Advertisement
Guest User

www

a guest
May 19th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 78.83 KB | None | 0 0
  1. public unsafe class Dialog
  2.     {
  3.         public bool Sent = false;
  4.         public static IniFile AvatarLinker = null;
  5.         public Client Client;
  6.         public List<MsgTaskDialog> Replies;
  7.         public Dialog(Client client)
  8.         {
  9.             Client = client;
  10.             Replies = new List<MsgTaskDialog>();
  11.         }
  12.         public Dialog Text(string text)
  13.         {
  14.             if (text.Length > 100)
  15.             {
  16.                 if (text.Length > 980)
  17.                     text = text.Substring(0, 980);
  18.                 int myLength = text.Length;
  19.                 while (myLength > 0)
  20.                 {
  21.                     int lastIndex = 100;
  22.                     if (myLength < 100)
  23.                         lastIndex = myLength;
  24.                     string txt = text.Substring(0, lastIndex);
  25.                     text = text.Substring(lastIndex, myLength - lastIndex);
  26.                     myLength -= lastIndex;
  27.                     Replies.Add(new MsgTaskDialog(MsgTaskDialog.Dialog, txt));
  28.                 }
  29.             }
  30.             else Replies.Add(new MsgTaskDialog(MsgTaskDialog.Dialog, text));
  31.             return this;
  32.         }
  33.         public Dialog Option(string text, byte id = 255)
  34.         {
  35.             Replies.Add(new MsgTaskDialog(MsgTaskDialog.Option, text) { OptionID = id });
  36.             return this;
  37.         }
  38.         public Dialog Avatar(uint npcMesh)
  39.         {
  40.             if (Replies.Count == 0)
  41.                 Replies.Add(new MsgTaskDialog(MsgTaskDialog.Avatar, "") { InputMaxLength = (byte)npcMesh });
  42.             else
  43.                 Replies[0].InputMaxLength = (byte)npcMesh;
  44.             return this;
  45.         }
  46.         public Dialog Input(string text, byte id, byte maxLength)
  47.         {
  48.             Replies.Add(new MsgTaskDialog(true)
  49.             {
  50.                 DontDisplay = true,
  51.                 InputMaxLength = maxLength,
  52.                 InteractType = MsgTaskDialog.Input,
  53.                 OptionID = id,
  54.                 Text = text
  55.             });
  56.             return this;
  57.         }
  58.         public Dialog Send()
  59.         {
  60.             foreach (MsgTaskDialog nr in Replies)
  61.                 Client.Send(nr);
  62.             Client.Send(new MsgTaskDialog(true) { InteractType = MsgTaskDialog.Finish, DontDisplay = false });
  63.             Replies.Clear();
  64.             Sent = true;
  65.             return this;
  66.         }
  67.         public static ISkill LearnableSpell(ushort spellid)
  68.         {
  69.             ISkill spell = new MsgMagicInfo(true);
  70.             spell.ID = spellid;
  71.             return spell;
  72.         }
  73.         public static ISkill LearnableSpell(ushort spellid, byte level)
  74.         {
  75.             ISkill spell = new MsgMagicInfo(true);
  76.             spell.ID = spellid;
  77.             spell.Level = level;
  78.             return spell;
  79.         }
  80.         public static bool InvalidCharacters(string Name)
  81.         {
  82.             if (Name.Length > 16)
  83.                 Name = Name.Substring(0, 16);
  84.             if (Name == "")
  85.                 return false;
  86.             foreach (Char c in Name)
  87.                 if (Elements.Kernel.InvalidCharacters.Contains(c) || (byte)c < 48)
  88.                     return true;
  89.             return true;
  90.         }
  91.         public static void GetDialog(MsgTaskDialog npcRequest, Client client, bool bypass = false)
  92.         {
  93.             if (!bypass)
  94.             {
  95.                 if (AvatarLinker == null)
  96.                     AvatarLinker = new IniFile("\\database\\npc.ini");
  97.                 Dialog dialog = new Dialog(client);
  98.                 npcRequest.Dialogs = dialog;
  99.                 if (!client.Map.Npcs.ContainsKey(client.ActiveNpc) || npcRequest == null || client == null || client.Entity == null || (npcRequest.NpcID == 0 && npcRequest.OptionID == 255)) return;
  100.                 if (client.Trade != null) if (client.Trade.InTrade) return;
  101.                 INpc npcs = null;
  102.                 if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npcs))
  103.                 {
  104.                     ushort avatar = (ushort)AvatarLinker.Readint16("NpcType" + (npcs.Mesh / 10), "SimpleObjID", 1);
  105.                     dialog.Avatar(avatar);
  106.                 }
  107.                 #region Invoke
  108.                 Action<MsgTaskDialog, Client> _invoker = TryGet(client.ActiveNpc) as Action<MsgTaskDialog, Client>;
  109.                 if (_invoker != null) _invoker.Invoke(npcRequest, client);
  110.                 #endregion
  111.                 if (!dialog.Sent)
  112.                     if (dialog.Replies.Count > 1)
  113.                         dialog.Send();
  114.             }
  115.         }
  116.  
  117.  
  118.         #region - Job Center -
  119.         #region - Warrior Skills -
  120.         public static string WarriorSkills(byte type, Client client)
  121.         {
  122.             switch (type)
  123.             {
  124.                 #region -- XPSkills --
  125.                 case 1:
  126.                     {
  127.                         ushort SkillID1 = 1015;
  128.                         ushort SkillID2 = 1020;
  129.                         ushort SkillID3 = 1025;
  130.                         string SkillName = "XPSkills";
  131.                         if (!client.Spells.ContainsKey(SkillID1) && !client.Spells.ContainsKey(SkillID2) && !client.Spells.ContainsKey(SkillID3)) return SkillName + "~(Available)~.";
  132.                         if (client.Spells.ContainsKey(SkillID1) && client.Spells.ContainsKey(SkillID2) && client.Spells.ContainsKey(SkillID3)) return SkillName + "~(Learned)~.";
  133.                         return "";
  134.                     }
  135.                 #endregion
  136.                 #region -- Dash --
  137.                 case 2:
  138.                     {
  139.                         ushort SkillID = 1051;
  140.                         string SkillName = "Dash";
  141.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  142.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  143.                         return "";
  144.                     }
  145.                 #endregion
  146.                 #region -- DefensiveStance --
  147.                 case 3:
  148.                     {
  149.                         ushort SkillID = 11160;
  150.                         string SkillName = "DefensiveStance";
  151.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  152.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  153.                         return "";
  154.                     }
  155.                 #endregion
  156.                 #region -- MagicDefender --
  157.                 case 4:
  158.                     {
  159.                         ushort SkillID = 11200;
  160.                         string SkillName = "MagicDefender";
  161.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  162.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  163.                         return "";
  164.                     }
  165.                 #endregion
  166.                 #region -- ChargingVortex --
  167.                 case 5:
  168.                     {
  169.                         ushort SkillID = 11190;
  170.                         string SkillName = "ChargingVortex";
  171.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  172.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  173.                         return "";
  174.                     }
  175.                 #endregion
  176.                 #region -- ScarOfEarth --
  177.                 case 6:
  178.                     {
  179.                         ushort SkillID = 12670;
  180.                         string SkillName = "ScarOfEarth";
  181.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  182.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  183.                         return "";
  184.                     }
  185.                 #endregion
  186.                 #region -- WaveOfBlood --
  187.                 case 7:
  188.                     {
  189.                         ushort SkillID = 12690;
  190.                         string SkillName = "WaveOfBlood";
  191.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  192.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  193.                         return "";
  194.                     }
  195.                 #endregion
  196.                 #region -- ManiacDance --
  197.                 case 8:
  198.                     {
  199.                         ushort SkillID = 12700;
  200.                         string SkillName = "ManiacDance";
  201.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  202.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  203.                         return "";
  204.                     }
  205.                 #endregion
  206.                 #region -- TwistOfWar --
  207.                 case 9:
  208.                     {
  209.                         ushort SkillID = 12660;
  210.                         string SkillName = "TwistOfWar";
  211.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  212.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  213.                         return "";
  214.                     }
  215.                 #endregion
  216.                 #region -- BackFire --
  217.                 case 10:
  218.                     {
  219.                         ushort SkillID = 12680;
  220.                         string SkillName = "BackFire";
  221.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  222.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  223.                         return "";
  224.                     }
  225.                 #endregion
  226.                 #region -- Pounce --
  227.                 case 11:
  228.                     {
  229.                         ushort SkillID = 12770;
  230.                         string SkillName = "Pounce";
  231.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  232.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  233.                         return "";
  234.                     }
  235.                 #endregion
  236.                 default: return "";
  237.             }
  238.         }
  239.         #endregion
  240.         #region - Archer Skills -
  241.         public static string ArcherSkills(byte type, Client client)
  242.         {
  243.             switch (type)
  244.             {
  245.                 #region -- XPSkill --
  246.                 case 1:
  247.                     {
  248.                         ushort SkillID = 8002;
  249.                         string SkillName = "XPSkill";
  250.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  251.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  252.                         return "";
  253.                     }
  254.                 #endregion
  255.                 #region -- Scatter --
  256.                 case 2:
  257.                     {
  258.                         ushort SkillID = 8001;
  259.                         string SkillName = "Scatter";
  260.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  261.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  262.                         return "";
  263.                     }
  264.                 #endregion
  265.                 #region -- RapidFire --
  266.                 case 3:
  267.                     {
  268.                         ushort SkillID = 8000;
  269.                         string SkillName = "RapidFire";
  270.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  271.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  272.                         return "";
  273.                     }
  274.                 #endregion
  275.                 #region -- Fly --
  276.                 case 4:
  277.                     {
  278.                         ushort SkillID = 8003;
  279.                         string SkillName = "Fly";
  280.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  281.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  282.                         return "";
  283.                     }
  284.                 #endregion
  285.                 #region -- Intensify --
  286.                 case 5:
  287.                     {
  288.                         ushort SkillID = 9000;
  289.                         string SkillName = "Intensify";
  290.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  291.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  292.                         return "";
  293.                     }
  294.                 #endregion
  295.                 #region -- ArrowRain --
  296.                 case 6:
  297.                     {
  298.                         ushort SkillID = 8030;
  299.                         string SkillName = "ArrowRain";
  300.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  301.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  302.                         return "";
  303.                     }
  304.                 #endregion
  305.                 #region -- AdvancedFly --
  306.                 case 7:
  307.                     {
  308.                         ushort SkillID = 8003;
  309.                         string SkillName = "AdvancedFly";
  310.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  311.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  312.                         return "";
  313.                     }
  314.                 #endregion
  315.                 #region -- PathOfShadow --
  316.                 case 8:
  317.                     {
  318.                         ushort SkillID = 11620;
  319.                         string SkillName = "PathOfShadow";
  320.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  321.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  322.                         return "";
  323.                     }
  324.                 #endregion
  325.                 #region -- BladeFlurry --
  326.                 case 9:
  327.                     {
  328.                         ushort SkillID = 11610;
  329.                         string SkillName = "BladeFlurry";
  330.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  331.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  332.                         return "";
  333.                     }
  334.                 #endregion
  335.                 #region -- MortalWound --
  336.                 case 10:
  337.                     {
  338.                         ushort SkillID = 11660;
  339.                         string SkillName = "MortalWound";
  340.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  341.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  342.                         return "";
  343.                     }
  344.                 #endregion
  345.                 #region -- KineticSpark --
  346.                 case 11:
  347.                     {
  348.                         ushort SkillID = 11590;
  349.                         string SkillName = "KineticSpark";
  350.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  351.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  352.                         return "";
  353.                     }
  354.                 #endregion
  355.                 #region -- BlisteringWave --
  356.                 case 12:
  357.                     {
  358.                         ushort SkillID = 11650;
  359.                         string SkillName = "BlisteringWave";
  360.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  361.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  362.                         return "";
  363.                     }
  364.                 #endregion
  365.                 #region -- SpiritFocus --
  366.                 case 13:
  367.                     {
  368.                         ushort SkillID = 11670;
  369.                         string SkillName = "SpiritFocus";
  370.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  371.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  372.                         return "";
  373.                     }
  374.                 #endregion
  375.                 #region -- DaggerStorm --
  376.                 case 14:
  377.                     {
  378.                         ushort SkillID = 11600;
  379.                         string SkillName = "DaggerStorm";
  380.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  381.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  382.                         return "";
  383.                     }
  384.                 #endregion
  385.                 default: return "";
  386.             }
  387.         }
  388.         #endregion
  389.         #region - Ninja Skills -
  390.         public static string NinjaSkills(byte type, Client client)
  391.         {
  392.             switch (type)
  393.             {
  394.                 #region -- TwofoldBlades --
  395.                 case 1:
  396.                     {
  397.                         ushort SkillID = 6000;
  398.                         string SkillName = "TwofoldBlades";
  399.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  400.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  401.                         return "";
  402.                     }
  403.                 #endregion
  404.                 #region -- ToxicFog --
  405.                 case 2:
  406.                     {
  407.                         ushort SkillID = 6001;
  408.                         string SkillName = "ToxicFog";
  409.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  410.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  411.                         return "";
  412.                     }
  413.                 #endregion
  414.                 #region -- PoisonStar --
  415.                 case 3:
  416.                     {
  417.                         ushort SkillID = 6002;
  418.                         string SkillName = "PoisonStar";
  419.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  420.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  421.                         return "";
  422.                     }
  423.                 #endregion
  424.                 #region -- CounterKill --
  425.                 case 4:
  426.                     {
  427.                         ushort SkillID = 6003;
  428.                         string SkillName = "CounterKill";
  429.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  430.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  431.                         return "";
  432.                     }
  433.                 #endregion
  434.                 #region -- ArcherBane --
  435.                 case 5:
  436.                     {
  437.                         ushort SkillID = 6004;
  438.                         string SkillName = "ArcherBane";
  439.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  440.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  441.                         return "";
  442.                     }
  443.                 #endregion
  444.                 #region -- Shuriken Vortex --
  445.                 case 6:
  446.                     {
  447.                         ushort SkillID = 6010;
  448.                         string SkillName = "Shuriken Vortex";
  449.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  450.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  451.                         return "";
  452.                     }
  453.                 #endregion
  454.                 #region -- FatalStrike --
  455.                 case 7:
  456.                     {
  457.                         ushort SkillID = 6011;
  458.                         string SkillName = "FatalStrike";
  459.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  460.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  461.                         return "";
  462.                     }
  463.                 #endregion
  464.                 #region -- BloodyScythe --
  465.                 case 8:
  466.                     {
  467.                         ushort SkillID = 11170;
  468.                         string SkillName = "BloodyScythe";
  469.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  470.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  471.                         return "";
  472.                     }
  473.                 #endregion
  474.                 #region -- MortalDrag --
  475.                 case 9:
  476.                     {
  477.                         ushort SkillID = 11180;
  478.                         string SkillName = "MortalDrag";
  479.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  480.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  481.                         return "";
  482.                     }
  483.                 #endregion
  484.                 #region -- GapingWounds --
  485.                 case 10:
  486.                     {
  487.                         ushort SkillID = 11230;
  488.                         string SkillName = "GapingWounds";
  489.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  490.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  491.                         return "";
  492.                     }
  493.                 #endregion
  494.                 #region -- TwilightDance --
  495.                 case 11:
  496.                     {
  497.                         ushort SkillID = 12070;
  498.                         string SkillName = "TwilightDance";
  499.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  500.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  501.                         return "";
  502.                     }
  503.                 #endregion
  504.                 #region -- ShadowClone --
  505.                 case 12:
  506.                     {
  507.                         ushort SkillID = 12090;
  508.                         string SkillName = "ShadowClone";
  509.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  510.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  511.                         return "";
  512.                     }
  513.                 #endregion
  514.                 #region -- SuperTwofoldBlade --
  515.                 case 13:
  516.                     {
  517.                         ushort SkillID = 12080;
  518.                         string SkillName = "SuperTwofoldBlade";
  519.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  520.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  521.                         return "";
  522.                     }
  523.                 #endregion
  524.                 #region -- FatalSpin --
  525.                 case 14:
  526.                     {
  527.                         ushort SkillID = 12110;
  528.                         string SkillName = "FatalSpin";
  529.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  530.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  531.                         return "";
  532.                     }
  533.                 #endregion
  534.                 default: return "";
  535.             }
  536.         }
  537.         #endregion
  538.         #region - Monk Skills -
  539.         public static string MonkSkills(byte type, Client client)
  540.         {
  541.             switch (type)
  542.             {
  543.                 #region -- TripleAttack --
  544.                 case 1:
  545.                     {
  546.                         ushort SkillID = 10490;
  547.                         string SkillName = "TripleAttack";
  548.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  549.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  550.                         return "";
  551.                     }
  552.                 #endregion
  553.                 #region -- OblivionXP --
  554.                 case 2:
  555.                     {
  556.                         ushort SkillID = 10390;
  557.                         string SkillName = "OblivionXP";
  558.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  559.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  560.                         return "";
  561.                     }
  562.                 #endregion
  563.                 #region -- WhirlwindKick --
  564.                 case 3:
  565.                     {
  566.                         ushort SkillID = 10415;
  567.                         string SkillName = "WhirlwindKick";
  568.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  569.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  570.                         return "";
  571.                     }
  572.                 #endregion
  573.                 #region -- RadiantPalm --
  574.                 case 4:
  575.                     {
  576.                         ushort SkillID = 10381;
  577.                         string SkillName = "RadiantPalm";
  578.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  579.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  580.                         return "";
  581.                     }
  582.                 #endregion
  583.                 #region -- Serenity --
  584.                 case 5:
  585.                     {
  586.                         ushort SkillID = 10400;
  587.                         string SkillName = "Serenity";
  588.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  589.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  590.                         return "";
  591.                     }
  592.                 #endregion
  593.                 #region -- Tranquility --
  594.                 case 6:
  595.                     {
  596.                         ushort SkillID = 10425;
  597.                         string SkillName = "Tranquility";
  598.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  599.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  600.                         return "";
  601.                     }
  602.                 #endregion
  603.                 #region -- Compassion --
  604.                 case 7:
  605.                     {
  606.                         ushort SkillID = 10430;
  607.                         string SkillName = "Compassion";
  608.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  609.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  610.                         return "";
  611.                     }
  612.                 #endregion
  613.                 #region -- TyrantAura --
  614.                 case 8:
  615.                     {
  616.                         ushort SkillID = 10395;
  617.                         string SkillName = "TyrantAura";
  618.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  619.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  620.                         return "";
  621.                     }
  622.                 #endregion
  623.                 #region -- FendAura --
  624.                 case 9:
  625.                     {
  626.                         ushort SkillID = 10410;
  627.                         string SkillName = "FendAura";
  628.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  629.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  630.                         return "";
  631.                     }
  632.                 #endregion
  633.                 #region -- MetalAura --
  634.                 case 10:
  635.                     {
  636.                         ushort SkillID = 10420;
  637.                         string SkillName = "MetalAura";
  638.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  639.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  640.                         return "";
  641.                     }
  642.                 #endregion
  643.                 #region -- WoodAura --
  644.                 case 11:
  645.                     {
  646.                         ushort SkillID = 10421;
  647.                         string SkillName = "WoodAura";
  648.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  649.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  650.                         return "";
  651.                     }
  652.                 #endregion
  653.                 #region -- WaterAura --
  654.                 case 12:
  655.                     {
  656.                         ushort SkillID = 10422;
  657.                         string SkillName = "WaterAura";
  658.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  659.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  660.                         return "";
  661.                     }
  662.                 #endregion
  663.                 #region -- FireAura --
  664.                 case 13:
  665.                     {
  666.                         ushort SkillID = 10423;
  667.                         string SkillName = "FireAura";
  668.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  669.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  670.                         return "";
  671.                     }
  672.                 #endregion
  673.                 #region -- EarthArua --
  674.                 case 14:
  675.                     {
  676.                         ushort SkillID = 10424;
  677.                         string SkillName = "EarthArua";
  678.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  679.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  680.                         return "";
  681.                     }
  682.                 #endregion
  683.                 #region -- WrathOfTheEmperor --
  684.                 case 15:
  685.                     {
  686.                         ushort SkillID = 12570;
  687.                         string SkillName = "WrathOfTheEmperor";
  688.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  689.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  690.                         return "";
  691.                     }
  692.                 #endregion
  693.                 #region -- GraceOfHeaven --
  694.                 case 16:
  695.                     {
  696.                         ushort SkillID = 12560;
  697.                         string SkillName = "GraceOfHeaven";
  698.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  699.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  700.                         return "";
  701.                     }
  702.                 #endregion
  703.                 #region -- InfernalEcho --
  704.                 case 17:
  705.                     {
  706.                         ushort SkillID = 12550;
  707.                         string SkillName = "InfernalEcho";
  708.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  709.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  710.                         return "";
  711.                     }
  712.                 #endregion
  713.                 default: return "";
  714.             }
  715.         }
  716.         #endregion
  717.         #region - Trojan Skills -
  718.         public static string TrojanSkills(byte type, Client client)
  719.         {
  720.             switch (type)
  721.             {
  722.                 #region -- XPSkills --
  723.                 case 1:
  724.                     {
  725.                         ushort SkillID1 = 1110;
  726.                         ushort SkillID2 = 1015;
  727.                         string SkillName = "XPSkills";
  728.                         if (!client.Spells.ContainsKey(SkillID1) && !client.Spells.ContainsKey(SkillID2)) return SkillName + "~(Available)~.";
  729.                         if (client.Spells.ContainsKey(SkillID1) && client.Spells.ContainsKey(SkillID2)) return SkillName + "~(Learned)~.";
  730.                         return "";
  731.                     }
  732.                 #endregion
  733.                 #region -- Hercules --
  734.                 case 2:
  735.                     {
  736.                         ushort SkillID = 1115;
  737.                         string SkillName = "Hercules";
  738.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  739.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  740.                         return "";
  741.                     }
  742.                 #endregion
  743.                 #region -- Golem --
  744.                 case 3:
  745.                     {
  746.                         ushort SkillID = 1270;
  747.                         string SkillName = "Golem";
  748.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  749.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  750.                         return "";
  751.                     }
  752.                 #endregion
  753.                 #region -- SpiritHealing --
  754.                 case 4:
  755.                     {
  756.                         ushort SkillID = 1190;
  757.                         string SkillName = "SpiritHealing";
  758.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  759.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  760.                         return "";
  761.                     }
  762.                 #endregion
  763.                 #region -- SuperCyclone --
  764.                 case 5:
  765.                     {
  766.                         ushort SkillID = 11970;
  767.                         string SkillName = "SuperCyclone";
  768.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  769.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  770.                         return "";
  771.                     }
  772.                 #endregion
  773.                 #region -- FatalCross --
  774.                 case 6:
  775.                     {
  776.                         ushort SkillID = 11980;
  777.                         string SkillName = "FatalCross";
  778.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  779.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  780.                         return "";
  781.                     }
  782.                 #endregion
  783.                 #region -- MortalStrike --
  784.                 case 7:
  785.                     {
  786.                         ushort SkillID = 11990;
  787.                         string SkillName = "MortalStrike";
  788.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  789.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  790.                         return "";
  791.                     }
  792.                 #endregion
  793.                 #region -- BreathFocus --
  794.                 case 8:
  795.                     {
  796.                         ushort SkillID = 11960;
  797.                         string SkillName = "BreathFocus";
  798.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  799.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  800.                         return "";
  801.                     }
  802.                 #endregion
  803.                 default: return "";
  804.             }
  805.         }
  806.         #endregion
  807.         #region - Taiost Skills -
  808.         public static string TaiostSkills(byte type, Client client)
  809.         {
  810.             switch (type)
  811.             {
  812.                 #region -- Thunder --
  813.                 case 1:
  814.                     {
  815.                         ushort SkillID = 1000;
  816.                         string SkillName = "Thunder";
  817.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  818.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  819.                         return "";
  820.                     }
  821.                 #endregion
  822.                 #region -- Fire --
  823.                 case 2:
  824.                     {
  825.                         ushort SkillID = 1001;
  826.                         string SkillName = "Fire";
  827.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  828.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  829.                         return "";
  830.                     }
  831.                 #endregion
  832.                 #region -- Cure --
  833.                 case 3:
  834.                     {
  835.                         ushort SkillID = 1005;
  836.                         string SkillName = "Cure";
  837.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  838.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  839.                         return "";
  840.                     }
  841.                 #endregion
  842.                 #region -- Meditation --
  843.                 case 4:
  844.                     {
  845.                         ushort SkillID = 1195;
  846.                         string SkillName = "Meditation";
  847.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  848.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  849.                         return "";
  850.                     }
  851.                 #endregion
  852.                 #region -- HealingRain --
  853.                 case 5:
  854.                     {
  855.                         ushort SkillID = 1055;
  856.                         string SkillName = "HealingRain";
  857.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  858.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  859.                         return "";
  860.                     }
  861.                 #endregion
  862.                 #region -- Invisibility --
  863.                 case 6:
  864.                     {
  865.                         ushort SkillID = 1075;
  866.                         string SkillName = "Invisibility";
  867.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  868.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  869.                         return "";
  870.                     }
  871.                 #endregion
  872.                 #region -- StarOfAccuracy --
  873.                 case 7:
  874.                     {
  875.                         ushort SkillID = 1085;
  876.                         string SkillName = "StarOfAccuracy";
  877.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  878.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  879.                         return "";
  880.                     }
  881.                 #endregion
  882.                 #region -- MagicShield --
  883.                 case 8:
  884.                     {
  885.                         ushort SkillID = 1090;
  886.                         string SkillName = "MagicShield";
  887.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  888.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  889.                         return "";
  890.                     }
  891.                 #endregion
  892.                 #region -- Stigma --
  893.                 case 9:
  894.                     {
  895.                         ushort SkillID = 1095;
  896.                         string SkillName = "Stigma";
  897.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  898.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  899.                         return "";
  900.                     }
  901.                 #endregion
  902.                 #region -- Pray --
  903.                 case 10:
  904.                     {
  905.                         ushort SkillID = 1100;
  906.                         string SkillName = "Pray";
  907.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  908.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  909.                         return "";
  910.                     }
  911.                 #endregion
  912.                 #region -- AdvancedCure --
  913.                 case 11:
  914.                     {
  915.                         ushort SkillID = 1175;
  916.                         string SkillName = "AdvancedCure";
  917.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  918.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  919.                         return "";
  920.                     }
  921.                 #endregion
  922.                 #region -- Nectar --
  923.                 case 12:
  924.                     {
  925.                         ushort SkillID = 1170;
  926.                         string SkillName = "Nectar";
  927.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  928.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  929.                         return "";
  930.                     }
  931.                 #endregion
  932.                 #region -- Volcano --
  933.                 case 13:
  934.                     {
  935.                         ushort SkillID = 1125;
  936.                         string SkillName = "Volcano";
  937.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  938.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  939.                         return "";
  940.                     }
  941.                 #endregion
  942.                 #region -- Lightning --
  943.                 case 14:
  944.                     {
  945.                         ushort SkillID = 1010;
  946.                         string SkillName = "Lightning";
  947.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  948.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  949.                         return "";
  950.                     }
  951.                 #endregion
  952.                 #region -- Revive --
  953.                 case 15:
  954.                     {
  955.                         ushort SkillID = 1050;
  956.                         string SkillName = "Revive";
  957.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  958.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  959.                         return "";
  960.                     }
  961.                 #endregion
  962.                 #region -- ChainBolt --
  963.                 case 16:
  964.                     {
  965.                         ushort SkillID = 10309;
  966.                         string SkillName = "ChainBolt";
  967.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  968.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  969.                         return "";
  970.                     }
  971.                 #endregion
  972.                 #region -- AzureShield --
  973.                 case 17:
  974.                     {
  975.                         ushort SkillID = 30000;
  976.                         string SkillName = "AzureShield";
  977.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  978.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  979.                         return "";
  980.                     }
  981.                 #endregion
  982.                 #region -- AuroraLotus --
  983.                 case 18:
  984.                     {
  985.                         ushort SkillID = 12370;
  986.                         string SkillName = "AuroraLotus";
  987.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  988.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  989.                         return "";
  990.                     }
  991.                 #endregion
  992.                 #region -- BlessingTouch --
  993.                 case 19:
  994.                     {
  995.                         ushort SkillID = 12390;
  996.                         string SkillName = "BlessingTouch";
  997.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  998.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  999.                         return "";
  1000.                     }
  1001.                 #endregion
  1002.                 #region -- FireRing --
  1003.                 case 20:
  1004.                     {
  1005.                         ushort SkillID = 1150;
  1006.                         string SkillName = "FireRing";
  1007.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1008.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1009.                         return "";
  1010.                     }
  1011.                 #endregion
  1012.                 #region -- FireMeteor --
  1013.                 case 21:
  1014.                     {
  1015.                         ushort SkillID = 1180;
  1016.                         string SkillName = "FireMeteor";
  1017.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1018.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1019.                         return "";
  1020.                     }
  1021.                 #endregion
  1022.                 #region -- FireCircle --
  1023.                 case 22:
  1024.                     {
  1025.                         ushort SkillID = 1120;
  1026.                         string SkillName = "FireCircle";
  1027.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1028.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1029.                         return "";
  1030.                     }
  1031.                 #endregion
  1032.                 #region -- Bomb --
  1033.                 case 23:
  1034.                     {
  1035.                         ushort SkillID = 1160;
  1036.                         string SkillName = "Bomb";
  1037.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1038.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1039.                         return "";
  1040.                     }
  1041.                 #endregion
  1042.                 #region -- FireOfHell --
  1043.                 case 24:
  1044.                     {
  1045.                         ushort SkillID = 1165;
  1046.                         string SkillName = "FireOfHell";
  1047.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1048.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1049.                         return "";
  1050.                     }
  1051.                 #endregion
  1052.                 #region -- Tornado --
  1053.                 case 25:
  1054.                     {
  1055.                         ushort SkillID = 1002;
  1056.                         string SkillName = "Tornado";
  1057.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1058.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1059.                         return "";
  1060.                     }
  1061.                 #endregion
  1062.                 #region -- Volcano --
  1063.                 case 26:
  1064.                     {
  1065.                         ushort SkillID = 1125;
  1066.                         string SkillName = "Volcano";
  1067.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1068.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1069.                         return "";
  1070.                     }
  1071.                 #endregion
  1072.                 #region -- Lightning --
  1073.                 case 27:
  1074.                     {
  1075.                         ushort SkillID = 1010;
  1076.                         string SkillName = "Lightning";
  1077.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1078.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1079.                         return "";
  1080.                     }
  1081.                 #endregion
  1082.                 #region -- SpeedLightning --
  1083.                 case 28:
  1084.                     {
  1085.                         ushort SkillID = 5001;
  1086.                         string SkillName = "SpeedLightning";
  1087.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1088.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1089.                         return "";
  1090.                     }
  1091.                 #endregion
  1092.                 #region -- ChainBolt --
  1093.                 case 29:
  1094.                     {
  1095.                         ushort SkillID = 10309;
  1096.                         string SkillName = "ChainBolt";
  1097.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1098.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1099.                         return "";
  1100.                     }
  1101.                 #endregion
  1102.                 #region -- HeavenBlade --
  1103.                 case 30:
  1104.                     {
  1105.                         ushort SkillID = 10310;
  1106.                         string SkillName = "HeavenBlade";
  1107.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1108.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1109.                         return "";
  1110.                     }
  1111.                 #endregion
  1112.                 #region -- FlameLotus --
  1113.                 case 31:
  1114.                     {
  1115.                         ushort SkillID = 12380;
  1116.                         string SkillName = "FlameLotus";
  1117.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1118.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1119.                         return "";
  1120.                     }
  1121.                 #endregion
  1122.                 #region -- SearingTouch --
  1123.                 case 32:
  1124.                     {
  1125.                         ushort SkillID = 12400;
  1126.                         string SkillName = "SearingTouch";
  1127.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1128.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1129.                         return "";
  1130.                     }
  1131.                 #endregion
  1132.                 default: return "";
  1133.             }
  1134.         }
  1135.         #endregion
  1136.         #region - Pirate Skills -
  1137.         public static string PirateSkills(byte type, Client client)
  1138.         {
  1139.             switch (type)
  1140.             {
  1141.                 #region -- BladeTempest --
  1142.                 case 1:
  1143.                     {
  1144.                         ushort SkillID = 11110;
  1145.                         string SkillName = "BladeTempest";
  1146.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1147.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1148.                         return "";
  1149.                     }
  1150.                 #endregion
  1151.                 #region -- ScurvyBomb --
  1152.                 case 2:
  1153.                     {
  1154.                         ushort SkillID = 11040;
  1155.                         string SkillName = "ScurvyBomb";
  1156.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1157.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1158.                         return "";
  1159.                     }
  1160.                 #endregion
  1161.                 #region -- CannonBarrage --
  1162.                 case 3:
  1163.                     {
  1164.                         ushort SkillID = 11050;
  1165.                         string SkillName = "CannonBarrage";
  1166.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1167.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1168.                         return "";
  1169.                     }
  1170.                 #endregion
  1171.                 #region -- Blackbeard`sRage --
  1172.                 case 4:
  1173.                     {
  1174.                         ushort SkillID = 11060;
  1175.                         string SkillName = "Blackbeard`sRage";
  1176.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1177.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1178.                         return "";
  1179.                     }
  1180.                 #endregion
  1181.                 #region -- GaleBomb --
  1182.                 case 5:
  1183.                     {
  1184.                         ushort SkillID = 11070;
  1185.                         string SkillName = "GaleBomb";
  1186.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1187.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1188.                         return "";
  1189.                     }
  1190.                 #endregion
  1191.                 #region -- Kraken`sRevenge --
  1192.                 case 6:
  1193.                     {
  1194.                         ushort SkillID = 11100;
  1195.                         string SkillName = "Kraken`sRevenge";
  1196.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1197.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1198.                         return "";
  1199.                     }
  1200.                 #endregion
  1201.                 #region -- BlackSpot --
  1202.                 case 7:
  1203.                     {
  1204.                         ushort SkillID = 11120;
  1205.                         string SkillName = "BlackSpot";
  1206.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1207.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1208.                         return "";
  1209.                     }
  1210.                 #endregion
  1211.                 #region -- AdrenalineRush --
  1212.                 case 8:
  1213.                     {
  1214.                         ushort SkillID = 11130;
  1215.                         string SkillName = "AdrenalineRush";
  1216.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1217.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1218.                         return "";
  1219.                     }
  1220.                 #endregion
  1221.                 #region -- EagleEye --
  1222.                 case 9:
  1223.                     {
  1224.                         ushort SkillID = 11030;
  1225.                         string SkillName = "EagleEye";
  1226.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1227.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1228.                         return "";
  1229.                     }
  1230.                 #endregion
  1231.                 #region -- Windstorm --
  1232.                 case 10:
  1233.                     {
  1234.                         ushort SkillID = 11140;
  1235.                         string SkillName = "Windstorm";
  1236.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1237.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1238.                         return "";
  1239.                     }
  1240.                 #endregion
  1241.                 #region -- WoodAura --
  1242.                 case 11:
  1243.                     {
  1244.                         ushort SkillID = 10421;
  1245.                         string SkillName = "WoodAura";
  1246.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1247.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1248.                         return "";
  1249.                     }
  1250.                 #endregion
  1251.                 #region -- WaterAura --
  1252.                 case 12:
  1253.                     {
  1254.                         ushort SkillID = 10422;
  1255.                         string SkillName = "WaterAura";
  1256.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1257.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1258.                         return "";
  1259.                     }
  1260.                 #endregion
  1261.                 #region -- FireAura --
  1262.                 case 13:
  1263.                     {
  1264.                         ushort SkillID = 10423;
  1265.                         string SkillName = "FireAura";
  1266.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1267.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1268.                         return "";
  1269.                     }
  1270.                 #endregion
  1271.                 #region -- EarthAura --
  1272.                 case 14:
  1273.                     {
  1274.                         ushort SkillID = 10424;
  1275.                         string SkillName = "EarthAura";
  1276.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1277.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1278.                         return "";
  1279.                     }
  1280.                 #endregion
  1281.                 default: return "";
  1282.             }
  1283.         }
  1284.         #endregion
  1285.         #region - DragonWarrior Skills -
  1286.         public static string DragonWarriorSkills(byte type, Client client)
  1287.         {
  1288.             switch (type)
  1289.             {
  1290.                 #region -- DragonPunch --
  1291.                 case 1:
  1292.                     {
  1293.                         ushort SkillID1 = 12240;
  1294.                         ushort SkillID2 = 12220;
  1295.                         ushort SkillID3 = 12210;
  1296.                         string SkillName = "DragonPunch";
  1297.                         if (!client.Spells.ContainsKey(SkillID1) && !client.Spells.ContainsKey(SkillID2) && !client.Spells.ContainsKey(SkillID3)) return SkillName + "~(Available)~.";
  1298.                         if (client.Spells.ContainsKey(SkillID1) && client.Spells.ContainsKey(SkillID2) && client.Spells.ContainsKey(SkillID3)) return SkillName + "~(Learned)~.";
  1299.                         return "";
  1300.                     }
  1301.                 #endregion
  1302.                 #region -- DragonCyclone --
  1303.                 case 2:
  1304.                     {
  1305.                         ushort SkillID = 12290;
  1306.                         string SkillName = "DragonCyclone";
  1307.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1308.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1309.                         return "";
  1310.                     }
  1311.                 #endregion
  1312.                 #region -- AirKick --
  1313.                 case 3:
  1314.                     {
  1315.                         ushort SkillID1 = 12320;
  1316.                         ushort SkillID2 = 12330;
  1317.                         ushort SkillID3 = 12340;
  1318.                         string SkillName = "AirKick";
  1319.                         if (!client.Spells.ContainsKey(SkillID1) && !client.Spells.ContainsKey(SkillID2) && !client.Spells.ContainsKey(SkillID3)) return SkillName + "~(Available)~.";
  1320.                         if (client.Spells.ContainsKey(SkillID1) && client.Spells.ContainsKey(SkillID2) && client.Spells.ContainsKey(SkillID3)) return SkillName + "~(Learned)~.";
  1321.                         return "";
  1322.                     }
  1323.                 #endregion
  1324.                 #region -- DragonFlow --
  1325.                 case 4:
  1326.                     {
  1327.                         ushort SkillID = 12270;
  1328.                         string SkillName = "DragonFlow";
  1329.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1330.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1331.                         return "";
  1332.                     }
  1333.                 #endregion
  1334.                 #region -- SpeedKick --
  1335.                 case 5:
  1336.                     {
  1337.                         ushort SkillID1 = 12120;
  1338.                         ushort SkillID2 = 12130;
  1339.                         ushort SkillID3 = 12140;
  1340.                         string SkillName = "SpeedKick";
  1341.                         if (!client.Spells.ContainsKey(SkillID1) && !client.Spells.ContainsKey(SkillID2) && !client.Spells.ContainsKey(SkillID3)) return SkillName + "~(Available)~.";
  1342.                         if (client.Spells.ContainsKey(SkillID1) && client.Spells.ContainsKey(SkillID2) && client.Spells.ContainsKey(SkillID3)) return SkillName + "~(Learned)~.";
  1343.                         return "";
  1344.                     }
  1345.                 #endregion
  1346.                 #region -- CrackingSwipe --
  1347.                 case 6:
  1348.                     {
  1349.                         ushort SkillID = 12160;
  1350.                         string SkillName = "CrackingSwipe";
  1351.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1352.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1353.                         return "";
  1354.                     }
  1355.                 #endregion
  1356.                 #region -- SplittingSwipe --
  1357.                 case 7:
  1358.                     {
  1359.                         ushort SkillID = 12170;
  1360.                         string SkillName = "SplittingSwipe";
  1361.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1362.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1363.                         return "";
  1364.                     }
  1365.                 #endregion
  1366.                 #region -- DragonSlash --
  1367.                 case 8:
  1368.                     {
  1369.                         ushort SkillID = 12350;
  1370.                         string SkillName = "DragonSlash";
  1371.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1372.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1373.                         return "";
  1374.                     }
  1375.                 #endregion
  1376.                 #region -- DragonRoar --
  1377.                 case 9:
  1378.                     {
  1379.                         ushort SkillID = 12280;
  1380.                         string SkillName = "DragonRoar";
  1381.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1382.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1383.                         return "";
  1384.                     }
  1385.                 #endregion
  1386.                 #region -- DragonSwing --
  1387.                 case 10:
  1388.                     {
  1389.                         ushort SkillID = 12200;
  1390.                         string SkillName = "DragonSwing";
  1391.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1392.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1393.                         return "";
  1394.                     }
  1395.                 #endregion
  1396.                 #region -- DragonFury --
  1397.                 case 11:
  1398.                     {
  1399.                         ushort SkillID = 12300;
  1400.                         string SkillName = "DragonFury";
  1401.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1402.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1403.                         return "";
  1404.                     }
  1405.                 #endregion
  1406.                 #region -- BreathFocus --
  1407.                 case 12:
  1408.                     {
  1409.                         ushort SkillID = 11960;
  1410.                         string SkillName = "BreathFocus";
  1411.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1412.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1413.                         return "";
  1414.                     }
  1415.                 #endregion
  1416.                 default: return "";
  1417.             }
  1418.         }
  1419.         #endregion
  1420.         #region - WindWalker Skills -
  1421.         public static string WindWalkerSkills(byte type, Client client)
  1422.         {
  1423.             switch (type)
  1424.             {
  1425.                 #region -- Omnipotence --
  1426.                 case 1:
  1427.                     {
  1428.                         ushort SkillID = 12860;
  1429.                         string SkillName = "Omnipotence";
  1430.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1431.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1432.                         return "";
  1433.                     }
  1434.                 #endregion
  1435.                 #region -- JusticeChant --
  1436.                 case 2:
  1437.                     {
  1438.                         ushort SkillID = 12870;
  1439.                         string SkillName = "JusticeChant";
  1440.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1441.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1442.                         return "";
  1443.                     }
  1444.                 #endregion
  1445.                 #region -- SwirlingStorm --
  1446.                 case 3:
  1447.                     {
  1448.                         ushort SkillID = 12890;
  1449.                         string SkillName = "SwirlingStorm";
  1450.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1451.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1452.                         return "";
  1453.                     }
  1454.                 #endregion
  1455.                 #region -- ShadowOfChaser --
  1456.                 case 4:
  1457.                     {
  1458.                         ushort SkillID = 13090;
  1459.                         string SkillName = "ShadowOfChaser";
  1460.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1461.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1462.                         return "";
  1463.                     }
  1464.                 #endregion
  1465.                 #region -- TripleBlasts --
  1466.                 case 5:
  1467.                     {
  1468.                         ushort SkillID = 12850;
  1469.                         string SkillName = "TripleBlasts";
  1470.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1471.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1472.                         return "";
  1473.                     }
  1474.                 #endregion
  1475.                 #region -- ThunderBolt --
  1476.                 case 6:
  1477.                     {
  1478.                         ushort SkillID = 12970;
  1479.                         string SkillName = "ThunderBolt";
  1480.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1481.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1482.                         return "";
  1483.                     }
  1484.                 #endregion
  1485.                 #region -- AngerOfStomper --
  1486.                 case 7:
  1487.                     {
  1488.                         ushort SkillID = 12980;
  1489.                         string SkillName = "AngerOfStomper";
  1490.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1491.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1492.                         return "";
  1493.                     }
  1494.                 #endregion
  1495.                 #region -- BurntFrost --
  1496.                 case 8:
  1497.                     {
  1498.                         ushort SkillID = 12940;
  1499.                         string SkillName = "BurntFrost";
  1500.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1501.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1502.                         return "";
  1503.                     }
  1504.                 #endregion
  1505.                 #region -- HealingSnow --
  1506.                 case 9:
  1507.                     {
  1508.                         ushort SkillID = 12950;
  1509.                         string SkillName = "HealingSnow";
  1510.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1511.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1512.                         return "";
  1513.                     }
  1514.                 #endregion
  1515.                 #region -- RageOfWar --
  1516.                 case 10:
  1517.                     {
  1518.                         ushort SkillID = 12930;
  1519.                         string SkillName = "RageOfWar";
  1520.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1521.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1522.                         return "";
  1523.                     }
  1524.                 #endregion
  1525.                 #region -- HorrorOfStomper --
  1526.                 case 11:
  1527.                     {
  1528.                         ushort SkillID = 12990;
  1529.                         string SkillName = "HorrorOfStomper";
  1530.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1531.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1532.                         return "";
  1533.                     }
  1534.                 #endregion
  1535.                 #region -- ChillingSnow --
  1536.                 case 12:
  1537.                     {
  1538.                         ushort SkillID = 12960;
  1539.                         string SkillName = "ChillingSnow";
  1540.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1541.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1542.                         return "";
  1543.                     }
  1544.                 #endregion
  1545.                 #region -- PeaceOfStomper --
  1546.                 case 13:
  1547.                     {
  1548.                         ushort SkillID = 13000;
  1549.                         string SkillName = "PeaceOfStomper";
  1550.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1551.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1552.                         return "";
  1553.                     }
  1554.                 #endregion
  1555.                 #region -- RevengeTail --
  1556.                 case 14:
  1557.                     {
  1558.                         ushort SkillID = 13030;
  1559.                         string SkillName = "RevengeTail";
  1560.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1561.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1562.                         return "";
  1563.                     }
  1564.                 #endregion
  1565.                 #region -- FreezingPelter --
  1566.                 case 15:
  1567.                     {
  1568.                         ushort SkillID = 13020;
  1569.                         string SkillName = "FreezingPelter";
  1570.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1571.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1572.                         return "";
  1573.                     }
  1574.                 #endregion
  1575.                 #region -- Frost Gaze --
  1576.                 case 16:
  1577.                     {
  1578.                         if (client.Entity.Class >= 160 && client.Entity.Class <= 165 && client.Entity.Reborn == 0)
  1579.                         {
  1580.                             ushort SkillID1 = 12830;
  1581.                             string SkillName1 = "Frost Gaze I";
  1582.                             if (!client.Spells.ContainsKey(SkillID1)) return SkillName1 + "~(Available)~.";
  1583.                             if (client.Spells.ContainsKey(SkillID1)) return SkillName1 + "~(Learned)~.";
  1584.                         }
  1585.                         else if (client.Entity.FirstRebornClass == 165 && client.Entity.Class >= 160 && client.Entity.Class <= 165 && client.Entity.Reborn == 1)
  1586.                         {
  1587.                             ushort SkillID2 = 12830;
  1588.                             string SkillName2 = "Frost Gaze II";
  1589.                             if (!client.Spells.ContainsKey(SkillID2)) return SkillName2 + "~(Available)~.";
  1590.                             if (client.Spells.ContainsKey(SkillID2)) return SkillName2 + "~(Learned)~.";
  1591.                         }
  1592.                         else if (client.Entity.FirstRebornClass == 165 && client.Entity.SecondRebornClass == 165 && client.Entity.Class >= 160 && client.Entity.Class <= 165 && client.Entity.Reborn == 2)
  1593.                         {
  1594.                             ushort SkillID3 = 12830;
  1595.                             string SkillName3 = "Frost Gaze III";
  1596.                             if (!client.Spells.ContainsKey(SkillID3)) return SkillName3 + "~(Available)~.";
  1597.                             if (client.Spells.ContainsKey(SkillID3)) return SkillName3 + "~(Learned)~.";
  1598.                         }
  1599.                         return "";
  1600.                     }
  1601.                 #endregion
  1602.                 default: return "";
  1603.             }
  1604.         }
  1605.         #endregion
  1606.         #region - Mount Skills -
  1607.         public static string MountSkills(byte type, Client client)
  1608.         {
  1609.             switch (type)
  1610.             {
  1611.                 #region -- Riding --
  1612.                 case 1:
  1613.                     {
  1614.                         ushort SkillID = 7001;
  1615.                         string SkillName = "Riding";
  1616.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1617.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1618.                         return "";
  1619.                     }
  1620.                 #endregion
  1621.                 #region -- Spook --
  1622.                 case 2:
  1623.                     {
  1624.                         ushort SkillID = 7002;
  1625.                         string SkillName = "Spook";
  1626.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1627.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1628.                         return "";
  1629.                     }
  1630.                 #endregion
  1631.                 #region -- WarCry --
  1632.                 case 3:
  1633.                     {
  1634.                         ushort SkillID = 7003;
  1635.                         string SkillName = "WarCry";
  1636.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1637.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1638.                         return "";
  1639.                     }
  1640.                 #endregion
  1641.                 #region -- ChargingVortex --
  1642.                 case 4:
  1643.                     {
  1644.                         ushort SkillID = 11190;
  1645.                         string SkillName = "ChargingVortex";
  1646.                         if (!client.Spells.ContainsKey(SkillID)) return SkillName + "~(Available)~.";
  1647.                         if (client.Spells.ContainsKey(SkillID)) return SkillName + "~(Learned)~.";
  1648.                         return "";
  1649.                     }
  1650.                 #endregion
  1651.                 default: return "";
  1652.             }
  1653.         }
  1654.         #endregion
  1655.         #endregion
  1656.  
  1657.         private static RedBlackTree<uint, Delegate> _Tree;
  1658.         public static void LoadAllNpcs()
  1659.         {
  1660.             Console.Write("\t Loading NpcAttribute ... ");
  1661.             _Tree = new RedBlackTree<uint, Delegate>();
  1662.             var methods = Assembly.GetCallingAssembly().GetTypes()
  1663.                      .SelectMany(t => t.GetMethods())
  1664.                      .Where(m => m.GetCustomAttributes(typeof(NpcAttribute), false).Length > 0)
  1665.                      .ToArray();
  1666.             int count = 0;
  1667.             foreach (var i in methods)
  1668.             {
  1669.                 foreach (var npcatt in i.GetCustomAttributes(false))
  1670.                 {
  1671.                     Console.Write("\b{0}", Loading.NextChar());
  1672.                     NpcAttribute Att = npcatt as NpcAttribute;
  1673.                     if (Att != null)
  1674.                     {
  1675.                         Delegate _Action;
  1676.                         _Action = Delegate.CreateDelegate(typeof(Action<MsgTaskDialog, Client>), null, i);
  1677.                         if (!_Tree.TryAppend((uint)Att.Type, _Action))
  1678.                         {
  1679.                             Delegate source = _Tree.TryGetValue((uint)Att.Type);
  1680.                             source = Delegate.Combine(source as Delegate, _Action as Delegate);
  1681.                             _Tree.AppendOrUpdate((uint)Att.Type, source);
  1682.                         }
  1683.                         count++;
  1684.                     }
  1685.                 }
  1686.             }
  1687.             var gc = new Client(null);
  1688.             gc.Account = null;
  1689.             gc.Entity = new Entity(EntityFlag.Player, false) { Name = "NONE" };
  1690.             NpcServer.Dialog.GetDialog(new MsgTaskDialog(true), gc, true);
  1691.             Console.WriteLine("\b Ok!");
  1692.         }
  1693.         public static Delegate TryGet(uint index)
  1694.         {
  1695.             { return _Tree.TryGetValue(index); }
  1696.         }
  1697.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement