Order / Chaos API

The following are the classes and documentation you will need to build O/C game systems and submit them to Alexandria for addition to the game. All methods / variables are public unless stated otherwise.

The Shrine of Virtues game is a stand-alone system that makes use of the following.

Happy Coding :)

namespace Server.Engines.ChaosOrder

static class PVPHelper

  • static int OrderHue = 1150
  • static int ChaosHue = 1608
  • static void OrderChaosRegionBroadcast(Region r, string BCString)
  • static void OrderChaosGlobalBroadcast(string BCString)
  • static bool MobIsChaos(Mobile m)
  • static bool MobIsOrder(Mobile m)
  • static bool MobIsChaosOrOrder(Mobile m)
  • static bool MobsAreChaosAndOrder(Mobile m1, Mobile m2)
  • static bool MobOpposes(Mobile m, GuildType gt)
  • static bool MobIsAlliedWith(Mobile m, GuildType gt)

static class ChaosOrder

  • static bool CheckRestriction(object obj, Mobile form) - checks for IChaosOrderRestricted interface & tests against it.
  • static void GetProperties(object obj, ObjectPropertyList list) - calls the next 2 functions in order
  • static void GetGuildTypeProperty(object obj, ObjectPropertyList list)
  • static void GetRankProperty(object obj, ObjectPropertyList list)

class OrderChaosStatistics

  • static List<OCPlayerStats> StatData { get; }
  • static List<OCPlayerStats> GetCustomSortedData(StatSortType orderedBy)
  • enum StatSortType { AlphaByName, AlphaByGuild, NumericByPoints, NumericByKills, NumericByRank, TypedByGuild }

class OCPlayerStats only contains getter properties

  • PlayerMobile Player
  • string PlayerName
  • int Kills
  • double Points
  • string GuildName
  • GuildType TypeOfGuild
  • PVPRank Rank
  • string RankName

class PvpBonusRegions

  • static void AddZone(int x, int y, int w, int h, Map m, double factor, string name)
  • static void AddZone(Point2D p1, Point2D p2, Map m, double factor, string name)
  • static void AddZone(Rectangle2D rect, Map m, double factor, string name)
  • static double GetFactor(Mobile m)

namespace Server.Items

interface IChaosOrderRestricted

  • PVPRank MinimumRank { get; set; }
  • GuildType GuildTypeRestriction { get; set; }

interface IOwnerRestricted

  • Mobile Owner { get; set; }

namespace Server.Mobiles

enum PVPRank (values correspond to rank breakpoints)

  • None = 0
  • Recruit = 600
  • Slinger = 4800
  • ShieldBearer = 16200
  • FootSoldier = 38400
  • Infantry = 75000
  • Warrior = 129600
  • Herald = 205800
  • Centurion = 307200
  • Officer = 437400
  • General = 600000
  • Prefect = 798600
  • Warlord = 1036800
  • GrandWarlord = 1318200
  • Deathbringer = 1646400
  • Ascendant = 2025000

class PVPRankings : BasePointSystem – non-static members are accessed via PointSystems.PVP

  • static int MinDamageForPoints = 20
  • static PVPRank GetAccurateRank(PlayerMobile pm) — based on points
  • static PVPRank GetCurrentRank(PlayerMobile pm) — based ranking (in case they haven’t visted the warmaster yet)
  • static string GetRankName(PVPRank rank)
  • static string GetRankName(PlayerMobile pm) : (pm, false)
  • static string GetRankName(PlayerMobile pm, bool update)
  • static void GetProgressInfo(PlayerMobile pm, ref int Points, ref int CurrentRankPoints, ref int NextRankPoints)
  • static PVPRank GetNextRank(PVPRank r)
  • Dictionary<PlayerMobile, int> GetPointTable()
  • bool AwardPoints(PlayerMobile player, double pts)
  • bool RemovePoints(PlayerMobile player, double pts[, bool Exact = false])
  • bool SetPoints(PlayerMobile player, double pts[, bool Create = true [, bool AdjustRank = false ]])
  • PointSystemType SysType, property, returns PST.PvpRankingSystem
  • int GetNumericRank(PVPRank r)
  • double GetPoints(PlayerMobile player)
  • most of the following is handled by the system:
  • double TryRegisterKills(Mobile victim) – called on any death event, in turn calls RegisterKills(…) if the system handles that kill situation
  • double RegisterKills(Mobile victim, int numDamagers)
  • bool IsOpposition(Mobile first, Mobile second) – i know, redundant from PVPHelper
  • double GetPointsAwarded(Mobile killer, Mobile victim)

PlayerMobile convenience accessor:

  • double CombatExperience { get, set } – alias for PointSystems.PVP.Get/SetPoints