public static void Mine(Client.GameState client) { if (client.Equipment.Free(4)) { client.Mining = false; return; } var item = client.Equipment.TryGetItem(4); var info = Database.ConquerItemInformation.BaseInformations[item.ID]; Data data = new Data(true); data.ID = Data.SwingPickaxe; data.UID = client.Entity.UID; client.SendScreen(data, true); if (info == null) { client.Mining = false; return; } if (info.Name != "PickAxe" && info.Name != "Hoe") { client.Mining = false; return; } if (!ServerBase.Kernel.Rate(40)) { return; } switch (client.Entity.MapID) { case 1218://meteor zone mine case 6001://jail war mine case 6000://jails { Mine(700001, 700011, 700031, 700041, 1072010, 1072020, 1072050, 0, client); break; } case 1025://phoenixcity minecave case 1028://twincity minecave { Mine(700011, 700001, 700021, 700071, 1072010, 1072050, 1072031, 0, client); break; } case 1027://DesertMine case 1026://ApeMine { Mine(700051, 700061, 0, 0, 1072010, 1072020, 1072040, 1072050, client); break; } default: { client.Send(new Message("You cannot mine here. You must go inside a mine.", System.Drawing.Color.Red, Message.TopLeft)); client.Mining = false; break; } } }
public static void DeleteNPC2(uint identifier) { PhoenixProject.Interfaces.INpc npc; if (ServerBase.Kernel.Maps[1002].Npcs.TryGetValue(identifier, out npc)) { ServerBase.Kernel.Maps[1002].Npcs.Remove(npc.UID); ServerBase.Kernel.Maps[1002].Removenpc(npc); foreach (Client.GameState C in ServerBase.Kernel.GamePool.Values) { if (C.Entity.MapID == 1002) { Data data = new Data(true); data.UID = npc.UID; data.ID = Data.RemoveEntity; C.Send(data); } } } }
public Booth(Client.GameState client, Data data) { Owner = client; Owner.Booth = this; Owner.Entity.Action = Enums.ConquerAction.Sit; ItemList = new SafeDictionary<uint, BoothItem>(20); Base = new SobNpcSpawn(); Base.Owner = Owner; Base.UID = (uint)((Owner.Entity.UID % 1000000) + ((Owner.Entity.UID / 1000000) * 100000)); Base.Mesh = 406; Base.Type = Game.Enums.NpcType.Booth; Base.ShowName = true; Base.Name = Name; Base.X = (ushort)(Owner.Entity.X + 1); Base.Y = Owner.Entity.Y; Owner.SendScreenSpawn(Base, true); data.dwParam = Base.UID; data.wParam1 = Base.X; data.wParam2 = Base.Y; data.ID = Data.OwnBooth; Owner.Send(data); }
public bool RemoveSpell(Interfaces.ISkill spell) { if (Spells.ContainsKey(spell.ID)) { Spells.Remove(spell.ID); Network.GamePackets.Data data = new Data(true); data.UID = Entity.UID; data.dwParam = spell.ID; data.ID = 109; Send(data); Database.SkillTable.DeleteSpell(this, spell.ID); return true; } return false; }
static unsafe void HandlePacket(byte[] packet, Client.GameState client) { try { if (packet == null) return; if (client == null) return; fixed (byte* ptr = packet) { var type = *((ushort*)(ptr + 2)); ushort Length = BitConverter.ToUInt16(packet, 0); ushort ID = BitConverter.ToUInt16(packet, 2); ushort ID2 = BitConverter.ToUInt16(packet, 4); switch (ID) { #region Packet Spook Mob case 2400: { client.Send(new NpcReply(NpcReply.MessageBox, "The Thrilling Spooks are sealed up, inside here Better speak to the Heavenly Master ,if you want more detalis")); #region client.OnMessageBoxOK = delegate { client.Entity.Teleport(8892, 28, 26); }; client.OnMessageBoxCANCEL = delegate { client.OnMessageBoxEventParams = new object[0]; }; #endregion break; } #endregion #region Arsenal [2201][2202][2203] case 2202: { if (packet[16] == 0) packet[16] = 8; client.Send(ArsenalPacket.ArsenalInscribedPage(client, packet, (PhoenixProject.Game.Features.Arsenal_ID)packet[16])); break; } case 2203: { client.Send(ArsenalPacket.GuildArsenal(client)); if (client.Guild != null) if (client.Guild.Arsenal != null) client.Guild.Arsenal.Update(client.Guild); byte pType = packet[4]; byte i_type = packet[8]; uint i_Uid = BitConverter.ToUInt32(packet, 12); if (i_type == 0) i_type = 8; switch (pType) { case 0: { if (client.Guild != null) client.Guild.Arsenal.UnlockArsenal(client, (PhoenixProject.Game.Features.Arsenal_ID)i_type); break; } case 1: { PhoenixProject.Interfaces.IConquerItem Item = null; if (client.Inventory.TryGetItem(i_Uid, out Item)) { if (client != null) { if (Item != null) { if (i_type != 0 && i_type <= 8) { if (client.Guild != null) { if (client.Guild.Arsenal != null) { client.Guild.Arsenal.InscribeItem(client, Item, (PhoenixProject.Game.Features.Arsenal_ID)i_type); } } } } } } break; } case 2://Uninscribe { PhoenixProject.Game.Features.Arsenal_Client ac = null; if (client.Guild.Arsenal.Arsenals[(PhoenixProject.Game.Features.Arsenal_ID)i_type].Inscribed.TryGetValue(i_Uid, out ac)) client.Guild.Arsenal.RemoveItem(client, ac.Item, (PhoenixProject.Game.Features.Arsenal_ID)i_type); break; } case 4: { client.Send(ArsenalPacket.GuildArsenal(client)); break; } } break; } #endregion #region EnitityCreate (1001) case 1001: { if (client.Action == 1) { EnitityCreate EC = new EnitityCreate(); EC.Deserialize(packet); string Message = ""; Boolean Created = Database.EntityTable.CreateEntity(EC, client, ref Message); client.Send(new Message(Message, "ALLUSERS", System.Drawing.Color.Orange, GamePackets.Message.PopUP)); if (Created) Console.WriteLine(client.Account.Username + " Sucesfully Created a new Character " + EC.Name); client.JustCreated = true; } break; } #endregion #region Chat/Message (1004) case 1004: { if (client.Action != 2) return; Message message = new Message(); message.Deserialize(packet); if (message.__Message.Split(new string[] { "\\n" }, StringSplitOptions.RemoveEmptyEntries).Length > 0) message.__Message = message.__Message.Split(new string[] { "\\n" }, StringSplitOptions.RemoveEmptyEntries)[0]; Chat(message, client); break; } #endregion #region Item/Ping (1009) case 1009: { if (client.Action != 2) return; ItemUsage usage = new ItemUsage(false); usage.Deserialize(packet); if (!client.Entity.Dead || usage.ID == ItemUsage.Ping) { switch (usage.ID) { case 53: { uint ItemAdd = BitConverter.ToUInt32(packet, 8); Interfaces.IConquerItem item_new = null; if (client.Inventory.TryGetItem(ItemAdd, out item_new)) { uint obtined_points = 0; Database.ConquerItemInformation iteminfo = new PhoenixProject.Database.ConquerItemInformation(ItemAdd, 0); Dictionary<uint, uint> amount = new Dictionary<uint, uint>();//packet[20]); for (ushort i = 84; i < 84 + 4 * packet[20]; i += 4) { uint item_swap = BitConverter.ToUInt32(packet, i); if (client.Inventory.ContainsUID(item_swap)) { Interfaces.IConquerItem item = null; if (client.Inventory.TryGetItem(item_swap, out item)) { amount.Add(item_swap, i); } switch (item.ID) { case 191505: case 191605: case 191705: case 191805: case 191905: case 191405: case 183325: case 183315: case 183375: case 183305: { obtined_points += 300; break; } default: obtined_points += 50; break; } } } if (iteminfo.BaseInformation.ConquerPointsWorth > obtined_points) { uint add_cps = 0; add_cps = (uint)(iteminfo.BaseInformation.ConquerPointsWorth - obtined_points); if (add_cps < client.Entity.ConquerPoints) { client.Entity.ConquerPoints -= (uint)add_cps; foreach (uint key in amount.Keys) { if (client.Inventory.ContainsUID(key)) client.Inventory.Remove(key, PhoenixProject.Game.Enums.ItemUse.Remove, true); } client.Inventory.Add(ItemAdd, 0, 1); } } else { foreach (uint key in amount.Keys) { if (client.Inventory.ContainsUID(key)) client.Inventory.Remove(key, PhoenixProject.Game.Enums.ItemUse.Remove, true); } client.Inventory.Add(ItemAdd, 0, 1); } } break; } case 52: { var item = Database.ConquerItemTable.LoadItem(usage.UID); item.Mode = PhoenixProject.Game.Enums.ItemMode.ChatItem; item.Send(client); break; } case 41: { // var item = Database.ConquerItemTable.LoadItem(usage.UID); usage.dwParam = 1; client.Send(usage); break; } case ItemUsage.SwitchEquipsBack: case ItemUsage.SwitchEquips: { client.AlternateEquipment = usage.ID == ItemUsage.SwitchEquips; if (usage.ID == 45) { ClientEquip equips = new ClientEquip(client); client.Send(equips); client.Equipment.UpdateEntityPacket2(); client.LoadItemStats2(client.Entity); client.CalculateStatBonus(); client.CalculateHPBonus(); client.Send(WindowStats(client)); } else { ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); client.Equipment.UpdateEntityPacket(); client.LoadItemStats(client.Entity); client.CalculateStatBonus(); client.CalculateHPBonus(); client.Send(WindowStats(client)); } usage.dwParam = 1; client.Send(usage); break; } case ItemUsage.ArrowReload: { ReloadArrows(client.Equipment.TryGetItem(ConquerItem.LeftWeapon), client); break; } case ItemUsage.ShowBoothItems: { ShowBoothItems(usage, client); break; } case ItemUsage.AddItemOnBoothForSilvers: case ItemUsage.AddItemOnBoothForConquerPoints: { AddItemOnBooth(usage, client); break; } case ItemUsage.BuyFromBooth: { BuyFromBooth(usage, client); break; } case ItemUsage.RemoveItemFromBooth: { RemoveItemFromBooth(usage, client); break; } case ItemUsage.EquipItem: { EquipItem(usage, client); break; } case ItemUsage.UnequipItem: { UnequipItem(usage, client); break; } case ItemUsage.BuyFromNPC: { HandleBuyFromNPC(usage, client); break; } case ItemUsage.SellToNPC: { HandleSellToNPC(usage, client); break; } case ItemUsage.Repair: { HandleRepair(usage, client); break; } case ItemUsage.MeteorUpgrade: case ItemUsage.DragonBallUpgrade: { UpgradeItem(usage, client); break; } case ItemUsage.Ping: { if (Time32.Now < client.LastPing.AddSeconds(2)) { client.PingCount++; if (client.PingCount == 40) { client.Send(new Message("Speed hack detected!", System.Drawing.Color.BlanchedAlmond, Message.TopLeft)); client.Disconnect(); return; } } client.LastPingT = client.LastPing; client.LastPing = Time32.Now; if (client.LastPing > client.LastPingT.AddSeconds(2)) client.PingCount = 0; usage.TimeStamp += 200; client.Send(ReturnFinal(packet)); client.Send(usage); break; } case ItemUsage.ViewWarehouse: { usage.dwParam = client.MoneySave; client.Send(usage); break; } case ItemUsage.WarehouseDeposit: { if (client.Entity.Money >= usage.dwParam) { client.Entity.Money -= usage.dwParam; client.MoneySave += usage.dwParam; } break; } case ItemUsage.WarehouseWithdraw: { if (client.MoneySave >= usage.dwParam) { client.Entity.Money += usage.dwParam; client.MoneySave -= usage.dwParam; } break; } case ItemUsage.DropItem: { DropItem(usage, client); break; } case ItemUsage.DropMoney: { DropMoney(usage, client); break; } case ItemUsage.Enchant: { EnchantItem(usage, client); break; } case ItemUsage.SocketTalismanWithItem: { SocketTalismanWithItem(usage, client); break; } case ItemUsage.SocketTalismanWithCPs: { SocketTalismanWithCPs(usage, client); break; } case ItemUsage.RedeemGear: { var item = client.DeatinedItem[usage.UID]; if (item != null) { if (DateTime.Now > item.Date.AddDays(7)) { client.Send(new Message("This item is expired!", System.Drawing.Color.Red, Message.TopLeft)); return; } if (client.Entity.ConquerPoints >= item.ConquerPointsCost) { client.Entity.ConquerPoints -= item.ConquerPointsCost; Database.EntityTable.UpdateCps(client); usage.dwParam = client.Entity.UID; usage.dwExtraInfo3 = item.ConquerPointsCost; client.Send(usage); client.Inventory.Add(item.Item, PhoenixProject.Game.Enums.ItemUse.Add); Database.ClaimItemTable.Redeem(usage.UID, client); Database.DetainedItemTable.Claim(usage.UID, client); client.DeatinedItem.Remove(item.UID); if (ServerBase.Kernel.GamePool.ContainsKey(item.GainerUID)) { GameState pClient; if (ServerBase.Kernel.GamePool.TryGetValue(item.GainerUID, out pClient)) { if (pClient.Entity != null) { pClient.ClaimableItem[item.UID].OwnerUID = 500; pClient.ClaimableItem[item.UID].MakeItReadyToClaim(); usage.dwParam = pClient.Entity.UID; usage.ID = ItemUsage.ClaimGear; pClient.Send(usage); pClient.ClaimableItem[item.UID].Send(pClient); } } } Message message = new Message(" " + client.Entity.Name + " has redeemed his Gear and Pay " + item.ConquerPointsCost + " CPS . Congratulations!", System.Drawing.Color.Wheat, Message.Talk); ServerBase.Kernel.SendWorldMessage(message, ServerBase.Kernel.GamePool.Values); } } else { client.Send(new Message("The item you want to redeem has already been redeemed.", System.Drawing.Color.Red, Message.TopLeft)); } break; } case ItemUsage.ClaimGear: { // Console.WriteLine(" usage " + usage.UID + ""); var item = client.ClaimableItem[usage.UID]; // Console.WriteLine(" usage i " + item.UID + ""); if (item != null) { if (item.Bound) { client.Send(new Message("Unnclaimable item!", System.Drawing.Color.Red, Message.TopLeft)); return; } if (DateTime.Now < item.Date.AddDays(7) && item.OwnerUID != 500) { client.Send(new Message("This item is not expired. You cannot claim it yet!", System.Drawing.Color.Red, Message.TopLeft)); return; } if (item.OwnerUID == 500) client.Entity.ConquerPoints += item.ConquerPointsCost; else { client.Inventory.Add(item.Item, PhoenixProject.Game.Enums.ItemUse.Move); Message message = new Message("Thank you for arresting " + item.OwnerName + " , " + item.GainerName + ". The arrested one has redeemed his items and you have received a great deal of ConquerPoints as reward. Congratulations!", System.Drawing.Color.Wheat, Message.Talk); ServerBase.Kernel.SendWorldMessage(message, ServerBase.Kernel.GamePool.Values); } Database.ClaimItemTable.Claim(usage.UID, client); client.ClaimableItem.Remove(item.UID); usage.dwParam = client.Entity.UID; usage.dwExtraInfo3 = item.ConquerPointsCost; //Database.EntityTable.UpdateCps(client); client.Send(usage); Message message2 = new Message("Thank you for arresting red/black name players " + client.Entity.Name + " has recived " + item.ConquerPointsCost + " CPS . Congratulations!", System.Drawing.Color.Wheat, Message.Talk); ServerBase.Kernel.SendWorldMessage(message2, ServerBase.Kernel.GamePool.Values); } else { client.Send(new Message("The item you want to claim has already been claimed.", System.Drawing.Color.Red, Message.TopLeft)); } break; } case 43: { uint UID = BitConverter.ToUInt32(packet, 4); if (packet[20] == 1) { if (client.Inventory.ContainsUID(BitConverter.ToUInt32(packet, 84)))//76 { Interfaces.IConquerItem item = null; if (client.Inventory.TryGetItem(UID, out item)) { UInt32 iType = item.ID / 1000; Positions pos = GetPositionFromID(item.ID); if (pos == Positions.Garment) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.RightAccessory) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.LeftAccessory) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.Bottle) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.Steed) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.SteedArmor) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.SteedTalisman) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.AttackTalisman) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.DefenceTalisman) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (item.SocketOne == PhoenixProject.Game.Enums.Gem.NoSocket) { if (item.SocketOne == PhoenixProject.Game.Enums.Gem.NoSocket) { if (item.SocketOne == PhoenixProject.Game.Enums.Gem.NoSocket) item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; client.Inventory.Remove(BitConverter.ToUInt32(packet, 84), PhoenixProject.Game.Enums.ItemUse.Remove, true); item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); usage.dwParam = 1; client.LoadItemStats(client.Entity); client.CalculateStatBonus(); client.CalculateHPBonus(); Database.ConquerItemTable.UpdateSockets(item); } } else if (item.SocketTwo == PhoenixProject.Game.Enums.Gem.NoSocket) { uint rand = (uint)PhoenixProject.ServerBase.Kernel.Random.Next(1, 700); if (rand > 320) // if (PhoenixProject.ServerBase.Kernel.PercentSuccess(30)) { if (item.SocketTwo == PhoenixProject.Game.Enums.Gem.NoSocket) item.SocketTwo = PhoenixProject.Game.Enums.Gem.EmptySocket; client.Inventory.Remove(BitConverter.ToUInt32(packet, 84), PhoenixProject.Game.Enums.ItemUse.Remove, true); item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); usage.dwParam = 1; client.LoadItemStats(client.Entity); client.CalculateStatBonus(); client.CalculateHPBonus(); Database.ConquerItemTable.UpdateSockets(item); } else { usage.dwParam = 0; client.Inventory.Add(1200006, 0, 1); client.Inventory.Remove(BitConverter.ToUInt32(packet, 84), PhoenixProject.Game.Enums.ItemUse.Remove, true); } } /*& } else { if (item.SocketOne == PhoenixProject.Game.Enums.Gem.NoSocket) item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; client.Inventory.Remove(BitConverter.ToUInt32(packet, 80), PhoenixProject.Game.Enums.ItemUse.Remove, true); item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); client.LoadItemStats(item); Database.ConquerItemTable.UpdateItem(item, client); }*/ } } } if (packet[20] == 5) { Interfaces.IConquerItem item = null; if (client.Inventory.TryGetItem(UID, out item)) { Dictionary<uint, uint> dbs = new Dictionary<uint, uint>();//packet[20]); for (ushort i = 84; i < 84 + 4 * packet[20]; i += 4) { if (client.Inventory.ContainsUID(BitConverter.ToUInt32(packet, i))) { dbs.Add(BitConverter.ToUInt32(packet, i), i); } } if (client.Inventory.Contains(1088000, 5)) { if (item.SocketOne == PhoenixProject.Game.Enums.Gem.NoSocket) return; if (item.SocketTwo == PhoenixProject.Game.Enums.Gem.NoSocket) item.SocketTwo = PhoenixProject.Game.Enums.Gem.EmptySocket; foreach (uint key in dbs.Keys) { if (client.Inventory.ContainsUID(key)) client.Inventory.Remove(key, PhoenixProject.Game.Enums.ItemUse.Remove, true); } usage.dwParam = 1; item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); client.LoadItemStats(client.Entity); client.CalculateStatBonus(); client.CalculateHPBonus(); Database.ConquerItemTable.UpdateSockets(item); } } } if (packet[20] == 7) { Interfaces.IConquerItem item = null; if (client.Inventory.TryGetItem(UID, out item)) { if (item.SocketOne == PhoenixProject.Game.Enums.Gem.NoSocket) return; Dictionary<uint, uint> drill = new Dictionary<uint, uint>();//packet[20]); for (ushort i = 84; i < 84 + 4 * packet[20]; i += 4) { if (client.Inventory.ContainsUID(BitConverter.ToUInt32(packet, i))) { drill.Add(BitConverter.ToUInt32(packet, i), i); } } if (client.Inventory.Contains(1200006, 7)) { if (item.SocketTwo == PhoenixProject.Game.Enums.Gem.NoSocket) item.SocketTwo = PhoenixProject.Game.Enums.Gem.EmptySocket; foreach (uint key in drill.Keys) { if (client.Inventory.ContainsUID(key)) client.Inventory.Remove(key, PhoenixProject.Game.Enums.ItemUse.Remove, true); } usage.dwParam = 1; item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); client.LoadItemStats(client.Entity); client.CalculateStatBonus(); client.CalculateHPBonus(); Database.ConquerItemTable.UpdateSockets(item); } } } if (packet[20] == 12) { Interfaces.IConquerItem item = null; if (client.Inventory.TryGetItem(UID, out item)) { Dictionary<uint, uint> dbs = new Dictionary<uint, uint>();//packet[20]); for (ushort i = 84; i < 84 + 4 * packet[20]; i += 4) { if (client.Inventory.ContainsUID(BitConverter.ToUInt32(packet, i))) { dbs.Add(BitConverter.ToUInt32(packet, i), i); } } if (client.Inventory.Contains(1088000, 12)) { if (item.SocketOne != PhoenixProject.Game.Enums.Gem.NoSocket) return; if (item.SocketOne == PhoenixProject.Game.Enums.Gem.NoSocket) item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; foreach (uint key in dbs.Keys) { if (client.Inventory.ContainsUID(key)) client.Inventory.Remove(key, PhoenixProject.Game.Enums.ItemUse.Remove, true); } usage.dwParam = 1; //client.Inventory.Remove(DragonBall, 12); item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); client.LoadItemStats(client.Entity); client.CalculateStatBonus(); client.CalculateHPBonus(); Database.ConquerItemTable.UpdateSockets(item); } } } client.Send(packet); break; } case 40: { uint ItemAdd = (uint)((packet[4] & 0xFF) | ((packet[5] & 0xFF) << 8) | ((packet[6] & 0xFF) << 16) | ((packet[7] & 0xFF) << 24)); Interfaces.IConquerItem item_new = null; if (client.Inventory.TryGetItem(ItemAdd, out item_new)) { UInt32 iType = item_new.ID / 1000; Positions pos = GetPositionFromID(item_new.ID); if (pos == Positions.Garment) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.RightAccessory) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.LeftAccessory) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.Bottle) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.Steed) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.SteedArmor) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.SteedTalisman) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.AttackTalisman) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (pos == Positions.DefenceTalisman) { client.Account.State = Database.AccountTable.AccountState.Cheat; client.Account.Savekimo(); client.Disconnect(); return; } if (item_new.Bless == 7) return; Queue<uint> amount = new Queue<uint>(packet[20]); for (ushort i = 84; i < 84 + 4 * packet[20]; i += 4) { if (client.Inventory.ContainsUID((uint)((packet[i] & 0xFF) | ((packet[(byte)(i + 1)] & 0xFF) << 8) | ((packet[(byte)(i + 2)] & 0xFF) << 16) | ((packet[(byte)(i + 3)] & 0xFF) << 24)))) amount.Enqueue((uint)((packet[i] & 0xFF) | ((packet[(byte)(i + 1)] & 0xFF) << 8) | ((packet[(byte)(i + 2)] & 0xFF) << 16) | ((packet[(byte)(i + 3)] & 0xFF) << 24))); else return; } byte oldbless = item_new.Bless; if (item_new.Bless == 0 && amount.Count == 5) item_new.Bless = 1; else if (item_new.Bless == 1 && amount.Count == 1) item_new.Bless = 3; else if (item_new.Bless == 3 && amount.Count == 3) item_new.Bless = 5; else if (item_new.Bless == 5 && amount.Count == 5) item_new.Bless = 7; if (oldbless == item_new.Bless) return; while (amount.Count != 0) client.Inventory.Remove(amount.Dequeue(), PhoenixProject.Game.Enums.ItemUse.Remove, true); item_new.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item_new.Send(client); usage.dwParam = 1; Database.ConquerItemTable.UpdateBless(item_new); } client.Send(packet); break; } case ItemUsage.GemCompose: { #region GemCompose UInt32 Ident = usage.UID; client.Inventory.Remove(Ident, 15); client.Inventory.Add(Ident + 1, 0, 1); usage.dwParam = 1; client.Send(usage); #endregion break; } case ItemUsage.ToristSuper: { #region GemCompose if (client.Entity.Money >= 100000) { client.Inventory.Remove(700002, 1); client.Inventory.Remove(700012, 1); client.Inventory.Remove(700022, 1); client.Inventory.Remove(700032, 1); client.Inventory.Remove(700042, 1); client.Inventory.Remove(700052, 1); client.Inventory.Remove(700062, 1); client.Entity.Money -= 100000; client.Inventory.Add(700072, 0, 1); usage.dwParam = 1; client.Send(usage); } usage.dwParam = 0; client.Send(usage); #endregion break; } case ItemUsage.SplitStack: { Interfaces.IConquerItem mainItem = null; Interfaces.IConquerItem minorItem = new ConquerItem(true); Database.ConquerItemInformation infos = null; minorItem.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); if (client.Inventory.TryGetItem(usage.UID, out mainItem)) { infos = new PhoenixProject.Database.ConquerItemInformation(mainItem.ID, 0); if (mainItem.StackSize > 1 && mainItem.StackSize <= infos.BaseInformation.StackSize) { if (client.Inventory.Count < 40) { client.SpiltStack = false; ushort Amount = (ushort)usage.dwParam; mainItem.StackSize -= Amount; mainItem.Mode = Game.Enums.ItemMode.Update; mainItem.Send(client); mainItem.Mode = Game.Enums.ItemMode.Default; Database.ConquerItemTable.UpdateStack(mainItem); minorItem.ID = mainItem.ID; minorItem.StackSize += Amount; minorItem.Durability = mainItem.Durability; client.Inventory.Add(minorItem, Game.Enums.ItemUse.CreateAndAdd); } } } break; } case ItemUsage.MergeStackableItems: { Interfaces.IConquerItem mainItem = null; Interfaces.IConquerItem minorItem = new ConquerItem(true); Database.ConquerItemInformation infos = null; minorItem.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); if (client.Inventory.TryGetItem(usage.UID, out mainItem) && client.Inventory.TryGetItem(usage.dwParam, out minorItem)) { if (mainItem.ID == minorItem.ID) { infos = new PhoenixProject.Database.ConquerItemInformation(mainItem.ID, 0); if (mainItem.StackSize < 1) mainItem.StackSize = 1; if (minorItem.StackSize < 1) minorItem.StackSize = 1; if ((mainItem.StackSize + minorItem.StackSize) <= infos.BaseInformation.StackSize) { mainItem.StackSize += minorItem.StackSize; mainItem.Mode = Game.Enums.ItemMode.Update; mainItem.Send(client); mainItem.Mode = Game.Enums.ItemMode.Default; Database.ConquerItemTable.UpdateStack(mainItem); client.Inventory.Remove(minorItem, Game.Enums.ItemUse.Remove); } } } break; } case 34: { break; } case 54://downgrade { Interfaces.IConquerItem item = null; Interfaces.IConquerItem minorItem = new ConquerItem(true); //Database.ConquerItemInformation infos = null; // uint newid = infos.LowestID(infos.BaseInformation.Level); //minorItem.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); if (client.Inventory.TryGetItem(usage.UID, out item) && client.Entity.ConquerPoints >= 54) { Database.ConquerItemInformation cii = new PhoenixProject.Database.ConquerItemInformation(item.ID, item.Plus); uint kimzz = 0; kimzz = item.ID; Kimozzz: uint kimo = kimzz - 10; uint kimo2 = kimzz - 20; uint kimo3 = kimzz - 30; ushort postion = ItemPosition(kimo); ushort postion2 = ItemPosition(kimo2); ushort postion3 = ItemPosition(kimo3); Database.ConquerItemInformation cii1 = new PhoenixProject.Database.ConquerItemInformation(kimo, 0); Database.ConquerItemInformation cii2 = new PhoenixProject.Database.ConquerItemInformation(kimo2, 0); Database.ConquerItemInformation cii3 = new PhoenixProject.Database.ConquerItemInformation(kimo3, 0); if (Database.ConquerItemInformation.BaseInformations.ContainsKey(kimo)) { if (cii1.BaseInformation.Level >= 10 && postion != 4 && postion != 5) { kimzz = kimo; goto Kimozzz; } else { if (cii1.BaseInformation.Level > 10) { kimzz = kimo; goto Kimozzz; } } } else { if (Database.ConquerItemInformation.BaseInformations.ContainsKey(kimo2)) { if (cii2.BaseInformation.Level >= 10 && postion2 != 4 && postion2 != 5) { kimzz = kimo2; goto Kimozzz; } else { if (cii2.BaseInformation.Level > 10) { kimzz = kimo2; goto Kimozzz; } } } else { if (Database.ConquerItemInformation.BaseInformations.ContainsKey(kimo3)) { if (cii3.BaseInformation.Level >= 10 && postion3 != 4 && postion3 != 5) { kimzz = kimo3; goto Kimozzz; } else { if (cii3.BaseInformation.Level > 10) { kimzz = kimo3; goto Kimozzz; } } } else { // return; } } } item.ID = kimzz; PhoenixProject.Database.ConquerItemTable.UpdateItemID(item, client); item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); client.Entity.ConquerPoints -= 54; } else { usage.dwParam = 2; } break; } default: { Console.WriteLine("Unhandled item usage type : " + usage.ID); break; } } } break; } #endregion #region String (1015) case 1015: { if (client.Action == 2) { _String str2 = new _String(false); str2.Deserialize(packet); if ((str2.Type == 0x1a) && (str2.Texts.Count > 0)) { IEnumerator enumerator = Kernel.GamePool.Values.GetEnumerator(); enumerator.MoveNext(); int count = Kernel.GamePool.Count; for (uint i = 0; i < count; i++) { if (i >= count) { break; } current = enumerator.Current as GameState; if (current.Entity.Name == str2.Texts[0]) { string str3 = ""; str3 = ((str3 + current.Entity.UID + " ") + current.Entity.Level + " ") + current.Entity.BattlePower + " #"; if (current.Entity.GuildID != 0) { str3 = str3 + current.Guild.Name + " fNone# "; } else { str3 = str3 + "None fNone# "; } str3 = (str3 + current.Entity.Spouse + " ") + ((byte)current.Entity.NobilityRank) + " "; if ((current.Entity.Body % 10) < 3) { str3 = str3 + "1"; } else { str3 = str3 + "0"; } str2.Texts.Add(str3); client.Send(str2); } enumerator.MoveNext(); } } break; } } break; #endregion #region KnownPersons (1019) case 1019: { KnownPersons knownP = new KnownPersons(false); knownP.Deserialize(packet); switch (knownP.Type) { case KnownPersons.RequestFriendship: { AddFriend(knownP, client); break; } case KnownPersons.RemovePerson: { RemoveFriend(knownP, client); break; } case KnownPersons.RemoveEnemy: { RemoveEnemy(knownP, client); break; } } break; } #endregion #region Vote /Attack case 1022: { if (client.Action != 2) return; uint dmg = BitConverter.ToUInt32(packet, 24); uint AttackType = BitConverter.ToUInt32(packet, 20); uint AttackType2 = BitConverter.ToUInt32(packet, 26); switch (AttackType) { case 36: { GamePackets.Attack attack2 = new Attack(false); attack2.Deserialize(packet); CloudSaintsJar.Execute(client, attack2); break; } case 39: { if (!Kernel.VotePool.ContainsKey(client.Account.IP)) { if (!Kernel.VotePoolUid.ContainsKey(client.Entity.UID)) { client.Entity.ConquerPoints += Database.rates.VotePrize; PhoenixProject.Game.ConquerStructures.PlayersVot Vot = new PhoenixProject.Game.ConquerStructures.PlayersVot(); Vot.AdressIp = client.Account.IP; Vot.Uid = client.Entity.UID; Kernel.VotePool.Add(Vot.AdressIp, Vot); Kernel.VotePoolUid.Add(Vot.Uid, Vot); Database.EntityTable.SavePlayersVot(Vot); client.Send(new Message("" + PhoenixProject.Database.rates.VoteUrl + "", System.Drawing.Color.Red, Network.GamePackets.Message.Website)); } else { client.Send(new Message("" + PhoenixProject.Database.rates.VoteUrl + "", System.Drawing.Color.Red, Network.GamePackets.Message.Website)); } } else { client.Send(new Message("" + PhoenixProject.Database.rates.VoteUrl + "", System.Drawing.Color.Red, Network.GamePackets.Message.Website)); } break; } default: { if (client.Entity.MapID == 8880 || client.Entity.MapID == 8881) return; GamePackets.Attack attack = new Attack(false); attack.Deserialize(packet); Attack(attack, client); break; } } break; } #endregion #region ChiSystem case 2533: { ChiSystem2.Handle(packet, client); break; } #endregion #region CountryFlag case 2430: { KimoCountryFlag kimo = new KimoCountryFlag(false); kimo.Deserialize(packet); client.Entity.CountryFlag = kimo.FlagID; kimo.UID = client.Entity.UID; client.SendScreen(kimo, true); break; } #endregion #region Teams (1023) case 1023: { if (client.Action != 2) return; Team teamPacket = new Team(); teamPacket.Deserialize(packet); switch (teamPacket.Type) { case Team.Create: CreateTeam(teamPacket, client); break; case Team.AcceptJoinRequest: AcceptRequestToJoinTeam(teamPacket, client); break; case Team.AcceptInvitation: AcceptInviteToJoinTeam(teamPacket, client); break; case Team.InviteRequest: SendInviteToJoinTeam(teamPacket, client); break; case Team.JoinRequest: SendRequestJoinToTeam(teamPacket, client); break; case Team.ExitTeam: LeaveTeam(teamPacket, client); break; case Team.Dismiss: DismissTeam(teamPacket, client); break; case Team.Kick: KickFromTeam(teamPacket, client); break; case Team.ForbidJoining: { foreach (Client.GameState Teammate in client.Team.Teammates) if (Teammate != null) { Teammate.Team.ForbidJoin = true; Teammate.Send(teamPacket); } break; } case Team.UnforbidJoining: { foreach (Client.GameState Teammate in client.Team.Teammates) if (Teammate != null) { Teammate.Team.ForbidJoin = false; Teammate.Send(teamPacket); } break; } case Team.LootMoneyOff: { foreach (Client.GameState Teammate in client.Team.Teammates) if (Teammate != null) { Teammate.Team.PickupMoney = false; Teammate.Send(teamPacket); } break; } case Team.LootMoneyOn: { foreach (Client.GameState Teammate in client.Team.Teammates) if (Teammate != null) { Teammate.Team.PickupMoney = true; Teammate.Send(teamPacket); } break; } case Team.LootItemsOn: { foreach (Client.GameState Teammate in client.Team.Teammates) if (Teammate != null) { Teammate.Team.PickupItems = true; Teammate.Send(teamPacket); } break; } case Team.LootItemsOff: { foreach (Client.GameState Teammate in client.Team.Teammates) if (Teammate != null) { Teammate.Team.PickupItems = false; Teammate.Send(teamPacket); } break; } } break; } #endregion #region Atributes Set (1024) case 1024: { if (client.Action != 2) return; uint AddStr = BitConverter.ToUInt32(packet, 8); uint AddAgi = BitConverter.ToUInt32(packet, 12); uint AddVit = BitConverter.ToUInt32(packet, 16); uint AddSpi = BitConverter.ToUInt32(packet, 20); if (client.Entity.Atributes == 0) return; uint TotalStatPoints = AddStr + AddAgi + AddVit + AddSpi; if (client.Entity.Atributes >= TotalStatPoints) { client.Entity.Strength += (ushort)AddStr; client.Entity.Agility += (ushort)AddAgi; client.Entity.Vitality += (ushort)AddVit; client.Entity.Spirit += (ushort)AddSpi; client.Entity.Atributes -= (ushort)TotalStatPoints; client.Send(packet); } client.CalculateStatBonus(); client.CalculateHPBonus(); client.GemAlgorithm(); break; } #endregion #region Socketing (1027) case 1027: { EmbedSocket socket = new EmbedSocket(false); socket.Deserialize(packet); SocketItem(socket, client); break; } #endregion #region Character Statistics (1040) case 1040: { uint UID = BitConverter.ToUInt32(packet, 4); Client.GameState Client; if (ServerBase.Kernel.GamePool.TryGetValue(UID, out Client)) { client.Send(WindowStats(Client)); } break; } #endregion #region LoginPacket (1052) case 1052: { if (client.Action == 1) { Connect connect = new Connect(); connect.Deserialize(packet); AppendConnect(connect, client); } else { //Console.WriteLine(" yes"); client.Disconnect(); //DoLogin(client); } break; } #endregion #region Trade (1056) case 1056: { if (client.Action != 2) return; Trade trade = new Trade(false); trade.Deserialize(packet); switch (trade.Type) { case Trade.Request: RequestTrade(trade, client); break; case Trade.Close: CloseTrade(trade, client); break; case Trade.AddItem: AddTradeItem(trade, client); break; case Trade.SetMoney: SetTradeMoney(trade, client); break; case Trade.SetConquerPoints: SetTradeConquerPoints(trade, client); break; case Trade.Accept: AcceptTrade(trade, client); break; } break; } #endregion Trade (1056) #region Floor items (1101) case 1101: { if (client.Action != 2) return; FloorItem floorItem = new FloorItem(false); floorItem.Deserialize(packet); client.SpiltStack = true; PickupItem(floorItem, client); client.SpiltStack = false; break; } #endregion #region Warehouses (1102) case 1102: { if (client.Action != 2) return; Warehouse warehousepacket = new Warehouse(false); warehousepacket.Deserialize(packet); switch (warehousepacket.Type) { case Warehouse.Entire: { Game.ConquerStructures.Warehouse wh = client.Warehouses[(PhoenixProject.Game.ConquerStructures.Warehouse.WarehouseID)warehousepacket.NpcID]; if (wh == null) return; byte count = 0; warehousepacket.Count = 1; warehousepacket.Type = Warehouse.AddItem; for (; count < wh.Count; count++) { warehousepacket.Append(wh.Objects[count]); client.Send(warehousepacket); } break; } case Warehouse.AddItem: { if (client.Booth != null) { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Sorry you cant add items into your warehouse while you in Booth"); npc.OptionID = 255; client.Send(npc.ToArray()); return; } Game.ConquerStructures.Warehouse wh = client.Warehouses[(PhoenixProject.Game.ConquerStructures.Warehouse.WarehouseID)warehousepacket.NpcID]; if (wh == null) return; Interfaces.IConquerItem item = null; if (client.Inventory.TryGetItem(warehousepacket.UID, out item)) { if (item.ID >= 729960 && item.ID <= 729970) return; if (item.ID == 750000) return; if (!ConquerItem.isRune(item.UID)) { if (wh.Add(item)) { warehousepacket.UID = 0; warehousepacket.Count = 1; warehousepacket.Append(item); client.Send(warehousepacket); return; } } else client.Send(new Message("You can not store Flame Stone Rune's in Warehouse", System.Drawing.Color.Red, Message.TopLeft)); } break; } case Warehouse.RemoveItem: { Game.ConquerStructures.Warehouse wh = client.Warehouses[(PhoenixProject.Game.ConquerStructures.Warehouse.WarehouseID)warehousepacket.NpcID]; if (wh == null) return; if (wh.ContainsUID(warehousepacket.UID)) { if (wh.Remove(warehousepacket.UID)) { client.Send(warehousepacket); return; } } break; } default: { Console.WriteLine("Unknown type: " + warehousepacket.Type); break; } } break; } #endregion #region GuildCommands (1107) case 1107: { GuildCommand command = new GuildCommand(false); command.Deserialize(packet); switch (command.Type) { case GuildCommand.Neutral1: case GuildCommand.Neutral2: { string name = System.Text.Encoding.UTF7.GetString(packet, 26, packet[25]); if (client.Guild != null) { if (client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { client.Guild.RemoveAlly(name); foreach (var guild in ServerBase.Kernel.Guilds.Values) { if (guild.Name == name && client.Guild.Name != name) { guild.RemoveAlly(client.Guild.Name); } } client.Guild.RemoveEnemy(name); } } break; } case GuildCommand.Allied: { string name = System.Text.Encoding.UTF8.GetString(packet, 26, packet[25]); if (client.Guild != null) { if (client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { AllyGuilds(name, client); } } break; } case GuildCommand.Enemied: { string name = System.Text.Encoding.UTF7.GetString(packet, 26, packet[25]); if (client.Guild != null) { if (client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { client.Guild.AddEnemy(name); } } break; } default: { client.Send(packet); break; } case GuildCommand.Bulletin: { string message = System.Text.Encoding.UTF7.GetString(packet, 26, packet[25]); if (client.Guild != null) { if (client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { client.Guild.Bulletin = message; client.Guild.SendGuild(client); Database.GuildTable.UpdateBulletin(client.Guild, client.Guild.Bulletin); } } break; } case GuildCommand.DonateSilvers: { if (client.Guild != null) { if (client.Entity.Money >= command.dwParam) { client.Guild.SilverFund += command.dwParam; Database.GuildTable.SaveFunds(client.Guild); client.AsMember.SilverDonation += command.dwParam; client.Entity.Money -= command.dwParam; client.Guild.SendGuild(client); } } break; } case GuildCommand.DonateConquerPoints: { if (client.Guild != null) { if (client.Entity.ConquerPoints >= command.dwParam) { client.Guild.ConquerPointFund += command.dwParam; Database.GuildTable.SaveFunds(client.Guild); client.AsMember.ConquerPointDonation += command.dwParam; client.Entity.ConquerPoints -= command.dwParam; client.Guild.SendGuild(client); } } break; } case GuildCommand.Refresh: { if (client.AsMember != null) { if (client.Guild != null) client.Guild.SendGuild(client); } break; } case GuildCommand.Discharge: { string name = System.Text.Encoding.UTF7.GetString(packet, 26, packet[25]); if (client.Guild != null) { if (client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { var member = client.Guild.GetMemberByName(name); if (member != null) { if (member.ID != client.Entity.UID) { if (member.Rank == PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) { client.Guild.DeputyLeaderCount--; member.Rank = PhoenixProject.Game.Enums.GuildMemberRank.Member; if (member.IsOnline) { client.Guild.SendGuild(member.Client); member.Client.Entity.GuildRank = (ushort)member.Rank; member.Client.Screen.FullWipe(); member.Client.Screen.Reload(null); } } } } } } break; } case GuildCommand.Promote: { if (client.Guild != null) { if (client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { if (client.Guild.Members.ContainsKey(command.dwParam)) { var member = client.Guild.Members[command.dwParam]; if (member.Rank == PhoenixProject.Game.Enums.GuildMemberRank.Member) { member.Rank = PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader; if (member.IsOnline) { client.Guild.SendGuild(member.Client); member.Client.Entity.GuildRank = (ushort)member.Rank; member.Client.Screen.FullWipe(); member.Client.Screen.Reload(null); } } else if (member.Rank == PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) { member.Rank = PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader; if (member.IsOnline) { client.Guild.SendGuild(member.Client); member.Client.Entity.GuildRank = (ushort)member.Rank; member.Client.Screen.FullWipe(); member.Client.Screen.Reload(null); } client.AsMember.Rank = PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader; client.Guild.SendGuild(client); client.Entity.GuildRank = (ushort)client.AsMember.Rank; client.Screen.FullWipe(); client.Screen.Reload(null); } } } } break; } case GuildCommand.JoinRequest: { if (ServerBase.Kernel.GamePool.ContainsKey(command.dwParam)) { var Client = ServerBase.Kernel.GamePool[command.dwParam]; if (Client.OnHoldGuildJoin == client.OnHoldGuildJoin && Client.OnHoldGuildJoin != 0) { if (Client.Guild != null) { if (Client.AsMember.Rank != PhoenixProject.Game.Enums.GuildMemberRank.Member) { Client.Guild.AddMember(client); Client.OnHoldGuildJoin = 0; client.OnHoldGuildJoin = 0; } } else { if (client.AsMember.Rank != PhoenixProject.Game.Enums.GuildMemberRank.Member) { client.Guild.AddMember(Client); Client.OnHoldGuildJoin = 0; client.OnHoldGuildJoin = 0; } } return; } if (client.Guild == null) { command.dwParam = client.Entity.UID; Client.Send(command); Client.OnHoldGuildJoin = (uint)new Random().Next(); client.OnHoldGuildJoin = Client.OnHoldGuildJoin; } } break; } case GuildCommand.InviteRequest: { if (ServerBase.Kernel.GamePool.ContainsKey(command.dwParam)) { var Client = ServerBase.Kernel.GamePool[command.dwParam]; if (Client.OnHoldGuildJoin == client.OnHoldGuildJoin && Client.OnHoldGuildJoin != 0) { if (Client.Guild != null) { if (Client.AsMember.Rank != PhoenixProject.Game.Enums.GuildMemberRank.Member) { Client.Guild.AddMember(client); Client.OnHoldGuildJoin = 0; client.OnHoldGuildJoin = 0; } } else { if (client.AsMember.Rank != PhoenixProject.Game.Enums.GuildMemberRank.Member) { client.Guild.AddMember(Client); Client.OnHoldGuildJoin = 0; client.OnHoldGuildJoin = 0; } } return; } if (client.Guild != null) { command.dwParam = client.Entity.UID; Client.Send(command); Client.OnHoldGuildJoin = 0; client.OnHoldGuildJoin = Client.OnHoldGuildJoin; } } break; } case GuildCommand.Quit: { if (client.Guild != null) { if (client.AsMember.Rank != PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { client.Guild.ExpelMember(client.Entity.Name, true); } } break; } } break; } #endregion #region Enlight (1127) case 1127: { Enlight enlight = new Enlight(false); enlight.Deserialize(packet); if (ServerBase.Kernel.GamePool.ContainsKey(enlight.Enlighted)) { var Client = ServerBase.Kernel.GamePool[enlight.Enlighted]; if (enlight.Enlighter == client.Entity.UID && enlight.Enlighted != enlight.Enlighter) { if (Client.Entity.ReceivedEnlightenPoints < 5) { if (client.Entity.EnlightenPoints >= 100) { if (Client.Entity.EnlightmentTime <= 80) { client.Entity.EnlightenPoints -= 100; Client.Entity.EnlightmentStamp = Time32.Now; Client.IncreaseExperience(Game.Attacking.Calculate.Percent((int)Client.ExpBall, .10F), false); Client.SendScreen(packet, true); Client.Entity.ReceivedEnlightenPoints++; Client.Entity.EnlightmentTime += 20; if (client.Entity.EnlightmentTime > 80) client.Entity.EnlightmentTime = 100; else if (client.Entity.EnlightmentTime > 60) client.Entity.EnlightmentTime = 80; else if (client.Entity.EnlightmentTime > 40) client.Entity.EnlightmentTime = 60; else if (client.Entity.EnlightmentTime > 20) client.Entity.EnlightmentTime = 40; else if (client.Entity.EnlightmentTime > 0) client.Entity.EnlightmentTime = 20; } else client.Send(new Message("You can't enlighten " + Client.Entity.Name + " yet because he has to wait a few minutes until he can be enlightened again.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You can't enlighten " + Client.Entity.Name + " because you don't have enough enlighten points!", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You can't enlighten " + Client.Entity.Name + " because he/she was enlightened today five times already!", System.Drawing.Color.Red, Message.TopLeft)); } } break; } #endregion #region QuizShow (2068) case 2068: { try { byte Answered = (byte)(packet[8] - 1); int L = Environment.TickCount; int Now = (L - client.QuizInfo.LastAnswer) / 1000 + 1; ushort qn = PhoenixProject.Game.ConquerStructures.QuizShow.QuestionNO; if ((ushort)((30 - Now) * PhoenixProject.Game.ConquerStructures.QuizShow.Questions[(ushort)(qn - 1)].Answers[Answered].Points) > 0) { client.QuizInfo.Time += (ushort)Now; client.QuizInfo.Score += (ushort)((30 - Now) * PhoenixProject.Game.ConquerStructures.QuizShow.Questions[(ushort)(qn - 1)].Answers[Answered].Points); client.Entity.QuizPoints += (ushort)((30 - Now) * PhoenixProject.Game.ConquerStructures.QuizShow.Questions[(ushort)(qn - 1)].Answers[Answered].Points); client.Entity.ConquerPoints += (ushort)((30 - Now) * PhoenixProject.Game.ConquerStructures.QuizShow.Questions[(ushort)(qn - 1)].Answers[Answered].Points * 10); client.Send(new Message("You have won " + ((30 - Now) * PhoenixProject.Game.ConquerStructures.QuizShow.Questions[(ushort)(qn - 1)].Answers[Answered].Points).ToString() + " quiz points and " + ((30 - Now) * PhoenixProject.Game.ConquerStructures.QuizShow.Questions[(ushort)(qn - 1)].Answers[Answered].Points * 10).ToString() + " ConquerPoints", System.Drawing.Color.Red, Message.TopLeft)); uint exp = 1000; exp = (uint)(exp * ((30 - Now) * PhoenixProject.Game.ConquerStructures.QuizShow.Questions[(ushort)(qn - 1)].Answers[Answered].Points)); client.IncreaseExperience((ulong)exp, false); Program.kimo3 = Answered; } else { client.QuizInfo.Time += (ushort)Now; client.QuizInfo.Score += (ushort)((30 - Now) * PhoenixProject.Game.ConquerStructures.QuizShow.Questions[(ushort)(qn - 1)].Answers[Answered].Points); uint exp = 1000; exp = (uint)(exp * ((30 - Now) * PhoenixProject.Game.ConquerStructures.QuizShow.Questions[(ushort)(qn - 1)].Answers[Answered].Points)); client.IncreaseExperience((ulong)exp, false); client.Send(new Message("Ops Wrong Answer try Google if you dont know www.Google.com!!", System.Drawing.Color.Red, Message.TopLeft)); } if (client.QuizInfo.Score >= 0) { /* int MyPlace = 0; for (int i = 0; i < 499; i++) { if (client.QuizInfo.Score < PhoenixProject.Game.ConquerStructures.QuizShow.Scores[i].Score) { MyPlace++; } else { if (client.Entity.UID == PhoenixProject.Game.ConquerStructures.QuizShow.Scores[i].EntityID) { } else { if (client.QuizInfo.Score == PhoenixProject.Game.ConquerStructures.QuizShow.Scores[i].Score) { MyPlace++; } } } }*/ if (client.QuizInfo.Score >= Kernel.MainQuiz.Score[0]) { Kernel.MainQuiz.Name[0] = client.Entity.Name; Kernel.MainQuiz.Score[0] = client.QuizInfo.Score; Kernel.MainQuiz.Time[0] = client.QuizInfo.Time; } client.Send(new GamePackets.QuizInfo().InfoBuffer(client.QuizInfo.Score, client.QuizInfo.Time, client.QuizInfo.Rank)); } } catch { } break; } #endregion #region NPC Dialog (2031 + 2032) case 2031: case 2032: { if (client.Action != 2) return; NpcRequest req = new NpcRequest(); req.Deserialize(packet); #region CaptureFlag if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 234 && client.Map.BaseID != 700)//CaptureFlag { client.Entity.Teleport(1002, 384, 348); } #endregion #region DemonCave if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 235 && client.Map.BaseID != 700)//DemonCave { if (DateTime.Now.Hour == Game.KimoEvents.DemonHour && DateTime.Now.Minute < 5) { if (!client.DemonCave) { client.DemonCave = true; client.Entity.Teleport(1, 77, 69); client.Entity.DemonCave1 = 0; client.Entity.DemonCave2 = 0; client.Entity.DemonCave3 = 0; Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3378; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } } } #endregion #region SkillTeam if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 236 && client.Map.BaseID != 700)//SkillTeamPK { client.Entity.Teleport(1002, 460, 367); } #endregion #region DonationWar if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 237 && client.Map.BaseID != 700)//dONATION { client.Entity.Teleport(1002, 428, 392); } #endregion #region ElitePk if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 249 && client.Map.BaseID != 700)//ElitePk { if (DateTime.Now.Hour == Game.KimoEvents.EBHour && DateTime.Now.Minute >= 5 && DateTime.Now.Minute < 20) { if (!Game.Tournaments.EliteTournament.Top8.ContainsKey(client.Entity.UID)) { Game.Tournaments.EliteTournament.AddMap(client); Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3378; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } } } #endregion #region classpk if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 248 && client.Map.BaseID != 700)//ClassPk { if (DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute < 05) { if (client.Entity.Class >= 10 && client.Entity.Class <= 15) { client.Entity.Teleport(7001, 25, 40); } if (client.Entity.Class >= 20 && client.Entity.Class <= 25) { client.Entity.Teleport(4500, 25, 40); } if (client.Entity.Class >= 40 && client.Entity.Class <= 45) { client.Entity.Teleport(4501, 25, 40); } if (client.Entity.Class >= 50 && client.Entity.Class <= 55) { client.Entity.Teleport(4502, 25, 40); } if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { client.Entity.Teleport(4503, 25, 40); } if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { client.Entity.Teleport(4504, 25, 40); } if (client.Entity.Class >= 132 && client.Entity.Class <= 135) { client.Entity.Teleport(4505, 25, 40); } if (client.Entity.Class >= 142 && client.Entity.Class <= 145) { client.Entity.Teleport(4506, 25, 40); } Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3378; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } } #endregion if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 247 && client.Map.BaseID != 700 && client.Entity.invite)//WeeklyPk { client.Entity.Teleport(1002, 453, 294); } if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 246 && client.Map.BaseID != 700)//MonthlyPk { client.Entity.Teleport(1002, 428, 243); } if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 245 && client.Map.BaseID != 700)//DisCity { client.Entity.Teleport(1020, 534, 484); } if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 244 && client.Map.BaseID != 700)//GuildWar { client.Disconnect(); return; } if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 233 && client.Map.BaseID != 700)//ClanWar { client.Entity.Teleport(1002, 413, 246); } if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 198 && client.Map.BaseID != 700)//ClanWar { client.Entity.Teleport(1002, 450, 372); } if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 196 && client.Map.BaseID != 700)//ClanWar { client.Entity.Teleport(1002, 425, 385); } #region DailyPk if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 243 && client.Map.BaseID != 700)//DailyPk { if (DateTime.Now.Minute >= 00 && DateTime.Now.Minute < 05) { client.Entity.Teleport(8877, 52, 44); Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3378; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } } #endregion if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 242 && client.Map.BaseID != 700)//SteedRace { client.Entity.Teleport(1002, 423, 245); } if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 241 && client.Map.BaseID != 700)//SpouseWar { client.Entity.Teleport(1002, 421, 292); } #region LastMan if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 240 && client.Map.BaseID != 700)//LastMan { if (DateTime.Now.Minute >= 30 && DateTime.Now.Minute <= 32) { Random R = new Random(); int Nr = R.Next(1, 10); if (Nr == 1) client.Entity.Teleport(3333, 51, 73); if (Nr == 2) client.Entity.Teleport(3333, 33, 34); if (Nr == 3) client.Entity.Teleport(3333, 67, 34); if (Nr == 4) client.Entity.Teleport(3333, 51, 73); if (Nr == 5) client.Entity.Teleport(3333, 33, 34); if (Nr == 6) client.Entity.Teleport(3333, 67, 34); if (Nr == 7) client.Entity.Teleport(3333, 51, 73); if (Nr == 8) client.Entity.Teleport(3333, 33, 34); if (Nr == 9) client.Entity.Teleport(3333, 67, 34); if (Nr == 10) client.Entity.Teleport(3333, 68, 57); Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3378; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } } #endregion if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 239 && client.Map.BaseID != 700)//EliteGW { client.Entity.Teleport(1002, 414, 259); } if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 238 && client.Map.BaseID != 700)//TreasueBox { client.Entity.Teleport(1002, 441, 352); } if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead && req.OptionID == 233 && client.Map.BaseID != 700)//LordsWar { client.Entity.Teleport(1002, 382, 394); } if (req.InteractType == NpcReply.MessageBox) { if (client.Entity.ActivePOPUP == 99995) { client.Entity.ActivePOPUP = 0; break; } if (req.OptionID == 255) { if (client.OnMessageBoxOK != null) { client.OnMessageBoxOK.Invoke(); client.OnMessageBoxOK = null; } } else { if (client.OnMessageBoxCANCEL != null) { client.OnMessageBoxCANCEL.Invoke(); client.OnMessageBoxCANCEL = null; } } } else { if (ID == 2031) client.ActiveNpc = req.NpcID; if (req.NpcID == 12) { if (client.Entity.VIPLevel > 0) { Data data = new Data(true); data.ID = Data.OpenWindow; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = Data.WindowCommands.VIPWarehouse; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); break; } } Interfaces.INpc npc = null; if (req.InteractType == 102) { if (client.Guild != null) { if (client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { client.Guild.ExpelMember(req.Input, false); } } return; } if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npc)) { if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, npc.X, npc.Y) > 17) return; if (req.OptionID == 255 || (req.OptionID == 0 && ID == 2032)) return; if (client.Entity.Dead) return; req.NpcID = client.ActiveNpc; //NpcDialogs.Dialogs.GetDialog(req, client); Dialogs.GetDialog(req, client); } } break; } #endregion #region Compose (2036) case 2036: { Compose compose = new Compose(false); compose.Deserialize(packet); ComposePlus(compose, client); break; } #endregion #region Offline TG (2044) case 2044: { OfflineTGRequest otgr = new OfflineTGRequest(false); otgr.Deserialize(packet); switch (otgr.ID) { case OfflineTGRequest.OnTrainingTimeRequested: { otgr.Minutes = 900; client.Send(otgr); break; } case OfflineTGRequest.OnConfirmation: { if (client.Map.BaseID == 6000 || client.Map.BaseID == 6001 || client.Entity.Dead) { return; } if (client.Entity.MapID == 1036 || client.Entity.MapID == 1039 || ServerBase.Constants.OfflineTG.Contains(client.Entity.MapID)) { switch (client.Entity.PreviousMapID) { case 1000: { client.Entity.PreviousMapID = 1000; client.Entity.PrevX = 500; client.Entity.PrevY = 560; break; } case 1020: { client.Entity.PreviousMapID = 1020; client.Entity.PrevX = 565; client.Entity.PrevY = 562; //client.Entity.Teleport(1020, 565, 562); break; } case 1011: { client.Entity.PreviousMapID = 1011; client.Entity.PrevX = 188; client.Entity.PrevY = 264; //client.Entity.Teleport(1011, 188, 264); break; } case 1015: { client.Entity.PreviousMapID = 1015; client.Entity.PrevX = 717; client.Entity.PrevY = 571; // client.Entity.Teleport(1015, 717, 571); break; } default: { client.Entity.PreviousMapID = 1002; client.Entity.PrevX = 429; client.Entity.PrevY = 378; //client.Entity.Teleport(1002, 429, 378); break; } } client.Entity.PreviousMapID = client.Entity.PreviousMapID; //client.Entity.PrevX = client.Entity.PrevX; //client.Entity.PrevY = client.Entity.PrevY; } else { client.Entity.PreviousMapID = client.Entity.MapID; client.Entity.PrevX = client.Entity.X; client.Entity.PrevY = client.Entity.Y; } client.Entity.MapID = 601; client.Entity.X = 64; client.Entity.Y = 56; client.OfflineTGEnterTime = DateTime.Now; client.Disconnect(); break; } case OfflineTGRequest.ClaimExperience: { var T1 = new TimeSpan(DateTime.Now.Ticks); var T2 = new TimeSpan(client.OfflineTGEnterTime.Ticks); ushort minutes = (ushort)(T1.TotalMinutes - T2.TotalMinutes); minutes = (ushort)Math.Min((ushort)900, minutes); double expballGain = (double)300 * (double)minutes / (double)900; while (expballGain >= 100) { expballGain -= 100; client.IncreaseExperience(client.ExpBall, false); } if (expballGain != 0) client.IncreaseExperience((uint)(client.ExpBall * (expballGain / 100)), false); client.Entity.SetLocation(client.Entity.PreviousMapID, client.Entity.PrevX, client.Entity.PrevY); if (client.Entity.PreviousMapID == 1036 || client.Entity.PreviousMapID == 1039) switch (client.Entity.PreviousMapID) { case 1000: { client.Entity.Teleport(1000, 500, 650); break; } case 1020: { client.Entity.Teleport(1020, 565, 562); break; } case 1011: { client.Entity.Teleport(1011, 188, 264); break; } case 1015: { client.Entity.Teleport(1015, 717, 571); break; } default: { client.Entity.Teleport(1002, 429, 378); break; } } else { client.Entity.Teleport(client.Entity.PreviousMapID, client.Entity.PrevX, client.Entity.PrevY); } client.OfflineTGEnterTime = DateTime.Now; break; } default: client.Send(otgr); break; } break; } #endregion #region Trade partner (2046) case 2046: { TradePartner partner = new TradePartner(false); partner.Deserialize(packet); switch (partner.Type) { case TradePartner.RequestPartnership: RequestTradePartnership(partner, client); break; case TradePartner.RejectRequest: RejectPartnership(partner, client); break; case TradePartner.BreakPartnership: BreakPartnership(partner, client); break; } break; } #endregion #region ItemLock (2048) case 2048: { if (client.Action != 2) return; ItemLock itemlock = new ItemLock(false); itemlock.Deserialize(packet); switch (itemlock.ID) { case ItemLock.RequestLock: LockItem(itemlock, client); break; case ItemLock.RequestUnlock: UnlockItem(itemlock, client); break; } break; } #endregion #region Broadcast (2050) case 2050: { Broadcast cast = new Broadcast(false); cast.Deserialize(packet); switch (cast.Type) { case Broadcast.ReleaseSoonMessages: { BroadcastInfoAwaiting(cast, client); break; } case Broadcast.MyMessages: { BroadcastClientMessages(cast, client); break; } case Broadcast.BroadcastMessage: { if (client.Trade.InTrade) { client.Send(new Message("You cannot send any broadcasts While you inTrade.", System.Drawing.Color.Red, Message.TopLeft)); break; } if (client.Entity.MapID == 3031) { client.Send(new Message("You cannot send any broadcasts while you in LordsWar Tourment.", System.Drawing.Color.Red, Message.TopLeft)); break; } if (Game.ConquerStructures.Broadcast.Broadcasts.Count == ServerBase.Constants.MaxBroadcasts) { client.Send(new Message("You cannot send any broadcasts for now. The limit has been reached. Wait until a broadcast is chopped down.", System.Drawing.Color.Red, Message.TopLeft)); break; } if (client.Entity.ConquerPoints >= 5) { client.Entity.ConquerPoints -= 5; Game.ConquerStructures.Broadcast.BroadcastStr broadcast = new PhoenixProject.Game.ConquerStructures.Broadcast.BroadcastStr(); broadcast.EntityID = client.Entity.UID; broadcast.EntityName = client.Entity.Name; broadcast.ID = Game.ConquerStructures.Broadcast.BroadcastCounter.Next; if (cast.List[0].Length > 80) cast.List[0] = cast.List[0].Remove(80); broadcast.Message = cast.List[0]; if (Game.ConquerStructures.Broadcast.Broadcasts.Count == 0) { if (Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID == 1) { Game.ConquerStructures.Broadcast.CurrentBroadcast = broadcast; Game.ConquerStructures.Broadcast.LastBroadcast = DateTime.Now; ServerBase.Kernel.SendWorldMessage(new Message(cast.List[0], "ALLUSERS", client.Entity.Name, System.Drawing.Color.Red, Message.BroadcastMessage), ServerBase.Kernel.GamePool.Values); client.Send(cast); break; } } Game.ConquerStructures.Broadcast.Broadcasts.Add(broadcast); cast.dwParam = (uint)Game.ConquerStructures.Broadcast.Broadcasts.Count; client.Send(cast); break; } break; } case Broadcast.Urgen5CPs: { for (int c = 0; c < Game.ConquerStructures.Broadcast.Broadcasts.Count; c++) { var broadcast = Game.ConquerStructures.Broadcast.Broadcasts[c]; if (broadcast.ID == cast.dwParam) { if (c != 0) { if (client.Entity.ConquerPoints > 5) { broadcast.SpentCPs += 5; client.Entity.ConquerPoints -= 5; if (Game.ConquerStructures.Broadcast.Broadcasts[c - 1].SpentCPs <= broadcast.SpentCPs) { Game.ConquerStructures.Broadcast.Broadcasts[c] = Game.ConquerStructures.Broadcast.Broadcasts[c - 1]; Game.ConquerStructures.Broadcast.Broadcasts[c - 1] = broadcast; } else { Game.ConquerStructures.Broadcast.Broadcasts[c] = broadcast; } } } } } break; } case Broadcast.Urgen15CPs: { for (int c = 0; c < Game.ConquerStructures.Broadcast.Broadcasts.Count; c++) { var broadcast = Game.ConquerStructures.Broadcast.Broadcasts[c]; if (broadcast.ID == cast.dwParam) { if (c != 0) { if (client.Entity.ConquerPoints > 15) { broadcast.SpentCPs += 15; client.Entity.ConquerPoints -= 15; for (int b = c - 1; b > 0; b--) Game.ConquerStructures.Broadcast.Broadcasts[b] = Game.ConquerStructures.Broadcast.Broadcasts[b - 1]; Game.ConquerStructures.Broadcast.Broadcasts[0] = broadcast; } } } } break; } } break; } #endregion #region Nobility (2064) case 2064: { NobilityInfo nobility = new NobilityInfo(false); nobility.Deserialize(packet); Game.ConquerStructures.Nobility.Handle(nobility, client); break; } #endregion #region TopGuilds case 1058: { if (client.Guild != null && client.AsMember != null) { if (client.AsMember != null) { Writer.WriteUInt32((uint)client.AsMember.SilverDonation, 8, packet); if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) if (client.AsMember.SilverDonation > client.Guild.SilverFund) { client.Guild.SilverFund = (uint)client.AsMember.SilverDonation; client.Entity.GuildRank = (ushort)PhoenixProject.Game.Enums.GuildMemberRank.OSupervisor; client.AsMember.Rank = (PhoenixProject.Game.Enums.GuildMemberRank)client.Entity.GuildRank; } Writer.WriteUInt32((uint)client.AsMember.ConquerPointDonation, 20, packet); if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) if (client.AsMember.ConquerPointDonation > client.Guild.ConquerPointFund) { client.Guild.ConquerPointFund = (uint)client.AsMember.ConquerPointDonation; client.Entity.GuildRank = (ushort)PhoenixProject.Game.Enums.GuildMemberRank.CPSupervisor; client.AsMember.Rank = (PhoenixProject.Game.Enums.GuildMemberRank)client.Entity.GuildRank; } } Writer.WriteUInt32(client.Entity.PKPoints, 12, packet); if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) if (client.Entity.PKPoints > client.Guild.pkp_donation) { client.Guild.pkp_donation = (uint)client.Entity.PKPoints; client.Entity.GuildRank = (ushort)PhoenixProject.Game.Enums.GuildMemberRank.PKSupervisor; client.AsMember.Rank = (PhoenixProject.Game.Enums.GuildMemberRank)client.Entity.GuildRank; } if (client.ArenaStatistic != null) { Writer.WriteUInt32(client.ArenaStatistic.CurrentHonor, 24, packet); if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) if (client.ArenaStatistic.CurrentHonor > client.Guild.honor_donation) { client.Guild.honor_donation = (uint)client.ArenaStatistic.CurrentHonor; client.Entity.GuildRank = (ushort)PhoenixProject.Game.Enums.GuildMemberRank.HonoraryManager; client.AsMember.Rank = (PhoenixProject.Game.Enums.GuildMemberRank)client.Entity.GuildRank; } } Writer.WriteUInt32(0, 16, packet); if (client.Entity != null) if (client.Entity.Flowers != null) { Writer.WriteUInt32((uint)client.Entity.Flowers.RedRoses, 28, packet); if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) if (client.Entity.Flowers.RedRoses > client.Guild.rose_donation) { client.Guild.rose_donation = (uint)client.Entity.Flowers.RedRoses; client.Entity.GuildRank = (ushort)PhoenixProject.Game.Enums.GuildMemberRank.RoseSupervisor; client.AsMember.Rank = (PhoenixProject.Game.Enums.GuildMemberRank)client.Entity.GuildRank; } Writer.WriteUInt32((uint)client.Entity.Flowers.Tulips, 32, packet); if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) if (client.Entity.Flowers.Tulips > client.Guild.tuil_donation) { client.Guild.tuil_donation = (uint)client.Entity.Flowers.Tulips; client.Entity.GuildRank = (ushort)PhoenixProject.Game.Enums.GuildMemberRank.TulipFollower; client.AsMember.Rank = (PhoenixProject.Game.Enums.GuildMemberRank)client.Entity.GuildRank; } Writer.WriteUInt32((uint)client.Entity.Flowers.Lilies, 36, packet); if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) if (client.Entity.Flowers.Lilies > client.Guild.lilies_donation) { client.Guild.lilies_donation = (uint)client.Entity.Flowers.Lilies; client.Entity.GuildRank = (ushort)PhoenixProject.Game.Enums.GuildMemberRank.LilySupervisor; client.AsMember.Rank = (PhoenixProject.Game.Enums.GuildMemberRank)client.Entity.GuildRank; } Writer.WriteUInt32((uint)client.Entity.Flowers.Orchads, 40, packet); if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) if (client.Entity.Flowers.Orchads > client.Guild.orchid_donation) { client.Guild.orchid_donation = (uint)client.Entity.Flowers.Orchads; client.Entity.GuildRank = (ushort)PhoenixProject.Game.Enums.GuildMemberRank.OrchidFollower; client.AsMember.Rank = (PhoenixProject.Game.Enums.GuildMemberRank)client.Entity.GuildRank; } Writer.WriteUInt32((uint)(client.Entity.Flowers.Orchads + (uint)client.Entity.Flowers.RedRoses + (uint)client.Entity.Flowers.Tulips + (uint)client.Entity.Flowers.Lilies), 44, packet); } if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) if (client.Entity.GuildRank != (ushort)PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { if (client.Entity.Name == client.Guild.LeaderName) { client.Entity.GuildRank = (ushort)PhoenixProject.Game.Enums.GuildMemberRank.LeaderSpouse; client.AsMember.Rank = (PhoenixProject.Game.Enums.GuildMemberRank)client.Entity.GuildRank; } } if (client.Guild != null) client.Guild.SendGuild(client); client.Send(packet); } break; } #endregion #region Flowers (1150 & 1151) case 1150: { new Game.Features.Flowers.FlowerSystem(packet, client); break; } #endregion #region Flowers (1150 & 1151) case 1151: { int subtype = packet[4]; AddFlowers(client, packet); break; } #endregion #region Mentor prize (2067) case 2067: { MentorPrize prize = new MentorPrize(false); prize.Deserialize(packet); switch (prize.Prize_Type) { case MentorPrize.ClaimExperience: { client.IncreaseExperience((ulong)(((double)client.PrizeExperience / 606) * client.ExpBall), false); client.PrizeExperience = 0; foreach (var appr in client.Apprentices.Values) { appr.Actual_Experience = 0; Database.KnownPersons.SaveApprenticeInfo(appr); } prize.Mentor_ID = client.Entity.UID; prize.Prize_Type = MentorPrize.Show; prize.Prize_Experience = client.PrizeExperience; prize.Prize_HeavensBlessing = client.PrizeHeavenBlessing; prize.Prize_PlusStone = client.PrizePlusStone; client.Send(prize); break; } case MentorPrize.ClaimHeavenBlessing: { client.AddBless(client.PrizeHeavenBlessing); client.PrizeHeavenBlessing = 0; foreach (var appr in client.Apprentices.Values) { appr.Actual_HeavenBlessing = 0; Database.KnownPersons.SaveApprenticeInfo(appr); } prize.Mentor_ID = client.Entity.UID; prize.Prize_Type = MentorPrize.Show; prize.Prize_Experience = client.PrizeExperience; prize.Prize_HeavensBlessing = client.PrizeHeavenBlessing; prize.Prize_PlusStone = client.PrizePlusStone; client.Send(prize); break; } case MentorPrize.ClaimPlus: { int stones = client.PrizePlusStone / 100; int totake = stones; if (stones > 0) { for (; stones > 0; stones--) { client.PrizePlusStone -= 100; if (!client.Inventory.Add(730001, 1, 1)) break; } } foreach (var appr in client.Apprentices.Values) { if (appr.Actual_Plus >= totake) { appr.Actual_Plus -= (ushort)totake; totake = 0; } else { totake -= appr.Actual_Plus; appr.Actual_Plus = 0; } Database.KnownPersons.SaveApprenticeInfo(appr); } prize.Mentor_ID = client.Entity.UID; prize.Prize_Type = MentorPrize.Show; prize.Prize_Experience = client.PrizeExperience; prize.Prize_HeavensBlessing = client.PrizeHeavenBlessing; prize.Prize_PlusStone = client.PrizePlusStone; client.Send(prize); break; } case MentorPrize.Show: { prize.Mentor_ID = client.Entity.UID; prize.Prize_Type = MentorPrize.Show; prize.Prize_Experience = client.PrizeExperience; prize.Prize_HeavensBlessing = client.PrizeHeavenBlessing; prize.Prize_PlusStone = client.PrizePlusStone; client.Send(prize); break; } } break; } #endregion #region ElitePk Tournament 2223 | 2219 case 2223: { if (client.Entity.MapID == 6002) break; if (Game.Tournaments.EliteTournament.Start) break; GamePackets.Elite_Pk pk = new Elite_Pk(client.Entity.UID); pk.Send(client); break; } case 2219: { if (client.Entity.MapID == 6002) break; byte[] sed = new byte[36] { 0x1C ,0x00 ,0xAB ,0x08 ,0x04 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x00 // ; « ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x54 ,0x51 ,0x53 ,0x65 // ; TQSe ,0x72 ,0x76 ,0x65 ,0x72 // ;rver }; client.Send(sed); break; } case 1063: { GamePackets.Guild_Pk pk = new Guild_Pk(client.Entity.UID); pk.Send(client); break; } /* case 2224: { client.Send(packet); break; } case 2232: { client.Send(packet); break; } case 2242: { client.Send(packet); break; } case 2243: { client.Send(packet); break; }*/ /*case 2242://Request Arena ranking List 2245 2242 2244 { //Code snippet that belongs to Ultimation Game.ConquerStructures.TeamArena.Statistics.ShowWiners(client); break; } case 2245: { client.TeamArenaStatistic.Send(client); break; }*/ /*case 2245: { client.Send(packet); break; }*/ /* case 2233: { GamePackets.Team_Pk pk = new Team_Pk(client.Entity.UID); pk.Send(client); break; }*/ /* case 2252: { client.Send(packet); break; }*/ /* case 2253: { GamePackets.Team_PkComun pk = new Team_PkComun(client.Entity.UID); pk.Send(client); break; }*/ case 1130: { if (client.Entity.TitlePacket != null) { if (packet[9] == 4) { if (client.Entity.TitlePacket.dwParam2 != 0) client.Entity.TitlePacket.Send(client); } if (packet[9] == 3) { client.Entity.TitleActivated = packet[8]; client.Send(packet); client.SendScreen(client.Entity.SpawnPacket, false); } } break; } #endregion #region vipteleport case 1128: { p1128 vp = new p1128(false); vp.Deserialize(packet); if (ServerBase.Constants.VipNo.Contains(client.Entity.MapID)) return; if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Ghost)) return; switch (vp.UID) { case 0://player city teleport { switch (vp.UID2) { //////////////////////////////////////////////////////////////////////////////////////////////////// case 1://tc if (client.Map.BaseID != 700) client.Entity.Teleport(1002, 429, 378); break; case 2://pc if (client.Map.BaseID != 700) client.Entity.Teleport(1011, 188, 264); break; case 3://ac if (client.Map.BaseID != 700) client.Entity.Teleport(1020, 565, 562); break; case 4://dc if (client.Map.BaseID != 700) client.Entity.Teleport(1000, 500, 650); break; case 5://bc if (client.Map.BaseID != 700) client.Entity.Teleport(1015, 717, 571); break; //////////////////////////////////////////////////////////////////////////////////////// { } default: Console.WriteLine("Unknown 1128 portal subtype 1 : " + vp.UID2); break; } break; } case 1://Team city teleport { switch (vp.UID2) { //////////////////////////////////////////////////////////////////////////////////////////////////// case 1://tc foreach (Client.GameState teammate in client.Entity.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, teammate.Entity.X, teammate.Entity.Y) <= 18) { if (client.Map.BaseID != 700) { teammate.Entity.Teleport(1002, 429, 378); } } } if (client.Map.BaseID != 700) client.Entity.Teleport(1002, 429, 378); break; case 2://pc foreach (Client.GameState teammate in client.Entity.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, teammate.Entity.X, teammate.Entity.Y) <= 18) { if (client.Map.BaseID != 700) { teammate.Entity.Teleport(1011, 188, 264); } } } if (client.Map.BaseID != 700) client.Entity.Teleport(1011, 188, 264); break; case 3://ac foreach (Client.GameState teammate in client.Entity.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, teammate.Entity.X, teammate.Entity.Y) <= 18) { if (client.Map.BaseID != 700) { teammate.Entity.Teleport(1020, 565, 562); } } } if (client.Map.BaseID != 700) client.Entity.Teleport(1020, 565, 562); break; case 4://dc foreach (Client.GameState teammate in client.Entity.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, teammate.Entity.X, teammate.Entity.Y) <= 18) { if (client.Map.BaseID != 700) { teammate.Entity.Teleport(1000, 500, 650); } } } if (client.Map.BaseID != 700) client.Entity.Teleport(1000, 500, 650); break; case 5://bc foreach (Client.GameState teammate in client.Entity.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, teammate.Entity.X, teammate.Entity.Y) <= 18) { if (client.Map.BaseID != 700) { teammate.Entity.Teleport(1015, 717, 571); } } } if (client.Map.BaseID != 700) client.Entity.Teleport(1015, 717, 571); break; //////////////////////////////////////////////////////////////////////////////////////// { } default: Console.WriteLine("Unknown 1128 portal subtype 2 : " + vp.UID2); break; } break; } default: Console.WriteLine("Unknown 1128 subtype: " + vp.UID); break; } break; } #endregion #region MentorApprentice (2065) case 2065: { MentorApprentice ma = new MentorApprentice(false); ma.Deserialize(packet); switch (ma.Type) { case MentorApprentice.LeaveMentor: { LeaveMentor(ma, client); break; } case MentorApprentice.ExpellApprentice: { ExpelApprentice(ma, client); break; } case MentorApprentice.RequestApprentice: { AddApprentice(ma, client); break; } case MentorApprentice.RequestMentor: { AddMentor(ma, client); break; } case MentorApprentice.AcceptRequestApprentice: { AcceptRequestApprentice(ma, client); break; } case MentorApprentice.AcceptRequestMentor: { AcceptRequestMentor(ma, client); break; } } break; } case 2066: { MentorInformation info = new MentorInformation(false); info.Deserialize(packet); if (info.Mentor_Type == 1) { client.ReviewMentor(); } break; } #endregion #region Guild members (2102) case 2102: { ushort Page = BitConverter.ToUInt16(packet, 8); if (client.Guild != null) { if (client.AsMember != null) client.Guild.SendMembers(client, Page); } break; } #endregion #region Arena (2207<->2211) case 2207://Request Arena ranking List 2245 2242 2244 { //Code snippet that belongs to Ultimation ushort PageIndex = BitConverter.ToUInt16(packet, 6); Game.ConquerStructures.Arena.Statistics.ShowRankingPage(packet[4], PageIndex, client); break; } case 2206: { //Code snippet that belongs to Ultimation ushort PageIndex = BitConverter.ToUInt16(packet, 4); Game.ConquerStructures.Arena.QualifyEngine.RequestGroupList(client, PageIndex); break; } case 2205://Arena Signup! { //Code snippet that belongs to Ultimation uint DialogID = BitConverter.ToUInt32(packet, 4); uint ButtonID = BitConverter.ToUInt32(packet, 8); switch (DialogID) { case 4: { switch (ButtonID) { case 0: { Game.ConquerStructures.Arena.QualifyEngine.DoQuit(client); break; } } break; } case 0: Game.ConquerStructures.Arena.QualifyEngine.DoSignup(client); client.Send(packet); break; case 1: Game.ConquerStructures.Arena.QualifyEngine.DoQuit(client); client.Send(packet); break; case 3: { switch (ButtonID) { case 2: Game.ConquerStructures.Arena.QualifyEngine.DoGiveUp(client); break; case 1: Game.ConquerStructures.Arena.QualifyEngine.DoAccept(client); break; } break; } case 5: { if (client.ArenaStatistic.ArenaPoints <= 1500) if (client.Entity.Money >= 9000000) { client.Entity.Money -= 9000000; client.ArenaStatistic.ArenaPoints += 1500; client.Send(client.ArenaStatistic); } break; } case 11://Win/Lose Dialog { switch (ButtonID) { case 0: Game.ConquerStructures.Arena.QualifyEngine.DoSignup(client); break; } break; } } break; } case 2208://Request Arena Winner List { //Code snippet that belongs to Ultimation Game.ConquerStructures.Arena.Statistics.ShowWiners(client); break; } case 2209: {//bug in console client.ArenaStatistic.Send(client); break; } case 2211: { if (client.Map.BaseID == 6001 || client.Map.BaseID == 6000) return; ushort Type = BitConverter.ToUInt16(packet, 4); uint Fighter = BitConverter.ToUInt32(packet, 10); if (Type == 0) { if (ServerBase.Kernel.GamePool.ContainsKey(Fighter)) { Client.GameState Client = ServerBase.Kernel.GamePool[Fighter]; if (Client.QualifierGroup != null) { if (Client.QualifierGroup.Inside) { if (!Client.QualifierGroup.Done) { Client.QualifierGroup.BeginWatching(client); } } } } } else if (Type == 1) { Game.ConquerStructures.Arena.QualifyEngine.DoLeave(client); } else if (Type == 4) { string name = ""; for (int c = 22; c < packet.Length; c++) { if (packet[c] != 0) name += (char)packet[c]; else break; } Game.ConquerStructures.Arena.QualifyEngine.DoCheer(client, name); } break; } #endregion #region Movement/Walk (10005) case 10005: { if (client.Action != 2) return; GroundMovement groundMovement = new GroundMovement(false); groundMovement.Deserialize(packet); PlayerGroundMovment(groundMovement, client); break; } #endregion //24 2533 53 152 1 0 0 0 84 //60 0 229 9 50 151 152 0 1 0 0 0 0 0 0 0 84 81 83 101 114 118 101 114 //3c 00 e5 09 32 97 98 00 01 00 00 00 00 00 00 00 54 51 53 65 72 76 65 72 /* case 2533: { KimoChi prize = new KimoChi(false); prize.Deserialize(packet); client.Send(packet); client.Send(prize); break; }*/ #region Lottery2 case 1314://1314 { Game.Lottery.Handle(packet, client); break; } #endregion #region New AutoInvite case 1126://1314 { EventAlert2.Handle(packet, client); break; } #endregion #region ClanWar inv (1313) case 1313://1313 { if (packet[4] == 8) { client.Entity.Teleport(1002, 413, 246); } return; } #endregion //packet[8] = 1; #region ChangeName (2080) case 2080: { NameChange prize = new NameChange(false); //prize.EditAllowed = 1; //prize.EditCount = 1; prize.Deserialize(packet); switch (prize.Action)//string name = System.Text.Encoding.UTF7.GetString(packet, 26, packet[25]); { case PhoenixProject.Network.GamePackets.NameChange.NameChangeAction.Request: { string newname = System.Text.Encoding.UTF7.GetString(packet, 10, 16).TrimEnd('\0'); packet[6] = (byte)client.Entity.EditeName; packet[8] = (byte)(5 - client.Entity.EditeName); prize.Send(client); client.Send(prize); if (newname != "") { if (newname == "") return; if (newname.Contains("[") && newname.Contains("]")) return; if (Dialogs.InvalidCharacters(newname) && Dialogs.InvalidCharacters3(newname) && !newname.Contains("[") && !newname.Contains("]")) { PhoenixProject.Database.MySqlCommand cmd2 = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.SELECT).Select("entities").Where("name", newname);//debug and test! PhoenixProject.Database.MySqlReader r = new PhoenixProject.Database.MySqlReader(cmd2); if (!r.Read())//wait { if (client.Entity.ConquerPoints >= PhoenixProject.Database.rates.ChangeName) { client.Entity.ConquerPoints -= PhoenixProject.Database.rates.ChangeName; // PhoenixProject.Database.MySqlCommand cmd = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); // cmd.Update("entities").Set("namechange", newname).Where("UID", client.Entity.UID).Execute(); r.Close(); r.Dispose(); client.Entity.NewName = newname; // Console.WriteLine(client.Entity.Name + ", Changed hes Name to : " + newname); ServerBase.Kernel.SendWorldMessage(new Message(client.Entity.Name + ", Changed He's/Hers Name to " + newname + ", Will be affected after Relogin.", System.Drawing.Color.Red, Message.Talk), ServerBase.Kernel.GamePool.Values); // client.Edita = 0; // client.Edite = 1; client.Entity.EditeName += 1; packet[4] = 1; prize.Send(client); client.Send(prize); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Your new name is : " + newname + ", After relog You will get your new name, Want to Relog?"); npc.OptionID = 244; client.Send(npc.ToArray()); } else { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Come back when you have " + PhoenixProject.Database.rates.ChangeName + " CPS."); npc.OptionID = 255; client.Send(npc.ToArray()); r.Close(); r.Dispose(); } } else { packet[4] = 2; prize.Send(client); client.Send(prize); r.Close(); r.Dispose(); } } else { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "im sorry not allowed now close the dialog and try again"); npc.OptionID = 255; client.Send(npc.ToArray()); //r.Close(); //r.Dispose(); } } break; } } //packet[8] = 1; //byte NewClass = packet[4]; //ushort NewBody = packet[8]; break; } #endregion #region Reincarnation (1066) case 1066: { if (client.Entity.Reborn != 2) return; if (ServerBase.Kernel.ReincarnatedCharacters.ContainsKey(client.Entity.UID)) return; byte NewClass = packet[4]; ushort NewBody = packet[8]; if (client.Entity.Body.ToString().EndsWith("1") || client.Entity.Body.ToString().EndsWith("2")) NewBody += 2000; else NewBody += 1000; if (client.Inventory.Contains(711083, 1) && client.Entity.ConquerPoints >= PhoenixProject.Database.rates.Riencration) { client.Entity.Body = NewBody; new PacketHandler.Reincarnation(client, NewClass); client.Inventory.Remove(711083, 1); client.Entity.ConquerPoints -= PhoenixProject.Database.rates.Riencration; } break; } #endregion #region PurifyItem (2076) case 2076: { Purification ps = new Purification(false); ps.Deserialize(packet); switch (ps.Mode) { case Purification.Purify: PurifyItem(ps, client); break; case Purification.ItemArtifact: PurifyRefinery(ps, client); break; //case Purification.Stabilaze: //new Game.Features.Refinery.Handle(packet, client); break; } break; } #endregion #region KimoClans case 1312: { //GameState targets; switch (packet[4]) { case 21: { if (client.Entity.Myclan != null) { try { uint lider = 0; string name_receive = System.Text.Encoding.UTF7.GetString(packet, 18, packet[17]); foreach (Client.GameState clien in ServerBase.Kernel.GamePool.Values) { if (clien.Entity.Name == name_receive) { lider = clien.Entity.UID; } } if (lider == client.Entity.UID) return; Client.GameState aClient = null; if (PhoenixProject.ServerBase.Kernel.GamePool.TryGetValue(lider, out aClient)) { if (PhoenixProject.ServerBase.Kernel.ServerClans.ContainsKey(client.Entity.Myclan.ClanId)) { if (PhoenixProject.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].Members.ContainsKey(aClient.Entity.UID)) { PhoenixProject.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].ClanLider = aClient.Entity.Name; aClient.Entity.ClanRank = 100; aClient.Entity.Myclan.Members[aClient.Entity.UID].Rank = 100; //if (aClient.Entity.Myclan.Members.ContainsKey(client.Entity.UID)) //aClient.Entity.Myclan.Members[client.Entity.UID].Rank = 0; client.Entity.ClanRank = 10; client.Entity.Myclan.Members[client.Entity.UID].Rank = 10; Database.Clans.SaveClan(aClient.Entity.Myclan); //Database.Clans.JoinClan(client); Network.GamePackets.Clan cl = new PhoenixProject.Network.GamePackets.Clan(client, 1); client.Send(cl.ToArray()); ClanMembers clan = new ClanMembers(client); client.Send(clan.ToArray()); Network.GamePackets.Clan cls = new PhoenixProject.Network.GamePackets.Clan(aClient, 1); aClient.Send(cls.ToArray()); ClanMembers clans = new ClanMembers(aClient); aClient.Send(clans.ToArray()); ServerBase.Kernel.GamePool[aClient.Entity.UID].Screen.FullWipe(); ServerBase.Kernel.GamePool[aClient.Entity.UID].Screen.Reload(null); ServerBase.Kernel.GamePool[client.Entity.UID].Screen.FullWipe(); ServerBase.Kernel.GamePool[client.Entity.UID].Screen.Reload(null); } } } else { PhoenixProject.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].ClanLider = name_receive; client.Entity.ClanRank = 10; client.Entity.Myclan.Members[client.Entity.UID].Rank = 10; Database.Clans.SaveClan(client.Entity.Myclan); Database.Clans.TransferClan(name_receive); Network.GamePackets.Clan cl = new PhoenixProject.Network.GamePackets.Clan(client, 1); client.Send(cl.ToArray()); ClanMembers clan = new ClanMembers(client); client.Send(clan.ToArray()); ServerBase.Kernel.GamePool[client.Entity.UID].Screen.FullWipe(); ServerBase.Kernel.GamePool[client.Entity.UID].Screen.Reload(null); //Console.WriteLine("gggf"); } } catch (Exception e) { Program.SaveException(e); } } break; } case (byte)Game.Clan_Typ.Quit: { if (client.Entity.Myclan != null) { if (client.Entity.ClanRank != 100) { client.Entity.Myclan.ExpelMember(client.Entity.Name, true); } } break; } case 25: { if (client.Entity.Myclan == null) return; string buletin = System.Text.Encoding.UTF7.GetString(packet, 18, packet[17]); if (PhoenixProject.ServerBase.Kernel.ServerClans.ContainsKey(client.Entity.Myclan.ClanId)) PhoenixProject.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].ClanBuletion = buletin; Database.Clans.SaveClan(PhoenixProject.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId]); client.Send(packet); break; } case 22: { if (client.Entity.Myclan != null) { if (client.Entity.ClanRank == 100) { string name = System.Text.Encoding.UTF7.GetString(packet, 18, packet[17]); if (client.Entity.Myclan != null) { if (client.Entity.ClanRank == 100) { client.Entity.Myclan.ExpelMember(name, false); Database.Clans.KickClan(name); } } } } break; } case 26: { uint money = BitConverter.ToUInt32(packet, 8); if (client.Entity.Money >= money && client.Entity.Myclan != null) { client.Entity.Myclan.Members[client.Entity.UID].Donation += money; client.Entity.Money -= money; if (PhoenixProject.ServerBase.Kernel.ServerClans.ContainsKey(client.Entity.Myclan.ClanId)) PhoenixProject.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId].ClanDonation += money; Network.GamePackets.Clan cl = new PhoenixProject.Network.GamePackets.Clan(client, 1); client.Send(cl.ToArray()); Database.Clans.SaveClientDonation(client); Database.Clans.SaveClan(PhoenixProject.ServerBase.Kernel.ServerClans[client.Entity.Myclan.ClanId]); } break; } case 11: { uint lider = BitConverter.ToUInt32(packet, 8); if (PhoenixProject.ServerBase.Kernel.GamePool.ContainsKey(lider)) { packet[4] = 11; Network.Writer.WriteUInt32(client.Entity.UID, 8, packet); packet[16] = 1; packet[17] = (byte)client.Entity.Name.Length; for (int i = 0; i < client.Entity.Name.Length; i++) { try { packet[18 + i] = Convert.ToByte(client.Entity.Name[i]); } catch { } } if (PhoenixProject.ServerBase.Kernel.GamePool[lider].Entity.Myclan != null) PhoenixProject.ServerBase.Kernel.GamePool[lider].Send(packet); } break; } case 12: { if (packet[16] == 1) { if (client.Entity.Myclan != null) if (client.Entity.Myclan.Members[client.Entity.UID].Rank == 100) { { if (client.Entity.Myclan.Members.Count < 7) { uint memeber = BitConverter.ToUInt32(packet, 8); if (ServerBase.Kernel.GamePool.ContainsKey(memeber)) { Game.ClanMembers member = new PhoenixProject.Game.ClanMembers(); member.UID = ServerBase.Kernel.GamePool[memeber].Entity.UID; member.Donation = 0; member.Rank = 10; member.Class = ServerBase.Kernel.GamePool[memeber].Entity.Class; member.Level = ServerBase.Kernel.GamePool[memeber].Entity.Level; member.Name = ServerBase.Kernel.GamePool[memeber].Entity.Name; if (!client.Entity.Myclan.Members.ContainsKey(memeber)) client.Entity.Myclan.Members.Add(member.UID, member); ServerBase.Kernel.GamePool[memeber].Entity.ClanRank = 10; ServerBase.Kernel.GamePool[memeber].Entity.ClanId = client.Entity.ClanId; ServerBase.Kernel.GamePool[memeber].Entity.Myclan = client.Entity.Myclan; ServerBase.Kernel.GamePool[memeber].Entity.ClanName = client.Entity.ClanName; Database.Clans.JoinClan(ServerBase.Kernel.GamePool[memeber]); ServerBase.Kernel.GamePool[memeber].Screen.FullWipe(); ServerBase.Kernel.GamePool[memeber].Screen.Reload(null); Network.GamePackets.Clan cl = new PhoenixProject.Network.GamePackets.Clan(client, 1); client.Send(cl.ToArray()); ClanMembers clan = new ClanMembers(client); client.Send(clan.ToArray()); } } } } } break; } case 4: { ClanMembers clan = new ClanMembers(client); client.Send(clan.ToArray()); break; } case 0x1d: { if (client.Entity.Myclan != null) { Network.Writer.WriteUInt32(client.Entity.Myclan.ClanId, 8, packet); Network.Writer.WriteByte(1, 16, packet); Network.Writer.WriteByte(0x0d, 17, packet); Network.Writer.WriteString("0 0 0 0 0 0 0", 18, packet); client.Send(packet); Network.GamePackets.Clan cl = new PhoenixProject.Network.GamePackets.Clan(client, 1); client.Send(cl.ToArray()); client.Send(packet); if (client.Entity.Myclan.ClanBuletion != "") client.Send(cl.UpgradeBuletin(client.Entity.Myclan.ClanBuletion)); } else { client.Send(packet); packet[4] = 23; } break; } case 0x18: { client.Send(packet); break; } case (byte)Game.Clan_Typ.AddAlly: { Game.Clans clan = client.Entity.Myclan; if (clan != null) { Client.GameState target; UInt32 Identifier = BitConverter.ToUInt32(packet, 8); if (client.Entity.ClanRank == 100) { if (clan.Allies.Count >= 5) { client.Send(new Message("The Amount of Allies You can Have is exceeded", System.Drawing.Color.Red, Message.TopLeft)); break; } if (ServerBase.Kernel.GamePool.TryGetValue(Identifier, out target)) { Game.Clans tclan = target.Entity.Myclan; if (tclan != null) { if (target.Entity.ClanRank == 100) { if (tclan.Allies.Count >= 5) { client.Send(new Message("The Amount of Allies the Target Clan can Have is exceeded", System.Drawing.Color.Red, Message.TopLeft)); break; } if (!clan.Allies.ContainsKey(tclan.ClanId)) { if (!clan.Enemies.ContainsKey(tclan.ClanId)) { String clanName = client.Entity.ClanName; Clan2 clanp = new Clan2(); clanp.Deserialize(packet); clanp.Offset16 = 2; clanp.Identifier = client.Entity.UID; Writer.WriteByte((Byte)clanName.Length, 17, clanp.ToArray()); Writer.WriteString(clanName, 18, clanp.ToArray()); tclan.AllyRequest = clan.ClanId; target.Send(clanp); } else client.Send(new Message("The clan is Your Enemy.", System.Drawing.Color.Red, Message.TopLeft)); } } else client.Send(new Message("This target is not the clan leader.", System.Drawing.Color.Red, Message.TopLeft)); } } else client.Send(new Message("Can not find target.", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You are not the clan leader.", System.Drawing.Color.Red, Message.TopLeft)); } break; } case (byte)Game.Clan_Typ.AcceptAlliance: { Game.Clans clan = client.Entity.Myclan; if (clan != null) { if (client.Entity.ClanRank == 100) { Game.Clans tclan; if (ServerBase.Kernel.ServerClans.TryGetValue(clan.AllyRequest, out tclan)) { if (tclan != null) { if (!tclan.Enemies.ContainsKey(clan.ClanId)) { if (!clan.Enemies.ContainsKey(tclan.ClanId)) { if (!clan.Allies.ContainsKey(tclan.ClanId)) clan.Allies.Add(tclan.ClanId, tclan); tclan.Allies.Add(clan.ClanId, clan); clan.SendMessage(new ClanRelations(clan, ClanRelations.RelationTypes.Allies)); tclan.SendMessage(new ClanRelations(tclan, ClanRelations.RelationTypes.Allies)); clan.SendMessage(new Message(String.Format("Our Clan has Allianced with {0}", tclan.ClanName), System.Drawing.Color.Red, Message.Clan)); tclan.SendMessage(new Message(String.Format("Our Clan has Allianced with {0}", clan.ClanName), System.Drawing.Color.Red, Message.Clan)); clan.AddRelation(tclan.ClanId, ClanRelations.RelationTypes.Allies); tclan.AddRelation(clan.ClanId, ClanRelations.RelationTypes.Allies); clan.AllyRequest = tclan.AllyRequest = 0; } else client.Send(new Message("This Clan is Your Enemy.", System.Drawing.Color.Red, Message.TopLeft)); } client.Send(new Message("This Clan Has Enemied You!.", System.Drawing.Color.Red, Message.TopLeft)); } } else client.Send(new Message("Can not find target", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("You are not the clan leader.", System.Drawing.Color.Red, Message.TopLeft)); } break; } case (byte)Game.Clan_Typ.DeleteEnemy: { Game.Clans clan = client.Entity.Myclan; if (clan != null) { if (client.Entity.ClanRank == 100) { Clan2 clanp = new Clan2(); clanp.Deserialize(packet); String EnemyTarget = clanp.Offset18String; UInt32 ClanId = clanp.GetClanId(EnemyTarget); Game.Clans tclan; if (ServerBase.Kernel.ServerClans.TryGetValue(ClanId, out tclan)) { clan.Enemies.Remove(ClanId); clan.DeleteRelation(ClanId, ClanRelations.RelationTypes.Enemies); clan.SendMessage(new ClanRelations(clan, ClanRelations.RelationTypes.Enemies)); clan.SendMessage(new Message(String.Format("We are no longer Enemies With {0}", clan.ClanId), System.Drawing.Color.Red, Message.Clan)); client.Send(clanp); } } else client.Send(new Message("You are not authorized to continue with this action", System.Drawing.Color.Red, Message.TopLeft)); } break; } case (byte)Game.Clan_Typ.DeleteAlly: { Game.Clans clan = client.Entity.Myclan; if (clan != null) { if (client.Entity.ClanRank == 100) { Clan2 clanp = new Clan2(); clanp.Deserialize(packet); String AlliedTarget = clanp.Offset18String; UInt32 ClanId = clanp.GetClanId(AlliedTarget); Game.Clans tclan; if (clan.Allies.TryGetValue(ClanId, out tclan)) { clan.Allies.Remove(ClanId); tclan.Allies.Remove(clan.ClanId); clan.DeleteRelation(ClanId, ClanRelations.RelationTypes.Allies); tclan.DeleteRelation(clan.ClanId, ClanRelations.RelationTypes.Allies); clan.SendMessage(new ClanRelations(clan, ClanRelations.RelationTypes.Allies)); tclan.SendMessage(new ClanRelations(tclan, ClanRelations.RelationTypes.Allies)); clan.SendMessage(new Message(String.Format("We are no longer allied with {0}", tclan.ClanName), System.Drawing.Color.Red, Message.Clan)); tclan.SendMessage(new Message(String.Format("We are no longer allied with {0}", clan.ClanName), System.Drawing.Color.Red, Message.Clan)); client.Send(clanp); } } else client.Send(new Message("You are not authorized to continue with this action", System.Drawing.Color.Red, Message.TopLeft)); } break; } case (byte)Game.Clan_Typ.AddEnemy: { Game.Clans clan = client.Entity.Myclan; if (clan != null) { if (client.Entity.ClanRank == 100) { String Enemy = System.Text.Encoding.UTF7.GetString(packet, 18, packet[17]).Trim(new Char[] { '\0' }); UInt32 ClanId = 0; var AllCland = ServerBase.Kernel.ServerClans.Values.ToArray(); foreach (Game.Clans c_clan in AllCland) { if (Enemy == c_clan.ClanName) { ClanId = c_clan.ClanId; break; } } if (ClanId == 0) break; if (!clan.Enemies.ContainsKey(ClanId)) { if (!clan.Allies.ContainsKey(ClanId)) { if (clan.Enemies.Count >= 5) { client.Send(new Message("The Ammount of Enemies You can Have is exceeded", System.Drawing.Color.Red, Message.TopLeft)); break; } Game.Clans tclan; if (ServerBase.Kernel.ServerClans.TryGetValue(ClanId, out tclan)) { if (!clan.Enemies.ContainsKey(tclan.ClanId)) clan.Enemies.Add(tclan.ClanId, tclan); clan.AddRelation(ClanId, ClanRelations.RelationTypes.Enemies); clan.SendMessage(new ClanRelations(clan, ClanRelations.RelationTypes.Enemies)); clan.SendMessage(new Message(String.Format("We Have Enemied the clan {0}", tclan.ClanName), System.Drawing.Color.Red, Message.Clan)); tclan.SendMessage(new Message(String.Format("The Clan {0} Has Made us their Enemy!", clan.ClanName), System.Drawing.Color.Red, Message.Clan)); } } else client.Send(new Message("This clan is one of your alliance, What has gone wrong?", System.Drawing.Color.Red, Message.TopLeft)); } else client.Send(new Message("This clan is Already One of Your Enemies", System.Drawing.Color.Red, Message.TopLeft)); } } break; } default: Console.WriteLine("Clan Type " + packet[4]); break; } break; } #endregion #region SubClass (2320) case 2320: { byte[] Packet = null; switch (packet[4]) { //9 = learn 10= upgrade pro #region [Restore/Switch] case 0: byte To = packet[6]; Packet = new byte[0]; client.Send(packet); if (To > 0)//Switch { /*switch ((Game.ClassID)To) { case Game.ClassID.Wrangler: { switch (client.Entity.SubClasses.Classes[To].Level) { case 9: { //client.Entity.Hitpoints += 1200; //client.Entity.MaxHitpoints += 1200; break; } } break; } }*/ Packet = new byte[0]; Packet = new SubClassShowFull(true) { ID = 1, Class = To, Level = client.Entity.SubClasses.Classes[To].Phase }.ToArray();//client.Entity.SubClasses.Classes[To].Phase client.Send(Packet); //Packet = new SubClass(client.Entity).ToArray(); //client.Send(Packet); client.Entity.SubClass = To; /// client.Entity.SubClassLevel = client.Entity.SubClasses.Classes[To].Level; client.Entity.SubClasses.Active = To; client.Entity.SubClassesActive = To; // Console.WriteLine("s " + To + ""); } else//Restore { client.Entity.SubClass = 0; //client.Entity.SubClassLevel = 0; client.Entity.SubClasses.Active = 0; client.Entity.SubClassesActive = 0; Packet = new SubClassShowFull(true) { ID = 1 }.ToArray(); client.Send(Packet); } client.SendScreen(client.Entity.SpawnPacket, false); break; #endregion #region [Upgrade] case 2: { byte Class = packet[6]; ushort Required = 0; Statement.SubClass Sc = client.Entity.SubClasses.Classes[Class]; #region [Set Required] switch ((Statement.ClassID)Sc.ID) { case Statement.ClassID.MartialArtist: switch (Sc.Level) { case 1: Required = 300; break; case 2: Required = 900; break; case 3: Required = 1800; break; case 4: Required = 2700; break; case 5: Required = 3600; break; case 6: Required = 5100; break; case 7: Required = 6900; break; case 8: Required = 8700; break; case 9: Required = ushort.MaxValue; break; } break; case Statement.ClassID.Warlock: switch (Sc.Level) { case 1: Required = 300; break; case 2: Required = 900; break; case 3: Required = 1800; break; case 4: Required = 2700; break; case 5: Required = 3600; break; case 6: Required = 5100; break; case 7: Required = 6900; break; case 8: Required = 8700; break; case 9: Required = ushort.MaxValue; break; } break; case Statement.ClassID.ChiMaster: switch (Sc.Level) { case 1: Required = 600; break; case 2: Required = 1800; break; case 3: Required = 3600; break; case 4: Required = 5400; break; case 5: Required = 7200; break; case 6: Required = 10200; break; case 7: Required = 13800; break; case 8: Required = 17400; break; case 9: Required = ushort.MaxValue; break; } break; case Statement.ClassID.Sage: switch (Sc.Level) { case 1: Required = 400; break; case 2: Required = 1200; break; case 3: Required = 2400; break; case 4: Required = 3600; break; case 5: Required = 4800; break; case 6: Required = 6800; break; case 7: Required = 9200; break; case 8: Required = 11600; break; case 9: Required = ushort.MaxValue; break; } break; case Statement.ClassID.Apothecary: switch (Sc.Level) { case 1: Required = 100; break; case 2: Required = 200; break; case 3: Required = 300; break; case 4: Required = 400; break; case 5: Required = 500; break; case 6: Required = 1000; break; case 7: Required = 4000; break; case 8: Required = 9000; break; case 9: Required = ushort.MaxValue; break; } break; case Statement.ClassID.Wrangler: case Statement.ClassID.Performer: switch (Sc.Level) { case 1: Required = 400; break; case 2: Required = 1200; break; case 3: Required = 2400; break; case 4: Required = 3600; break; case 5: Required = 4800; break; case 6: Required = 6800; break; case 7: Required = 9200; break; case 8: Required = 11600; break; case 9: Required = ushort.MaxValue; break; } break; } #endregion if (client.Entity.SubClasses.StudyPoints >= Required) { client.Entity.SubClasses.StudyPoints -= Required; client.Entity.SubClasses.Classes[Class].Level++; Packet = new byte[0]; Packet = new SubClassShowFull(true) { ID = 1, Class = Class, Level = client.Entity.SubClasses.Classes[Class].Level }.ToArray(); client.Send(Packet); Packet = new SubClass(client.Entity).ToArray(); client.Send(Packet); Database.SubClassTable.Update(client.Entity, client.Entity.SubClasses.Classes[Class]); //Database.SubClassTable.Update(client); } break; } #endregion #region [Info] case 6: Game.Entity Owner = client.Entity; if (Owner.SubClasses.Classes.Count > 0) { Statement.SubClass[] Classes = new Statement.SubClass[Owner.SubClasses.Classes.Count]; Owner.SubClasses.Classes.Values.CopyTo(Classes, 0); foreach (Statement.SubClass Class in Classes) { if (Class.ID == 9) { for (byte i = 0; i < Class.Phase; i++) { Packet = new byte[0]; Packet = new SubClassShowFull(true) { ID = 4, Class = Class.ID, Level = Class.Level }.ToArray(); client.Send(Packet); } continue; } Packet = new byte[0]; Packet = new SubClassShowFull(true) { ID = 4, Class = Class.ID, Level = Class.Level }.ToArray(); client.Send(Packet); } } Packet = new SubClass(client.Entity).ToArray(); client.Send(Packet); break; #endregion #region [Learn] case 9://class type packet6 byte Class1 = packet[6]; if (PacketHandler.PassLearn((byte)packet[6], client.Entity)) { if (!client.Entity.SubClasses.Classes.ContainsKey((byte)packet[6])) { { client.Entity.SubClasses.Classes.Add((byte)packet[6], new PhoenixProject.Statement.SubClass() { ID = (byte)packet[6], Level = 1, Phase = 1 }); PhoenixProject.Database.SubClassTable.Insert(client.Entity, (byte)packet[6]); Packet = new byte[0]; Packet = new SubClassShowFull(true) { ID = 1, Class = Class1, Level = client.Entity.SubClasses.Classes[Class1].Level }.ToArray(); client.Send(Packet); Packet = new SubClass(client.Entity).ToArray(); client.Send(Packet); } } } break; #endregion #region [UpgradePro] case 10: byte Class2 = packet[6]; if (client.Entity.SubClasses.Classes[(byte)Class2].Phase < client.Entity.SubClasses.Classes[(byte)Class2].Level) { client.Entity.SubClasses.Classes[(byte)Class2].Phase++; Database.SubClassTable.Update(client.Entity, client.Entity.SubClasses.Classes[(byte)Class2]); Packet = new byte[0]; Packet = new SubClassShowFull(true) { ID = 1, Class = Class2, Level = client.Entity.SubClasses.Classes[Class2].Level }.ToArray(); client.Send(Packet); Packet = new SubClass(client.Entity).ToArray(); client.Send(Packet); } break; #endregion default: Console.WriteLine("Unknown 2320 packet type " + packet[4]); break; } break; } #endregion #region ItemAdding Stabilization case 1038: { ItemAddingStabilization stabilization = new ItemAddingStabilization(false); stabilization.Deserialize(packet); StabilazeArtifact(stabilization, client); break; } #endregion #region Data (10010) case 10010: { if (client.Action != 2) return; Data gData = new Data(false); gData.Deserialize(packet); if (client.Account.State == PhoenixProject.Database.AccountTable.AccountState.Coder) { client.Send(new Message("Data ID: " + gData.ID, System.Drawing.Color.CadetBlue, Message.Talk)); } switch (gData.ID) { /*case Data.AllowAnimation: { LoginMessages(client); client.Send(new FlowerPacket(client.Entity.Flowers)); //Database.SubClassTable.Load(client.Entity); ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); client.Send(packet); } break;*/ #region Appearance case 0xb2: { byte appearance = (byte)gData.dwParam; Data app = new Data(true) { ID = 0xb2, UID = client.Entity.UID, dwParam = appearance, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }; client.Send(gData); client.Send(app); client.SendScreen(gData, true); client.SendScreen(app, true); return; } #endregion case 132: { // Console.WriteLine(" this "); client.Disconnect(); break; } /* case Data.KimoGearDis: { Console.WriteLine("data " + gData.dwParam + ""); break; }*/ case Data.UpdateProf: if (client != null) { ushort UplevelProficiency; UplevelProficiency = (ushort)gData.dwParam; var prof = client.Proficiencies[UplevelProficiency]; if ((prof.Level >= 1) && (prof.Level <= 19)) { if (prof.Level == 19 && client.Entity.ConquerPoints >= 1420) { client.Entity.ConquerPoints -= 1420; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level == 18 && client.Entity.ConquerPoints >= 1154) { client.Entity.ConquerPoints -= 1154; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level == 17 && client.Entity.ConquerPoints >= 799) { client.Entity.ConquerPoints -= 799; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level == 16 && client.Entity.ConquerPoints >= 548) { client.Entity.ConquerPoints -= 548; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level == 15 && client.Entity.ConquerPoints >= 375) { client.Entity.ConquerPoints -= 375; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level >= 11 && prof.Level <= 14 && client.Entity.ConquerPoints >= 324) { client.Entity.ConquerPoints -= 324; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level == 10 && client.Entity.ConquerPoints >= 270) { client.Entity.ConquerPoints -= 270; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level == 9 && client.Entity.ConquerPoints >= 162) { client.Entity.ConquerPoints -= 162; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level == 8 && client.Entity.ConquerPoints >= 135) { client.Entity.ConquerPoints -= 135; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level == 7 && client.Entity.ConquerPoints >= 81) { client.Entity.ConquerPoints -= 81; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level == 6 && client.Entity.ConquerPoints >= 54) { client.Entity.ConquerPoints -= 54; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level >= 2 && prof.Level <= 5 && client.Entity.ConquerPoints >= 27) { client.Entity.ConquerPoints -= 27; prof.Level++; prof.Experience = 0; prof.Send(client); } if (prof.Level == 1) { client.Entity.ConquerPoints -= 22; prof.Level++; prof.Experience = 0; prof.Send(client); } } } else { //break; } break; case Data.UpdateSpell: if (client != null) { ushort UplevelProficiency; UplevelProficiency = (ushort)gData.dwParam; if (client.Spells.ContainsKey(UplevelProficiency)) { var prof = client.Spells[UplevelProficiency]; if (prof != null) { int num2 = (int)Database.SpellTable.SpellInformations[UplevelProficiency][prof.Level].CPUpgradeRatio; int num3 = Math.Max((int)prof.Experience, 1); int num4 = 100 - ((int)(((ulong)num3) / ((ulong)Math.Max((uint)(Database.SpellTable.SpellInformations[UplevelProficiency][prof.Level].NeedExperience / 100), (uint)1)))); uint num = (uint)(((double)((num2 * num4) / 100)) / 22.2); if (client.Entity.ConquerPoints >= num) { client.Entity.ConquerPoints -= num; // Console.WriteLine(" " + num + ""); prof.Level++; prof.Experience = 0; prof.Send(client); break; } else { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Sorry you dont have " + num + " cps i cant help you!"); npc.OptionID = 255; client.Send(npc.ToArray()); break; //sorry you dont have 100 cps } } } break; } else { //break; } break; case Data.SwingPickaxe: client.Mining = true; break; case Data.Revive: Revive(gData, client); break; case Data.UsePortal: UsePortal(gData, client); break; case Data.ChangePKMode: ChangePKMode(gData, client); break; case Data.ChangeAction: ChangeAction(gData, client); break; case Data.ChangeDirection: ChangeDirection(gData, client); break; case Data.Hotkeys: client.Send(packet); break; case Data.ConfirmSpells: if (client.Spells != null) foreach (Interfaces.ISkill spell in client.Spells.Values) if (spell.ID != 3060) spell.Send(client); client.Send(packet); break; case Data.ConfirmProficiencies: if (client.Proficiencies != null) foreach (Interfaces.IProf proficiency in client.Proficiencies.Values) proficiency.Send(client); client.Send(packet); break; case Data.ConfirmGuild: client.Send(packet); break; case Data.ConfirmFriends: #region Friends/Enemy/TradePartners/Apprentices Message msg2 = new Message("Your friend, " + client.Entity.Name + ", has logged on.", System.Drawing.Color.Red, Message.TopLeft); foreach (Game.ConquerStructures.Society.Friend friend in client.Friends.Values) { if (friend.IsOnline) { var pckt = new KnownPersons(true) { UID = client.Entity.UID, Type = KnownPersons.RemovePerson, Name = client.Entity.Name, Online = true }; friend.Client.Send(pckt); pckt.Type = KnownPersons.AddFriend; friend.Client.Send(pckt); friend.Client.Send(msg2); } client.Send(new KnownPersons(true) { UID = friend.ID, Type = KnownPersons.AddFriend, Name = friend.Name, Online = friend.IsOnline }); if (friend.Message != "") { client.Send(new Message(friend.Message, client.Entity.Name, friend.Name, System.Drawing.Color.Red, Message.Whisper)); Database.KnownPersons.UpdateMessageOnFriend(friend.ID, client.Entity.UID, ""); } } foreach (Game.ConquerStructures.Society.Enemy enemy in client.Enemy.Values) { client.Send(new KnownPersons(true) { UID = enemy.ID, Type = KnownPersons.AddEnemy, Name = enemy.Name, Online = enemy.IsOnline }); } Message msg3 = new Message("Your partner, " + client.Entity.Name + ", has logged in.", System.Drawing.Color.Red, Message.TopLeft); foreach (Game.ConquerStructures.Society.TradePartner partner in client.Partners.Values) { if (partner.IsOnline) { var packet3 = new TradePartner(true) { UID = client.Entity.UID, Type = TradePartner.BreakPartnership, Name = client.Entity.Name, HoursLeft = (int)(new TimeSpan(partner.ProbationStartedOn.AddDays(3).Ticks).TotalHours - new TimeSpan(DateTime.Now.Ticks).TotalHours), Online = true }; partner.Client.Send(packet3); packet3.Type = TradePartner.AddPartner; partner.Client.Send(packet3); partner.Client.Send(msg3); } var packet4 = new TradePartner(true) { UID = partner.ID, Type = TradePartner.AddPartner, Name = partner.Name, HoursLeft = (int)(new TimeSpan(partner.ProbationStartedOn.AddDays(3).Ticks).TotalHours - new TimeSpan(DateTime.Now.Ticks).TotalHours), Online = partner.IsOnline }; client.Send(packet4); } foreach (Game.ConquerStructures.Society.Apprentice appr in client.Apprentices.Values) { if (appr.IsOnline) { ApprenticeInformation AppInfo = new ApprenticeInformation(); AppInfo.Apprentice_ID = appr.ID; AppInfo.Apprentice_Level = appr.Client.Entity.Level; AppInfo.Apprentice_Class = appr.Client.Entity.Class; AppInfo.Apprentice_PkPoints = appr.Client.Entity.PKPoints; AppInfo.Apprentice_Experience = appr.Actual_Experience; AppInfo.Apprentice_Composing = appr.Actual_Plus; AppInfo.Apprentice_Blessing = appr.Actual_HeavenBlessing; AppInfo.Apprentice_Name = appr.Name; AppInfo.Apprentice_Online = true; AppInfo.Apprentice_Spouse_Name = appr.Client.Entity.Spouse; AppInfo.Enrole_date = appr.EnroleDate; AppInfo.Mentor_ID = client.Entity.UID; AppInfo.Mentor_Mesh = client.Entity.Mesh; AppInfo.Mentor_Name = client.Entity.Name; AppInfo.Type = 2; client.Send(AppInfo); MentorInformation Information = new MentorInformation(true); Information.Mentor_Type = 1; Information.Mentor_ID = client.Entity.UID; Information.Apprentice_ID = appr.ID; Information.Enrole_Date = appr.EnroleDate; Information.Mentor_Level = client.Entity.Level; Information.Mentor_Class = client.Entity.Class; Information.Mentor_PkPoints = client.Entity.PKPoints; Information.Mentor_Mesh = client.Entity.Mesh; Information.Mentor_Online = true; Information.Shared_Battle_Power = (uint)(((client.Entity.BattlePower - client.Entity.ExtraBattlePower) - (appr.Client.Entity.BattlePower - appr.Client.Entity.ExtraBattlePower)) / 3.3F); Information.String_Count = 3; Information.Mentor_Name = client.Entity.Name; Information.Apprentice_Name = appr.Name; Information.Mentor_Spouse_Name = client.Entity.Spouse; appr.Client.ReviewMentor(); appr.Client.Send(Information); } else { ApprenticeInformation AppInfo = new ApprenticeInformation(); AppInfo.Apprentice_ID = appr.ID; AppInfo.Apprentice_Name = appr.Name; AppInfo.Apprentice_Online = false; AppInfo.Enrole_date = appr.EnroleDate; AppInfo.Mentor_ID = client.Entity.UID; AppInfo.Mentor_Mesh = client.Entity.Mesh; AppInfo.Mentor_Name = client.Entity.Name; AppInfo.Type = 2; client.Send(AppInfo); } } #endregion client.Send(packet); break; case Data.EndTeleport: break; case Data.GetSurroundings: if (client.Booth != null) { client.Entity.TransformationID = 0; client.Booth.Remove(); client.Booth = null; } GetSurroundings(client); client.Send(new MapStatus() { BaseID = (ushort)client.Map.BaseID, ID = (uint)client.Map.ID, Status = Database.MapsTable.MapInformations[client.Map.ID].Status }); Game.Weather.CurrentWeatherBase.Send(client); client.Send(gData); break; case Data.SetLocation: SetLocation(gData, client); client.Entity.MapRegion = Region.Region.FindRegion((uint)client.Map.BaseID, client.Entity.X, client.Entity.Y); break; case Data.Jump: { PlayerJump(gData, client); break; } case Data.BlueCountdown: { // PlayerJump(gData, client); break; } case Data.UnknownEntity: { #region UnknownEntity Client.GameState pClient = null; if (ServerBase.Kernel.GamePool.TryGetValue(gData.dwParam, out pClient)) { if (ServerBase.Kernel.GetDistance(pClient.Entity.X, pClient.Entity.Y, client.Entity.X, client.Entity.Y) <= ServerBase.Constants.pScreenDistance && client.Map.ID == pClient.Map.ID) { if (pClient.Guild != null) pClient.Guild.SendName(client); if (client.Guild != null) client.Guild.SendName(pClient); if (pClient.Entity.UID != client.Entity.UID) { if (pClient.Map.ID == client.Map.ID) { if (pClient.Map.BaseID == 700) { if (client.QualifierGroup != null) { if (pClient.QualifierGroup != null) { client.Entity.SendSpawn(pClient, false); pClient.Entity.SendSpawn(client, false); } else { client.Entity.SendSpawn(pClient, false); client.Screen.Add(pClient.Entity); } } else { if (pClient.QualifierGroup != null) { pClient.Entity.SendSpawn(client, false); pClient.Screen.Add(client.Entity); } else { client.Entity.SendSpawn(pClient, false); pClient.Entity.SendSpawn(client, false); } } } else { client.Entity.SendSpawn(pClient, false); pClient.Entity.SendSpawn(client, false); } } } } } else { Game.Entity monster = null; for (int x = 0; x < client.Map.Entities.Count; x++) { if (x >= client.Map.Entities.Count) break; if (client.Map.Entities[x] != null) { if (client.Map.Entities[x].UID == gData.dwParam) { monster = client.Map.Entities[x]; break; } } } if (monster != null) { if (ServerBase.Kernel.GetDistance(monster.X, monster.Y, client.Entity.X, client.Entity.Y) <= ServerBase.Constants.pScreenDistance) { monster.SendSpawn(client, false); } } for (int x = 0; x < client.Map.Companions.Count; x++) { if (x >= client.Map.Companions.Count) break; if (client.Map.Companions[x] != null) { if (client.Map.Companions[x].UID == gData.dwParam) { monster = client.Map.Companions[x]; break; } } } if (monster != null) { if (ServerBase.Kernel.GetDistance(monster.X, monster.Y, client.Entity.X, client.Entity.Y) <= ServerBase.Constants.pScreenDistance) { monster.SendSpawn(client, false); } } } #endregion break; } case Data.CompleteLogin: { client.MonsterHunterStats = new MonsterHunterStats(client); //client.MonsterHunterStats.Kills = (ushort)client.Entity.Status4; // client.MonsterHunterStats.Load(client); LoginMessages(client); Network.GamePackets.Weather weather = new Network.GamePackets.Weather(true); weather.WeatherType = (uint)Program.WeatherType; weather.Intensity = 100; weather.Appearence = 2; weather.Direction = 4; client.Send(new FlowerPacket(client.Entity.Flowers)); client.Send(new FlowerPacket3(client)); /*ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips);*/ client.Send(packet); client.Send(weather); break; } case Data.ChangeFace: ChangeFace(gData, client); break; case Data.ObserveEquipment: ObserveEquipment2(gData, client); break; case Data.ObserveEquipment2: ObserveEquipment(gData, client); break; case 408: { /* if (!client.ChangeGear) { Game.KimoChangeGear.Load(client); } else { Game.KimoChangeGear.Load2(client); } client.ChangeGear = true;*/ break; } case Data.ObserveKnownPerson: ObserveEquipment(gData, client); break; case Data.ViewEnemyInfo: { if (client.Enemy.ContainsKey(gData.dwParam)) { if (client.Enemy[gData.dwParam].IsOnline) { KnownPersonInfo info = new KnownPersonInfo(true); info.Fill(client.Enemy[gData.dwParam], true, false); if (client.Enemy[gData.dwParam].Client.Guild != null) client.Enemy[gData.dwParam].Client.Guild.SendName(client); client.Send(info); } } break; } case Data.ViewFriendInfo: { if (client.Friends.ContainsKey(gData.dwParam)) { if (client.Friends[gData.dwParam].IsOnline) { KnownPersonInfo info = new KnownPersonInfo(true); info.Fill(client.Friends[gData.dwParam], false, false); if (client.Friends[gData.dwParam].Client.Guild != null) client.Friends[gData.dwParam].Client.Guild.SendName(client); client.Send(info); } } break; } case Data.ViewPartnerInfo: { if (client.Partners.ContainsKey(gData.dwParam)) { if (client.Partners[gData.dwParam].IsOnline) { TradePartnerInfo info = new TradePartnerInfo(true); info.Fill(client.Partners[gData.dwParam]); if (client.Partners[gData.dwParam].Client.Guild != null) client.Partners[gData.dwParam].Client.Guild.SendName(client); client.Send(info); } } break; } case Data.EndFly: client.Entity.RemoveFlag(Update.Flags.Fly); break; case Data.EndTransformation: client.Entity.Untransform(); break; case Data.XPListEnd: case Data.Die: break; case Data.Confiscator: client.Send(packet); break; case Data.OwnBooth: { client.Booth = new PhoenixProject.Game.ConquerStructures.Booth(client, gData); client.Send(new Data(true) { ID = Data.ChangeAction, UID = client.Entity.UID, dwParam = 0 }); break; } case Data.Away: { if (client.Entity.Away == 0) client.Entity.Away = 1; else client.Entity.Away = 0; client.SendScreenSpawn(client.Entity, false); break; } case Data.DeleteCharacter: { if ((client.WarehousePW == null || client.WarehousePW == "" || client.WarehousePW == "0" && gData.dwParam == 0) || (client.WarehousePW == gData.dwParam.ToString())) { client.Account.TempID = 400; client.Disconnect(); } break; } case Data.TeamSearchForMember: { if (client.Team != null) { Client.GameState Client = null; if (!client.Team.IsTeammate(gData.UID)) return; if (Kernel.GamePool.TryGetValue(gData.UID, out Client)) { // Console.WriteLine(" " + gData.dwParam + ""); gData.wParam1 = Client.Entity.X; gData.wParam2 = Client.Entity.Y; gData.Send(client); } } break; } default: if (client.Account.State == PhoenixProject.Database.AccountTable.AccountState.ProjectManager || client.Account.State == PhoenixProject.Database.AccountTable.AccountState.Coder) client.Send(new Message("Unknown generaldata id: " + gData.ID, System.Drawing.Color.CadetBlue, Message.Talk)); break; } break; } #endregion #region TimePacket (1033) case 1033: { ServerTime time = new ServerTime(); time.Year = (uint)DateTime.Now.Year; time.Month = (uint)DateTime.Now.Month; time.DayOfYear = (uint)DateTime.Now.DayOfYear; time.DayOfMonth = (uint)DateTime.Now.Day; time.Hour = (uint)DateTime.Now.Hour; time.Minute = (uint)DateTime.Now.Minute; time.Second = (uint)DateTime.Now.Second; client.Send(time); break; } #endregion #region MemoryAgate case 2110: { uint ItemUID = BitConverter.ToUInt32(packet, 8); switch (packet[4]) { case 1: { if (client.Map.IsDynamic()) return; if (ServerBase.Constants.revnomap.Contains(client.Entity.MapID)) return; Interfaces.IConquerItem Item = null; if (client.Inventory.TryGetItem(ItemUID, out Item)) { if (Item.Agate_map.ContainsKey(packet[12])) { Item.Agate_map[(uint)packet[12]] = client.Entity.MapID + "~" + client.Entity.X + "~" + client.Entity.Y; Database.ConquerItemTable.UpdateItemAgate(Item); Item.SendAgate(client); break; } if (packet[12] > Item.Agate_map.Count) { Item.Agate_map.Add((byte)(Item.Agate_map.Count), client.Entity.MapID + "~" + client.Entity.X + "~" + client.Entity.Y); Database.ConquerItemTable.UpdateItemAgate(Item); Item.SendAgate(client); break; } else { if (!Item.Agate_map.ContainsKey(packet[12])) { Item.Agate_map.Add(packet[12], client.Entity.MapID + "~" + client.Entity.X + "~" + client.Entity.Y); Database.ConquerItemTable.UpdateItemAgate(Item); Item.SendAgate(client); } break; } } break; } case 3: { if (client.Map.IsDynamic()) return; if (ServerBase.Constants.revnomap.Contains(client.Entity.MapID)) return; Interfaces.IConquerItem Item = null; if (client.Inventory.TryGetItem(ItemUID, out Item)) { if (Item.Agate_map.ContainsKey(packet[12])) { if (ServerBase.Constants.MemoryAgateNotAllowedMap.Contains(ushort.Parse(Item.Agate_map[packet[12]].Split('~')[0].ToString()))) { return; } /*if (ushort.Parse(Item.Agate_map[packet[12]].Split('~')[0].ToString()) == 1038) return; if (ushort.Parse(Item.Agate_map[packet[12]].Split('~')[0].ToString()) == 6001) return;*/ client.Entity.Teleport(ushort.Parse(Item.Agate_map[packet[12]].Split('~')[0].ToString()) , ushort.Parse(Item.Agate_map[packet[12]].Split('~')[1].ToString()) , ushort.Parse(Item.Agate_map[packet[12]].Split('~')[2].ToString())); Item.Durability--; Item.SendAgate(client); Database.ConquerItemTable.UpdateItemAgate(Item); } } break; } case 4: { if (ServerBase.Constants.MemoryAgateNotAllowedMap.Contains(client.Entity.MapID)) return; Interfaces.IConquerItem Item = null; if (client.Inventory.TryGetItem(ItemUID, out Item)) { uint cost = (uint)(Item.MaximDurability - Item.Durability) / 2; if (cost == 0) cost = 1; if (client.Entity.ConquerPoints > cost) { client.Entity.ConquerPoints -= cost; Item.Durability = Item.MaximDurability; Item.SendAgate(client); Database.ConquerItemTable.UpdateItemAgate(Item); } } break; } } break; } #endregion #region Ayudante case 1321: case 1322: case 1136: case 1320: client.Send(packet); break; case 2261: { client.Send(packet); } break; #endregion #region Advertise case 2226: { byte[] firstpacket = new byte[724]{0xCC,0x02,0xB2,0x08,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00//;̲0x,0x0x0x ,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x67,0x01,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x,0xg0x0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x75,0x83,0x83,0x50//;0x0x0x,0x,0xPuP ,0x75,0x83,0x83,0x50,0x61,0x24,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;uPa$$0x0x0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44//;0x0x0x0x0xD ,0x65,0x76,0x69,0x6C,0x5F,0x44,0x6F,0x67,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;evil_Dogg0x0x,0x ,0x01,0x00,0x00,0x00,0x83,0x00,0x00,0x00,0x81,0xC3,0x15,0x00,0x00,0x00,0x00,0x00//;0x0xÃ0x,0x,0x ,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;,0x0x0x0x0x,0x ,0x7E,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;~0x0x0x0x,0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x41,0x4F,0x57,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0xAOW0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;0x0x0x0x0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x61,0x61,0x6E,0x00,0x00,0x00,0x00,0x00//;0x0x,0xsaan0x,0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0D,0x00,0x00,0x00//;0x0x,0x,0x0x0x ,0xA5,0x0C,0x0E,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00//;¥0x,0x,0x,0x0x,0x,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x51,0x53,0x65//;0x0x0x0xTQSe ,0x72,0x76,0x65,0x72};//;rver client.Send(firstpacket); byte[] secondpacket = new byte[724]{0xCC,0x02,0xB2,0x08,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00//;̲//////,0x//,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x01,0x00,0x00,0x00,0x00,0x00,0x00//;////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x2A,0x41,0x75,0x74//;//////,0x`*Aut ,0x68,0x65,0x6E,0x74,0x69,0x63,0x2A,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;hentic*`//// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4E//;//////,0xN ,0x61,0x72,0x72,0x63,0x6F,0x74,0x69,0x63,0x7A,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;arrcoticz//,0x ,0x01,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xDF,0xA3,0x59,0x00,0x00,0x00,0x00,0x00//;//,0xY//,0xߣY////,0x ,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;,0x////,0x ,0x7B,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;{////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x7E,0x2A,0x44,0x65,0x5F,0x41,0x5F,0x74,0x68,0x2A,0x7E,0x00,0x00//;//,0x~*De_A_th*~// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//;//////// ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5E,0x5E,0x5E,0x5E,0x5E,0x32,0x5E,0x5E,0x5E//;//,0x^^^^^2^^^ ,0x5E,0x5E,0x5E,0x5E,0x5E,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00//;^^^^^//,0x//,0x//,0x ,0x10,0x27,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00//;'//,0x////,0x ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x51,0x53,0x65//;////TQSe ,0x72,0x76,0x65,0x72};//////////////;rver client.Send(secondpacket); break; } #endregion #region OneArmedBandit 1351 AboRagab/Kimo/Amro kan bys2f case 1351: { if (packet[4] == 0) { if (client.Entity.ConquerPoints >= 100 * packet[5]) { client.Send(packet); Sendonearmed(client); //PrintPacket(packet); client.Entity.ConquerPoints -= (uint)(100 * packet[5]); //Console.WriteLine("cps " +(uint)(100 * packet[5])); } } else { Sendonearmed2(client); Prize3X(client); client.Entity.ConquerPoints += client.Entity.CPSS * packet[5]; //Console.WriteLine("Win " + (uint)(client.Entity.CPSS * packet[5])); //PrintPacket(packet); } break; } #endregion /*case 1044: PrintPacket(packet); client.Send(packet); break;*/ /*#region PK Explorer (2220) case 2220: { PkExplorer pk = new PkExplorer(packet, client); pk.SubType = 1; client.Send(pk.Build()); break; } #endregion*/ /* #region Cases de Packs case 1034: case 1037: { client.Send(packet); break; } case 1135: client.Send(packet); break; case 1134: { switch (ID2) { case 1: client.Send(packet); break; case 2: client.Send(packet); break; case 3: client.Send(packet); break; case 4: client.Send(packet); break; case 5: client.Send(packet); break; case 6: client.Send(packet); break; case 7: client.Send(packet); break; case 8: client.Send(packet); break; case 9: client.Send(packet); break; case 10: client.Send(packet); break; } break; } #endregion*/ /*case 1134: { PhoenixProject.Network.GamePackets.Quest.QuestInfo.Handle(packet, client); break; } case 1135: { PhoenixProject.Network.GamePackets.Quest.QuestQuery2.Handle(packet, client); break; }*/ /* case 1136: { //PrintPacket(packet); client.Send(packet); // PrintPacket(packet); break; }*/ default: { if (client.Account.State == PhoenixProject.Database.AccountTable.AccountState.Coder) { ushort key = BitConverter.ToUInt16(packet, 2); //PrintPacket(packet); Console.WriteLine("[Kimo]=> Unknown Packet: " + key + ""); // Console.WriteLine("[Kimo]=> Unknown Packet: " + key + " " + PacketConstructor.Dump(packet) + ""); } break; } } } } catch (Exception e) { Program.SaveException(e); } }
static bool CheckCommand(Message message, Client.GameState client) { try { if (message.__Message.StartsWith("@")) { string Message = message.__Message.Substring(1).ToLower(); string Mess = message.__Message.Substring(1); string[] Data = Message.Split(' '); #region GMs PMs if (client.Account.State == PhoenixProject.Database.AccountTable.AccountState.ProjectManager || client.Account.State == PhoenixProject.Database.AccountTable.AccountState.Coder) { switch (Data[0]) { case "addcps": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1])) { if (!Game.PrizeNPC.PrizeNpcInformations.ContainsKey(pClient.Entity.UID)) { PhoenixProject.Game.PrizeNPC.PrizeNpcInfo info = new PhoenixProject.Game.PrizeNPC.PrizeNpcInfo(); info.Owner = pClient.Entity.UID; info.type = 1; info.amount = uint.Parse(Data[2]); info.itemid = 0; PhoenixProject.Game.PrizeNPC.PrizeNpcInformations.Add(info.Owner, info); PhoenixProject.Database.MySqlCommand cmd = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.INSERT); cmd.Insert("prizenpc").Insert("Owner", client.Entity.UID).Insert("type", info.type).Insert("Amount", info.amount).Insert("itemid", info.itemid); cmd.Execute(); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratulation you have got an Donation Prize " + info.amount + " Cps go to PrizeNpc to Claim It?"); npc.OptionID = 255; pClient.Send(npc.ToArray()); Network.GamePackets.NpcReply npc2 = new Network.GamePackets.NpcReply(6, "" + pClient.Entity.Name + " has Recived " + info.amount + " Cps"); npc2.OptionID = 255; client.Send(npc2.ToArray()); Console.WriteLine("" + pClient.Entity.Name + " has got Donation Prize Cps " + info.amount + ""); } else { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Sorry the player already have prize not claimed yet"); npc.OptionID = 255; client.Send(npc.ToArray()); } } } break; } case "who": { var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint x = 0; x < COunt; x++) { if (x >= COunt) break; Client.GameState pClient = (varr.Current as Client.GameState); if (pClient.Entity.Name.ToLower().Contains(Data[1])) { client.Send(new Message("[Whois " + pClient.Entity.Name + "]", System.Drawing.Color.Gold, GamePackets.Message.FirstRightCorner)); client.Send(new Message("Username: "******"Password: "******"IP: " + pClient.Account.IP, System.Drawing.Color.Gold, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("CPs: " + pClient.Entity.ConquerPoints, System.Drawing.Color.Gold, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Money: " + pClient.Entity.Money, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Class: " + pClient.Entity.Class, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("UID: " + pClient.Entity.UID, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Level: " + pClient.Entity.Level, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Strength: " + pClient.Entity.Strength, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Agility: " + pClient.Entity.Agility, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Vitality: " + pClient.Entity.Vitality, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Spirit: " + pClient.Entity.Spirit, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Atributes: " + pClient.Entity.Atributes, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Hitpoints: " + pClient.Entity.Hitpoints, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("PKPoints: " + pClient.Entity.PKPoints, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("VIPLevel: " + pClient.Entity.VIPLevel, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); client.Send(new Message("Map: [" + pClient.Entity.MapID + "] " + pClient.Entity.X + "," + pClient.Entity.Y, System.Drawing.Color.Green, GamePackets.Message.ContinueRightCorner)); } varr.MoveNext(); } break; } case "additem": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1])) { if (!Game.PrizeNPC.PrizeNpcInformations.ContainsKey(pClient.Entity.UID)) { PhoenixProject.Game.PrizeNPC.PrizeNpcInfo info = new PhoenixProject.Game.PrizeNPC.PrizeNpcInfo(); info.Owner = pClient.Entity.UID; info.type = 2; info.amount = 0; info.itemid = uint.Parse(Data[2]); PhoenixProject.Game.PrizeNPC.PrizeNpcInformations.Add(info.Owner, info); PhoenixProject.Database.MySqlCommand cmd = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.INSERT); cmd.Insert("prizenpc").Insert("Owner", client.Entity.UID).Insert("type", info.type).Insert("Amount", info.amount).Insert("itemid", info.itemid); cmd.Execute(); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratulation you have got an Donation item go to PrizeNpc to Claim It?"); npc.OptionID = 255; pClient.Send(npc.ToArray()); Network.GamePackets.NpcReply npc2 = new Network.GamePackets.NpcReply(6, "" + pClient.Entity.Name + " has Recived item id: " + info.itemid + ""); npc2.OptionID = 255; client.Send(npc2.ToArray()); Console.WriteLine("" + pClient.Entity.Name + " has got Donation Prize item " + info.itemid + ""); } else { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Sorry the player already have prize not claimed yet"); npc.OptionID = 255; client.Send(npc.ToArray()); } } } break; } case "summon": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1])) { pClient.Entity.Teleport(client.Entity.MapID, client.Entity.X, client.Entity.Y); } } break; } case "scroll": { if (client.Entity.MapID == 700) break; switch (Data[1].ToLower()) { case "tc": client.Entity.Teleport(1002, 430, 380); break; case "pc": client.Entity.Teleport(1011, 195, 260); break; case "ac": case "am": client.Entity.Teleport(1020, 566, 563); break; case "dc": client.Entity.Teleport(1000, 500, 645); break; case "bi": client.Entity.Teleport(1015, 723, 573); break; case "pka": client.Entity.Teleport(1005, 050, 050); break; case "ma": client.Entity.Teleport(1036, 211, 196); break; case "ja": client.Entity.Teleport(6000, 100, 100); break; } break; } case "test": { byte IDs = byte.Parse(Data[1]); Data data = new Data(true); data.UID = client.Entity.UID; data.dwParam = 2; data.ID = IDs;//157 data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); break; } case "jar": { ConquerItem item2 = new ConquerItem(true); item2.ID = 750000; //item2.Color = PhoenixProject.Game.Enums.Color.Blue; item2.Durability = 0; item2.MaximDurability = 2; client.Inventory.Add(item2, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); break; } case "id": { byte[] data = new byte[24 + 8]; Writer.WriteUInt32(24, 0, data); Writer.WriteUInt32(1010, 2, data); Writer.WriteUInt32(client.Entity.UID, 4, data); Writer.WriteUInt32(1, 7, data); Writer.WriteUInt32(client.Entity.UID, 8, data); Writer.WriteUInt32(client.Entity.UID, 12, data); Writer.WriteUInt32(client.Entity.UID, 16, data); Writer.WriteUInt32(1, 19, data); Writer.WriteUInt32(7, 20, data); Writer.WriteUInt32(121, 22, data); // Writer.WriteUInt32(9828, 12, data); client.Send(data); // client.Entity.CountryFlag = uint.Parse(Data[1]); break; } case "itemeffect": { Kernel.boundID = int.Parse(Data[1]); Kernel.boundIDEnd = int.Parse(Data[2]); break; } case "kiko": { string[] Strings = new string[2]; Strings[0] = (Data[1]); Strings[1] = "1"; _String SoundPacket = new _String(true); SoundPacket.UID = client.Entity.UID; SoundPacket.Type = 20; SoundPacket.TextsCount = 2; SoundPacket.Texts.Add(Strings[0]); SoundPacket.Texts.Add(Strings[1]); client.Send(SoundPacket); break; //client.Entity.ActualMyTypeFlower = 30010102; // break; } case "ss": { byte[] data = new byte[80 + 8]; Writer.WriteUInt32(80, 0, data); Writer.WriteUInt32(1151, 2, data); Writer.WriteUInt32(2, 4, data); Writer.WriteUInt32(1, 8, data); Writer.WriteUInt32(1, 16, data); Writer.WriteUInt32(227, 32, data); Writer.WriteUInt32(client.Entity.UID, 40, data); Writer.WriteUInt32(client.Entity.UID, 44, data); Writer.WriteString(client.Entity.Name, 48, data); Writer.WriteString(client.Entity.Name, 64, data); client.Send(data); byte[] data2 = new byte[80 + 8]; Writer.WriteUInt32(80, 0, data2); Writer.WriteUInt32(1151, 2, data2); Writer.WriteUInt32(2, 4, data2); Writer.WriteUInt32(2, 8, data2); Writer.WriteUInt32(1, 16, data2); Writer.WriteUInt32(282, 32, data2); Writer.WriteUInt32(client.Entity.UID, 40, data2); Writer.WriteUInt32(client.Entity.UID, 44, data2); Writer.WriteString(client.Entity.Name, 48, data2); Writer.WriteString(client.Entity.Name, 64, data2); client.Send(data2); // client.Send(new Message("Test Channel Mesaage!", System.Drawing.Color.Red, uint.Parse(Data[1]))); //client.Entity.ClanSharedBp = 4; // Game.KimoCarnaval.Load(); /*NpcInitial initial = new NpcInitial { Identifier = 1, Lookface = (num != 0x2008) ? ((ushort)0x1a) : ((ushort)3), Mode = PhoenixProject.Network.GamePackets.NpcInitial.NpcModes.Place, Furniture = num }; client.Send((byte[])initial);*/ break; } case "600": { Game.Map Map = ServerBase.Kernel.Maps[client.Entity.MapID]; Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.MapObjType = Game.MapObjectType.Item; floorItem.ItemID = uint.Parse(Data[1]); floorItem.MapID = client.Entity.MapID; floorItem.X = ushort.Parse(Data[2]); floorItem.Y = ushort.Parse(Data[3]); floorItem.Type = 10; floorItem.OnFloor = Time32.Now.AddHours(24); floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); client.SendScreenSpawn(floorItem, true); client.Effect = true; /* _String str = new _String(true); str.UID = client.Entity.UID; str.TextsCount = 2; str.Type = _String.Sound; str.Texts.Add("sound"); str.Texts.Add("gethp.wav"); client.Send(str);*/ // client.Entity.TitlePacket.dwParam2 = (byte)PhoenixProject.Game.Tournaments.top_typ.GoldenRacer; break; } case "quiz": { //PhoenixProject.Game.ConquerStructures.QuizShow.Start(); // client.Send(GamePackets.QuizInfo.tempQuestionBuffer()); //Game.ConquerStructures.QuizShow.Start(); Game.ConquerStructures.QuizShow.Start2(); Program.QuizStamp = Time32.Now; break; } case "me": { /* MessageTick m = new MessageTick(); m.Identifier = client.Entity.UID; m.Response = client.Entity.UID; client.Send(m);*/ MapStatus mbox = new MapStatus(); mbox.BaseID = 1002; client.Send(mbox); break; } case "quiz2": { //PhoenixProject.Game.ConquerStructures.QuizShow.Start(); // client.Send(GamePackets.QuizInfo.tempQuestionBuffer()); //Game.ConquerStructures.QuizShow.Start(); Game.ConquerStructures.QuizShow.Stop(); break; } case "q": { //PhoenixProject.Game.ConquerStructures.QuizShow.Start(); // client.Send(GamePackets.QuizInfo.tempQuestionBuffer()); //Game.ConquerStructures.QuizShow.Start(); client.Send(GamePackets.QuizInfo.tempQuestionBuffer()); break; } case "team": { { Game.KimoSkillWar.Started = true; Game.KimoSkillWar.SignUP = true; } break; } case "geartest": { //181315 515black uint UID = 92000; PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = 181825; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; //client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); client.Equipment.UpdateEntityPacket(); break; } case "quarantine": { //542363 PhoenixProject.Game.ConquerStructures.Quarantine.Started = true; break; } case "test2": { client.Entity.RemoveFlag(ulong.Parse(Data[1])); break; } case "arrest": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1])) { pClient.Entity.Teleport(6004, 30, 74); } } break; } case "pkp": { client.Entity.PKPoints = ushort.Parse(Data[1]); break; } case "dropevent": { Interfaces.IConquerItem Item = null; #region Get Item string ItemName = Data[1]; bool SpecialItem = false; uint SpecialID = 0; if (ItemName.Contains("cp") || ItemName.Contains("met") || ItemName.Contains("db") || ItemName.Contains("stone") || ItemName.Contains("soul")) { if (ItemName.Contains("cp")) SpecialID = 729911; else if (ItemName.Contains("db")) SpecialID = 1088000; else if (ItemName.Contains("met")) SpecialID = 1088001; else if (ItemName.Contains("stone")) SpecialID = 730008; else if (ItemName.Contains("Soul")) SpecialID = 800110; SpecialItem = true; goto PrepareDrop; } if (ItemName.ToLower() == "exp") { for (int c = 0; c < client.Screen.Objects.Count; c++) { if (c >= client.Screen.Objects.Count) break; Interfaces.IMapObject ClientObj = client.Screen.Objects[c]; if (ClientObj != null) { if (ClientObj is Game.Entity) { if (ClientObj.MapObjType == PhoenixProject.Game.MapObjectType.Player) { ClientObj.Owner.IncreaseExperience(ClientObj.Owner.ExpBall, false); } } } } break; } Game.Enums.ItemQuality Quality = Game.Enums.ItemQuality.NormalV3; if (Data.Length > 2) { switch (Data[3].ToLower()) { case "fixed": Quality = Game.Enums.ItemQuality.Fixed; break; case "normal": Quality = Game.Enums.ItemQuality.Normal; break; case "normalv1": Quality = Game.Enums.ItemQuality.NormalV1; break; case "normalv2": Quality = Game.Enums.ItemQuality.NormalV2; break; case "normalv3": Quality = Game.Enums.ItemQuality.NormalV3; break; case "refined": Quality = Game.Enums.ItemQuality.Refined; break; case "unique": Quality = Game.Enums.ItemQuality.Unique; break; case "elite": Quality = Game.Enums.ItemQuality.Elite; break; case "super": Quality = Game.Enums.ItemQuality.Super; break; case "other": Quality = Game.Enums.ItemQuality.Other; break; default: { Quality = (PhoenixProject.Game.Enums.ItemQuality)int.Parse(Data[4]); break; } } } Database.ConquerItemBaseInformation CIBI = null; foreach (Database.ConquerItemBaseInformation infos in Database.ConquerItemInformation.BaseInformations.Values) { if (infos.Name.ToLower() == ItemName.ToLower() && Quality == (Game.Enums.ItemQuality)(infos.ID % 10)) { CIBI = infos; } else { if (infos.Name.ToLower() == ItemName.ToLower()) CIBI = infos; } } if (CIBI == null) break; Item = new GamePackets.ConquerItem(true); Item.ID = CIBI.ID; Item.Durability = CIBI.Durability; Item.MaximDurability = CIBI.Durability; if (Data.Length > 3) Item.Plus = byte.Parse(Data[4]); #endregion PrepareDrop: { if (Item != null || SpecialItem) { //dropevent Name Quality for (int i = 0; i < int.Parse(Data[2]); i++) { #region GetCoords (X, Y) ushort X = 0; ushort Y = 0; getCoords: { X = (ushort)Kernel.Random.Next(client.Entity.X - 20, client.Entity.X + 20); Y = (ushort)Kernel.Random.Next(client.Entity.Y - 20, client.Entity.Y + 20); } while (!client.Map.SelectCoordonates(ref X, ref Y)) goto getCoords; #endregion #region Drop Floor Item FloorItem floorItem = new FloorItem(true); if (SpecialItem) { if (SpecialID == 729911) { floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.ConquerPoints; floorItem.Value = 20; } floorItem.ItemID = SpecialID; floorItem.Item = new ConquerItem(true); floorItem.Item.ID = SpecialID; floorItem.Item.UID = FloorItem.FloorUID.Next; floorItem.UID = floorItem.Item.UID; floorItem.Item.MobDropped = true; while (client.Map.Npcs.ContainsKey(floorItem.Item.UID)) { floorItem.Item.UID = FloorItem.FloorUID.Next; floorItem.UID = FloorItem.FloorUID.Next; } } else { floorItem.Item = new ConquerItem(true); floorItem.Item.Color = Item.Color; floorItem.Item.Durability = Item.Durability; floorItem.Item.ID = Item.ID; floorItem.Item.Mode = Game.Enums.ItemMode.Default; floorItem.Item.UID = FloorItem.FloorUID.Next; floorItem.UID = floorItem.Item.UID; floorItem.Item.MobDropped = true; floorItem.ItemColor = Item.Color; floorItem.ItemID = Item.ID; while (client.Map.Npcs.ContainsKey(floorItem.Item.UID)) { floorItem.Item.UID = FloorItem.FloorUID.Next; floorItem.UID = FloorItem.FloorUID.Next; } } floorItem.MapID = client.Map.ID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = FloorItem.Drop; floorItem.OnFloor = Time32.Now; client.SendScreenSpawn(floorItem, true); client.Map.AddFloorItem(floorItem); } } #endregion } break; } case "testtitle": { TitlePacket title = new TitlePacket(byte.Parse(Data[1]) == 1); title.UID = client.Entity.UID; title.Title = byte.Parse(Data[2]); title.Type = byte.Parse(Data[3]); title.dwParam = byte.Parse(Data[4]); title.dwParam2 = byte.Parse(Data[5]); client.Send(title); break; } case "resetvote": { Kernel.VotePoolUid.Clear(); Kernel.VotePool.Clear(); Database.EntityTable.DeletVotes(); break; } case "invite": { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Weekly has Started! You Wana Join?"); npc.OptionID = 247; //npc.times = 10; client.Send(npc.ToArray()); client.Entity.InviteSendStamp = Time32.Now; client.Entity.invite = true; break; } case "bo7sen": { PhoenixProject.Network.GamePackets.Data Datas = new PhoenixProject.Network.GamePackets.Data(true); Datas.UID = client.Entity.UID; Datas.ID = 126; Datas.dwParam = uint.Parse(Data[1]); Datas.wParam1 = client.Entity.X; Datas.wParam2 = client.Entity.Y; client.Send(Datas); break; } case "ww": { Program.kimo = ushort.Parse(Data[1]); break; } case "halo": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.MagicDefender); break; } case "halo2": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo2); break; } case "halo3": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo3); break; } case "halo4": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo4); break; } case "halo29": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo29); break; } case "halo30": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo30); break; } case "halo31": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo31); break; } case "halo32": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo32); break; } case "halo33": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo33); break; } case "halo34": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo34); break; } case "halo35": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo35); break; } case "halo36": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo36); break; } case "halo37": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo37); break; } case "halo38": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo38); break; } case "halo39": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo39); break; } case "halo40": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo40); break; } case "halo41": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo41); break; } case "halo42": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo42); break; } case "halo43": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo43); break; } case "halo44": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo44); break; } case "halo45": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo45); break; } case "halo46": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo46); break; } case "halo47": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo47); break; } case "halo48": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo48); break; } case "halo49": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo49); break; } case "halo50": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo50); break; } case "halo51": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo51); break; } case "halo52": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo52); break; } case "halo53": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo53); break; } case "halo54": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo54); break; } case "halo55": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo55); break; } case "halo56": { //client.Entity.StatusFlag2 = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo56); break; } case "halo57": { // client.Entity.StatusFlag = 0; client.Entity.AddFlag3(GamePackets.Update.Flags3.kimo57); break; } case "lottery1": { break; } case "bbs": { Console.WriteLine(" " + client.Entity.BattlePower + ""); break; } case "lottery2": { uint randprize = (uint)PhoenixProject.ServerBase.Kernel.Random.Next(1, (int)Database.DROP_SOULS.Count_Jar); //Database.Monster.Souls[randsouls].item_id uint ItemID = ServerBase.Kernel.JarItem[randprize].item_id; client.Inventory.Add(ItemID, 0, 1); ServerBase.Kernel.SendWorldMessage(new Message("Congratulations, " + client.Entity.Name + " has finished CloudSaint Jar Quest and Obtained " + Database.ConquerItemInformation.BaseInformations[ItemID].Name + " !", System.Drawing.Color.Red, Network.GamePackets.Message.Talk), ServerBase.Kernel.GamePool.Values); Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); break; } case "kimo": { Program.kimo = ushort.Parse(Data[1]); // Program.kimo2 = ushort.Parse(Data[2]); // Program.kimo3 = ushort.Parse(Data[3]); testpacket str = new testpacket(true); client.Send(str); break; } case "3": { PhoenixProject.Game.KimoCarnaval.Load(); /*Program.kimo3 = ushort.Parse(Data[1]); Network.GamePackets.Weather weather = new Network.GamePackets.Weather(true); weather.WeatherType = (uint)Program.kimo3; weather.Intensity = 100; weather.Appearence = 2; weather.Direction = 4; client.Send(weather);*/ break; } case "kimo4": { //PhoenixProject.Game.KimoCarnaval.Npc(); /*Program.kimo3 = ushort.Parse(Data[1]); Network.GamePackets.Weather weather = new Network.GamePackets.Weather(true); weather.WeatherType = (uint)Program.kimo3; weather.Intensity = 100; weather.Appearence = 2; weather.Direction = 4; client.Send(weather);*/ break; } case "33": { client.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.poker; /*Program.kimo3 = ushort.Parse(Data[1]); Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = (uint)Program.kimo3; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data);*/ // client.Send(new Data(true) { UID = client.Entity.UID, ID = GamePackets.Data.OpenWindow, dwParam = GamePackets.Data.CustomCommands.Reincarnation, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); break; } case "p1": { client.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.poker2; break; } case "p2": { client.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.poker3; break; } case "p3": { client.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.poker4; break; } case "p4": { client.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.poker; break; } case "p5": { client.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.poker; break; } case "p6": { client.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.poker5; break; } case "bb": { PhoenixProject.Database.MySqlCommand command = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.DELETE); command.Delete("skills", "ID", "1110").And("EntityID", client.Entity.UID).Execute(); break; } case "bo": { _String str = new _String(true); str.UID = client.Entity.UID; str.TextsCount = 1; str.Type = _String.Sound; str.Texts.Add("zhengfu"); client.Send(str); //client.Send(new Data(true) { UID = client.Entity.UID, ID = Network.GamePackets.Data.OpenWindow, dwParam = uint.Parse(Data[1]), wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); //datas.dwParam = uint.Parse(Data[1]); //client.Send(datas); break; } case "pok": { break; } case "n": { { Random disco = new Random(); uint discocolor = (uint)disco.Next(50000, 999999999); Program.ScreenColor = 5855577; foreach (Client.GameState C in ServerBase.Kernel.GamePool.Values) { Data datas = new Data(true); datas.UID = C.Entity.UID; datas.ID = 104; Program.ScreenColor = 5855577; datas.dwParam = 5855577; C.Send(datas); } } break; } case "d": { { Random disco = new Random(); uint discocolor = (uint)disco.Next(50000, 999999999); Program.ScreenColor = 0; foreach (Client.GameState C in ServerBase.Kernel.GamePool.Values) { Data datas = new Data(true); datas.UID = C.Entity.UID; datas.ID = 104; datas.dwParam = 0; //datas.wParam1 = (ushort)Program.ScreenColor; //datas.wParam2 = (ushort)Program.ScreenColor; //datas.wParam2 = 104; //datas.wParam4 = (ushort)Program.ScreenColor; C.Send(datas); } } break; } case "give": { foreach (var Client in ServerBase.Kernel.GamePool.Values) { if (Client.Entity.Name.ToLower().Contains(Data[1])) { switch (Data[2]) { case "vip": Client.Entity.VIPLevel = byte.Parse(Data[3]); break; case "cps": Client.Entity.ConquerPoints += uint.Parse(Data[3]); break; case "money": Client.Entity.Money += uint.Parse(Data[3]); break; case "spell": Client.AddSpell(new Spell(true) { ID = ushort.Parse(Data[3]) }); break; case "level": Client.Entity.Level = byte.Parse(Data[3]); break; case "plustone": { UInt32 ItemId = UInt32.Parse(Data[3]); if (Database.ConquerItemInformation.BaseInformations.ContainsKey(ItemId)) { Database.ConquerItemBaseInformation iteminfo; if (Database.ConquerItemInformation.BaseInformations.TryGetValue(ItemId, out iteminfo)) { Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true); newItem.ID = iteminfo.ID; Byte Plus = (Byte)(newItem.ID % 730000); Console.WriteLine("Item Plus " + Plus); newItem.Plus = (Byte)(newItem.ID % 730000); Client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); } } break; } case "item": { string ItemName = Data[3]; Game.Enums.ItemQuality Quality = Game.Enums.ItemQuality.Fixed; switch (Data[4].ToLower()) { case "fixed": Quality = Game.Enums.ItemQuality.Fixed; break; case "normal": Quality = Game.Enums.ItemQuality.Normal; break; case "normalv1": Quality = Game.Enums.ItemQuality.NormalV1; break; case "normalv2": Quality = Game.Enums.ItemQuality.NormalV2; break; case "normalv3": Quality = Game.Enums.ItemQuality.NormalV3; break; case "refined": Quality = Game.Enums.ItemQuality.Refined; break; case "unique": Quality = Game.Enums.ItemQuality.Unique; break; case "elite": Quality = Game.Enums.ItemQuality.Elite; break; case "super": Quality = Game.Enums.ItemQuality.Super; break; case "other": Quality = Game.Enums.ItemQuality.Other; break; default: { Quality = (PhoenixProject.Game.Enums.ItemQuality)int.Parse(Data[4]); break; } } Database.ConquerItemBaseInformation CIBI = null; foreach (Database.ConquerItemBaseInformation infos in Database.ConquerItemInformation.BaseInformations.Values) { if (infos.Name.ToLower() == ItemName.ToLower() && Quality == (Game.Enums.ItemQuality)(infos.ID % 10)) { CIBI = infos; } } if (CIBI == null) break; Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true); newItem.ID = CIBI.ID; newItem.Durability = CIBI.Durability; newItem.MaximDurability = CIBI.Durability; if (Data.Length > 3) { byte plus = 0; byte.TryParse(Data[3], out plus); newItem.Plus = Math.Min((byte)15, plus); if (Data.Length > 4) { byte bless = 0; byte.TryParse(Data[6], out bless); newItem.Bless = Math.Min((byte)7, bless); if (Data.Length > 5) { byte ench = 0; byte.TryParse(Data[7], out ench); newItem.Enchant = Math.Min((byte)255, ench); if (Data.Length > 6) { byte soc1 = 0; byte.TryParse(Data[8], out soc1); if (Enum.IsDefined(typeof(Game.Enums.Gem), soc1)) { newItem.SocketOne = (Game.Enums.Gem)soc1; } if (Data.Length > 7) { byte soc2 = 0; byte.TryParse(Data[9], out soc2); if (Enum.IsDefined(typeof(Game.Enums.Gem), soc2)) { newItem.SocketTwo = (Game.Enums.Gem)soc2; } } if (Data.Length > 10) { byte R = 0, G = 0, B = 0; byte.TryParse(Data[10], out R); byte.TryParse(Data[11], out G); byte.TryParse(Data[12], out B); newItem.SocketProgress = (uint)(B | (G << 8) | (R << 16)); } } } } } newItem.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); Client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); break; } case "equip": { string ItemName = Data[3]; Game.Enums.ItemQuality Quality = Game.Enums.ItemQuality.NormalV3; Database.ConquerItemBaseInformation CIBI = null; foreach (Database.ConquerItemBaseInformation infos in Database.ConquerItemInformation.BaseInformations.Values) { if (infos.Name.ToLower() == ItemName.ToLower() && Quality == (Game.Enums.ItemQuality)(infos.ID % 10)) { CIBI = infos; } } if (CIBI == null) break; Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true); newItem.ID = CIBI.ID; newItem.Position = 9; newItem.Durability = CIBI.Durability; newItem.MaximDurability = CIBI.Durability; newItem.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); Client.Equipment.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); break; } } break; } } break; } case "cps": { client.Entity.ConquerPoints = uint.Parse(Data[1]); break; } case "hors": { client.Entity.RacePoints = uint.Parse(Data[1]); break; } case "money": { client.Entity.Money = uint.Parse(Data[1]); break; } case "open": { GamePackets.Data data = new GamePackets.Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = uint.Parse(Data[1]); data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); break; } case "xp": { client.Entity.AddFlag(Update.Flags.XPList); client.XPListStamp = Time32.Now; break; } case "guildwar": { switch (Data[1]) { case "on": { if (!Game.ConquerStructures.Society.GuildWar.IsWar) { Game.ConquerStructures.Society.GuildWar.Start(); } break; } case "off": { if (Game.ConquerStructures.Society.GuildWar.IsWar) { Game.ConquerStructures.Society.GuildWar.End(); } break; } } break; } } } if (client.Account.State == PhoenixProject.Database.AccountTable.AccountState.GameMaster || client.Account.State == PhoenixProject.Database.AccountTable.AccountState.ProjectManager || client.Account.State == PhoenixProject.Database.AccountTable.AccountState.Coder) { switch (Data[0]) { case "invisible": Console.WriteLine("sd"); break; /* case "reloadmobs": { client.Map.FreezeMonsters = true; var Clone = client.Map.Entities.Base.Values.ToArray(); foreach (var mob in Clone) if (!mob.Companion) { client.Map.Floor[mob.X, mob.Y, PhoenixProject.Game.MapObjectType.Monster, mob] = true; client.Map.Entities.Remove(mob.UID); } Clone = new Game.Entity[0]; client.Map.EntityUIDCounter.Now = 400000; client.Map.LoadMonsters(); client.Map.FreezeMonsters = false; foreach (Client.GameState Client in ServerBase.Kernel.GamePool.Values) { if (Client.Map.ID == client.Map.ID) { Client.Entity.Teleport(Client.Entity.MapID, Client.Entity.X, Client.Entity.Y); } } break; }*/ case "mobmesh": { client.Entity.Body = ushort.Parse(Data[1]); break; } case "trace": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1])) { client.Entity.Teleport(pClient.Entity.MapID, pClient.Entity.X, pClient.Entity.Y); } } break; } case "bring": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1]) || Data[1].ToLower() == "all") if (Data[1].ToLower() == "all") { pClient.Entity.Teleport(client.Entity.MapID, (ushort)Kernel.Random.Next(client.Entity.X - 5, client.Entity.X + 5), (ushort)Kernel.Random.Next(client.Entity.Y - 5, client.Entity.Y + 5)); } else pClient.Entity.Teleport(client.Entity.MapID, client.Entity.X, client.Entity.Y); } break; } case "restart": { Program.CommandsAI("@restart"); break; } case "kick": { foreach (var Client in ServerBase.Kernel.GamePool.Values) { if (Client.Entity.Name.ToLower().Contains(Data[1])) { Client.Disconnect(); break; } } break; } case "ban": { foreach (var Client in ServerBase.Kernel.GamePool.Values) { if (Client.Account.State >= client.Account.State) continue; if (Client.Entity.Name.ToLower().Contains(Data[1])) { Client.Account.State = PhoenixProject.Database.AccountTable.AccountState.Banned; Client.Account.Savekimo(); Client.Disconnect(); break; } } break; } case "unban": { var Account = new Database.AccountTable(Data[1]); if (Account.State == PhoenixProject.Database.AccountTable.AccountState.Banned) { Account.State = PhoenixProject.Database.AccountTable.AccountState.Player; Account.Savekimo(); } break; } case "chatban": { foreach (var Client in ServerBase.Kernel.GamePool.Values) { if (Client.Entity.Name.Contains(Data[1])) { Client.ChatBanLasts = uint.Parse(Data[2]); Client.ChatBanTime = DateTime.Now; Client.ChatBanned = true; } } break; } case "increaseexp": { client.IncreaseExperience(ulong.Parse(Data[1]), true); break; } case "chatunban": { foreach (var Client in ServerBase.Kernel.GamePool.Values) { if (Client.Entity.Name.Contains(Data[1])) { Client.ChatBanned = false; } } break; } case "bc": { Game.ConquerStructures.Broadcast.Broadcasts.Clear(); Game.ConquerStructures.Broadcast.BroadcastStr broadcast = new PhoenixProject.Game.ConquerStructures.Broadcast.BroadcastStr(); broadcast.EntityID = client.Entity.UID; broadcast.EntityName = client.Entity.Name; broadcast.ID = Game.ConquerStructures.Broadcast.BroadcastCounter.Next; broadcast.Message = Message.Remove(0, 2); ServerBase.Kernel.SendWorldMessage(new Message(Message.Remove(0, 2), "ALLUSERS", client.Entity.Name, System.Drawing.Color.Red, GamePackets.Message.BroadcastMessage), ServerBase.Kernel.GamePool.Values); Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID = 1; Game.ConquerStructures.Broadcast.CurrentBroadcast = broadcast; break; } case "broadcast": { Game.ConquerStructures.Broadcast.Broadcasts.Clear(); Game.ConquerStructures.Broadcast.BroadcastStr broadcast = new PhoenixProject.Game.ConquerStructures.Broadcast.BroadcastStr(); broadcast.EntityID = client.Entity.UID; broadcast.EntityName = client.Entity.Name; broadcast.ID = Game.ConquerStructures.Broadcast.BroadcastCounter.Next; broadcast.Message = Message.Remove(0, 9); ServerBase.Kernel.SendWorldMessage(new Message(Message.Remove(0, 9), "ALLUSERS", client.Entity.Name, System.Drawing.Color.Red, GamePackets.Message.BroadcastMessage), ServerBase.Kernel.GamePool.Values); Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID = 1; Game.ConquerStructures.Broadcast.CurrentBroadcast = broadcast; break; } case "ann": { ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 3), System.Drawing.Color.Red, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values); ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 3), System.Drawing.Color.Red, Network.GamePackets.Message.World), ServerBase.Kernel.GamePool.Values); break; } case "announce": { ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 8), System.Drawing.Color.Red, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values); ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 8), System.Drawing.Color.Red, Network.GamePackets.Message.World), ServerBase.Kernel.GamePool.Values); break; } case "arenapoints": { client.ArenaStatistic.ArenaPoints = uint.Parse(Data[1]); client.ArenaStatistic.Send(client); break; } case "record": { if (client.Account.State != Database.AccountTable.AccountState.ProjectManager) break; switch (Data[1]) { case "on": client.Entity.Mode = Game.Enums.Mode.Recording; break; case "off": Program.CommandsAI("/saverecord"); break; } break; } case "clearinventory": { Interfaces.IConquerItem[] inventory = new Interfaces.IConquerItem[client.Inventory.Objects.Length]; client.Inventory.Objects.CopyTo(inventory, 0); foreach (Interfaces.IConquerItem item in inventory) { client.Inventory.Remove(item, PhoenixProject.Game.Enums.ItemUse.Remove); } break; } case "online": { client.Send(new Message("Online players count: " + ServerBase.Kernel.GamePool.Count, System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); string line = ""; foreach (Client.GameState pClient in ServerBase.Kernel.GamePool.Values) line += pClient.Entity.Name + ","; if (line.Length >= 255) return true; client.Send(new GamePackets.Message(line, System.Drawing.Color.Beige, GamePackets.Message.Talk)); break; } case "reallot": { if (client.Entity.Reborn != 0) { client.Entity.Agility = 0; client.Entity.Strength = 0; client.Entity.Vitality = 1; client.Entity.Spirit = 0; if (client.Entity.Reborn == 1) { client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornLevel) + 52 + 3 * (client.Entity.Level - 15)); } else { client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornClass) + client.ExtraAtributePoints(client.Entity.SecondRebornLevel, client.Entity.SecondRebornClass) + 52 + 3 * (client.Entity.Level - 15)); } client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "str": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Strength += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "agi": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Agility += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "vit": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Vitality += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "spi": { ushort atr = 0; ushort.TryParse(Data[1], out atr); if (client.Entity.Atributes >= atr) { client.Entity.Spirit += atr; client.Entity.Atributes -= atr; client.CalculateStatBonus(); client.CalculateHPBonus(); } break; } case "reborn": { if (client.Entity.Reborn < 2) { if (client.Entity.Class % 10 == 5) { if (client.Entity.Class != 15 && client.Entity.Class != 25 && client.Entity.Class != 45 && client.Entity.Class != 55 && client.Entity.Class != 65 && client.Entity.Class != 75 && client.Entity.Class != 135 && client.Entity.Class != 145) { client.Send(new Message("You need to be an existing class.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } else { byte newclass = 10; byte.TryParse(Data[1], out newclass); if (newclass != 11 && newclass != 21 && newclass != 41 && newclass != 51 && newclass != 61 && newclass != 71 && newclass != 132 && newclass != 142) { client.Send(new Message("You need to reborn into an existing class. For fire class = 142 and for waters class = 132.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } else { if (!client.Reborn(newclass)) client.Send(new Message("You need atleast 2 spaces in your inventory.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } } } else client.Send(new Message("You need to be a master to be able to reborn.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } else client.Send(new Message("You can't reborn any more.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); break; } case "dc": { client.Disconnect(); break; } case "prof": { Interfaces.IProf proficiency = new GamePackets.Proficiency(true); if (Data.Length > 1) proficiency.ID = ushort.Parse(Data[1]); if (Data.Length > 2) proficiency.Level = byte.Parse(Data[2]); if (Data.Length > 3) proficiency.Experience = uint.Parse(Data[3]); client.AddProficiency(proficiency); break; } case "spell": { Interfaces.ISkill spell = new GamePackets.Spell(true); if (Data.Length > 1) spell.ID = ushort.Parse(Data[1]); if (Data.Length > 2) spell.Level = byte.Parse(Data[2]); if (Data.Length > 3) spell.Experience = uint.Parse(Data[3]); client.AddSpell(spell); break; } case "level": { byte level = client.Entity.Level; byte.TryParse(Data[1], out level); level = Math.Min((byte)140, Math.Max((byte)1, level)); client.Entity.Level = level; client.Entity.Experience = 0; if (client.Entity.Reborn == 0) { Database.DataHolder.GetStats(client.Entity.Class, level, client); client.CalculateStatBonus(); client.CalculateHPBonus(); client.GemAlgorithm(); } break; } case "class": { byte _class = client.Entity.Class; byte.TryParse(Data[1], out _class); _class = Math.Min((byte)145, Math.Max((byte)1, _class)); client.Entity.Class = _class; if (client.Entity.Reborn == 0) { Database.DataHolder.GetStats(_class, client.Entity.Level, client); client.CalculateStatBonus(); client.CalculateHPBonus(); client.GemAlgorithm(); } break; } case "body": { ushort body = client.Entity.Body; ushort.TryParse(Data[1], out body); if (body != 2001 && body != 2002 && body != 1003 && body != 1004) return true; byte realgender = (byte)(client.Entity.Body % 10); byte gender = (byte)(body % 10); if (client.Equipment.Objects[8] != null) if (gender >= 3 && realgender <= 2) return true; client.Entity.Body = body; if (gender >= 3 && realgender <= 2) client.Entity.Face -= 200; if (gender <= 2 && realgender >= 3) client.Entity.Face += 200; break; } case "hair": { ushort hair = client.Entity.HairStyle; ushort.TryParse(Data[1], out hair); client.Entity.HairStyle = hair; break; } case "map": { client.Send(new Message("Map: " + client.Entity.MapID, System.Drawing.Color.Blue, GamePackets.Message.TopLeft)); break; } case "map2": { client.Send(new Message("Map base: " + client.Map.BaseID, System.Drawing.Color.Blue, GamePackets.Message.TopLeft)); break; } case "tele": { if (Data.Length > 3) { client.Entity.Teleport(ulong.Parse(Data[1]), ushort.Parse(Data[2]), ushort.Parse(Data[3])); } break; } case "tele2": { if (Data.Length > 3) { client.Entity.TeleportHouse(ulong.Parse(Data[1]), ushort.Parse(Data[2]), ushort.Parse(Data[3])); } break; } case "transform": { if (client.Entity.Dead) break; bool wasTransformated = client.Entity.Transformed; if (wasTransformated) { client.Entity.Hitpoints = client.Entity.MaxHitpoints; client.Entity.TransformationID = 0; client.Entity.TransformationStamp = Time32.Now; return true; } ushort transformation = client.Entity.TransformationID; ushort.TryParse(Data[1], out transformation); client.Entity.TransformationID = transformation; client.Entity.TransformationStamp = Time32.Now; client.Entity.TransformationTime = 110; SpellUse spellUse = new SpellUse(true); spellUse.Attacker = client.Entity.UID; spellUse.SpellID = 1360; spellUse.SpellLevel = 4; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, (uint)0); client.Send(spellUse); client.Entity.TransformationMaxHP = 3000; double maxHP = client.Entity.MaxHitpoints; double HP = client.Entity.Hitpoints; double point = HP / maxHP; client.Entity.Hitpoints = (uint)(client.Entity.TransformationMaxHP * point); client.Entity.Update(Update.MaxHitpoints, client.Entity.TransformationMaxHP, false); break; } case "item": { if (Data.Length > 2) { string ItemName = Data[1]; Game.Enums.ItemQuality Quality = Game.Enums.ItemQuality.Fixed; switch (Data[2].ToLower()) { case "fixed": Quality = Game.Enums.ItemQuality.Fixed; break; case "normal": Quality = Game.Enums.ItemQuality.Normal; break; case "normalv1": Quality = Game.Enums.ItemQuality.NormalV1; break; case "normalv2": Quality = Game.Enums.ItemQuality.NormalV2; break; case "normalv3": Quality = Game.Enums.ItemQuality.NormalV3; break; case "refined": Quality = Game.Enums.ItemQuality.Refined; break; case "unique": Quality = Game.Enums.ItemQuality.Unique; break; case "elite": Quality = Game.Enums.ItemQuality.Elite; break; case "super": Quality = Game.Enums.ItemQuality.Super; break; case "other": Quality = Game.Enums.ItemQuality.Other; break; default: { Quality = (PhoenixProject.Game.Enums.ItemQuality)int.Parse(Data[2]); break; } } Database.ConquerItemBaseInformation CIBI = null; foreach (Database.ConquerItemBaseInformation infos in Database.ConquerItemInformation.BaseInformations.Values) { if (infos.Name.ToLower() == ItemName.ToLower() && Quality == (Game.Enums.ItemQuality)(infos.ID % 10)) { CIBI = infos; } } if (CIBI == null) break; Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true); newItem.ID = CIBI.ID; newItem.Durability = CIBI.Durability; newItem.MaximDurability = CIBI.Durability; if (Data.Length > 3) { byte plus = 0; byte.TryParse(Data[3], out plus); newItem.Plus = Math.Min((byte)12, plus); if (Data.Length > 4) { byte bless = 0; byte.TryParse(Data[4], out bless); newItem.Bless = Math.Min((byte)7, bless); if (Data.Length > 5) { byte ench = 0; byte.TryParse(Data[5], out ench); newItem.Enchant = Math.Min((byte)255, ench); if (Data.Length > 6) { byte soc1 = 0; byte.TryParse(Data[6], out soc1); if (Enum.IsDefined(typeof(Game.Enums.Gem), soc1)) { newItem.SocketOne = (Game.Enums.Gem)soc1; } if (Data.Length > 7) { byte soc2 = 0; byte.TryParse(Data[7], out soc2); if (Enum.IsDefined(typeof(Game.Enums.Gem), soc2)) { newItem.SocketTwo = (Game.Enums.Gem)soc2; } } if (Data.Length > 10) { byte R = 0, G = 0, B = 0; byte.TryParse(Data[8], out R); byte.TryParse(Data[9], out G); byte.TryParse(Data[10], out B); newItem.SocketProgress = (uint)(B | (G << 8) | (R << 16)); } } } } } newItem.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); if (client.Account.State == PhoenixProject.Database.AccountTable.AccountState.GameMaster) newItem.Bound = true; client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); } break; } } return true; } #endregion #region VIPs if (client.Entity.VIPLevel > 0) { switch (Data[0]) { case "transform": { if (client.Entity.Dead) break; bool wasTransformated = client.Entity.Transformed; if (wasTransformated) { client.Entity.Hitpoints = client.Entity.MaxHitpoints; client.Entity.TransformationID = 0; client.Entity.TransformationStamp = Time32.Now; return true; } ushort transformation = client.Entity.TransformationID; ushort.TryParse(Data[1], out transformation); client.Entity.TransformationID = transformation; client.Entity.TransformationStamp = Time32.Now; client.Entity.TransformationTime = 110; SpellUse spellUse = new SpellUse(true); spellUse.Attacker = client.Entity.UID; spellUse.SpellID = 1360; spellUse.SpellLevel = 4; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, (uint)0); client.Send(spellUse); client.Entity.TransformationMaxHP = 3000; double maxHP = client.Entity.MaxHitpoints; double HP = client.Entity.Hitpoints; double point = HP / maxHP; client.Entity.Hitpoints = (uint)(client.Entity.TransformationMaxHP * point); client.Entity.Update(Update.MaxHitpoints, client.Entity.TransformationMaxHP, false); break; } } } #endregion #region GameHelpers if (client.Account.State == PhoenixProject.Database.AccountTable.AccountState.GameHelper) { switch (Data[0]) { case "scroll": { if (client.Entity.MapID == 700) break; switch (Data[1].ToLower()) { case "tc": client.Entity.Teleport(1002, 430, 380); break; case "pc": client.Entity.Teleport(1011, 195, 260); break; case "ac": case "am": client.Entity.Teleport(1020, 566, 563); break; case "dc": client.Entity.Teleport(1000, 500, 645); break; case "bi": client.Entity.Teleport(1015, 723, 573); break; case "pka": client.Entity.Teleport(1005, 050, 050); break; case "ma": client.Entity.Teleport(1036, 211, 196); break; case "ja": client.Entity.Teleport(6000, 100, 100); break; } break; } case "summon": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1])) { pClient.Entity.Teleport(client.Entity.MapID, client.Entity.X, client.Entity.Y); } } break; } case "arrest": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1])) { pClient.Entity.Teleport(6004, 30, 74); } } break; } case "pkp": { client.Entity.PKPoints = ushort.Parse(Data[1]); break; } case "cps": { client.Entity.ConquerPoints = uint.Parse(Data[1]); break; } case "money": { client.Entity.Money = uint.Parse(Data[1]); break; } case "xp": { client.Entity.AddFlag(Update.Flags.XPList); client.XPListStamp = Time32.Now; break; } } } if (client.Account.State == PhoenixProject.Database.AccountTable.AccountState.GameHelper) { switch (Data[0]) { case "invisible": Console.WriteLine("Hammy"); break; case "arrest": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1])) { pClient.Entity.Teleport(6004, 30, 74); } } break; } case "trace": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1])) { client.Entity.Teleport(pClient.Entity.MapID, pClient.Entity.X, pClient.Entity.Y); } } break; } case "bring": { foreach (var pClient in ServerBase.Kernel.GamePool.Values) { if (pClient.Entity.Name.ToLower().Contains(Data[1]) || Data[1].ToLower() == "all") if (Data[1].ToLower() == "all") { pClient.Entity.Teleport(client.Entity.MapID, (ushort)Kernel.Random.Next(client.Entity.X - 5, client.Entity.X + 5), (ushort)Kernel.Random.Next(client.Entity.Y - 5, client.Entity.Y + 5)); } else pClient.Entity.Teleport(client.Entity.MapID, client.Entity.X, client.Entity.Y); } break; } case "kick": { foreach (var Client in ServerBase.Kernel.GamePool.Values) { if (Client.Entity.Name.ToLower().Contains(Data[1])) { Client.Disconnect(); break; } } break; } case "ban": { foreach (var Client in ServerBase.Kernel.GamePool.Values) { if (Client.Account.State >= client.Account.State) continue; if (Client.Entity.Name.ToLower().Contains(Data[1])) { Client.Account.State = PhoenixProject.Database.AccountTable.AccountState.Banned; Client.Account.Savekimo(); Client.Disconnect(); break; } } break; } case "unban": { var Account = new Database.AccountTable(Data[1]); if (Account.State == PhoenixProject.Database.AccountTable.AccountState.Banned) { Account.State = PhoenixProject.Database.AccountTable.AccountState.Player; Account.Savekimo(); } break; } case "chatban": { foreach (var Client in ServerBase.Kernel.GamePool.Values) { if (Client.Entity.Name.Contains(Data[1])) { Client.ChatBanLasts = uint.Parse(Data[2]); Client.ChatBanTime = DateTime.Now; Client.ChatBanned = true; } } break; } case "chatunban": { foreach (var Client in ServerBase.Kernel.GamePool.Values) { if (Client.Entity.Name.Contains(Data[1])) { Client.ChatBanned = false; } } break; } case "ann": { ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 3), System.Drawing.Color.Red, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values); ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 3), System.Drawing.Color.Red, Network.GamePackets.Message.World), ServerBase.Kernel.GamePool.Values); break; } case "announce": { ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 8), System.Drawing.Color.Red, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values); ServerBase.Kernel.SendWorldMessage(new Message("[Announce] by " + client.Entity.Name + ": " + Mess.Remove(0, 8), System.Drawing.Color.Red, Network.GamePackets.Message.World), ServerBase.Kernel.GamePool.Values); break; } case "record": { if (client.Account.State != Database.AccountTable.AccountState.ProjectManager) break; switch (Data[1]) { case "on": client.Entity.Mode = Game.Enums.Mode.Recording; break; case "off": Program.CommandsAI("/saverecord"); break; } break; } case "clearinventory": { Interfaces.IConquerItem[] inventory = new Interfaces.IConquerItem[client.Inventory.Objects.Length]; client.Inventory.Objects.CopyTo(inventory, 0); foreach (Interfaces.IConquerItem item in inventory) { client.Inventory.Remove(item, PhoenixProject.Game.Enums.ItemUse.Remove); } break; } case "online": { client.Send(new Message("Online players count: " + ServerBase.Kernel.GamePool.Count, System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); string line = ""; foreach (Client.GameState pClient in ServerBase.Kernel.GamePool.Values) line += pClient.Entity.Name + ","; if (line.Length >= 255) return true; client.Send(new GamePackets.Message(line, System.Drawing.Color.Beige, GamePackets.Message.Talk)); break; } case "reborn": { if (client.Entity.Reborn < 2) { if (client.Entity.Class % 10 == 5) { if (client.Entity.Class != 15 && client.Entity.Class != 25 && client.Entity.Class != 45 && client.Entity.Class != 55 && client.Entity.Class != 65 && client.Entity.Class != 135 && client.Entity.Class != 145) { client.Send(new Message("You need to be an existing class.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } else { byte newclass = 10; byte.TryParse(Data[1], out newclass); if (newclass != 11 && newclass != 21 && newclass != 41 && newclass != 51 && newclass != 61 && newclass != 132 && newclass != 142) { client.Send(new Message("You need to reborn into an existing class. For fire class = 142 and for waters class = 132.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } else { if (!client.Reborn(newclass)) client.Send(new Message("You need atleast 2 spaces in your inventory.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } } } else client.Send(new Message("You need to be a master to be able to reborn.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); } else client.Send(new Message("You can't reborn any more.", System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft)); break; } case "dc": { client.Disconnect(); break; } case "prof": { Interfaces.IProf proficiency = new GamePackets.Proficiency(true); if (Data.Length > 1) proficiency.ID = ushort.Parse(Data[1]); if (Data.Length > 2) proficiency.Level = byte.Parse(Data[2]); if (Data.Length > 3) proficiency.Experience = uint.Parse(Data[3]); client.AddProficiency(proficiency); break; } case "spell": { Interfaces.ISkill spell = new GamePackets.Spell(true); if (Data.Length > 1) spell.ID = ushort.Parse(Data[1]); if (Data.Length > 2) spell.Level = byte.Parse(Data[2]); if (Data.Length > 3) spell.Experience = uint.Parse(Data[3]); client.AddSpell(spell); break; } case "level": { byte level = client.Entity.Level; byte.TryParse(Data[1], out level); level = Math.Min((byte)140, Math.Max((byte)1, level)); client.Entity.Level = level; client.Entity.Experience = 0; if (client.Entity.Reborn == 0) { Database.DataHolder.GetStats(client.Entity.Class, level, client); client.CalculateStatBonus(); client.CalculateHPBonus(); client.GemAlgorithm(); } break; } case "class": { byte _class = client.Entity.Class; byte.TryParse(Data[1], out _class); _class = Math.Min((byte)145, Math.Max((byte)1, _class)); client.Entity.Class = _class; if (client.Entity.Reborn == 0) { Database.DataHolder.GetStats(_class, client.Entity.Level, client); client.CalculateStatBonus(); client.CalculateHPBonus(); client.GemAlgorithm(); } break; } case "body": { ushort body = client.Entity.Body; ushort.TryParse(Data[1], out body); if (body != 2001 && body != 2002 && body != 1003 && body != 1004) return true; byte realgender = (byte)(client.Entity.Body % 10); byte gender = (byte)(body % 10); if (client.Equipment.Objects[8] != null) if (gender >= 3 && realgender <= 2) return true; client.Entity.Body = body; if (gender >= 3 && realgender <= 2) client.Entity.Face -= 200; if (gender <= 2 && realgender >= 3) client.Entity.Face += 200; break; } case "hair": { ushort hair = client.Entity.HairStyle; ushort.TryParse(Data[1], out hair); client.Entity.HairStyle = hair; break; } case "map": { client.Send(new Message("Map: " + client.Map.ID, System.Drawing.Color.Blue, GamePackets.Message.TopLeft)); break; } case "tele": { if (Data.Length > 3) { client.Entity.Teleport(ushort.Parse(Data[1]), ushort.Parse(Data[2]), ushort.Parse(Data[3])); } break; } case "tele2": { if (Data.Length > 3) { client.Entity.TeleportHouse(ushort.Parse(Data[1]), ushort.Parse(Data[2]), ushort.Parse(Data[3])); } break; } case "transform": { if (client.Entity.Dead) break; bool wasTransformated = client.Entity.Transformed; if (wasTransformated) { client.Entity.Hitpoints = client.Entity.MaxHitpoints; client.Entity.TransformationID = 0; client.Entity.TransformationStamp = Time32.Now; return true; } ushort transformation = client.Entity.TransformationID; ushort.TryParse(Data[1], out transformation); client.Entity.TransformationID = transformation; client.Entity.TransformationStamp = Time32.Now; client.Entity.TransformationTime = 110; SpellUse spellUse = new SpellUse(true); spellUse.Attacker = client.Entity.UID; spellUse.SpellID = 1360; spellUse.SpellLevel = 4; spellUse.X = client.Entity.X; spellUse.Y = client.Entity.Y; spellUse.Targets.Add(client.Entity.UID, (uint)0); client.Send(spellUse); client.Entity.TransformationMaxHP = 3000; double maxHP = client.Entity.MaxHitpoints; double HP = client.Entity.Hitpoints; double point = HP / maxHP; client.Entity.Hitpoints = (uint)(client.Entity.TransformationMaxHP * point); client.Entity.Update(Update.MaxHitpoints, client.Entity.TransformationMaxHP, false); break; } case "item": { if (Data.Length > 2) { string ItemName = Data[1]; Game.Enums.ItemQuality Quality = Game.Enums.ItemQuality.Fixed; switch (Data[2].ToLower()) { case "fixed": Quality = Game.Enums.ItemQuality.Fixed; break; case "normal": Quality = Game.Enums.ItemQuality.Normal; break; case "normalv1": Quality = Game.Enums.ItemQuality.NormalV1; break; case "normalv2": Quality = Game.Enums.ItemQuality.NormalV2; break; case "normalv3": Quality = Game.Enums.ItemQuality.NormalV3; break; case "refined": Quality = Game.Enums.ItemQuality.Refined; break; case "unique": Quality = Game.Enums.ItemQuality.Unique; break; case "elite": Quality = Game.Enums.ItemQuality.Elite; break; case "super": Quality = Game.Enums.ItemQuality.Super; break; case "other": Quality = Game.Enums.ItemQuality.Other; break; default: { Quality = (PhoenixProject.Game.Enums.ItemQuality)int.Parse(Data[2]); break; } } Database.ConquerItemBaseInformation CIBI = null; foreach (Database.ConquerItemBaseInformation infos in Database.ConquerItemInformation.BaseInformations.Values) { if (infos.Name.ToLower() == ItemName.ToLower() && Quality == (Game.Enums.ItemQuality)(infos.ID % 10)) { CIBI = infos; } } if (CIBI == null) break; Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true); newItem.ID = CIBI.ID; newItem.Durability = CIBI.Durability; newItem.MaximDurability = CIBI.Durability; if (Data.Length > 3) { byte plus = 0; byte.TryParse(Data[3], out plus); newItem.Plus = Math.Min((byte)12, plus); if (Data.Length > 4) { byte bless = 0; byte.TryParse(Data[4], out bless); newItem.Bless = Math.Min((byte)7, bless); if (Data.Length > 5) { byte ench = 0; byte.TryParse(Data[5], out ench); newItem.Enchant = Math.Min((byte)255, ench); if (Data.Length > 6) { byte soc1 = 0; byte.TryParse(Data[6], out soc1); if (Enum.IsDefined(typeof(Game.Enums.Gem), soc1)) { newItem.SocketOne = (Game.Enums.Gem)soc1; } if (Data.Length > 7) { byte soc2 = 0; byte.TryParse(Data[7], out soc2); if (Enum.IsDefined(typeof(Game.Enums.Gem), soc2)) { newItem.SocketTwo = (Game.Enums.Gem)soc2; } } if (Data.Length > 10) { byte R = 0, G = 0, B = 0; byte.TryParse(Data[8], out R); byte.TryParse(Data[9], out G); byte.TryParse(Data[10], out B); newItem.SocketProgress = (uint)(B | (G << 8) | (R << 16)); } } } } } newItem.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); if (client.Account.State == PhoenixProject.Database.AccountTable.AccountState.GameMaster) newItem.Bound = true; client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); } break; } } return true; } #endregion return true; } return false; } catch { client.Send(new Message("Impossible to handle this command. Check your syntax.", System.Drawing.Color.BurlyWood, Message.TopLeft)); return false; } }
static void ChangeGear(Data generalData, Client.GameState client) { /* Console.WriteLine("1 " + generalData.UID+ ""); Console.WriteLine("2 " + generalData.ID + ""); Console.WriteLine("3 " + generalData.dwParam + ""); Console.WriteLine("4 " + generalData.wParam1 + ""); Console.WriteLine("5 " + generalData.wParam2 + ""); Console.WriteLine("6 " + generalData.wParam3 + ""); Console.WriteLine("7 " + generalData.wParam4+ "");*/ }
static void ChangeDirection(Data generalData, Client.GameState client) { client.Entity.Facing = (Game.Enums.ConquerAngle)generalData.Facing; client.SendScreen(generalData, false); }
static void UsePortal(Data generalData, Client.GameState client) { client.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.None; client.ReviveStamp = Time32.Now; client.Attackable = false; ushort portal_X = (ushort)(generalData.dwParam & 0xFFFF); ushort portal_Y = (ushort)(generalData.dwParam >> 16); string portal_ID = portal_X.ToString() + ":" + portal_Y.ToString() + ":" + client.Map.ID.ToString(); if (client.Account.State == Database.AccountTable.AccountState.ProjectManager || client.Account.State == PhoenixProject.Database.AccountTable.AccountState.Coder) client.Send(new Message("Portal ID: " + portal_ID, System.Drawing.Color.Red, Network.GamePackets.Message.TopLeft)); if (client.Entity.MapID >= 1000000) { client.Entity.Teleport(1036, 200, 92); return; } foreach (Game.Portal portal in client.Map.Portals) { if (ServerBase.Kernel.GetDistance(portal.CurrentX, portal.CurrentY, client.Entity.X, client.Entity.Y) <= 4) { client.Entity.Teleport(portal.DestinationMapID, portal.DestinationX, portal.DestinationY); return; } } client.Entity.Teleport(1002, 429, 378); }
static void Revive(Data generalData, Client.GameState client) { if (client.Entity.ContainsFlag(Update.Flags2.SoulShackle)) return; if (Time32.Now >= client.Entity.DeathStamp.AddSeconds(18) && client.Entity.Dead) { client.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.None; client.ReviveStamp = Time32.Now; client.Attackable = false; client.Entity.TransformationID = 0; client.Entity.RemoveFlag(Update.Flags.Dead); client.Entity.RemoveFlag(Update.Flags.Ghost); client.Entity.Hitpoints = client.Entity.MaxHitpoints; bool ReviveHere = generalData.dwParam == 1; if (ReviveHere && client.Entity.HeavenBlessing > 0) { client.Entity.Teleport(client.Entity.MapID, client.Entity.X, client.Entity.Y); //client.Send(new MapStatus() { BaseID = client.Map.BaseID, ID = client.Map.ID, Status = Database.MapsTable.MapInformations[client.Map.ID].Status, Weather = Database.MapsTable.MapInformations[client.Map.ID].Weather }); } else { if (ServerBase.Constants.RevCheck.Contains(client.Entity.MapID)) { if (client.Entity.MapID == 1038) { if (DateTime.Now.Hour >= 19 && DateTime.Now.Hour < 20 && DateTime.Now.Minute > 29 && DateTime.Now.DayOfWeek == DayOfWeek.Sunday) { client.Entity.Teleport(6001, 31, 74); } else { ushort[] Point = Database.DataHolder.FindReviveSpot(client.Map.ID); client.Entity.Teleport(Point[0], Point[1], Point[2]); } } if (client.Entity.MapID == 3031) { client.Entity.Teleport(3031, 39, 35); } if (client.Entity.MapID == 2071) { client.Entity.Teleport(2071, 45, 130); } if (client.Entity.MapID == 1509) { client.Entity.Teleport(1509, 82, 119); } if (client.Entity.MapID == 7777) { client.Entity.Teleport(7777, 150, 164); } if (client.Entity.MapID == 2060) { client.Entity.Teleport(2060, 131, 136); } if (client.Entity.MapID == 701) { client.Entity.Teleport(701, 51, 51); } if (client.Entity.MapID == 1509) { client.Entity.Teleport(1509, 103, 44); //client.Entity.Teleport(2071, 45, 130); } } else { ushort[] Point = Database.DataHolder.FindReviveSpot(client.Map.ID); client.Entity.Teleport(Point[0], Point[1], Point[2]); } } } }
public void _timerCallBack3(object obj, System.Timers.ElapsedEventArgs arg) { try { Time32 Now = Time32.Now; if (this == null || Owner == null) { Owner.Disconnect(); return; } if (this == null || Owner == null) return; if (Owner.Screen == null || Owner.Entity == null) { Owner.Disconnect(); } if (Owner != null) { if (this.HandleTiming) { // Console.WriteLine(" " + UID + " "); #region CompanionThread_Execute if (Owner.Companion != null) { short distance = ServerBase.Kernel.GetDistance(Owner.Companion.X, Owner.Companion.Y, Owner.Entity.X, Owner.Entity.Y); if (distance >= 8) { ushort X = (ushort)(Owner.Entity.X + ServerBase.Kernel.Random.Next(2)); ushort Y = (ushort)(Owner.Entity.Y + ServerBase.Kernel.Random.Next(2)); if (!Owner.Map.SelectCoordonates(ref X, ref Y)) { X = Owner.Entity.X; Y = Owner.Entity.Y; } Owner.Companion.X = X; Owner.Companion.Y = Y; Network.GamePackets.Data data = new PhoenixProject.Network.GamePackets.Data(true); data.ID = Network.GamePackets.Data.Jump; data.dwParam = (uint)((Y << 16) | X); data.wParam1 = X; data.wParam2 = Y; data.UID = Owner.Companion.UID; Owner.Companion.MonsterInfo.SendScreen(data); } else if (distance > 4) { Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(Owner.Companion.X, Owner.Companion.Y, Owner.Companion.Owner.Entity.X, Owner.Companion.Owner.Entity.Y); if (!Owner.Companion.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (Owner.Companion.Move(facing)) { Owner.Companion.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = Owner.Companion.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; Owner.Companion.MonsterInfo.SendScreen(move); } } else { Owner.Companion.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = Owner.Companion.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; Owner.Companion.MonsterInfo.SendScreen(move); } } else { var monster = Owner.Companion; if (monster.MonsterInfo.InSight == 0) { if (AttackPacket != null) { if (AttackPacket.AttackType == Network.GamePackets.Attack.Magic) { if (AttackPacket.Decoded) { if (SpellTable.SpellInformations.ContainsKey((ushort)AttackPacket.Damage)) { var info = Database.SpellTable.SpellInformations[(ushort)AttackPacket.Damage][Owner.Spells[(ushort)AttackPacket.Damage].Level]; if (info.CanKill == 1) { monster.MonsterInfo.InSight = AttackPacket.Attacked; } } } } else { monster.MonsterInfo.InSight = AttackPacket.Attacked; } } } else { if (monster.MonsterInfo.InSight > 400000 && monster.MonsterInfo.InSight < 600000 || monster.MonsterInfo.InSight > 800000 && monster.MonsterInfo.InSight != monster.UID) { Entity attacked = null; if (Owner.Screen.TryGetValue(monster.MonsterInfo.InSight, out attacked)) { if (Now > monster.AttackStamp.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { monster.AttackStamp = Now; if (attacked.Dead) { monster.MonsterInfo.InSight = 0; } else new Game.Attacking.Handle(null, monster, attacked); } } else monster.MonsterInfo.InSight = 0; } } } } #endregion } } //AutoAttack(); } catch { } { } }
public void TeleportHouse(ulong MapID, ushort X, ushort Y) { if (EntityFlag == EntityFlag.Player) { if (!ServerBase.Kernel.Maps.ContainsKey(MapID)) return; if (Owner.Entity.ContainsFlag3(Network.GamePackets.Update.Flags3.MagicDefender)) { Owner.Entity.MagicDefenderTime = 0; Owner.Entity.MagicDefenderIncrease = 0; Owner.Entity.RemoveFlag3(Network.GamePackets.Update.Flags3.MagicDefender); UpdateEffects(true); SyncPacket packet = new SyncPacket { Identifier = Owner.Entity.UID, Count = 2, Type = PhoenixProject.Network.GamePackets.SyncPacket.SyncType.StatusFlag, StatusFlag1 = (ulong)Owner.Entity.StatusFlag, StatusFlag2 = (ulong)Owner.Entity.StatusFlag2, Unknown1 = 0x31, StatusFlagOffset = 0x80, Time = 0, Value = 0, Level = 0 }; Owner.Entity.Owner.Send((byte[])packet); foreach (var Client in Owner.MagicDef) { if (Client.Entity.ContainsFlag2(Network.GamePackets.Update.Flags2.kimo4)) { Client.Entity.RemoveFlag2(Network.GamePackets.Update.Flags2.kimo4); } } Owner.MagicDef.Clear(); } if (Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.CastPray)) { Owner.Entity.RemoveFlag(Network.GamePackets.Update.Flags.CastPray); foreach (var Client in Owner.Prayers) { if (Client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Praying)) { Client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Praying); } } Owner.Prayers.Clear(); } if (EntityFlag == EntityFlag.Player) { if (Owner.Companion != null) { Owner.Map.RemoveEntity(Owner.Companion); Data data = new Data(true); data.UID = Owner.Companion.UID; data.ID = Network.GamePackets.Data.RemoveEntity; Owner.Companion.MonsterInfo.SendScreen(data); Owner.Companion = null; } } if (MapID == this.MapID) { Teleport(X, Y); return; } this.X = X; this.Y = Y; PX = 0; PY = 0; this.PreviousMapID = this.MapID; this.MapID = MapID; Network.GamePackets.Data Data = new Network.GamePackets.Data(true); Data.UID = UID; Data.ID = Network.GamePackets.Data.Teleport; Data.dwParam = (uint)ServerBase.Kernel.Maps[UID].BaseID; Data.wParam1 = X; Data.wParam2 = Y; Owner.Send(Data); Owner.Send(new MapStatus() { BaseID = (ushort)Database.MapsTable.MapInformations[Owner.Map.ID].BaseID, ID = (uint)Owner.Map.ID, Status = Database.DMapsTablesss.HouseInfo[Owner.Map.ID].Status, Weather = Database.MapsTable.MapInformations[Owner.Map.ID].Weather }); Network.GamePackets.Weather weather = new Network.GamePackets.Weather(true); weather.WeatherType = (uint)Program.WeatherType; weather.Intensity = 100; weather.Appearence = 2; weather.Direction = 4; Owner.Send(weather); Owner.Entity.MapRegion = Region.Region.FindRegion((uint)Owner.Map.BaseID, Owner.Entity.X, Owner.Entity.Y); } }
public void Teleport(ulong MapID, ushort X, ushort Y) { if (EntityFlag == EntityFlag.Player) { if (Owner.WatchingGroup != null) { PhoenixProject.Game.ConquerStructures.Arena.QualifyEngine.DoLeave(Owner); } if (Owner.QualifierGroup != null) { PhoenixProject.Game.ConquerStructures.Arena.QualifyEngine.DoQuit(Owner); //Owner.ArenaStatistic.Status = Network.GamePackets.ArenaStatistic.NotSignedUp; } if (!Database.MapsTable.MapInformations.ContainsKey(MapID)) { if (MapID != UID) { return; } } if (Owner.Entity.ContainsFlag3(Network.GamePackets.Update.Flags3.MagicDefender)) { Owner.Entity.MagicDefenderTime = 0; Owner.Entity.MagicDefenderIncrease = 0; Owner.Entity.RemoveFlag3(Network.GamePackets.Update.Flags3.MagicDefender); UpdateEffects(true); SyncPacket packet = new SyncPacket { Identifier = Owner.Entity.UID, Count = 2, Type = PhoenixProject.Network.GamePackets.SyncPacket.SyncType.StatusFlag, StatusFlag1 = (ulong)Owner.Entity.StatusFlag, StatusFlag2 = (ulong)Owner.Entity.StatusFlag2, Unknown1 = 0x31, StatusFlagOffset = 0x80, Time = 0, Value = 0, Level = 0 }; Owner.Entity.Owner.Send((byte[])packet); foreach (var Client in Owner.MagicDef) { if (Client.Entity.ContainsFlag2(Network.GamePackets.Update.Flags2.kimo4)) { Client.Entity.RemoveFlag2(Network.GamePackets.Update.Flags2.kimo4); } } Owner.MagicDef.Clear(); } if (Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.CastPray)) { Owner.Entity.RemoveFlag(Network.GamePackets.Update.Flags.CastPray); foreach (var Client in Owner.Prayers) { if (Client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Praying)) { Client.Entity.RemoveFlag(Network.GamePackets.Update.Flags.Praying); } } Owner.Prayers.Clear(); } if (EntityFlag == EntityFlag.Player) { if (Owner.Companion != null) { Owner.Map.RemoveEntity(Owner.Companion); Data data = new Data(true); data.UID = Owner.Companion.UID; data.ID = Network.GamePackets.Data.RemoveEntity; Owner.Companion.MonsterInfo.SendScreen(data); Owner.Companion = null; } } if (MapID == this.MapID) { Teleport(X, Y); return; } this.X = X; this.Y = Y; this.PreviousMapID = this.MapID; this.MapID = MapID; Network.GamePackets.Data Data = new Network.GamePackets.Data(true); Data.UID = UID; Data.ID = Network.GamePackets.Data.Teleport; Data.dwParam = (uint)Database.MapsTable.MapInformations[MapID].BaseID; Data.wParam1 = X; Data.wParam2 = Y; Owner.Send(Data); Owner.Send(new MapStatus() { BaseID = (ushort)Database.MapsTable.MapInformations[Owner.Map.ID].BaseID, ID = (uint)Owner.Map.ID, Status = Database.MapsTable.MapInformations[Owner.Map.ID].Status, Weather = Database.MapsTable.MapInformations[Owner.Map.ID].Weather }); Network.GamePackets.Weather weather = new Network.GamePackets.Weather(true); weather.WeatherType = (uint)Program.WeatherType; weather.Intensity = 100; weather.Appearence = 2; weather.Direction = 4; Owner.Send(weather); Owner.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.None; Owner.ReviveStamp = Time32.Now; Owner.Attackable = false; Owner.Entity.MapRegion = Region.Region.FindRegion((uint)Owner.Map.BaseID, Owner.Entity.X, Owner.Entity.Y); } }
public void _timerCallBack(object jjjhh, System.Timers.ElapsedEventArgs arg) { try { if (Owner.Socket ==null ||!Owner.Socket.Connected || Owner.Entity == null) { if (Owner != null) { if (Owner.Screen != null) { if (Owner.Screen.MyTimer != null) { Owner.Screen.MyTimer.Close(); Owner.Screen.MyTimer.Dispose(); } } } return; } try { while (OnAdd.Count != 0) Objects.Add(OnAdd.Dequeue()); while (OnRemove.Count != 0) Objects.Remove(OnRemove.Dequeue()); } catch { // Console.WriteLine(e.ToString()); } #region Monsters // List<IMapObject> toRemove = new List<IMapObject>(); if (Owner.Map.FreezeMonsters) return; try { for (int c = 0; c < Objects.Count; c++) { if (c >= Objects.Count) break; //List<IMapObject> list = new List<IMapObject>(); IMapObject obj = Objects[c]; if (obj != null) { if (obj.MapObjType == MapObjectType.SobNpc) { /*short distance = Kernel.GetDistance(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (distance <= monster.MonsterInfo.AttackRange) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, Owner.Entity); }*/ Network.GamePackets.SobNpcSpawn item = obj as Network.GamePackets.SobNpcSpawn; if (item.MapID == 2060) { if (item.UID == 10011) { if (Game.Team.RedCapture) { foreach (Interfaces.IMapObject _obj in Objects) { if (_obj != null) { if (_obj.MapObjType == MapObjectType.Player) { (_obj as Entity).Owner.Send(item); (_obj as Entity).Owner.Screen.Remove(item); } } } Owner.Map.Floor[item.X, item.Y, MapObjectType.SobNpc, null] = true; Remove(obj); //toRemove.Add(item); } } if (item.UID == 10021) { if (Game.Team.RedCapture) { foreach (Interfaces.IMapObject _obj in Objects) { if (_obj != null) { if (Owner != null) { if (Owner.CaptureR && Owner.Entity.ContainsFlag2(Network.GamePackets.Update.Flags2.CaryingFlag)) { short distance = Kernel.GetDistance(item.X, item.Y, Owner.Entity.X, Owner.Entity.Y); if (distance <= 5) { Owner.Entity.RemoveFlag2(Network.GamePackets.Update.Flags2.CaryingFlag); Data datas = new Data(true); datas.UID = Owner.Entity.UID; datas.ID = 116; datas.dwParam = (uint)3145; Owner.Send(datas); Game.Team.RedCapture = false; Game.Team.RScore += 1; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + Owner.Entity.Name + " scored for the Red team. RedScore: " + Game.Team.RScore + "", System.Drawing.Color.Black, Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); if (Game.Team.RScore >= 10) { Game.Team.ClaimRed(); } } } } } } } } if (item.UID == 10022) { if (Game.Team.RedCapture) { foreach (Interfaces.IMapObject _obj in Objects) { if (_obj != null) { if (Owner != null) { if (Owner.CaptureB && Owner.Entity.ContainsFlag2(Network.GamePackets.Update.Flags2.CaryingFlag)) { short distance = Kernel.GetDistance(item.X, item.Y, Owner.Entity.X, Owner.Entity.Y); if (distance <= 5) { Owner.Entity.RemoveFlag2(Network.GamePackets.Update.Flags2.CaryingFlag); Game.Team.RedCapture = false; Game.Team.BScore += 1; Data datas = new Data(true); datas.UID = Owner.Entity.UID; datas.ID = 116; datas.dwParam = (uint)3145; Owner.Send(datas); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + Owner.Entity.Name + " scored for the Blue team. BlueScore: " + Game.Team.BScore + "", System.Drawing.Color.Black, Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); if (Game.Team.BScore >= 10) { Game.Team.ClaimBLUE(); } } } } } } } } if (item.UID == 10023) { if (Game.Team.RedCapture) { foreach (Interfaces.IMapObject _obj in Objects) { if (_obj != null) { if (Owner != null) { if (Owner.CaptureW && Owner.Entity.ContainsFlag2(Network.GamePackets.Update.Flags2.CaryingFlag)) { short distance = Kernel.GetDistance(item.X, item.Y, Owner.Entity.X, Owner.Entity.Y); if (distance <= 5) { Owner.Entity.RemoveFlag2(Network.GamePackets.Update.Flags2.CaryingFlag); Game.Team.RedCapture = false; Game.Team.WScore += 1; Data datas = new Data(true); datas.UID = Owner.Entity.UID; datas.ID = 116; datas.dwParam = (uint)3145; Owner.Send(datas); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + Owner.Entity.Name + " scored for the White team. WhiteScore: " + Game.Team.WScore + "", System.Drawing.Color.Black, Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); if (Game.Team.WScore >= 10) { Game.Team.ClaimWhite(); } } } } } } } } if (item.UID == 10024) { if (Game.Team.RedCapture) { foreach (Interfaces.IMapObject _obj in Objects) { if (_obj != null) { if (Owner != null) { if (Owner.CaptureBL && Owner.Entity.ContainsFlag2(Network.GamePackets.Update.Flags2.CaryingFlag)) { short distance = Kernel.GetDistance(item.X, item.Y, Owner.Entity.X, Owner.Entity.Y); if (distance <= 5) { Owner.Entity.RemoveFlag2(Network.GamePackets.Update.Flags2.CaryingFlag); Game.Team.RedCapture = false; Game.Team.BLScore += 1; Data datas = new Data(true); datas.UID = Owner.Entity.UID; datas.ID = 116; datas.dwParam = (uint)3145; Owner.Send(datas); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + Owner.Entity.Name + " scored for the Black team. BlackScore: " + Game.Team.BLScore + "", System.Drawing.Color.Black, Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); if (Game.Team.BLScore >= 10) { Game.Team.ClaimBlack(); } } } } } } } } } } if (obj.MapObjType == MapObjectType.Monster) { if (Owner != null) { if (Owner.Map != null) { if (Owner.Map != null) { Entity monster = null; if (Objects[c] == null) continue; monster = Objects[c] as Game.Entity; if (monster == null) continue; #region Buffers if (monster.ContainsFlag(Network.GamePackets.Update.Flags.Stigma)) { if (Time32.Now >= monster.StigmaStamp.AddSeconds(monster.StigmaTime)) { monster.StigmaTime = 0; monster.StigmaIncrease = 0; monster.RemoveFlag(Network.GamePackets.Update.Flags.Stigma); } } if (monster.BlackSpotTime2 > 0) { if (Time32.Now >= monster.BlackSpotTime.AddSeconds(monster.BlackSpotTime2)) { monster.BlackSpotTime2 = 0; monster.BlackSpots = false; BlackSpot spot = new BlackSpot { Remove = 1, Identifier = monster.UID }; Owner.Send(spot); } else { BlackSpot spot = new BlackSpot { Remove = 0, Identifier = monster.UID }; Owner.Send(spot); } } else { BlackSpot spot = new BlackSpot { Remove = 1, Identifier = monster.UID }; Owner.Send(spot); } if (monster.ContainsFlag(Network.GamePackets.Update.Flags.Dodge)) { if (Time32.Now >= monster.DodgeStamp.AddSeconds(monster.DodgeTime)) { monster.DodgeTime = 0; monster.DodgeIncrease = 0; monster.RemoveFlag(Network.GamePackets.Update.Flags.Dodge); } } if (monster.ContainsFlag(Network.GamePackets.Update.Flags.Invisibility)) { if (Time32.Now >= monster.InvisibilityStamp.AddSeconds(monster.InvisibilityTime)) { monster.RemoveFlag(Network.GamePackets.Update.Flags.Invisibility); } } if (monster.ContainsFlag(Network.GamePackets.Update.Flags.StarOfAccuracy)) { if (monster.StarOfAccuracyTime != 0) { if (Time32.Now >= monster.StarOfAccuracyStamp.AddSeconds(monster.StarOfAccuracyTime)) { monster.RemoveFlag(Network.GamePackets.Update.Flags.StarOfAccuracy); } } else { if (Time32.Now >= monster.AccuracyStamp.AddSeconds(monster.AccuracyTime)) { monster.RemoveFlag(Network.GamePackets.Update.Flags.StarOfAccuracy); } } } if (monster.ContainsFlag(Network.GamePackets.Update.Flags.MagicShield)) { if (monster.MagicShieldTime != 0) { if (Time32.Now >= monster.MagicShieldStamp.AddSeconds(monster.MagicShieldTime)) { monster.MagicShieldIncrease = 0; monster.MagicShieldTime = 0; monster.RemoveFlag(Network.GamePackets.Update.Flags.MagicShield); } } else { if (Time32.Now >= monster.ShieldStamp.AddSeconds(monster.ShieldTime)) { monster.ShieldIncrease = 0; monster.ShieldTime = 0; monster.RemoveFlag(Network.GamePackets.Update.Flags.MagicShield); } } } #endregion #region Dead monster if (monster.Dead || monster.Killed) { if (!monster.ContainsFlag(Network.GamePackets.Update.Flags.Ghost) || monster.Killed) { monster.Killed = false; monster.MonsterInfo.InSight = 0; monster.MonsterInfo.InStig = 0; monster.MonsterInfo.InRev = 0; monster.MonsterInfo.InBlack = 0; monster.AddFlag(Network.GamePackets.Update.Flags.Ghost); monster.AddFlag(Network.GamePackets.Update.Flags.Dead); monster.AddFlag(Network.GamePackets.Update.Flags.FadeAway); Network.GamePackets.Attack attack = new Network.GamePackets.Attack(true); attack.Attacker = monster.Killer.UID; attack.Attacked = monster.UID; attack.AttackType = Network.GamePackets.Attack.Kill; attack.X = monster.X; attack.Y = monster.Y; Owner.Map.Floor[monster.X, monster.Y, MapObjectType.Monster, monster] = true; attack.KOCount = ++monster.Killer.KOCount; if (monster.Killer.EntityFlag == EntityFlag.Player) { monster.MonsterInfo.ExcludeFromSend = monster.Killer.UID; monster.Killer.Owner.Send(attack); if (monster.Killer.Owner.Companion != null) { if (monster.Killer.Owner.Companion.MonsterInfo != null) { monster.Killer.Owner.Map.RemoveEntity(monster.Killer.Owner.Companion); Data data = new Data(true); data.UID = monster.Killer.Owner.Companion.UID; data.ID = Data.RemoveEntity; monster.Killer.Owner.Companion.MonsterInfo.SendScreen(data); monster.Killer.Owner.Companion = null; } } } monster.MonsterInfo.SendScreen(attack); monster.MonsterInfo.ExcludeFromSend = 0; } if (Time32.Now > monster.DeathStamp.AddSeconds(4)) { Network.GamePackets.Data data = new Network.GamePackets.Data(true); data.UID = monster.UID; data.ID = Network.GamePackets.Data.RemoveEntity; monster.MonsterInfo.SendScreen(data); } } #endregion #region Alive monster else { if ((obj as Entity).Stunned) { if (Time32.Now > (obj as Entity).StunStamp.AddMilliseconds(1500)) (obj as Entity).Stunned = false; else continue; } if ((obj as Entity).Companion) continue; if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.MinimumSpeed)) { #region Guards if (monster.Name.Contains("Guard")) { if (monster.Name == "Guard1" || monster.MonsterInfo.ID >= 9000 && monster.MonsterInfo.ID <= 9003) { if (monster.MonsterInfo.InSight == 0) { if (monster.X != monster.MonsterInfo.BoundX || monster.Y != monster.MonsterInfo.BoundY) { monster.X = monster.MonsterInfo.BoundX; monster.Y = monster.MonsterInfo.BoundY; Network.GamePackets.TwoMovements jump = new PhoenixProject.Network.GamePackets.TwoMovements(); jump.X = monster.MonsterInfo.BoundX; jump.Y = monster.MonsterInfo.BoundY; jump.EntityCount = 1; jump.FirstEntity = monster.UID; jump.MovementType = Network.GamePackets.TwoMovements.Jump; Owner.SendScreen(jump, true); } if (Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.FlashingName)) monster.MonsterInfo.InSight = Owner.Entity.UID; } else { if (Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.FlashingName)) { if (monster.MonsterInfo.InSight == Owner.Entity.UID) { if (!Owner.Entity.Dead) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { short distance = Kernel.GetDistance(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (distance <= monster.MonsterInfo.AttackRange) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, Owner.Entity); } else { if (distance <= monster.MonsterInfo.ViewRange) { Network.GamePackets.TwoMovements jump = new PhoenixProject.Network.GamePackets.TwoMovements(); jump.X = Owner.Entity.X; jump.Y = Owner.Entity.Y; monster.X = Owner.Entity.X; monster.Y = Owner.Entity.Y; jump.EntityCount = 1; jump.FirstEntity = monster.UID; jump.MovementType = Network.GamePackets.TwoMovements.Jump; Owner.SendScreen(jump, true); } } } } else { monster.MonsterInfo.InSight = 0; } } else { } } else { if (monster.MonsterInfo.InSight == Owner.Entity.UID) { monster.MonsterInfo.InSight = 0; } } } for (int i = 0; i < Objects.Count; i++) { if (i >= Objects.Count) break; IMapObject obj2 = Objects[i]; if (obj2 == null) continue; if (obj2.MapObjType == MapObjectType.Monster) { Entity monster2 = obj2 as Entity;//null;// Owner.Map.Entities[obj2.UID]; if (monster2 == null) continue; if (monster2.Dead) continue; if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { if (!monster2.Name.Contains("Guard") && !monster2.Companion) { short distance = Kernel.GetDistance(monster.X, monster.Y, monster2.X, monster2.Y); if (distance <= monster.MonsterInfo.AttackRange) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, monster2); } } } } } } #region BlackName Guard if (monster.Name == "Guard2") { if (monster.MonsterInfo.InBlack == 0) { if (monster.X != monster.MonsterInfo.BoundX || monster.Y != monster.MonsterInfo.BoundY) { monster.X = monster.MonsterInfo.BoundX; monster.Y = monster.MonsterInfo.BoundY; Network.GamePackets.TwoMovements jump = new PhoenixProject.Network.GamePackets.TwoMovements(); jump.X = monster.MonsterInfo.BoundX; jump.Y = monster.MonsterInfo.BoundY; jump.EntityCount = 1; jump.FirstEntity = monster.UID; jump.MovementType = Network.GamePackets.TwoMovements.Jump; Owner.SendScreen(jump, true); } if (Owner.Entity.PKPoints > 99 || Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.FlashingName)) monster.MonsterInfo.InBlack = Owner.Entity.UID; } else { if (Owner.Entity.PKPoints > 99 || Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.FlashingName)) { if (monster.MonsterInfo.InBlack == Owner.Entity.UID) { if (!Owner.Entity.Dead) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { short distance = Kernel.GetDistance(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (distance <= monster.MonsterInfo.AttackRange) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, Owner.Entity); } else { if (distance <= monster.MonsterInfo.ViewRange) { Network.GamePackets.TwoMovements jump = new PhoenixProject.Network.GamePackets.TwoMovements(); jump.X = Owner.Entity.X; jump.Y = Owner.Entity.Y; monster.X = Owner.Entity.X; monster.Y = Owner.Entity.Y; jump.EntityCount = 1; jump.FirstEntity = monster.UID; jump.MovementType = Network.GamePackets.TwoMovements.Jump; Owner.SendScreen(jump, true); } } } } else { monster.MonsterInfo.InBlack = 0; } } else { } } else { if (monster.MonsterInfo.InBlack == Owner.Entity.UID) { monster.MonsterInfo.InBlack = 0; } } } for (int i = 0; i < Objects.Count; i++) { if (i >= Objects.Count) break; IMapObject obj2 = Objects[i]; if (obj2 == null) continue; if (obj2.MapObjType == MapObjectType.Monster) { Entity monster2 = obj2 as Entity;//null;// Owner.Map.Entities[obj2.UID]; if (monster2 == null) continue; if (monster2.Dead) continue; if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { if (!monster2.Name.Contains("Guard") && !monster2.Companion) { short distance = Kernel.GetDistance(monster.X, monster.Y, monster2.X, monster2.Y); if (distance <= monster.MonsterInfo.AttackRange) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, monster2); } } } } } } #endregion #region Rev Guard if (monster.Name == "RevGuard") { if (monster.MonsterInfo.InRev == 0) { if (monster.X != monster.MonsterInfo.BoundX || monster.Y != monster.MonsterInfo.BoundY) { monster.X = monster.MonsterInfo.BoundX; monster.Y = monster.MonsterInfo.BoundY; Network.GamePackets.TwoMovements jump = new PhoenixProject.Network.GamePackets.TwoMovements(); jump.X = monster.MonsterInfo.BoundX; jump.Y = monster.MonsterInfo.BoundY; jump.EntityCount = 1; jump.FirstEntity = monster.UID; jump.MovementType = Network.GamePackets.TwoMovements.Jump; Owner.SendScreen(jump, true); } if (Owner.Entity.Dead) monster.MonsterInfo.InRev = Owner.Entity.UID; } else { if (Owner.Entity.Dead) { if (monster.MonsterInfo.InRev == Owner.Entity.UID) { if (Owner.Entity.Dead) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { short distance = Kernel.GetDistance(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (distance <= monster.MonsterInfo.AttackRange) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, Owner.Entity); } else { if (distance <= monster.MonsterInfo.ViewRange) { /*Network.GamePackets.TwoMovements jump = new PhoenixProject.Network.GamePackets.TwoMovements(); jump.X = Owner.Entity.X; jump.Y = Owner.Entity.Y; monster.X = Owner.Entity.X; monster.Y = Owner.Entity.Y; jump.EntityCount = 1; jump.FirstEntity = monster.UID; jump.MovementType = Network.GamePackets.TwoMovements.Jump; Owner.SendScreen(jump, true);*/ } } } } else { monster.MonsterInfo.InRev = 0; } } else { monster.MonsterInfo.InRev = 0; } } else { if (monster.MonsterInfo.InRev == Owner.Entity.UID) { monster.MonsterInfo.InRev = 0; } } } } #endregion #region Stig Guard if (monster.Name == "StigGuard") { if (monster.MonsterInfo.InStig == 0) { if (monster.X != monster.MonsterInfo.BoundX || monster.Y != monster.MonsterInfo.BoundY) { monster.X = monster.MonsterInfo.BoundX; monster.Y = monster.MonsterInfo.BoundY; Network.GamePackets.TwoMovements jump = new PhoenixProject.Network.GamePackets.TwoMovements(); jump.X = monster.MonsterInfo.BoundX; jump.Y = monster.MonsterInfo.BoundY; jump.EntityCount = 1; jump.FirstEntity = monster.UID; jump.MovementType = Network.GamePackets.TwoMovements.Jump; Owner.SendScreen(jump, true); } if (!Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Stigma)) monster.MonsterInfo.InStig = Owner.Entity.UID; } else { if (!Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Stigma)) { if (monster.MonsterInfo.InStig == Owner.Entity.UID) { if (!Owner.Entity.Dead) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { short distance = Kernel.GetDistance(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (distance <= monster.MonsterInfo.AttackRange) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, Owner.Entity); } else { if (distance <= monster.MonsterInfo.ViewRange) { /*Network.GamePackets.TwoMovements jump = new PhoenixProject.Network.GamePackets.TwoMovements(); jump.X = Owner.Entity.X; jump.Y = Owner.Entity.Y; monster.X = Owner.Entity.X; monster.Y = Owner.Entity.Y; jump.EntityCount = 1; jump.FirstEntity = monster.UID; jump.MovementType = Network.GamePackets.TwoMovements.Jump; Owner.SendScreen(jump, true);*/ } } } } else { monster.MonsterInfo.InStig = 0; } } else { monster.MonsterInfo.InStig = 0; } } else { if (monster.MonsterInfo.InStig == Owner.Entity.UID) { monster.MonsterInfo.InStig = 0; } } } for (int i = 0; i < Objects.Count; i++) { if (i >= Objects.Count) break; IMapObject obj2 = Objects[i]; if (obj2 == null) continue; if (obj2.MapObjType == MapObjectType.Monster) { Entity monster2 = obj2 as Entity;//null;// Owner.Map.Entities[obj2.UID]; if (monster2 == null) continue; if (monster2.Dead) continue; if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { if (!monster2.Name.Contains("Guard") && !monster2.Companion) { short distance = Kernel.GetDistance(monster.X, monster.Y, monster2.X, monster2.Y); if (distance <= monster.MonsterInfo.AttackRange) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, monster2); } } } } } } #endregion #endregion } else { #region Monsters short distance = Kernel.GetDistance(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (monster.MonsterInfo.InSight != 0 && monster.MonsterInfo.InSight != Owner.Entity.UID) { if (monster.MonsterInfo.InSight > 1000000) { var cl = ServerBase.Kernel.GamePool[monster.MonsterInfo.InSight]; if (cl == null) monster.MonsterInfo.InSight = 0; else { short dst = Kernel.GetDistance(monster.X, monster.Y, cl.Entity.X, cl.Entity.Y); if (dst > ServerBase.Constants.pScreenDistance) monster.MonsterInfo.InSight = 0; } } else { Entity companion = null; for (int x = 0; x < Owner.Map.Companions.Count; x++) { if (x >= Owner.Map.Companions.Count) break; if (Owner.Map.Companions[x] != null) { if (Owner.Map.Companions[x].UID == monster.MonsterInfo.InSight) { companion = Owner.Map.Companions[x]; break; } } } if (companion == null) monster.MonsterInfo.InSight = 0; else { short dst = Kernel.GetDistance(monster.X, monster.Y, companion.X, companion.Y); if (dst > ServerBase.Constants.pScreenDistance) monster.MonsterInfo.InSight = 0; } } } /*if (monster.MonsterInfo.InRev != 0 && monster.MonsterInfo.InRev != Owner.Entity.UID) { if (monster.MonsterInfo.InRev > 1000000) { var cl = ServerBase.Kernel.GamePool[monster.MonsterInfo.InRev]; if (cl == null) monster.MonsterInfo.InRev = 0; else { short dst = Kernel.GetDistance(monster.X, monster.Y, cl.Entity.X, cl.Entity.Y); if (dst > ServerBase.Constants.pScreenDistance2 || !cl.Entity.Dead) monster.MonsterInfo.InRev = 0; } } } if (monster.MonsterInfo.InStig != 0 && monster.MonsterInfo.InStig != Owner.Entity.UID) { if (monster.MonsterInfo.InStig > 1000000) { var cl = ServerBase.Kernel.GamePool[monster.MonsterInfo.InStig]; if (cl == null) monster.MonsterInfo.InStig = 0; else { short dst = Kernel.GetDistance(monster.X, monster.Y, cl.Entity.X, cl.Entity.Y); if (dst > ServerBase.Constants.pScreenDistance2 || cl.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Stigma)) monster.MonsterInfo.InStig = 0; } } } if (monster.MonsterInfo.InBlack != 0 && monster.MonsterInfo.InBlack != Owner.Entity.UID) { if (monster.MonsterInfo.InBlack > 1000000) { var cl = ServerBase.Kernel.GamePool[monster.MonsterInfo.InBlack]; if (cl == null) monster.MonsterInfo.InBlack = 0; else { short dst = Kernel.GetDistance(monster.X, monster.Y, cl.Entity.X, cl.Entity.Y); if (dst > ServerBase.Constants.pScreenDistance || cl.Entity.PKPoints < 100) monster.MonsterInfo.InBlack = 0; } } }*/ if (distance <= ServerBase.Constants.pScreenDistance) { #region Companions if (Owner.Companion != null) { if (Owner.Companion.Companion && !Owner.Companion.Dead) { short distance2 = Kernel.GetDistance(monster.X, monster.Y, Owner.Companion.X, Owner.Companion.Y); if (distance > distance2 || Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Invisibility) || Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) { if (monster.MonsterInfo.InSight == 0) { monster.MonsterInfo.InSight = Owner.Companion.UID; } else { if (monster.MonsterInfo.InSight == Owner.Companion.UID) { if (distance2 > ServerBase.Constants.pScreenDistance) { monster.MonsterInfo.InSight = 0; } else { if (distance2 <= monster.MonsterInfo.AttackRange) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, Owner.Companion); } } else { if (distance2 > monster.MonsterInfo.ViewRange / 2) { if (distance2 < ServerBase.Constants.pScreenDistance) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.RunSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(monster.X, monster.Y, Owner.Companion.X, Owner.Companion.Y); if (!monster.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (monster.Move(facing)) { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; monster.MonsterInfo.SendScreen(move); } } else { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; monster.MonsterInfo.SendScreen(move); } } } else { monster.MonsterInfo.InSight = 0; } } else { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.MoveSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(monster.X, monster.Y, Owner.Companion.X, Owner.Companion.Y); if (!monster.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (monster.Move(facing)) { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; monster.MonsterInfo.SendScreen(move); } } else { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; monster.MonsterInfo.SendScreen(move); } } } } } } else goto Over; } } } else goto Over; } else goto Over; #endregion Over: #region Player if (monster.MonsterInfo.Name.Contains("Guard")) { if (monster.MonsterInfo.InBlack == 0) { if (distance <= monster.MonsterInfo.ViewRange) { if (!Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Invisibility)) { if (monster.MonsterInfo.SpellID != 0 || !Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) { monster.MonsterInfo.InBlack = Owner.Entity.UID; } } } } else { if (monster.MonsterInfo.InBlack == Owner.Entity.UID) { if (monster.MonsterInfo.SpellID == 0 && Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) { monster.MonsterInfo.InBlack = 0; return; } if (Owner.Entity.Dead) { monster.MonsterInfo.InBlack = 0; return; } if (distance > ServerBase.Constants.pScreenDistance) { monster.MonsterInfo.InBlack = 0; } else { if (distance <= monster.MonsterInfo.AttackRange) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, Owner.Entity); } } else { if (distance > monster.MonsterInfo.ViewRange / 2) { if (distance < ServerBase.Constants.pScreenDistance) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.RunSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (!monster.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (monster.Move(facing)) { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; monster.MonsterInfo.SendScreen(move); } } else { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; monster.MonsterInfo.SendScreen(move); } } } else { monster.MonsterInfo.InBlack = 0; } } else { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.MoveSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (!monster.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (monster.Move(facing)) { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; monster.MonsterInfo.SendScreen(move); } } else { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; monster.MonsterInfo.SendScreen(move); } } } } } } } } if (monster.MonsterInfo.InSight == 0) { if (!Owner.Entity.Dead) { if (distance <= monster.MonsterInfo.ViewRange) { if (!Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Invisibility)) { if (monster.MonsterInfo.SpellID != 0 || !Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) { monster.MonsterInfo.InSight = Owner.Entity.UID; } } } } } else { if (!Owner.Entity.Dead) { if (monster.MonsterInfo.InSight == Owner.Entity.UID) { if (monster.MonsterInfo.SpellID == 0 && Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) { monster.MonsterInfo.InSight = 0; return; } if (Owner.Entity.Dead) { monster.MonsterInfo.InSight = 0; return; } if (distance > ServerBase.Constants.pScreenDistance) { monster.MonsterInfo.InSight = 0; } else { if (!Owner.Entity.Dead) { if (distance <= monster.MonsterInfo.AttackRange) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, Owner.Entity); } } else { if (distance > monster.MonsterInfo.ViewRange / 2) { if (distance < ServerBase.Constants.pScreenDistance) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.RunSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (!monster.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (monster.Move(facing)) { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; monster.MonsterInfo.SendScreen(move); } } else { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; monster.MonsterInfo.SendScreen(move); } } } else { monster.MonsterInfo.InSight = 0; } } else { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.MoveSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (!monster.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (monster.Move(facing)) { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; monster.MonsterInfo.SendScreen(move); } } else { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; monster.MonsterInfo.SendScreen(move); } } } } } else { if (Owner.Entity.Dead) { monster.MonsterInfo.InSight = 0; // Console.WriteLine("cheack1"); return; } } } } } } if (monster.MonsterInfo.Name.Contains("Guard")) { if (monster.MonsterInfo.InRev == 0) { if (distance <= monster.MonsterInfo.ViewRange) { if (!Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Invisibility)) { if (monster.MonsterInfo.SpellID != 0 || !Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) { monster.MonsterInfo.InRev = Owner.Entity.UID; } } } } else { if (monster.MonsterInfo.InRev == Owner.Entity.UID) { if (monster.MonsterInfo.SpellID == 0 && Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) { monster.MonsterInfo.InRev = 0; return; } if (!Owner.Entity.Dead) { monster.MonsterInfo.InRev = 0; return; } if (distance > ServerBase.Constants.pScreenDistance) { monster.MonsterInfo.InRev = 0; } else { if (distance <= monster.MonsterInfo.AttackRange) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, Owner.Entity); } } else { if (distance > monster.MonsterInfo.ViewRange / 2) { if (distance < ServerBase.Constants.pScreenDistance) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.RunSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (!monster.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (monster.Move(facing)) { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; monster.MonsterInfo.SendScreen(move); } } else { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; monster.MonsterInfo.SendScreen(move); } } } else { monster.MonsterInfo.InRev = 0; } } else { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.MoveSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (!monster.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (monster.Move(facing)) { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; monster.MonsterInfo.SendScreen(move); } } else { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; monster.MonsterInfo.SendScreen(move); } } } } } } } } if (monster.MonsterInfo.Name.Contains("Guard")) { if (monster.MonsterInfo.InStig == 0) { if (distance <= monster.MonsterInfo.ViewRange) { if (!Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Invisibility)) { if (monster.MonsterInfo.SpellID != 0 || !Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) { monster.MonsterInfo.InStig = Owner.Entity.UID; } } } } else { if (monster.MonsterInfo.InStig == Owner.Entity.UID) { if (monster.MonsterInfo.SpellID == 0 && Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) { monster.MonsterInfo.InStig = 0; return; } if (Owner.Entity.Dead) { monster.MonsterInfo.InStig = 0; return; } if (distance > ServerBase.Constants.pScreenDistance) { monster.MonsterInfo.InStig = 0; } else { if (distance <= monster.MonsterInfo.AttackRange) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; new Game.Attacking.Handle(null, monster, Owner.Entity); } } else { if (distance > monster.MonsterInfo.ViewRange / 2) { if (distance < ServerBase.Constants.pScreenDistance) { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.RunSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (!monster.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (monster.Move(facing)) { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; monster.MonsterInfo.SendScreen(move); } } else { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; monster.MonsterInfo.SendScreen(move); } } } else { monster.MonsterInfo.InStig = 0; } } else { if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monster.MonsterInfo.MoveSpeed)) { monster.MonsterInfo.LastMove = Time32.Now; Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(monster.X, monster.Y, Owner.Entity.X, Owner.Entity.Y); if (!monster.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (monster.Move(facing)) { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; monster.MonsterInfo.SendScreen(move); } } else { monster.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = monster.UID; monster.MonsterInfo.SendScreen(move); } } } } } } } } #endregion } else { Remove(obj); } } #endregion } } #endregion } } } } if (obj.MapObjType == MapObjectType.Item) { Network.GamePackets.FloorItem item = obj as Network.GamePackets.FloorItem; if (item.Type != Network.GamePackets.FloorItem.Effect) { if (Time32.Now > item.OnFloor.AddSeconds(ServerBase.Constants.FloorItemSeconds)) { item.Type = Network.GamePackets.FloorItem.Remove; foreach (Interfaces.IMapObject _obj in Objects) { if (_obj != null) { if (_obj.MapObjType == MapObjectType.Player) { (_obj as Entity).Owner.Send(item); } } } Owner.Map.Floor[item.X, item.Y, MapObjectType.Item, null] = true; Remove(obj); } } else { // Console.WriteLine("zaza"); item.Type = Network.GamePackets.FloorItem.Effect; foreach (Interfaces.IMapObject _obj in Objects) { if (_obj != null) { if (_obj.MapObjType == MapObjectType.Player) { (_obj as Entity).Owner.Send(item); } } } } } } } } catch (Exception e) { Program.SaveException(e); } /* foreach (IMapObject obj in toRemove) Remove(obj);*/ #endregion } catch { /*Console.WriteLine(e.ToString()); Console.WriteLine("erorrr screnn timer");*/ } }
private void ShutDown() { try { if (Disconnected) return; if (Logger != null) { Logger.Close(); Logger = null; } if (this != null && this.Entity != null) { if (this.JustCreated) return; if (ServerBase.Kernel.GamePool.ContainsKey(Account.EntityID)) { ServerBase.Kernel.GamePool.Remove(Account.EntityID); } if (ServerBase.Kernel.WasInGamePool.ContainsKey(Account.EntityID)) { ServerBase.Kernel.WasInGamePool.Remove(Account.EntityID); } //if (ServerBase.Kernel.AwaitingPool.ContainsKey(Account.EntityID)) //{ // ServerBase.Kernel.AwaitingPool.Remove(Account.EntityID); //} Time32 now = Time32.Now; RemoveScreenSpawn(this.Entity, false); /* for (byte i = 1; i < 12; i++) { Interfaces.IConquerItem item = this.Equipment.TryGetItem(i); if (item != null && item.ID != 0) { Database.ConquerItemTable.PonerDurabilidad(item); } }*/ if (this.Entity.ContainsFlag2(Network.GamePackets.Update.Flags2.CaryingFlag)) { Game.Team.RedCapture = false; Game.Team.BlueCapture = false; Game.Team.BlackCapture = false; Game.Team.WhiteCapture = false; } if (this.Entity.ContainsFlag(Update.Flags.Dead)) { if (this.Entity.MapID == 1038 && DateTime.Now.DayOfWeek == DayOfWeek.Sunday) { if (DateTime.Now.Hour >= 19 && DateTime.Now.Hour < 20 && DateTime.Now.Minute > 29) { this.Entity.Teleport(6001, 31, 74); } } } if (Booth != null) { Booth.Remove(); } //Database.SubClassTable.save(this.Entity); //Database.FlowerSystemTable.SaveFlowerTable(this); if (Companion != null) { Map.RemoveEntity(Companion); Data data = new Data(true); data.UID = Companion.UID; data.ID = Data.RemoveEntity; Companion.MonsterInfo.SendScreen(data); } if (QualifierGroup != null) QualifierGroup.End(this); if (ArenaStatistic.Status != Network.GamePackets.ArenaStatistic.NotSignedUp) Game.ConquerStructures.Arena.QualifyEngine.DoQuit(this); Database.FlowerSystemTable.SaveFlowerTable(this); Database.EntityTable.SaveEntity(this); Database.SkillTable.SaveProficiencies(this); Database.SkillTable.SaveSpells(this); Database.ArenaTable.SaveArenaStatistics(this.ArenaStatistic); RemoveScreenSpawn(this.Entity, false); Database.EntityTable.UpdateOnlineStatus(this, false); string name200 = Entity.Name; string name300 = Entity.NewName; if (Entity.NewName != "") { // Console.WriteLine("Change Name In Progress"); if (Entity.NewName != "") { PhoenixProject.Database.MySqlCommand cmdupdate = null; cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("apprentice").Set("MentorName", Entity.NewName).Where("MentorID", Entity.UID).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("apprentice").Set("ApprenticeName", Entity.NewName).Where("ApprenticeID", Entity.UID).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("elitepk").Set("Name", Entity.NewName).Where("UID", Entity.UID).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopArcher", Entity.NewName).Where("TopArcher", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopPirate", Entity.NewName).Where("TopPirate", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopTrojan", Entity.NewName).Where("TopTrojan", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopGuildLeader", Entity.NewName).Where("TopGuildLeader", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopNinja", Entity.NewName).Where("TopNinja", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopMonk", Entity.NewName).Where("TopMonk", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopWarrior", Entity.NewName).Where("TopWarrior", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopSpouse", Entity.NewName).Where("TopSpouse", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopWaterTaoist", Entity.NewName).Where("TopWaterTaoist", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopFireTaoist", Entity.NewName).Where("TopFireTaoist", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("MonthlyPkChampion", Entity.NewName).Where("MonthlyPkChampion", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("WeeklyPkChampion", Entity.NewName).Where("WeeklyPkChampion", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopDeputyLeader", Entity.NewName).Where("TopDeputyLeader", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopDeputyLeader2", Entity.NewName).Where("TopDeputyLeader2", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopDeputyLeader3", Entity.NewName).Where("TopDeputyLeader3", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopDeputyLeader4", Entity.NewName).Where("TopDeputyLeader4", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("flags").Set("TopDeputyLeader5", Entity.NewName).Where("TopDeputyLeader5", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("arena").Set("EntityName", Entity.NewName).Where("EntityID", Entity.UID).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("claimitems").Set("OwnerName", Entity.NewName).Where("OwnerName", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("claimitems").Set("GainerName", Entity.NewName).Where("GainerName", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("detaineditems").Set("OwnerName", Entity.NewName).Where("OwnerName", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("detaineditems").Set("GainerName", Entity.NewName).Where("GainerName", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("enemy").Set("EnemyName", Entity.NewName).Where("EnemyID", Entity.UID).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("friends").Set("FriendName", Entity.NewName).Where("FriendID", Entity.UID).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("guilds").Set("Name", Entity.NewName).Where("Name", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("guilds").Set("LeaderName", Entity.NewName).Where("LeaderName", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("clans").Set("Leader", Entity.NewName).Where("Leader", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("nobility").Set("EntityName", Entity.NewName).Where("EntityUID", Entity.UID).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("partners").Set("PartnerName", Entity.NewName).Where("PartnerID", Entity.UID).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("entities").Set("Spouse", Entity.NewName).Where("Spouse", Entity.Name).Execute(); cmdupdate = new PhoenixProject.Database.MySqlCommand(PhoenixProject.Database.MySqlCommandType.UPDATE); cmdupdate.Update("entities").Set("Name", Entity.NewName).Where("Name", Entity.Name).Execute(); if (Game.ConquerStructures.Nobility.Board.ContainsKey(Entity.UID)) { Game.ConquerStructures.Nobility.Board[Entity.UID].Name = Entity.NewName; } if (Game.ConquerStructures.Arena.ArenaStatistics.ContainsKey(Entity.UID)) { Game.ConquerStructures.Arena.ArenaStatistics[Entity.UID].Name = Entity.NewName; } if (Guild != null) { if (Guild.LeaderName == name200) { ServerBase.Kernel.Guilds[Guild.ID].LeaderName = Entity.NewName; ServerBase.Kernel.Guilds[Guild.ID].Members[Entity.UID].Name = Entity.NewName; } } if (Entity.ClanId != 0 && Entity.Myclan != null) { if (Entity.Myclan.ClanLider == name200) { PhoenixProject.ServerBase.Kernel.ServerClans[Entity.ClanId].ClanLider = Entity.NewName; PhoenixProject.ServerBase.Kernel.ServerClans[Entity.ClanId].Members[Entity.UID].Name = Entity.NewName; } } //foreach (Client.GameState c in ServerBase.Kernel.GamePool.Values) //{ // if(c.Enemy.ContainsKey(Entity.UID)) // { // var packet = new KnownPersons(true) // { // UID = Entity.UID, // Type = KnownPersons.RemovePerson, // Name = name200, // Online = false // }; // c.Send(packet); // c.Enemy[Entity.UID].Name = Entity.NewName; // packet.Type = KnownPersons.AddEnemy; // c.Send(packet); // } //} } } #region Friend/TradePartner/Apprentice Message msg = new Message("Your friend, " + name200 + ", has logged off.", System.Drawing.Color.Red, Message.TopLeft); if (Friends == null) Friends = new SafeDictionary<uint, PhoenixProject.Game.ConquerStructures.Society.Friend>(100); foreach (Game.ConquerStructures.Society.Friend friend in Friends.Values) { if (friend.IsOnline) { var packet = new KnownPersons(true) { UID = Entity.UID, Type = KnownPersons.RemovePerson, Name = name200, Online = false }; friend.Client.Send(packet); if (Entity.NewName != "") { if (friend.Client.Friends.ContainsKey(Entity.UID)) { friend.Client.Friends[Entity.UID].Name = Entity.NewName; } } packet.Type = KnownPersons.AddFriend; if (friend != null) { if (friend.Client != null) { friend.Client.Send(packet); friend.Client.Send(msg); } } } } Message msg2 = new Message("Your partner, " + name200 + ", has logged off.", System.Drawing.Color.Red, Message.TopLeft); foreach (Game.ConquerStructures.Society.TradePartner partner in Partners.Values) { if (partner.IsOnline) { var packet = new TradePartner(true) { UID = Entity.UID, Type = TradePartner.BreakPartnership, Name = name200, HoursLeft = (int)(new TimeSpan(partner.ProbationStartedOn.AddDays(3).Ticks).TotalHours - new TimeSpan(DateTime.Now.Ticks).TotalHours), Online = false }; partner.Client.Send(packet); if (Entity.NewName != "") { if (partner.Client.Partners.ContainsKey(Entity.UID)) { partner.Client.Partners[Entity.UID].Name = Entity.NewName; } } packet.Type = TradePartner.AddPartner; if (partner != null) { if (partner.Client != null) { partner.Client.Send(packet); partner.Client.Send(msg2); } } } } MentorInformation Information = new MentorInformation(true); Information.Mentor_Type = 1; Information.Mentor_ID = Entity.UID; Information.Mentor_Level = Entity.Level; Information.Mentor_Class = Entity.Class; Information.Mentor_PkPoints = Entity.PKPoints; Information.Mentor_Mesh = Entity.Mesh; Information.Mentor_Online = false; Information.String_Count = 3; Information.Mentor_Name = name200; Information.Mentor_Spouse_Name = Entity.Spouse; foreach (var appr in Apprentices.Values) { if (appr.IsOnline) { Information.Apprentice_ID = appr.ID; Information.Enrole_Date = appr.EnroleDate; Information.Apprentice_Name = appr.Name; appr.Client.Send(Information); appr.Client.ReviewMentor(); if (Entity.NewName != "") { if (appr.Client.Apprentices.ContainsKey(Entity.UID)) { appr.Client.Apprentices[Entity.UID].Name = Entity.NewName; } } } } if (Mentor != null) { if (Mentor.IsOnline) { ApprenticeInformation AppInfo = new ApprenticeInformation(); AppInfo.Apprentice_ID = Entity.UID; AppInfo.Apprentice_Level = Entity.Level; AppInfo.Apprentice_Name = name200; AppInfo.Apprentice_Online = false; AppInfo.Apprentice_Spouse_Name = Entity.Spouse; AppInfo.Enrole_date = Mentor.EnroleDate; AppInfo.Mentor_ID = Mentor.Client.Entity.UID; AppInfo.Mentor_Mesh = Mentor.Client.Entity.Mesh; AppInfo.Mentor_Name = Mentor.Client.Entity.Name; AppInfo.Type = 2; Mentor.Client.Send(AppInfo); } } #endregion if (Team != null) { if (Team.TeamLeader) { Network.GamePackets.Team team = new Team(); team.UID = Account.EntityID; team.Type = Network.GamePackets.Team.Dismiss; foreach (Client.GameState Teammate in Team.Teammates) { if (Teammate != null) { if (Teammate.Entity.UID != Account.EntityID) { Teammate.Send(team); Teammate.Team = null; } } } } else { Network.GamePackets.Team team = new Team(); team.UID = Account.EntityID; team.Type = Network.GamePackets.Team.ExitTeam; foreach (Client.GameState Teammate in Team.Teammates) { if (Teammate != null) { if (Teammate.Entity.UID != Account.EntityID) { Teammate.Send(team); Teammate.Team.Remove(Account.EntityID); } } } } } if (Account.TempID == 400) { Account.EntityID = 0; Account.Save(); } if (!Disconnected) { Console.WriteLine(this.Entity.Name + " has logged off! Ip:[" + this.Account.IP + "]"); Console.Title = "[" + Database.rates.servername + "]Kimo Proj. Start time: " + Program.StartDate.ToString("dd MM yyyy hh:mm") + ". Players online: " + ServerBase.Kernel.GamePool.Count + "/" + Program.PlayerCap + " Max Online: " + Program.MaxOn + ""; } Disconnected = true; try { if (_socket != null) { // Console.WriteLine(" Close1 "); if (_socket.Connected) { // Console.WriteLine(" Close2 "); if (!SocketDisposed) { //Monitor.Exit(_socket); // Monitor.Exit(Cryptography); // Console.WriteLine(" Close3 "); SocketDisposed = true; _socket.Disconnect(false); _socket.Shutdown(SocketShutdown.Both); _socket.Close(); _socket = null; } } } } catch (Exception e) { Program.SaveException(e); //Disabled = true; } } } catch (Exception e) { Program.SaveException(e); if (ServerBase.Kernel.GamePool.ContainsKey(Account.EntityID)) { ServerBase.Kernel.GamePool.Remove(Account.EntityID); } if (ServerBase.Kernel.WasInGamePool.ContainsKey(Account.EntityID)) { ServerBase.Kernel.WasInGamePool.Remove(Account.EntityID); } //if (ServerBase.Kernel.AwaitingPool.ContainsKey(Account.EntityID)) //{ // ServerBase.Kernel.AwaitingPool.Remove(Account.EntityID); //} RemoveScreenSpawn(this.Entity, false); Database.EntityTable.UpdateOnlineStatus(this, false); if (Account.TempID == 400) { Account.EntityID = 0; Account.Save(); } if (!Disconnected) { Console.WriteLine(this.Entity.Name + " has logged off! Ip:[" + this.Account.IP + "] Temp"); Console.Title = "[" + Database.rates.servername + "]Kimo Proj. Start time: " + Program.StartDate.ToString("dd MM yyyy hh:mm") + ". Players online: " + ServerBase.Kernel.GamePool.Count + "/" + Program.PlayerCap + " Max Online: " + Program.MaxOn + ""; } Disconnected = true; try { if (_socket != null) { // Console.WriteLine(" Close1 "); if (_socket.Connected) { // Console.WriteLine(" Close2 "); if (!SocketDisposed) { SocketDisposed = true; _socket.Disconnect(false); _socket.Shutdown(SocketShutdown.Both); _socket.Close(); _socket = null; } } } } catch (Exception ex) { Program.SaveException(ex); //Disabled = true; } } }
static void PickupItem(FloorItem floorItem, Client.GameState client) { if (client.Screen.TryGetFloorItem(floorItem.UID, out floorItem) && !client.Trade.InTrade) { if (client.Entity.X == floorItem.X && client.Entity.Y == floorItem.Y) { uint owner = floorItem.Owner == null ? 0 : (uint)floorItem.Owner.Entity.UID; if ((owner != 0 && owner == client.Entity.UID) || owner == 0 || Time32.Now >= floorItem.OnFloor.AddSeconds(ServerBase.Constants.FloorItemAvailableAfter)) { goto Jump; } else if (client.Team != null) { if (client.Team.IsTeammate(owner)) { if (client.Team.PickupItems && floorItem.ValueType == FloorItem.FloorValueType.Item) { if (floorItem.ItemID != 1088000 && floorItem.ItemID != 1088001) { goto Jump; } } else if (client.Team.PickupMoney && floorItem.ValueType != FloorItem.FloorValueType.Item) { goto Jump; } } } client.Send(ServerBase.Constants.FloorItemNotAvailable); return; Jump: FloorItem pickupAnimation = new FloorItem(true); pickupAnimation.Type = 3; pickupAnimation.UID = client.Entity.UID; pickupAnimation.X = client.Entity.X; pickupAnimation.Y = client.Entity.Y; // Console.WriteLine("Xn "+floorItem.ValueType+""); if (!client.Map.Floor[floorItem.X, floorItem.Y, PhoenixProject.Game.MapObjectType.Item, floorItem]) { switch (floorItem.ValueType) { case FloorItem.FloorValueType.Item: { if (client.Inventory.Count <= 39) { if (!client.Map.Floor[floorItem.X, floorItem.Y, PhoenixProject.Game.MapObjectType.Item, floorItem]) { floorItem.Type = 2; floorItem.PickedUpAlready = true; client.RemoveScreenSpawn(floorItem, true); client.Map.RemoveFloorItem(floorItem); client.SendScreen(pickupAnimation, false); client.Screen.Remove(floorItem); client.Send(ServerBase.Constants.PickupItem(Database.ConquerItemInformation.BaseInformations[floorItem.Item.ID].Name)); //foreach (Client.GameState clients in ServerBase.Kernel.GamePool.Values) //{ // clients.Screen.Remove(floorItem); //} if (floorItem.Item.MobDropped) { client.Inventory.Add(floorItem.Item, Game.Enums.ItemUse.CreateAndAdd); Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } else { client.Inventory.Add(floorItem.Item, Game.Enums.ItemUse.CreateAndAdd); Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } } } else client.Send(ServerBase.Constants.FullInventory); break; } case FloorItem.FloorValueType.Money: { // Console.WriteLine("Xn"); floorItem.Type = 2; client.RemoveScreenSpawn(floorItem, true); client.Map.RemoveFloorItem(floorItem); client.Send(ServerBase.Constants.PickupGold(floorItem.Value)); client.SendScreen(pickupAnimation, false); client.Entity.Money += floorItem.Value; break; } case FloorItem.FloorValueType.ConquerPoints: { floorItem.Type = 2; client.RemoveScreenSpawn(floorItem, true); client.Map.RemoveFloorItem(floorItem); client.Send(ServerBase.Constants.PickupConquerPoints(floorItem.Value)); client.SendScreen(pickupAnimation, false); client.Entity.ConquerPoints += floorItem.Value; break; } } } return; } } }
static void PlayerJump(Data generalData, Client.GameState client) { // Console.WriteLine("Jump Sec " + DateTime.Now.Second + " Mile " + DateTime.Now.Millisecond + ""); //Console.WriteLine("" + generalData + ""); client.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.None; client.Mining = false; /* #region SpeedHack Check if (Time32.Now > client.speedsleep.AddSeconds(60)) { client.speedHackSuspiction += 1; //Console.WriteLine("SpeedHack sus "+client.speedHackSuspiction+" "); if (Time32.Now > client.speedHackTime.AddSeconds(2)) { client.speedHackTime = Time32.Now; client.speedHackSuspiction = 0; } if (client.Entity.TransformationID == 0) { if (client.speedHackSuspiction > 5 && !client.Entity.OnCyclone() && !client.Entity.ContainsFlag(Update.Flags2.Oblivion) && !client.Entity.ContainsFlag(Update.Flags.Ride)) { if (client.Entity.MapID != 6004) { client.HackTime += 1; client.speedHackTime = Time32.Now; client.speedsleep = Time32.Now; client.speedHackSuspiction = 0; //client.Entity.Teleport(6004, 30, 74); if (client.HackTime < 3) { PhoenixProject.ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("[GM]: " + client.Entity.Name + " is using SpeedHack, Using SpeedHack Times " + client.HackTime + " Time/s he still have " + (3 - client.HackTime) + " Warn then we will kick his/her ass Out!", System.Drawing.Color.Black, PhoenixProject.Network.GamePackets.Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); } else { client.HackTime += 1; client.speedHackTime = Time32.Now; client.speedHackSuspiction = 0; client.Entity.Teleport(6004, 30, 74); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("[GM]: " + client.Entity.Name + " used SpeedHack for Three Times and sent to Botjail ,TakeCare of your account!", System.Drawing.Color.Black, PhoenixProject.Network.GamePackets.Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); } } } } } #endregion*/ #region MagicDefender if (client.Entity.ContainsFlag3(Network.GamePackets.Update.Flags3.MagicDefender)) { client.Entity.MagicDefenderTime = 0; client.Entity.MagicDefenderIncrease = 0; client.Entity.RemoveFlag3(Network.GamePackets.Update.Flags3.MagicDefender); SyncPacket packet = new SyncPacket { Identifier = client.Entity.UID, Count = 2, Type = PhoenixProject.Network.GamePackets.SyncPacket.SyncType.StatusFlag, StatusFlag1 = (ulong)client.Entity.StatusFlag, StatusFlag2 = (ulong)client.Entity.StatusFlag2, Unknown1 = 0x31, StatusFlagOffset = 0x80, Time = 0, Value = 0, Level = 0 }; client.Entity.Owner.Send((byte[])packet); foreach (var Client in client.MagicDef) { if (Client.Entity.ContainsFlag2(Update.Flags2.kimo4)) { Client.Entity.RemoveFlag2(Update.Flags2.kimo4); } } client.MagicDef.Clear(); } #endregion #region Pray if (client.Entity.ContainsFlag(Update.Flags.CastPray)) { client.Entity.RemoveFlag(Update.Flags.CastPray); foreach (var Client in client.Prayers) { if (Client.Entity.ContainsFlag(Update.Flags.Praying)) { Client.Entity.RemoveFlag(Update.Flags.Praying); } } client.Prayers.Clear(); } if (client.Entity.ContainsFlag(Update.Flags.Praying)) { client.Entity.RemoveFlag(Update.Flags.Praying); if (client.PrayLead != null) { client.PrayLead.Prayers.Remove(client); client.PrayLead = null; } } #endregion Time32 Now = Time32.Now; client.Attackable = true; if (client.Entity.AttackPacket != null) { client.Entity.AttackPacket = null; } if (client.Entity.Dead) { if (Now > client.Entity.DeathStamp.AddSeconds(4)) { //client.Disconnect(); return; } } ushort new_X = (ushort)(generalData.dwParam & 0xFFFF); ushort new_Y = (ushort)(generalData.dwParam >> 16); if (client.lastJumpDistance == 0) goto Jump; if (client.Entity.ContainsFlag(Update.Flags.Ride)) { int distance = ServerBase.Kernel.GetDistance(new_X, new_Y, client.Entity.X, client.Entity.Y); ushort take = (ushort)(1.5F * (distance / 2)); if (client.Entity.Vigor >= take) { client.Entity.Vigor -= take; Network.GamePackets.Vigor vigor = new Network.GamePackets.Vigor(true); vigor.VigorValue = client.Entity.Vigor; vigor.Send(client); } else { } } client.LastJumpTime = (int)ServerBase.Kernel.maxJumpTime(client.lastJumpDistance); int a1 = Now.GetHashCode() - client.lastJumpTime.GetHashCode(); int a2 = generalData.TimeStamp.GetHashCode() - client.lastClientJumpTime.GetHashCode(); bool DOO = false; if (a2 - a1 > 1000) DOO = true; if (Now < client.lastJumpTime.AddMilliseconds(client.LastJumpTime)) { bool doDisconnect = false; if (client.Entity.Transformed) if (client.Entity.TransformationID != 207 && client.Entity.TransformationID != 267) doDisconnect = true; if (client.Entity.Transformed && doDisconnect) { } if (client.Entity.Transformed && !doDisconnect) { goto Jump; } if (!client.Entity.OnCyclone() && !client.Entity.ContainsFlag(Update.Flags2.Oblivion) && !client.Entity.ContainsFlag(Update.Flags.Ride) && !DOO) { } else if (client.Entity.ContainsFlag(Update.Flags.Ride)) { int time = (int)ServerBase.Kernel.maxJumpTime(client.lastJumpDistance); int speedprc = Database.DataHolder.SteedSpeed(client.Equipment.TryGetItem(ConquerItem.Steed).Plus); if (speedprc != 0) { if (Now < client.lastJumpTime.AddMilliseconds(time - (time * speedprc / 100))) { } } else { } } } Jump: client.lastJumpDistance = ServerBase.Kernel.GetDistance(new_X, new_Y, client.Entity.X, client.Entity.Y); client.lastClientJumpTime = generalData.TimeStamp; client.lastJumpTime = Now; Game.Map Map = client.Map; if (Map != null) { if (Map.Floor[new_X, new_Y, Game.MapObjectType.Player, null]) { if (ServerBase.Kernel.GetDistance(new_X, new_Y, client.Entity.X, client.Entity.Y) <= 20) { client.Entity.Action = Game.Enums.ConquerAction.Jump; client.Entity.Facing = ServerBase.Kernel.GetAngle(generalData.wParam1, generalData.wParam2, new_X, new_Y); client.Entity.PX = client.Entity.X; client.Entity.PY = client.Entity.Y; client.Entity.X = new_X; client.Entity.Y = new_Y; client.SendScreen(generalData, true); client.Screen.Reload(generalData); if (client.Entity.MapID == 1005) { if (new_X == 42 && new_Y == 51)//stig { if (!client.Entity.ContainsFlag(Update.Flags.Stigma) && !client.Entity.ContainsFlag(Update.Flags.Ghost)) { SpellUse suse = new SpellUse(true); suse.Attacker = client.Entity.UID; suse.SpellID = 1095; suse.SpellLevel = 3; suse.X = 42; suse.Y = 51; suse.Targets.Add(client.Entity.UID, 0); client.Entity.AddFlag(Update.Flags.Stigma); client.Entity.StigmaStamp = Time32.Now; client.Entity.StigmaIncrease = 25; client.Entity.StigmaTime = 20; client.SendScreen(suse, true); if (client.Entity.EntityFlag == PhoenixProject.Game.EntityFlag.Player) client.Send(ServerBase.Constants.Stigma(25, 20)); } } else { if (new_X == 42 && new_Y == 48)//rev { if (client.Entity.ContainsFlag(Update.Flags.Ghost)) { SpellUse suse = new SpellUse(true); suse.Attacker = client.Entity.UID; suse.SpellID = 1050; suse.SpellLevel = 0; suse.X = 42; suse.Y = 48; suse.Targets.Add(client.Entity.UID, 0); client.SendScreen(suse, true); client.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.None; client.ReviveStamp = Time32.Now; client.Attackable = false; client.Entity.TransformationID = 0; client.Entity.RemoveFlag(Update.Flags.Dead); client.Entity.RemoveFlag(Update.Flags.Ghost); client.Entity.Hitpoints = client.Entity.MaxHitpoints; client.Entity.Ressurect(); } } } } if (client.Entity.MapID == 1002) { if (new_X == 436 && new_Y == 444)//stig { if (!client.Entity.ContainsFlag(Update.Flags.Ghost)) { if (client.Entity.EntityFlag == PhoenixProject.Game.EntityFlag.Player && client.Entity.MaxHitpoints != client.Entity.Hitpoints) { SpellUse suse = new SpellUse(true); suse.Attacker = client.Entity.UID; suse.SpellID = 1195; suse.SpellLevel = 0; suse.X = 436; suse.Y = 444; uint Hp = (client.Entity.MaxHitpoints - client.Entity.Hitpoints); client.Entity.Hitpoints = client.Entity.MaxHitpoints; suse.Targets.Add(client.Entity.UID, Hp); client.SendScreen(suse, true); client.Send(new Message("Your HP Now : " + client.Entity.Hitpoints + "!", System.Drawing.Color.Red, Message.Talk)); } } } } if (client.Entity.InteractionInProgress && client.Entity.InteractionSet) { if (client.Entity.Body == 1003 || client.Entity.Body == 1004) { if (ServerBase.Kernel.GamePool.ContainsKey(client.Entity.InteractionWith)) { Client.GameState ch = ServerBase.Kernel.GamePool[client.Entity.InteractionWith]; PhoenixProject.Network.GamePackets.Data general = new PhoenixProject.Network.GamePackets.Data(true); general.UID = ch.Entity.UID; general.wParam1 = new_X; general.wParam2 = new_Y; general.ID = 0x9c; ch.Send(general.ToArray()); ch.Entity.Action = Game.Enums.ConquerAction.Jump; ch.Entity.X = new_X; ch.Entity.Y = new_Y; ch.Entity.Facing = ServerBase.Kernel.GetAngle(ch.Entity.X, ch.Entity.Y, new_X, new_Y); ch.SendScreen(generalData, true); ch.Screen.Reload(general); client.SendScreen(generalData, true); client.Screen.Reload(general); } } } } else { client.Disconnect(); } } else { if (client.Entity.Mode == Game.Enums.Mode.None) { client.Entity.Teleport(client.Map.ID, client.Entity.X, client.Entity.Y); } } } else { if (ServerBase.Kernel.GetDistance(new_X, new_Y, client.Entity.X, client.Entity.Y) <= 20) { client.Entity.Action = Game.Enums.ConquerAction.Jump; client.Entity.Facing = ServerBase.Kernel.GetAngle(generalData.wParam1, generalData.wParam2, new_X, new_Y); client.Entity.X = new_X; client.Entity.Y = new_Y; client.SendScreen(generalData, true); client.Screen.Reload(generalData); } else { client.Disconnect(); } } client.Entity.MapRegion = Region.Region.FindRegion((uint)client.Map.BaseID, client.Entity.X, client.Entity.Y); }
public static void GetDialog(NpcRequest npcRequest, GameState client) { if (AvatarLinker == null) AvatarLinker = new IniFile("\\database\\npc.ini"); //Console.WriteLine("[" + client.Entity.Name + "][NPC] " + npcRequest.NpcID + " : " + npcRequest.OptionID); if (!client.Map.Npcs.ContainsKey(client.ActiveNpc) || npcRequest == null || client == null || client.Entity == null || (npcRequest.NpcID == 0 && npcRequest.OptionID == 255)) return; if (client.Trade != null) if (client.Trade.InTrade) return; Dialogs dialog = new Dialogs(); dialog.Client = client; dialog.Replies = new List<NpcReply>(); INpc npcs = null; if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npcs)) { ushort avatar = (ushort)AvatarLinker.ReadInt16("NpcType" + (npcs.Mesh / 10), "SimpleObjID", 1); dialog.Avatar(avatar); } switch (client.Entity.MapID) { #region Mr.HassaN New Mount case 24109369: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello" + client.Entity.Name + " I Sell Now Mount and Germant for 100k cps?"); dialog.Option("ErrantryRobe.", 1); dialog.Option("DancingSnake", 2); dialog.Option("MakersProblems", 3); dialog.Option("NO Thx.", 255); dialog.Avatar(116); dialog.Send(); break; } case 1: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; client.Inventory.Add(188155, 0, 1); } else { dialog.Text("you don't have enought cps"); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 2: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; client.Inventory.Add(200458, 0, 1); } else { dialog.Text("you don't have enought cps"); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 3: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; client.Inventory.Add(200453, 0, 1); } else { dialog.Text("you don't have enought cps"); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } } break; } #endregion Mr.HassaN New Mount #region Twin City case 1002: { switch (client.ActiveNpc) { #region Lune(Enter Moon Platform) case 12116: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Would you like to enter the Moon Platform ?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1100, 184, 164); dialog.Text("Welcome in Moon Platform!"); dialog.Option("Thanks.", 1); dialog.Send(); break; } } break; } #endregion #region Enter Guild Arena case 380: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Would you like to enter the guild war arena?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1038, 348, 339); break; } } break; } #endregion #region Twin City case 10080: { switch (npcRequest.OptionID) { case 0: { if (client.Entity.PKPoints < 29) { dialog.Text("Hey there " + client.Entity.Name + "! I'm the craziest conductress!\nI also know how to send you to all the main cities.\nAnyways... Where are you headed? I may be able to teleport you there for 5,000 gold."); dialog.Option("Phoenix Castle.", 1); dialog.Option("Ape City.", 2); dialog.Option("Desert City.", 3); dialog.Option("Bird Island.", 4); dialog.Option("Mine Cave.", 5); dialog.Option("Market.", 6); dialog.Option("I don't care.", 255); dialog.Send(); break; } else { dialog.Text("I will not help MURDERS!"); dialog.Option("Ouch..", 255); dialog.Option("Then you are of no use to me!\nI'll kill you too!", 100); dialog.Send(); break; } } case 1: case 2: case 3: case 4: case 5: case 6: { ushort Map = 1002, X, Y; if (npcRequest.OptionID == 1) { X = 958; Y = 555; } else if (npcRequest.OptionID == 2) { X = 555; Y = 957; } else if (npcRequest.OptionID == 3) { X = 69; Y = 473; } else if (npcRequest.OptionID == 4) { X = 232; Y = 190; } else if (npcRequest.OptionID == 5) { X = 53; Y = 399; } else { X = 211; Y = 196; Map = 1036; } if (client.Entity.Money >= 100) { client.Entity.Money -= 100; client.Entity.Teleport(Map, X, Y); } else { dialog.Text("Hey! You don't have 100 gold do you?\nDon't you dare try to cheat me or I'll call the guards!"); dialog.Option("Crazy!", 255); dialog.Send(); } break; } case 100: { client.Entity.AddFlag(Update.Flags.FlashingName); client.Entity.FlashingNameStamp = Time32.Now; client.Entity.FlashingNameTime = 30; client.Send(PhoenixProject.ServerBase.Constants.Warrent); dialog.Text("Guards! HELP! " + client.Entity.Name + " is trying to kill me!!"); dialog.Option("I'll get you!", 255); dialog.Send(); break; } } break; } #endregion #region Celestine case 20005: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Did you see those plants while comming over here? Do you see that pond right over there? You see I need clean water badly. If the clean water is united with 7 of 9 unique gems(except tortoise, thunder, glory) it can heal plants and clean ponds. In exchange of those 8 items, I will give you back a celestial stone, which is needed for first reborn."); dialog.Option("How do I get gems?", 1); dialog.Option("How do I get clean water?", 2); dialog.Option("I got the items.", 3); dialog.Option("Boring...", 255); dialog.Send(); break; } case 1: { dialog.Text("You can get gems simply by minning or killing monsters, as they drop gems sometime."); dialog.Option("How do I get clean water?", 2); dialog.Option("I got the items.", 3); dialog.Option("Boring...", 255); dialog.Send(); break; } case 2: { dialog.Text("In the first Island Map in Adventure Zone(GC1), you might find the WaterLord(517,732). You may kill it and it may give a CleanWater, with a 50% percent of success. Once killed you may wait 15 minutes, before it will respawn again."); dialog.Option("How do I get gems?", 1); dialog.Option("I got the items.", 3); dialog.Option("Boring...", 255); dialog.Send(); break; } case 3: { bool hasfornow = true; uint baseid = 700001; for (int c = 0; c < 70; c += 10) if (!client.Inventory.Contains((uint)(baseid + c), 1)) { hasfornow = false; break; } if (!hasfornow) { dialog.Text("You don't meet the requierments!"); dialog.Send(); break; } if (client.Inventory.Contains(721258, 1)) { for (int c = 0; c < 70; c += 10) client.Inventory.Remove((uint)(baseid + c), 1); client.Inventory.Remove(721258, 1); client.Inventory.Add(721259, 0, 1); } else { dialog.Text("You don't meet the requierments!"); dialog.Send(); break; } break; } } break; } #endregion #region GuildDirector case 10003: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. Do you want to create a new guild? You need level 90 and 500000 silver and you have to not belong to any guild. If you are a guild leader, then you can name 5 deputy leaders."); dialog.Option("Create guild.", 1); dialog.Option("Name deputy leader.", 3); dialog.Option("Move leadership.", 6); dialog.Option("Disband guild.", 9); // dialog.Option("Remove ins From my items.", 15); dialog.Option("I don't have that.", 255); dialog.Send(); break; } case 15: { if (client.Guild != null) { dialog.Text("Sorry you Already in guild i cant help you, need to Quit so i can help You."); dialog.Option("Ahh.", 255); dialog.Send(); } else { //PhoenixProject.Database.ConquerItemTable.deleteallguildins(client); dialog.Text("Congratulations, all your items is back to normal status again, Now you need to Relog!"); dialog.Option("Thanks, i'll relog.", 255); dialog.Send(); } break; } case 9: { if (client.Guild != null && client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { dialog.Text("Are you sure you want to disband your guild?"); dialog.Option("Yes.", 10); dialog.Option("Ah, nevermind.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } case 10: { if (client.Guild != null && client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { client.Guild.Disband(); } break; } case 6: { if (client.Guild != null && client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { dialog.Text("Input here the member name you want to promote as guild leader."); dialog.Input("Here:", 7, 16); dialog.Option("Ah, nevermind.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } case 7: { if (client.Guild != null && client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { if (npcRequest.Input != "") { var member = client.Guild.GetMemberByName(npcRequest.Input); if (member == null) { dialog.Text("There is no such member in your guild."); dialog.Option("Ah, nevermind.", 255); dialog.Send(); return; } else { if (member.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { dialog.Text("You cannot promote this member anymore."); dialog.Option("Ah, nevermind.", 255); dialog.Send(); return; } else { if (member.Rank == PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) client.Guild.DeputyLeaderCount--; member.Rank = PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader; if (member.IsOnline) { client.Guild.SendGuild(member.Client); member.Client.Entity.GuildRank = (ushort)member.Rank; member.Client.Screen.FullWipe(); member.Client.Screen.Reload(null); } client.AsMember.Rank = PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader; if (client.AsMember.IsOnline) { client.Guild.SendGuild(client); client.Entity.GuildRank = (ushort)member.Rank; client.Screen.FullWipe(); client.Screen.Reload(null); } client.Guild.DeputyLeaderCount++; } } } } break; } case 3: { if (client.Guild != null && client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { dialog.Text("You have now " + client.Guild.DeputyLeaderCount + " named deupty leaders."); if (client.Guild.DeputyLeaderCount == 5) { dialog.Text("You cannot name any other deupty leader."); dialog.Option("Ah, nevermind.", 255); dialog.Send(); } else { dialog.Text("Input here the member name you want to promote as deputy leader."); dialog.Input("Here:", 4, 16); dialog.Option("Ah, nevermind.", 255); dialog.Send(); } } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } case 4: { if (client.Guild != null && client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { if (npcRequest.Input != "") { var member = client.Guild.GetMemberByName(npcRequest.Input); if (member == null) { dialog.Text("There is no such member in your guild."); dialog.Option("Ah, nevermind.", 255); dialog.Send(); return; } else { if (member.Rank != PhoenixProject.Game.Enums.GuildMemberRank.Member) { dialog.Text("You cannot promote this member anymore."); dialog.Option("Ah, nevermind.", 255); dialog.Send(); return; } else { member.Rank = PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader; if (member.IsOnline) { client.Guild.SendGuild(member.Client); member.Client.Entity.GuildRank = (ushort)member.Rank; member.Client.Screen.FullWipe(); member.Client.Screen.Reload(null); } client.Guild.DeputyLeaderCount++; } } } } break; } case 1: { if (client.Guild == null && client.Entity.Level >= 90 && client.Entity.Money >= 500000) { dialog.Text("Name your guild. The name must have less than 16 characters of any type."); dialog.Input("Here:", 2, 16); dialog.Option("Ah, nevermind.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } case 2: { if (client.Guild == null && client.Entity.Level >= 90 && client.Entity.Money >= 500000) { if (npcRequest.Input != "") { if (!Guild.CheckNameExist(npcRequest.Input)) { client.Entity.Money -= 500000; Guild guild = new Guild(client.Entity.Name); guild.ID = Program.nextGuildID; Program.nextGuildID++; //guild.ID = Guild.GuildCounter.Next; guild.SilverFund = 500000; client.AsMember = new PhoenixProject.Game.ConquerStructures.Society.Guild.Member(guild.ID) { SilverDonation = 500000, ID = client.Entity.UID, Level = client.Entity.Level, Name = client.Entity.Name, Rank = PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader, }; if (client.NobilityInformation != null) { client.AsMember.Gender = client.NobilityInformation.Gender; client.AsMember.NobilityRank = client.NobilityInformation.Rank; } client.Entity.GuildID = (ushort)guild.ID; client.Entity.GuildRank = (ushort)PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader; guild.Leader = client.AsMember; client.Guild = guild; Database.ArsenalTable.LoadArsenal(guild); //client.Guild.Arsenal = new Game.Features.Arsenal((ushort)client.Guild.ID); guild.Create(npcRequest.Input); guild.Name = npcRequest.Input; guild.MemberCount++; guild.SendGuild(client); guild.SendName(client); client.Screen.FullWipe(); client.Screen.Reload(null); } else { dialog.Text("There is a Guild Already with this Name i'm sorry."); dialog.Option("Choose another Name", 1); dialog.Option("Ok Sorry.", 255); dialog.Send(); } } } break; } } break; } #endregion #region ClanManager case 5522416: { switch (npcRequest.OptionID) { case 0: { if (client.Entity.Myclan == null) { dialog.Text("Hello! Would you like to make a clan, but you need 500.000 Silvers"); dialog.Option("Create Clan,", 1); dialog.Option("Just Passing By!", 255); dialog.Avatar(40); dialog.Send(); } else { if (client.Entity.Myclan.ClanLider == client.Entity.Name) { dialog.Text("Hello! i can help you to upgrade your clan level, what you want?"); dialog.Option("Upgrade Clan lvl", 2); //dialog.Option("Disband my Clan", 10); dialog.Option("Just Passing By!", 255); dialog.Avatar(40); dialog.Send(); } else { dialog.Text("you already in clan cant help you to create any clan now"); dialog.Option("Thanks", 255); dialog.Avatar(40); dialog.Send(); } } break; } case 12: { foreach (Game.Clans clans in ServerBase.Kernel.ServerClans.Values) { if (clans.Allies.ContainsKey(client.Entity.Myclan.ClanId)) { clans.Allies.Remove(client.Entity.Myclan.ClanId); clans.DeleteRelation(client.Entity.Myclan.ClanId, ClanRelations.RelationTypes.Allies); clans.SendMessage(new ClanRelations(clans, ClanRelations.RelationTypes.Allies)); } } foreach (Game.Clans clanss in ServerBase.Kernel.ServerClans.Values) { if (clanss.Enemies.ContainsKey(client.Entity.Myclan.ClanId)) { clanss.Enemies.Remove(client.Entity.Myclan.ClanId); clanss.DeleteRelation(client.Entity.Myclan.ClanId, ClanRelations.RelationTypes.Enemies); clanss.SendMessage(new ClanRelations(clanss, ClanRelations.RelationTypes.Enemies)); } } PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("clan: " + client.Entity.Myclan.ClanName + " Disbanded!", System.Drawing.Color.White, Network.GamePackets.Message.Clan), PhoenixProject.ServerBase.Kernel.GamePool.Values); if (PhoenixProject.ServerBase.Kernel.ServerClans.ContainsKey(client.Entity.Myclan.ClanId)) PhoenixProject.ServerBase.Kernel.ServerClans.Remove(client.Entity.Myclan.ClanId); Database.Clans.DeleteClan(client.Entity.Myclan.ClanId); var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint c = 0; c < COunt; c++) { if (c >= COunt) break; Client.GameState clien = (varr.Current as Client.GameState); if (clien.Entity.Myclan != null) { if (client.Entity.UID != clien.Entity.UID) { if (clien.Entity.Myclan.ClanId == client.Entity.Myclan.ClanId) { Network.GamePackets.Clan cl = new PhoenixProject.Network.GamePackets.Clan(clien, 22); clien.Send(cl.ToArray()); clien.Entity.ClanId = 0; clien.Entity.ClanRank = 0; clien.Entity.Myclan = null; clien.Entity.ClanName = null; Database.Clans.KickClan(clien.Entity.Name); ServerBase.Kernel.GamePool[client.Entity.UID].Screen.FullWipe(); ServerBase.Kernel.GamePool[client.Entity.UID].Screen.Reload(null); } } } varr.MoveNext(); } Network.GamePackets.Clan acl = new PhoenixProject.Network.GamePackets.Clan(client, 22); client.Send(acl.ToArray()); client.Entity.Myclan = null; client.Entity.ClanRank = 0; client.Entity.ClanId = 0; client.Entity.ClanName = null; Database.Clans.KickClan(client.Entity.Name); client.Entity.Myclan = null; ServerBase.Kernel.GamePool[client.Entity.UID].Screen.FullWipe(); ServerBase.Kernel.GamePool[client.Entity.UID].Screen.Reload(null); break; } case 10: { dialog.Text("You sure you wanT to Disband your clan?"); dialog.Option("Yes ", 12); dialog.Option("Just Passing By!", 255); dialog.Avatar(40); dialog.Send(); break; } case 2: { if (client.Entity.Myclan.ClanLevel < 4) { dialog.Text("You need " + Game.Clans.MoneyClanLevel[client.Entity.Myclan.ClanLevel] + " Silvers to upgrade ClandLevel! You are sure?"); dialog.Option("Yes upgrade.", 4); dialog.Option("Just Passing By!", 255); dialog.Avatar(88); dialog.Send(); } else { dialog.Text("Sorry, your clan level now is [5] cant help you tp upgrade it any more"); dialog.Option("Thanks!", 255); dialog.Avatar(88); dialog.Send(); } break; } case 4: { if (client.Entity.Money >= Game.Clans.MoneyClanLevel[client.Entity.Myclan.ClanLevel]) { try { client.Entity.Money -= Game.Clans.MoneyClanLevel[client.Entity.Myclan.ClanLevel]; var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator(); varr.MoveNext(); int COunt = ServerBase.Kernel.GamePool.Count; for (uint c = 0; c < COunt; c++) { if (c >= COunt) break; Client.GameState clien = (varr.Current as Client.GameState); if (clien.Entity.Myclan != null) { if (clien.Entity.UID != client.Entity.UID) { if (clien.Entity.Myclan.ClanId == client.Entity.Myclan.ClanId) { clien.Entity.Myclan.ClanId += 1; } } } varr.MoveNext(); } dialog.Text("Congratulations, you Upgraded your clan Level"); dialog.Option("Thanks!", 255); dialog.Send(); client.Entity.Myclan.ClanLevel += 1; Database.Clans.SaveClan(client.Entity.Myclan); Network.GamePackets.Clan cl = new PhoenixProject.Network.GamePackets.Clan(client, 1); client.Send(cl.ToArray()); } catch (Exception e) { Program.SaveException(e); } } else { dialog.Text("Sorry, you need " + Game.Clans.MoneyClanLevel[client.Entity.Myclan.ClanLevel] + " Silvers"); dialog.Option("Ah, Ok", 255); dialog.Avatar(40); dialog.Send(); } break; } case 1: { dialog.Text("Choose the name of your clan that your want to create?"); dialog.Input("Clan Name", 3, 14); dialog.Option("Just Passing By!", 255); dialog.Avatar(88); dialog.Send(); break; } case 3: { string name = npcRequest.Input; foreach (KeyValuePair<uint, Game.Clans> cl in PhoenixProject.ServerBase.Kernel.ServerClans) { if (cl.Value.ClanName == name) { dialog.Text("Sorry, but this clan exist! try another clan name"); dialog.Input("Clan Name", 3, 14); dialog.Option("Just Passing By!", 255); dialog.Avatar(88); dialog.Send(); return; } } if (client.Entity.Money >= 500000) { client.Entity.Money -= 500000; Game.Clans clan = new PhoenixProject.Game.Clans(); clan.ClanName = name; clan.ClanDonation = 500000; clan.ClanLider = client.Entity.Name; Game.ClanMembers member = new PhoenixProject.Game.ClanMembers(); member.Name = client.Entity.Name; member.UID = client.Entity.UID; member.Donation = 500000; member.Class = client.Entity.Class; member.Rank = 100; member.Level = client.Entity.Level; if (!clan.Members.ContainsKey(member.UID)) clan.Members.Add(member.UID, member); client.Entity.Myclan = clan; Database.Clans.CreateClan(client); Network.GamePackets.Clan cl = new PhoenixProject.Network.GamePackets.Clan(client, 1); client.Send(cl.ToArray()); ServerBase.Kernel.GamePool[client.Entity.UID].Screen.FullWipe(); ServerBase.Kernel.GamePool[client.Entity.UID].Screen.Reload(null); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("Congratulations, " + client.Entity.Name + " has created clan " + name + " Succesfully!", System.Drawing.Color.White, Network.GamePackets.Message.Clan), PhoenixProject.ServerBase.Kernel.GamePool.Values); dialog.Text("Congratulations, you created your clan " + clan.ClanName + " Successfully!"); dialog.Option("Ah, Ok", 255); dialog.Send(); } else { dialog.Text("Sorry, you dont have 500.000 Silver come again later ;)"); dialog.Option("Ah, Ok", 255); dialog.Avatar(88); dialog.Send(); } break; } } break; } #endregion #region Barber case 10002: { dialog.Avatar(241); switch (npcRequest.OptionID) { case 0: { dialog.Text("What kind of hair style would you like?"); dialog.Option("Awsome Styles", 4); dialog.Option("New Styles", 1); dialog.Option("Nostalgic Styles", 2); dialog.Option("Special Styles", 3); dialog.Option("Nevermind", 255); dialog.Send(); break; } #region New Hair Styles #region Options case 1: { dialog.Text("Which new style do you want?"); dialog.Option("New Hairstyle 1", 10); dialog.Option("New Hairstyle 2", 11); dialog.Option("New Hairstyle 3", 12); dialog.Option("New Hairstyle 4", 13); dialog.Option("New Hairstyle 5", 14); dialog.Option("New Hairstyle 6", 15); dialog.Option("New Hairstyle 7", 16); dialog.Option("More styles.", 102); dialog.Send(); break; } case 102: { dialog.Text("Which new style do you want?"); dialog.Option("New Hairstyle 8", 17); dialog.Option("New Hairstyle 9", 18); dialog.Option("New Hairstyle 10", 19); dialog.Option("New Hairstyle 11", 20); dialog.Option("New Hairstyle 12", 21); dialog.Option("Back.", 1); dialog.Option("Nevermind", 255); dialog.Send(); break; } #endregion #region ... case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20: case 21: { client.Entity.HairStyle = ushort.Parse(Convert.ToString(client.Entity.HairStyle)[0] + (20 + npcRequest.OptionID).ToString()); dialog.Text("Done!"); //Console.WriteLine("HairStyle " + client.Entity.HairStyle + ""); dialog.Option("Thanks.", 255); dialog.Send(); break; } #endregion #endregion #region Nostalgic Hair Styles #region Options case 2: { dialog.Text("Which new style do you want?"); dialog.Option("Nostalgic Hairstyle 1", 30); dialog.Option("Nostalgic Hairstyle 2", 31); dialog.Option("Nostalgic Hairstyle 3", 32); dialog.Option("Nostalgic Hairstyle 4", 33); dialog.Option("Nostalgic Hairstyle 5", 34); dialog.Option("Nostalgic Hairstyle 6", 35); dialog.Option("Nostalgic Hairstyle 7", 36); dialog.Option("Nevermind.", 255); dialog.Send(); break; } #endregion #region ... case 30: case 31: case 32: case 33: case 34: case 35: case 36: { client.Entity.HairStyle = ushort.Parse(Convert.ToString(client.Entity.HairStyle)[0] + (npcRequest.OptionID - 20).ToString()); dialog.Text("Done!"); dialog.Option("Thanks.", 255); dialog.Send(); break; } #endregion #endregion #region Special Hair Styles #region Options case 3: { dialog.Text("Which new style do you want?"); dialog.Option("New Hairstyle 1", 40); dialog.Option("New Hairstyle 2", 41); dialog.Option("New Hairstyle 3", 42); dialog.Option("New Hairstyle 4", 43); dialog.Option("New Hairstyle 5", 44); dialog.Option("Nevermind.", 255); dialog.Send(); break; } #endregion #region ... case 40: case 41: case 42: case 43: case 44: { client.Entity.HairStyle = ushort.Parse(Convert.ToString(client.Entity.HairStyle)[0] + (npcRequest.OptionID - 19).ToString()); dialog.Text("Done!"); dialog.Option("Thanks.", 255); dialog.Send(); break; } #endregion #endregion #region AwsomeStyles #region Options case 4: { dialog.Text("Which new style do you want?"); dialog.Option("New Hairstyle 1", 70); dialog.Option("New Hairstyle 2", 71); dialog.Option("New Hairstyle 3", 72); dialog.Option("New Hairstyle 4", 73); dialog.Option("New Hairstyle 5", 74); dialog.Option("Nevermind.", 255); dialog.Send(); break; } #endregion #region ... case 70: case 71: case 72: case 73: case 74: { if (npcRequest.OptionID == 70) { client.Entity.HairStyle = 770; dialog.Text("Done!"); dialog.Option("Thanks.", 255); dialog.Send(); //break; } if (npcRequest.OptionID == 71) { client.Entity.HairStyle = 771; dialog.Text("Done!"); dialog.Option("Thanks.", 255); dialog.Send(); //break; } if (npcRequest.OptionID == 72) { client.Entity.HairStyle = 772; dialog.Text("Done!"); dialog.Option("Thanks.", 255); dialog.Send(); //break; } if (npcRequest.OptionID == 73) { client.Entity.HairStyle = 773; dialog.Text("Done!"); dialog.Option("Thanks.", 255); dialog.Send(); //break; } if (npcRequest.OptionID == 74) { client.Entity.HairStyle = 774; dialog.Text("Done!"); dialog.Option("Thanks.", 255); dialog.Send(); //break; } break; } #endregion #endregion } break; } #endregion #region Assistant case 4293: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Do you want to visit the mine?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1028, 155, 95); break; } } break; } #endregion #region Furniture Store NPC case 30161: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Welcome to Twin City Furniture Store. Currently, you have a limited selection, but more furniture will come in soon."); dialog.Option("I wanna have a look.", 1); dialog.Option("I am not interested.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1511, 52, 70); dialog.Send(); break; } } break; } #endregion #region General Peace case 10054: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Stop!\nThe path ahead of you is dangerous.\nI don't recommend you continue on this path.\n"); if (client.Entity.Level <= 70) { dialog.Text("If you are looking from stronger monsters you should look in the Canyon first.\n"); dialog.Text("You can find your way there in the south-west part of the wind plain.\n"); } dialog.Option("Leave me alone General.", 1); dialog.Option("Okay, thanks for the warning.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1000, 973, 668); break; } } break; } #endregion #region WarehouseGuardian case 1061: //WarehouseGuardian { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello. I'm the one that was choosen to set/change/remove the password of the warehouse. I must say without a password you could lose a lot yet, which you probably already knew. My advice for you is that you should have a password, because it could save you of many problems. If you have a password yet, you can remove or change it."); if (client.WarehousePW == "") { dialog.Option("Okay, let me set the password.", 1); } else { dialog.Option("I want to change the password.", 2); dialog.Option("I want to remove the password.", 3); } dialog.Option("Forget it.", 255); dialog.Send(); break; } #region Set password case 1: { if (client.WarehousePW == "") { dialog.Text("Please insert a password that's built only with numbers and whose length is less or equal to 8. An example can be 74352."); dialog.Input("Here:", 4, 8); dialog.Option("Forget it.", 255); } else { dialog.Text("You have a password already set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } case 4: { if (client.WarehousePW == "") { if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8) { client.TempPassword = npcRequest.Input; dialog.Text("Please insert the password again."); dialog.Input("Here:", 5, 8); dialog.Option("Forget it.", 255); } else { dialog.Text("Invalid password, please try again."); dialog.Input("Here:", 4, 8); dialog.Option("Alright.", 255); } } else { dialog.Text("You have a password already set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } case 5: { if (client.WarehousePW == "") { if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8) { if (client.TempPassword == npcRequest.Input) { client.TempPassword = ""; client.WarehousePW = npcRequest.Input; dialog.Text("Password set!"); dialog.Option("Thank you.", 255); } else { dialog.Text("The password doesn't match. Insert again?"); dialog.Input("Here:", 5, 8); dialog.Option("Forget it.", 255); } } else { dialog.Text("Invalid password, please try again."); dialog.Input("Here:", 5, 8); dialog.Option("Alright.", 255); } } else { dialog.Text("You have a password already set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } #endregion #region Change password case 2: { if (client.WarehousePW != "") { dialog.Text("Please insert the password you have now."); dialog.Input("Here:", 6, 8); dialog.Option("Forget it.", 255); } else { dialog.Text("You don't have a password set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } case 6: { if (client.WarehousePW != "") { if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8) { if (client.WarehousePW == npcRequest.Input) { dialog.Text("Please insert the password again."); dialog.Input("Here:", 7, 8); dialog.Option("Forget it.", 255); } else { dialog.Text("Wrong password. Try again?"); dialog.Input("Here:", 6, 8); dialog.Option("Alright.", 255); } } else { dialog.Text("Invalid password, please try again."); dialog.Input("Here:", 6, 8); dialog.Option("Alright.", 255); } } else { dialog.Text("You don't have a password set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } case 7: { if (client.WarehousePW != "") { if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8) { client.TempPassword = npcRequest.Input; dialog.Text("Please insert the password again."); dialog.Input("Here:", 8, 8); dialog.Option("Forget it.", 255); } else { dialog.Text("Invalid password, please try again."); dialog.Input("Here:", 7, 8); dialog.Option("Alright.", 255); } } else { dialog.Text("You don't have a password set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } case 8: { if (client.WarehousePW != "") { if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8) { if (client.TempPassword == npcRequest.Input) { client.TempPassword = ""; client.WarehousePW = npcRequest.Input; dialog.Text("Password changed!"); dialog.Option("Thank you.", 255); } else { dialog.Text("Wrong password."); dialog.Input("Here:", 8, 8); dialog.Option("Alright.", 255); } } else { dialog.Text("Invalid password, please try again."); dialog.Input("Here:", 8, 8); dialog.Option("Alright.", 255); } } else { dialog.Text("You don't have a password set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } #endregion #region Remove password case 3: { if (client.WarehousePW != "") { dialog.Text("Please insert the password you have now."); dialog.Input("Here:", 9, 8); dialog.Option("Forget it.", 255); } else { dialog.Text("You don't have a password set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } case 9: { if (client.WarehousePW != "") { if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8) { if (client.WarehousePW == npcRequest.Input) { dialog.Text("Please insert the password again."); dialog.Input("Here:", 10, 8); dialog.Option("Forget it.", 255); } else { dialog.Text("Wrong password. Try again?"); dialog.Input("Here:", 9, 8); dialog.Option("Alright.", 255); } } else { dialog.Text("Invalid password, please try again."); dialog.Input("Here:", 9, 8); dialog.Option("Alright.", 255); } } else { dialog.Text("You don't have a password set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } case 10: { if (client.WarehousePW != "") { if (CheckNumberPassword(npcRequest.Input) && npcRequest.Input.Length <= 8) { if (client.WarehousePW == npcRequest.Input) { client.WarehousePW = ""; client.WarehouseOpen = true; dialog.Text("Password removed."); dialog.Option("Thank you.", 255); } } else { dialog.Text("Invalid password, please try again."); dialog.Input("Here:", 10, 8); dialog.Option("Alright.", 255); } } else { dialog.Text("You don't have a password set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } #endregion } break; } #endregion #region Jail npc case 10081: //Jail npc { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. I can teleport you in jail for the amount of 1000 silvers. Do you want to proceed?"); dialog.Option("Sure.", 1); dialog.Option("I'm standing by.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 1000) { client.Entity.Money -= 1000; client.Entity.Teleport(6000, 32, 72); } else { dialog.Text("You need 1000 silvers to be able to enter the jail."); dialog.Option("Alright.", 255); } break; } } break; } #endregion #region Arena npc case 10021: //Arena npc { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. I can teleport you in jail for the amount of 50 silvers. Do you want to proceed?"); dialog.Option("Sure.", 1); dialog.Option("I'm standing by.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 50) { client.Entity.Money -= 50; client.Entity.Teleport(1005, 51, 71); } else { dialog.Text("You need 50 silvers to be able to enter the jail."); dialog.Option("Alright.", 255); } break; } } break; } #endregion #region ShopBoy case 10063: //ShopBoy { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. I can teleport you in our shop, but I can also dye your armor black for the price of one DragonBall. What do you say?"); dialog.Option("Teleport me in the shop.", 1); dialog.Option("Dye my armor black.", 2); dialog.Option("I'm standing by.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1008, 22, 26); break; } case 2: { if (client.Inventory.Contains(1088000, 1)) { IConquerItem armor = client.Equipment.TryGetItem(3); if (armor != null && armor.ID != 0) { client.Inventory.Remove(1088000, 1); armor.Color = PhoenixProject.Game.Enums.Color.Black; PhoenixProject.Database.ConquerItemTable.UpdateColor(armor); armor.Mode = PhoenixProject.Game.Enums.ItemMode.Update; armor.Send(client); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } } else { dialog.Text("You don't wear an armor right now so I can't do anything."); dialog.Option("Ah alright.", 255); dialog.Send(); } } else { dialog.Text("Hmm...You don't have one DragonBall so I can't dye your armor."); dialog.Option("Ah alright.", 255); dialog.Send(); } break; } } break; } #endregion #region Kungfu Boy case 100229: { // If inv contains jade glyph // npcRequest.OptionID = 5 switch (npcRequest.OptionID) { case 0: { //#warning (Kungfu Boy) Check for begenniers quest, check for the note. Echo this text. dialog.Text("I started learning Kungfu when I was very young.\nNow I have learn to master my Chi very well! Wanna have a try?"); dialog.Option("Yeah!", 1); dialog.Option("I don't care...", 255); dialog.Send(); break; } case 1: { dialog.Text("Oh, a message from the Village Gateman? I see.\nHe wants me to teach you how to master your Chi."); dialog.Option("I'm listening.", 2); dialog.Send(); break; } case 2: { dialog.Text("Press the Ctrl button, move the mouse arrow to the place you want to jump to and left click."); dialog.Text("You should know, you can't jump to a place you can't just normally walk to sometimes."); dialog.Option("Gotcha.", 3); dialog.Send(); break; } case 3: { dialog.Text("Good! It seems that you have mastered this skill. One more thing!\n"); dialog.Text("My sister, Kungfu Girl, has stolen my Jade Glyph and taken it up onto the roof behind me. Can you go get it for me?"); dialog.Option("No problem.", 4); dialog.Send(); break; } case 4: { //#warning (Kungfu boy) Add quest progress client.Send(new Message("Jump to the roof behind Kungfu Boy and catch his mischievous sister!", System.Drawing.Color.Green, Message.PopUP)); break; } case 5: { dialog.Text("Hey you got it! Thank you. I see you've mastered your Chi."); dialog.Option("I have.", 6); dialog.Send(); break; } case 6: { dialog.Text("Well, thats good. I storngly recommend you go visit the Armorer in Twin City."); dialog.Text(" You need to pick out some armor. It will save your life!"); dialog.Option("I'll think about it.", 255); dialog.Send(); break; } } break; } #endregion #region Kungfu Girl case 127271: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Haha! I wanted to play a trick on my brother! Don't tell him."); dialog.Option("He knows already.", 2); dialog.Option("You are very naughty.", 1); dialog.Send(); break; } case 1: { dialog.Text("Teehee!"); dialog.Option("He knows about this, you know.", 2); dialog.Send(); break; } case 2: { dialog.Text("Oh, well you got me.... Alright. Here's his Jade Glyph. Take it."); dialog.Option("Good!", 3); dialog.Send(); break; } case 3: { //#warning (Kungfu boy) Add quest progress client.Send(new Message("You got Kungfu Boy's Jade Glyph back from Kungfu Girl! Take it back to Kungfu Boy.", System.Drawing.Color.Green, Message.PopUP)); break; } } break; } #endregion #region Simon case 1152: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hmm, a few years ago, me and some friends of mine, started exploring the mountains. It was an usual day, cloudy with a very happy sun. We all went on the mountain to explore and level up a bit. Somehow we was all tricked into seeing a fantasy land and we went that way. We found a big rock that looked like a door, we broke it and went in. Since then, my friends are in the place we found and which we called the labirinth as it was full of powerful creatures that were leading each of the four levels of the labirith. Each friend of mine chose a floor and they await great conquerors at the end of each floor. "); dialog.Option("Tell me more about it.", 1); dialog.Option("Blah, boring.", 255); dialog.Send(); break; } case 1: { dialog.Text("In each floor there are three kinds of monsters, floor one has Slingers, GoldGhosts and the powerful Gibbon. The second floor has the AgileRats, Bladelings and the snake Naga. The third floor has BlueBirds, FiendBats and the mighty Talon. The last floor, the fourth, has MinotaurL120 and the Syren. Each of them drops some items, and you'll need some to get to the next floor, or some others to claim a reward from me."); dialog.Option("What rewards?", 2); dialog.Option("Blah, boring.", 255); dialog.Send(); break; } case 2: { dialog.Text("In exchange of 17 SunDiamonds(dropped by Slingers) I will give you two meteors, for 17 MoonDiamonds(dropped by Bladelings), I will give you 4 meteors, for 17 StarDiamonds(dropped by BlueBirds), I will give you 4 meteor tears, and lastly for 17 CloudDiamonds, I will give you one DragonBall. More over, to get to the second floor from first one you need a SkyToken(dropped by GoldGhost), from second to third a EarthToken(dropped by AgileRat) and from third to fourth a SoulToken(dropped by FiendBat)."); dialog.Option("Enough talking.", 3); dialog.Option("Claim my reward.", 4); dialog.Option("Blah, boring.", 255); dialog.Send(); break; } case 3: { dialog.Text("Right. In exchange of 2000 VirtuePoints, I will be more than glad to teleport you in the first floor of the Labirith."); dialog.Option("Here, take them.", 5); dialog.Option("Blah, boring.", 255); dialog.Send(); break; } case 4: { dialog.Text("What do you want to claim?"); dialog.Option("Two Meteors.", 6); dialog.Option("Four Meteors.", 7); dialog.Option("Four Meteor tears.", 8); dialog.Option("One DragonBall.", 9); dialog.Option("Blah, boring.", 255); dialog.Send(); break; } case 5: { if (client.VirtuePoints >= 2000) { client.VirtuePoints -= 2000; client.Entity.Teleport(1351, 018, 127); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh, sorry.", 255); dialog.Send(); } break; } case 6: { if (client.Inventory.Contains(721533, 17)) { client.Inventory.Remove(721533, 17); client.Inventory.Add(1088001, 0, 2); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh, sorry.", 255); dialog.Send(); } break; } case 7: { if (client.Inventory.Contains(721534, 17)) { client.Inventory.Remove(721534, 17); client.Inventory.Add(1088001, 0, 4); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh, sorry.", 255); dialog.Send(); } break; } case 8: { if (client.Inventory.Contains(721535, 17)) { client.Inventory.Remove(721535, 17); client.Inventory.Add(1088002, 0, 4); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh, sorry.", 255); dialog.Send(); } break; } case 9: { if (client.Inventory.Contains(721536, 17)) { client.Inventory.Remove(721536, 17); client.Inventory.Add(1088000, 0, 1); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh, sorry.", 255); dialog.Send(); } break; } } break; } #endregion #region MoonBoxQuest #region FortuneTeller case 600050: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + ", Have you heard of the palace method?"); dialog.Option("Palace method?..", 1); dialog.Option("Don't care!", 255); dialog.Send(); break; } case 1: { dialog.Text("I discovered a mystical tactic, but I was not able to solve it.\nI almost died! It's very dangerous."); dialog.Option("Sounds like my kind of fun.", 2); dialog.Option("Too dangerous", 255); dialog.Send(); break; } case 2: { dialog.Text("I'm serious! You don't understand it's very dangerous..."); dialog.Option("Yea yea. Just take my there.", 3); dialog.Option("Nevermind... o.o", 255); dialog.Send(); break; } case 3: { client.Entity.Teleport(1042, 028, 033); dialog.Text("I warned you...."); dialog.Option("I think you're full of it.\nThere's nothing here.", 255); dialog.Send(); break; } } break; } #endregion #endregion #region FrozenGrottoGeneral case 27837: { switch (npcRequest.OptionID) { case 0: { dialog.Text("There is a dangeous frozen cavern south of nowhere! It's too dangerous for you to enter! Even Leroy Jenkins died there!"); dialog.Option("I want to enter the grotto.", 4); dialog.Option("Blah, boring.", 255); dialog.Send(); break; } case 4: { dialog.Text("Ok, well.. Which floor of the Grotto do you want to enter?\n"); dialog.Option("Floor 1 [Lv127]", 1); dialog.Option("Floor 2 [Lv132]", 2); dialog.Send(); break; } case 1: { client.Entity.Teleport(1762, 61, 257); break; } case 2: { client.Entity.Teleport(7007, 61, 257); break; } } break; } #endregion } break; } #endregion #region Poker1 case 8880: { switch (client.ActiveNpc) { #region Poker1 case 269857: //Poker1 npc { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. I can teleport you to the twin city for 100 Gold Just gimme 100 gold to travel away from here."); dialog.Option("Teleport me.", 1); dialog.Option("I'm standing by.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 100) { client.Entity.Money -= 100; client.Entity.Teleport(1002, 430, 380); } else { dialog.Text("You need 100 silvers to be able to Teleport To twin city."); dialog.Option("Alright.", 255); } break; } } break; } #endregion } break; } #endregion #region Poker2 case 8881: { switch (client.ActiveNpc) { #region Poker2 case 369857: //Poker2 npc { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. I can teleport you Back to market"); dialog.Option("Teleport me.", 1); dialog.Option("I'm standing by.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1036, 192, 184); break; } } break; } #endregion } break; } #endregion #region ThrilingSpook case 8892: { switch (client.ActiveNpc) { #region Mobs1 case 269861: //Mobs1 npc { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. I can teleport you back to TwinCity you should give me 100 Silver ."); dialog.Option("Teleport me.", 1); dialog.Option("I'm standing by.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 100) { client.Entity.Money -= 100; client.Entity.Teleport(1002, 450, 350); } else { dialog.Text("You need 100 Silver to be able to Teleport To TwinCity."); dialog.Option("Alright.", 255); } break; } } break; } #endregion } break; } #endregion #region MoonboxQuest case 1040: case 1041: case 1042: case 1043: case 1044: case 1045: case 1046: case 1047: case 1048: case 1049: case 1050: case 1051: { switch (client.ActiveNpc) { #region MoonBoxQuest #region Maggie case 600003: { switch (npcRequest.OptionID) { case 0: { dialog.Text("What are you here for!?\nPlease do not go ahead, or you will enter the very dangerous tactics."); dialog.Option("....You too?", 1); dialog.Option("Send me to the tatics.", 4); dialog.Option("I had better leave here!", 255); dialog.Send(); break; } case 1: { dialog.Text("The tactic is so changeful, I once thought highly of my self\nand died from the damned tactics."); dialog.Option("How can I solve the tatics?", 2); dialog.Option("I do not believe in this!", 255); dialog.Send(); break; } case 2: { dialog.Text("I have studied it for so may years, but fail to work it out.\nPerhaps you can... Would you like to give it a try?"); dialog.Option("Yes. I like a good challenge.", 3); dialog.Option("I changed my mind..", 255); dialog.Send(); break; } case 3: { dialog.Text("You will be entrapped in the tatic if you enter.\nYou won't be able to leave until you've found a special token."); dialog.Option("I'm ready to do this.", 5); dialog.Option("No. This is too risky.", 255); dialog.Send(); break; } case 4: { dialog.Text("Alright, I'll take you there.\nYou must be sure to pick up the token!"); dialog.Option("Okay.", 5); dialog.Send(); break; } case 5: { ushort map = 1042; map += (ushort)PhoenixProject.ServerBase.Kernel.Random.Next(1, 8); client.Entity.Teleport(map, 210, 164); break; } } break; } #endregion #region GuardianGod case 600004: case 600006: case 600008: case 600010: case 600012: case 600014: { switch (npcRequest.OptionID) { case 0: { string[] Tactics = { "Peace", "Chaos", "Deserted", "Disturbed", "Prosperous", "Calmed" }; uint almostid = client.ActiveNpc / 2; uint baseId = 721010; uint tactic = almostid - 300002; baseId += tactic; if (client.Inventory.Contains(baseId, 1)) { dialog.Text("Congratulations, you have a token for this tactic. This tactic is " + Tactics[tactic] + "."); dialog.Option("Ok, thanks!", 255); dialog.Send(); break; } else { dialog.Text("You don't have a token for this tactic, I'm afraid I cannot tell you which tactic is it."); dialog.Option("Ahh, thanks anyway!", 255); dialog.Send(); break; } } } break; } case 600016: { switch (npcRequest.OptionID) { case 0: { dialog.Text("You are in DeathTactic, you either die or proceed if you have 6 tokens that are not the same."); dialog.Option("Ok, thanks!", 255); dialog.Send(); break; } } break; } #endregion #region Ghost case 600005: case 600007: case 600009: case 600011: case 600013: case 600015: { uint almostId = (client.ActiveNpc - 1) / 2; uint baseId = 721010; uint tactic = almostId - 300002; baseId += tactic; switch (npcRequest.OptionID) { case 0: { if (client.Inventory.Contains(baseId, 1)) { dialog.Text("Nice you have the token!\nAre you ready to leave?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); } else { dialog.Text("How dare you bother me without the token!\nYou will not leave this place until the token has been found!"); dialog.Option("Sorry I'll go find it!", 255); dialog.Send(); } break; } case 1: { if (client.Inventory.Contains(baseId, 1)) { client.Entity.Teleport(1042, 028, 033); } break; } } break; } case 600017: { switch (npcRequest.OptionID) { case 0: { dialog.Text("I've been trapped here forever.\nI didn't have all the token before coming here."); dialog.Option("What about me?", 1); dialog.Send(); break; } case 1: { dialog.Text("If you have all the tokens you may leave this place with a moonbox.\nIf you don't.... You must die."); dialog.Option("I have them! Please don't kill me!", 2); dialog.Option("Oh no...", 255); dialog.Send(); break; } case 2: { if (client.Inventory.Contains(721010, 1) && client.Inventory.Contains(721011, 1) && client.Inventory.Contains(721012, 1) && client.Inventory.Contains(721013, 1) && client.Inventory.Contains(721014, 1) && client.Inventory.Contains(721015, 1)) { client.Inventory.Remove(721010, 1); client.Inventory.Remove(721011, 1); client.Inventory.Remove(721012, 1); client.Inventory.Remove(721013, 1); client.Inventory.Remove(721014, 1); client.Inventory.Remove(721015, 1); client.Inventory.Add(721072, 0, 1); client.Entity.Teleport(1050, 210, 164); } else { dialog.Text("You're wrong. Enjoy your death."); dialog.Option("No!", 255); dialog.Send(); } break; } } break; } #endregion #region VagrantGhost case 600018: case 600019: case 600020: case 600021: case 600022: case 600023: case 600024: case 600025: case 600026: case 600027: case 600028: case 600029: case 600030: case 600031: case 600032: case 600033: case 600034: case 600035: case 600036: case 600037: case 600038: case 600039: case 600040: case 600041: case 600042: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Help me... Please"); dialog.Option("Who are you?", 1); dialog.Send(); break; } case 1: { dialog.Text("I am a warrior trapped in these tactics please help me to revive!"); dialog.Option("I have the SoulJade.", 2); dialog.Option("No.", 3); dialog.Send(); break; } case 2: { if (client.Inventory.Contains(721072, 1)) { dialog.Text("Thank you! Will you recive my gift of a Moonbox?"); dialog.Option("Yes.", 3); dialog.Option("Not needed.", 4); dialog.Send(); } else { dialog.Text("You do not...even so, I shall help you leave this cursed map."); dialog.Option("Please get me out of here.", 5); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(721072, 1)) { client.Inventory.Remove(721072, 1); client.Inventory.Add(721080, 0, 1); client.Entity.Teleport(1042, 028, 033); } break; } case 4: { client.Inventory.Remove(721072, 1); client.Entity.Teleport(1042, 028, 033); break; } case 5: { client.Entity.Teleport(1042, 028, 033); break; } } break; } #endregion #endregion } break; } #endregion #region Ape Canyon case 1020: { switch (client.ActiveNpc) { #region Ape City case 10053: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + ", I can send you on your way for just 100 silvers."); dialog.Text("\nWhere would you like to go?"); dialog.Option("Twin City", 1); dialog.Option("Market", 2); dialog.Option("Nevermind", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 100) { client.Entity.Money -= 100; client.Entity.Teleport(1020, 378, 13); } else { dialog.Text("You do not have 100 silvers."); dialog.Option("Aww!", 255); dialog.Send(); } break; } case 2: { if (client.Entity.Money >= 100) { client.Entity.Money -= 100; client.Entity.Teleport(1036, 211, 196); } else { dialog.Text("You do not have 100 silvers."); dialog.Option("Aww!", 255); dialog.Send(); } break; } } break; } #endregion #region Ape Canyon #region Alex case 3600: { switch (npcRequest.OptionID) { case 0: { dialog.Text("You don't worry, it's not gonna hurt you a bit when getting the third life. You just need an exemption token and it's all going to be fine."); dialog.Option("Here is the ExemptionToken.", 1); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 1: { if (client.Entity.Reborn == 1) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { dialog.Text("Select the class you want to reborn in."); dialog.Option("Trojan.", 11); dialog.Option("Warrior.", 21); dialog.Option("Archer.", 41); dialog.Option("WaterTaoist.", 132); dialog.Option("FireTaoist.", 142); dialog.Option("Ninja.", 51); dialog.Option("Monk.", 61); dialog.Option("Pirate.", 71); //dialog.Option("Nothing thank you.", 255); dialog.Send(); } else { dialog.Text("If you are a water saint you need level 110+, else you need 120+."); dialog.Option("I'll just leave", 255); dialog.Send(); break; } } else { dialog.Text("You need to be in the second life to be able to get the third life."); dialog.Option("I'll just leave", 255); dialog.Send(); break; } break; } default: { if (npcRequest.OptionID == 255) return; if (client.Entity.Reborn == 1) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { if (client.Inventory.Contains(723701, 1)) { if (client.Reborn(npcRequest.OptionID)) { client.Inventory.Remove(723701, 1); } else { dialog.Text("You need two free slots in your inventory."); dialog.Option("I'll just leave", 255); dialog.Send(); break; } } } else { dialog.Text("If you are a water saint you need level 110+, else you need 120+."); dialog.Option("I'll just leave", 255); dialog.Send(); break; } } else { dialog.Text("You need to be in the second life to be able to get the third life."); dialog.Option("I'll just leave", 255); dialog.Send(); break; } break; } } break; } #endregion #region Assistant case 126: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Do you want to visit the mine?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1026, 142, 105); break; } } break; } #endregion #endregion } break; } #endregion #region PhoenixCastle case 1011: { switch (client.ActiveNpc) { #region Phoenix Castle case 10052: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + ", I can send you on your way for just 100 silvers."); dialog.Text("\nWhere would you like to go?"); dialog.Option("Market", 1); dialog.Option("Twin City", 2); dialog.Option("Nevermind", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 100) { client.Entity.Money -= 100; client.Entity.Teleport(1036, 211, 196); } else { dialog.Text("You do not have 100 silvers."); dialog.Option("Aww!", 255); dialog.Send(); } break; } case 2: { if (client.Entity.Money >= 100) { client.Entity.Money -= 100; client.Entity.Teleport(10, 377); } else { dialog.Text("You do not have 100 silvers."); dialog.Option("Aww!", 255); dialog.Send(); } break; } } break; } #endregion #region PhoenixCity #region Assistant case 125: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Do you want to visit the mine?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1025, 30, 71); break; } } break; } #endregion #endregion } break; } #endregion #region DesertCity case 1000: { switch (client.ActiveNpc) { #region Desert city case 10051: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + ", I can set you on your way for just 100 silver.\n"); dialog.Text("Where would you like to go?"); dialog.Option("Twin City", 1); dialog.Option("Mystic Castle", 2); dialog.Option("Market", 3); dialog.Option("Nevermind.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 100) { client.Entity.Teleport(1000, 973, 668); client.Entity.Money -= 100; } else { dialog.Text("You do not have 100 silvers."); dialog.Option("Aww!", 255); dialog.Send(); } break; } case 2: { if (client.Entity.Money >= 100) { client.Entity.Teleport(1000, 80, 320); client.Entity.Money -= 100; } else { dialog.Text("You do not have 100 silvers."); dialog.Option("Aww!", 255); dialog.Send(); } break; } case 3: { if (client.Entity.Money >= 100) { client.Entity.Teleport(1036, 211, 196); client.Entity.Money -= 100; } else { dialog.Text("You do not have 100 silvers."); dialog.Option("Aww!", 255); dialog.Send(); } break; } } break; } #endregion #region DesertCity #region Assistant case 127: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Do you want to visit the mine?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1027, 142, 105); break; } } break; } #endregion #region FrozenGrottoGuardian case 27837: { switch (npcRequest.OptionID) { case 0: { dialog.Text("There is a dangeous frozen cavern south of nowhere! It's too dangerous for you to enter! Even Leroy Jenkins died there!"); dialog.Option("I want to enter the grotto.", 4); dialog.Option("Blah, boring.", 255); dialog.Send(); break; } case 4: { dialog.Text("Ok, well.. Which floor of the Grotto do you want to enter?\n"); dialog.Option("Floor 1 [Lv127]", 1); dialog.Option("Floor 2 [Lv132]", 2); dialog.Send(); break; } case 1: { client.Entity.Teleport(7007, 61, 257); break; } case 2: { client.Entity.Teleport(2056, 30, 335); break; } } break; } #endregion #endregion } break; } #endregion #region Bird Village case 1015: { switch (client.ActiveNpc) { #region Bird Island case 10056: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + ", I can send you on your way for just 100 silvers."); dialog.Text("\nWhere would you like to go?"); dialog.Option("Twin City", 1); dialog.Option("Market", 2); dialog.Option("Nevermind", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 100) { client.Entity.Money -= 100; client.Entity.Teleport(1015, 1015, 710); } else { dialog.Text("You do not have 100 silvers."); dialog.Option("Aww!", 255); dialog.Send(); } break; } case 2: { if (client.Entity.Money >= 100) { client.Entity.Money -= 100; client.Entity.Teleport(1036, 211, 196); } else { dialog.Text("You do not have 100 silvers."); dialog.Option("Aww!", 255); dialog.Send(); } break; } } break; } #endregion #region Bird Village #region ArtisanOu case 41: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there my friend. I am here to make your socket your weapon. With a socketed weapon you can add gems inside of the sockets and the gems will give you some extra stats. For the first socket I demand 1 DragonBall and for the second one I demand 5 dragonballs."); dialog.Option("Alright let's go on.", 1); dialog.Send(); break; } case 1: { if (!client.Equipment.Free(4)) { PhoenixProject.Interfaces.IConquerItem Item = null; Item = client.Equipment.TryGetItem(4); if (Item.SocketOne == PhoenixProject.Game.Enums.Gem.NoSocket) { dialog.Text("My friend I need one DragonBall to socket your weapon. Are you sure you want to do this?"); dialog.Option("Yea sure.", 2); dialog.Send(); } else if (Item.SocketTwo == PhoenixProject.Game.Enums.Gem.NoSocket) { dialog.Text("My friend I need five dragonballs to socket your weapon. Are you sure you want to do this?"); dialog.Option("Yea sure.", 2); dialog.Send(); } else { dialog.Text("I can't socket this weapon once more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to wear the weapon first."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 2: { if (!client.Equipment.Free(4)) { PhoenixProject.Interfaces.IConquerItem Item = null; Item = client.Equipment.TryGetItem(4); if (Item.SocketOne == PhoenixProject.Game.Enums.Gem.NoSocket) { if (client.Inventory.Contains(1088000, 1)) { client.Inventory.Remove(1088000, 1); Item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; Item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; Item.Send(client); PhoenixProject.Database.ConquerItemTable.UpdateSockets(Item); dialog.Text("Done!"); dialog.Option("Thank you.", 255); dialog.Send(); } else { dialog.Text("You don't have one DragonBall!"); dialog.Option("Ah...", 255); dialog.Send(); } } else if (Item.SocketTwo == PhoenixProject.Game.Enums.Gem.NoSocket) { if (client.Inventory.Contains(1088000, 5)) { client.Inventory.Remove(1088000, 5); Item.SocketTwo = PhoenixProject.Game.Enums.Gem.EmptySocket; Item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; Item.Send(client); PhoenixProject.Database.ConquerItemTable.UpdateSockets(Item); dialog.Text("Done!"); dialog.Option("Thank you.", 255); dialog.Send(); } else { dialog.Text("You don't have one DragonBall!"); dialog.Option("Ah...", 255); dialog.Send(); } } } else { dialog.Text("You need to wear the weapon first."); dialog.Option("Alright.", 255); dialog.Send(); } break; } } break; } #endregion #endregion } break; } #endregion #region Market case 1036: { switch (client.ActiveNpc) { #region Market #region Shelby case 300000: { switch (npcRequest.OptionID) { case 0: { dialog.Text("I have here the list with the virtue of all the people in this world. You have so far " + client.VirtuePoints + " virtue points."); dialog.Option("Thank you.", 255); dialog.Send(); break; } } break; } #endregion #region LadyLuck case 923: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Welcome to the Lottery Center! There are many Lucky Boxes here, each"); dialog.Text(" containing incredible treasures! Pay me 3 Small Lottery Tickets to draw from"); dialog.Text(" the Lucky Box in the Lottery Center. You are allowed to enter the Lottery"); dialog.Text(" Center and try your luck upto 10 times a day. You will have extra lottery"); dialog.Text(" chances if you are a vip player."); dialog.Option("Lets try my luck!", 1); dialog.Option("Exchange Small Lottery Ticket.", 2); dialog.Option("Nice to see you.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Level >= 70) { client.Entity.Teleport(700, 42, 50); } else { dialog.Text("You may not join the lottery , you need level 70 first."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 2: { if (client.InLottery) { client.Entity.Teleport(700, 42, 50); } break; } } break; } #endregion #region Realloter case 350050: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there brave conqueror, if you have reborn, and you misplaced your atribute points or you want to set them another way, I'll reset your atribute points for one DragonBall. Do you accept?"); dialog.Option("Here is the DragonBall.", 1); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 1: { if (client.Entity.Reborn > 0) { if (client.Inventory.Contains(1088000, 1)) { client.Inventory.Remove(1088000, 1); if (client.Entity.Reborn != 0) { client.Entity.Agility = 0; client.Entity.Strength = 0; client.Entity.Vitality = 1; client.Entity.Spirit = 0; if (client.Entity.Reborn == 1) { client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornLevel) + 52 + 3 * (client.Entity.Level - 15)); } else { client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornClass) + client.ExtraAtributePoints(client.Entity.SecondRebornLevel, client.Entity.SecondRebornClass) + 52 + 3 * (client.Entity.Level - 15)); } } } else { dialog.Text("You need a DragonBall."); dialog.Option("I'll just leave", 255); dialog.Send(); } } else { dialog.Text("You have to have atleast one rebirth atleast."); dialog.Option("I'll just leave", 255); dialog.Send(); } break; } } break; } #endregion #region Magic Artisan case 10062: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Have you ever seen my brother Artisan Wind? If so, you might know that he upgrades and downgrades the item level and item quality."); dialog.Text("Well, he doesn't always succeed, but that's why I am here. I can upgrade/downgrade being sucessfully with a fixed amount of meteors (tears)/dragonballs. "); dialog.Text("What would you like me to do?"); dialog.Option("Upgrade level.", 1); dialog.Option("Downgrade level.", 2); dialog.Option("Upgrade quality.", 3); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 1: case 3: { int aut = npcRequest.OptionID * 10; dialog.Text("Select which item's details you want to change?"); dialog.Option("Headgear.", (byte)(aut + 1)); dialog.Option("Necklace.", (byte)(aut + 2)); dialog.Option("Armor.", (byte)(aut + 3)); dialog.Option("Main Weapon.", (byte)(aut + 4)); dialog.Option("Left Weapon/Shield.", (byte)(aut + 5)); dialog.Option("Ring.", (byte)(aut + 6)); dialog.Option("Boots.", (byte)(aut + 8)); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 2: { client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = 506, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); break; } case 100: { if (client.SelectedItem == 0) return; var item = client.Equipment.TryGetItem(client.SelectedItem); var itemdetail = PhoenixProject.Database.ConquerItemInformation.BaseInformations[item.ID]; PhoenixProject.Database.ConquerItemInformation infos = new PhoenixProject.Database.ConquerItemInformation(item.ID, item.Plus); switch (client.UpdateType) { case 1: case 2: { //Cost: 36 //Metscrolls: 4 byte cost = (byte)(itemdetail.Level / 5); byte scrolls = 0; bool useScrolls = false; byte extraScroll = 0; int addMets = 0; cost += (byte)((item.ID % 10) / 3); cost += (byte)(itemdetail.Level / 10); uint id = 1088001; if (client.UpdateType == 2) id++; foreach (IConquerItem scroll in client.Inventory.Objects) if (scroll.ID == 720027) scrolls++; if (cost % 10 != 0) { addMets = 10 - (cost % 10); extraScroll = 1; } if (scrolls >= (cost / 10) + extraScroll) useScrolls = true; if (client.Inventory.Contains(id, cost) || useScrolls) { //client.UnloadItemStats(item, false); if (client.UpdateType == 1) { PhoenixProject.Database.ConquerItemInformation infos2 = new PhoenixProject.Database.ConquerItemInformation(infos.CalculateUplevel(), item.Plus); if (infos2.BaseInformation.ID == infos.BaseInformation.ID) return; if (client.Entity.Level < infos2.BaseInformation.Level) { dialog.Text("You need level " + infos2.BaseInformation.Level + " first."); dialog.Option("Ahh sorry.", 255); dialog.Send(); client.SelectedItem = 0; client.UpdateType = 0; return; } uint kimo = item.ID + 10; byte itemType = (byte)(kimo / 10000); byte itemType2 = (byte)(item.ID / 10000); if (Database.ConquerItemInformation.BaseInformations.ContainsKey(kimo)) { if (useScrolls) { client.Inventory.Remove(720027, Convert.ToByte((cost / 10) + extraScroll)); client.Inventory.Add(1088001, 0, (byte)addMets); } else { client.Inventory.Remove(id, cost); } item.ID = (item.ID + 10); } else { dialog.Text("[Error],This " + Database.ConquerItemInformation.BaseInformations[item.ID].Name + " level cannot be upgraded anymore."); dialog.Option("Ahh sorry.", 255); dialog.Send(); return; } } PhoenixProject.Database.ConquerItemTable.UpdateItemID(item, client); item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); if (!client.AlternateEquipment) { client.LoadItemStats(client.Entity); } else { client.LoadItemStats2(client.Entity); } if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } } break; } case 3: { byte cost = (byte)(itemdetail.Level / 30); cost += (byte)((item.ID % 10) / 2); uint id = 1088000; if (client.Inventory.Remove(id, cost)) { client.Inventory.Remove(id, cost); //client.UnloadItemStats(item, false); if (item.ID % 10 < 5) item.ID += 5 - item.ID % 10; item.ID++; PhoenixProject.Database.ConquerItemTable.UpdateItemID(item, client); item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); if (!client.AlternateEquipment) { client.LoadItemStats(client.Entity); } else { client.LoadItemStats2(client.Entity); } if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } } break; } } break; } default: { if (npcRequest.OptionID == 255) break; client.SelectedItem = (byte)(npcRequest.OptionID % 10); client.UpdateType = (byte)(npcRequest.OptionID / 10); if (client.Equipment.Free(client.SelectedItem)) { dialog.Text("You have to be wearing the selected item."); dialog.Option("I'll just leave", 255); dialog.Send(); return; } var item = client.Equipment.TryGetItem(client.SelectedItem); var itemdetail = PhoenixProject.Database.ConquerItemInformation.BaseInformations[item.ID]; if (itemdetail == null) { dialog.Text("An error occured. Please relogin and try again."); dialog.Option("Ok.", 255); dialog.Send(); return; } switch (client.UpdateType) { case 1: case 2: { if (itemdetail.Level == PhoenixProject.Network.PacketHandler.ItemMaxLevel(client.SelectedItem) && client.UpdateType == 1) { dialog.Text("This item's level cannot be upgraded anymore."); dialog.Option("Ahh sorry.", 255); dialog.Send(); client.SelectedItem = 0; client.UpdateType = 0; return; } if (itemdetail.Level == PhoenixProject.Network.PacketHandler.ItemMinLevel(client.SelectedItem) && client.UpdateType == 2) { dialog.Text("This item's level cannot be downgraded anymore."); dialog.Option("Ahh sorry.", 255); dialog.Send(); client.SelectedItem = 0; client.UpdateType = 0; return; } byte cost = (byte)(itemdetail.Level / 5); cost += (byte)((item.ID % 10) / 3); cost += (byte)(itemdetail.Level / 10); dialog.Text("It will cost you " + cost + " meteor" + (client.UpdateType == 2 ? " tears" : "s") + ". Do you accept?"); dialog.Option("Yes.", 100); dialog.Option("No thank you.", 255); dialog.Send(); break; } case 3: { if (item.ID % 10 == 9) { dialog.Text("[Error],This " + Database.ConquerItemInformation.BaseInformations[item.ID].Name + " Quality cannot be upgraded anymore."); dialog.Option("Ahh sorry.", 255); dialog.Send(); client.SelectedItem = 0; client.UpdateType = 0; return; } byte cost = (byte)(itemdetail.Level / 30); cost += (byte)((item.ID % 10) / 2); dialog.Text("It will cost you " + cost + " dragonballs. Do you accept?"); dialog.Option("Yes.", 100); dialog.Option("No thank you.", 255); dialog.Send(); break; } } break; } } break; } #endregion #region Weapon Master case 7050: { switch (npcRequest.OptionID) { case 0: { dialog.Text("My brothers, Magic Artisan and Artisan Wind, both need meteors to upgrade, but I need only dragonballs."); dialog.Text("I upgrade item's level only and I want only one dragonball for my service."); dialog.Option("Upgrade Equipment Level.", 1); dialog.Option("Improve Equipment Quailty.", 3); dialog.Option("Upgrade Equipment with Mets.", 4); dialog.Option("RepairEquipment.", 5); dialog.Option("Lower Equipment Level.", 2); dialog.Option("I will come later.", 255); dialog.Send(); break; } case 5: { // int aut = npcRequest.OptionID * 10; dialog.Text("You cant Repair your Equipments at this time?"); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 3: { int aut = npcRequest.OptionID * 10; dialog.Text("Select which item's details you want to change?"); dialog.Option("Headgear.", (byte)(aut + 1)); dialog.Option("Necklace.", (byte)(aut + 2)); dialog.Option("Armor.", (byte)(aut + 3)); dialog.Option("Main Weapon.", (byte)(aut + 4)); dialog.Option("Left Weapon/Shield.", (byte)(aut + 5)); dialog.Option("Ring.", (byte)(aut + 6)); dialog.Option("Boots.", (byte)(aut + 8)); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 4: { int aut = npcRequest.OptionID * 10; dialog.Text("Select which item's details you want to change?"); dialog.Option("Headgear.", (byte)(aut + 1)); dialog.Option("Necklace.", (byte)(aut + 2)); dialog.Option("Armor.", (byte)(aut + 3)); dialog.Option("Main Weapon.", (byte)(aut + 4)); dialog.Option("Left Weapon/Shield.", (byte)(aut + 5)); dialog.Option("Ring.", (byte)(aut + 6)); dialog.Option("Boots.", (byte)(aut + 8)); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 200: { if (client.SelectedItem == 0) return; var item = client.Equipment.TryGetItem(client.SelectedItem); var itemdetail = PhoenixProject.Database.ConquerItemInformation.BaseInformations[item.ID]; PhoenixProject.Database.ConquerItemInformation infos = new PhoenixProject.Database.ConquerItemInformation(item.ID, item.Plus); switch (client.UpdateType) { case 1: case 2: { //Cost: 36 //Metscrolls: 4 byte cost = (byte)(itemdetail.Level / 5); byte scrolls = 0; bool useScrolls = false; byte extraScroll = 0; int addMets = 0; cost += (byte)((item.ID % 10) / 3); cost += (byte)(itemdetail.Level / 10); uint id = 1088001; if (client.UpdateType == 2) id++; foreach (IConquerItem scroll in client.Inventory.Objects) if (scroll.ID == 720027) scrolls++; if (cost % 10 != 0) { addMets = 10 - (cost % 10); extraScroll = 1; } if (scrolls >= (cost / 10) + extraScroll) useScrolls = true; if (client.Inventory.Contains(id, cost) || useScrolls) { //client.UnloadItemStats(item, false); if (client.UpdateType == 1) { PhoenixProject.Database.ConquerItemInformation infos2 = new PhoenixProject.Database.ConquerItemInformation(infos.CalculateUplevel(), item.Plus); if (infos2.BaseInformation.ID == infos.BaseInformation.ID) return; if (client.Entity.Level < infos2.BaseInformation.Level) { dialog.Text("You need level " + infos2.BaseInformation.Level + " first."); dialog.Option("Ahh sorry.", 255); dialog.Send(); client.SelectedItem = 0; client.UpdateType = 0; return; } uint kimo = item.ID + 10; byte itemType = (byte)(kimo / 10000); byte itemType2 = (byte)(item.ID / 10000); if (Database.ConquerItemInformation.BaseInformations.ContainsKey(kimo)) { if (useScrolls) { client.Inventory.Remove(720027, Convert.ToByte((cost / 10) + extraScroll)); client.Inventory.Add(1088001, 0, (byte)addMets); } else { client.Inventory.Remove(id, cost); } item.ID = (item.ID + 10); } else { dialog.Text("[Error],This " + Database.ConquerItemInformation.BaseInformations[item.ID].Name + " level cannot be upgraded anymore."); dialog.Option("Ahh sorry.", 255); dialog.Send(); return; } } PhoenixProject.Database.ConquerItemTable.UpdateItemID(item, client); item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); if (!client.AlternateEquipment) { client.LoadItemStats(client.Entity); } else { client.LoadItemStats2(client.Entity); } if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } } break; } case 3: { byte cost = (byte)(itemdetail.Level / 30); cost += (byte)((item.ID % 10) / 2); uint id = 1088000; if (client.Inventory.Remove(id, cost)) { client.Inventory.Remove(id, cost); //client.UnloadItemStats(item, false); if (item.ID % 10 < 5) item.ID += 5 - item.ID % 10; item.ID++; PhoenixProject.Database.ConquerItemTable.UpdateItemID(item, client); item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); if (!client.AlternateEquipment) { client.LoadItemStats(client.Entity); } else { client.LoadItemStats2(client.Entity); } if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } } break; } } break; } case 30: case 31: case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: { if (npcRequest.OptionID == 255) break; client.SelectedItem = (byte)(npcRequest.OptionID % 10); client.UpdateType = (byte)(npcRequest.OptionID / 10); if (client.Equipment.Free(client.SelectedItem)) { dialog.Text("You have to be wearing the selected item."); dialog.Option("I'll just leave", 255); dialog.Send(); return; } var item = client.Equipment.TryGetItem(client.SelectedItem); var itemdetail = PhoenixProject.Database.ConquerItemInformation.BaseInformations[item.ID]; if (itemdetail == null) { dialog.Text("An error occured. Please relogin and try again."); dialog.Option("Ok.", 255); dialog.Send(); return; } switch (client.UpdateType) { case 4: case 2: { if (itemdetail.Level == PhoenixProject.Network.PacketHandler.ItemMaxLevel(client.SelectedItem) && client.UpdateType == 1) { dialog.Text("This item's level cannot be upgraded anymore."); dialog.Option("Ahh sorry.", 255); dialog.Send(); client.SelectedItem = 0; client.UpdateType = 0; return; } if (itemdetail.Level == PhoenixProject.Network.PacketHandler.ItemMinLevel(client.SelectedItem) && client.UpdateType == 2) { dialog.Text("This item's level cannot be downgraded anymore."); dialog.Option("Ahh sorry.", 255); dialog.Send(); client.SelectedItem = 0; client.UpdateType = 0; return; } byte cost = (byte)(itemdetail.Level / 5); cost += (byte)((item.ID % 10) / 3); cost += (byte)(itemdetail.Level / 10); dialog.Text("It will cost you " + cost + " meteor" + (client.UpdateType == 2 ? " tears" : "s") + ". Do you accept?"); dialog.Option("Yes.", 200); dialog.Option("No thank you.", 255); dialog.Send(); break; } case 3: { if (item.ID % 10 == 9) { dialog.Text("[Error],This " + Database.ConquerItemInformation.BaseInformations[item.ID].Name + " Quality cannot be upgraded anymore."); dialog.Option("Ahh sorry.", 255); dialog.Send(); client.SelectedItem = 0; client.UpdateType = 0; return; } byte cost = (byte)(itemdetail.Level / 30); cost += (byte)((item.ID % 10) / 2); dialog.Text("It will cost you " + cost + " dragonballs. Do you accept?"); dialog.Option("Yes.", 200); dialog.Option("No thank you.", 255); dialog.Send(); break; } } break; } case 2: { client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = 506, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); break; } case 1: { int aut = npcRequest.OptionID * 10; dialog.Text("Select which item's details you want to change?"); dialog.Option("Headgear.", (byte)(aut + 1)); dialog.Option("Necklace.", (byte)(aut + 2)); dialog.Option("Armor.", (byte)(aut + 3)); dialog.Option("Main Weapon.", (byte)(aut + 4)); dialog.Option("Left Weapon/Shield.", (byte)(aut + 5)); dialog.Option("Ring.", (byte)(aut + 6)); dialog.Option("Boots.", (byte)(aut + 8)); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: { if (npcRequest.OptionID == 255) break; byte SelectedItem = (byte)(npcRequest.OptionID % 10); byte NowType = (byte)(npcRequest.OptionID / 10); if (client.Equipment.Free(SelectedItem)) { dialog.Text("You have to be wearing the selected item."); dialog.Option("I'll just leave", 255); dialog.Send(); return; } var item = client.Equipment.TryGetItem(SelectedItem); var itemdetail = PhoenixProject.Database.ConquerItemInformation.BaseInformations[item.ID]; if (NowType == 1) { dialog.Text("It will cost you one dragonball. Do you accept the Amount?"); dialog.Option("Yes.", (byte)(20 + SelectedItem)); dialog.Option("No thank you.", 255); dialog.Send(); } else { PhoenixProject.Database.ConquerItemInformation infos = new PhoenixProject.Database.ConquerItemInformation(item.ID, item.Plus); PhoenixProject.Database.ConquerItemInformation infos2 = new PhoenixProject.Database.ConquerItemInformation(infos.CalculateUplevel(), item.Plus); if (client.Entity.Level < infos2.BaseInformation.Level) { dialog.Text("You need level " + infos2.BaseInformation.Level + " first."); dialog.Option("Ahh sorry.", 255); dialog.Send(); client.SelectedItem = 0; client.UpdateType = 0; return; } if (client.Inventory.Contains(1088000, 1)) { //client.UnloadItemStats(item, false); uint kimo = item.ID + 10; uint kimo2 = item.ID + 20; uint kimo3 = item.ID + 30; byte itemType = (byte)(kimo / 10000); byte itemType2 = (byte)(item.ID / 10000); if (Database.ConquerItemInformation.BaseInformations.ContainsKey(kimo)) { item.ID = (item.ID + 10); } else { if (Database.ConquerItemInformation.BaseInformations.ContainsKey(kimo2)) { item.ID = (item.ID + 20); } else { if (Database.ConquerItemInformation.BaseInformations.ContainsKey(kimo3)) { item.ID = (item.ID + 30); } else { dialog.Text("[Error],This " + Database.ConquerItemInformation.BaseInformations[item.ID].Name + " level cannot be upgraded anymore."); dialog.Option("Ahh sorry.", 255); dialog.Send(); return; } } } //item.ID = infos.CalculateUplevel(); client.Inventory.Remove(1088000, 1); //item.ID = infos.CalculateUplevel(); PhoenixProject.Database.ConquerItemTable.UpdateItemID(item, client); item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); if (!client.AlternateEquipment) { client.LoadItemStats(client.Entity); } else { client.LoadItemStats2(client.Entity); } if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } } } } break; } break; } #endregion #region Proficiency God case 941: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello my friend. If you believe that, leveling your proficiency is too hard and takes too much time, I can help you. In exchange of a fixed amount of exp balls, I will agree to level up your proficiency."); dialog.Text("Now, tell me what proficiency you want to level up."); dialog.Option("One handed.", 1); dialog.Option("Two handed.", 3); dialog.Option("Other.", 5); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 1: { dialog.Text("Which one handed proficiency?"); dialog.Option("Blade.", 41); dialog.Option("Sword.", 42); dialog.Option("Hook.", 43); dialog.Option("Whip.", 44); dialog.Option("Axe.", 45); dialog.Option("Next page.", 2); dialog.Option("Nothing, sorry.", 255); dialog.Send(); break; } case 2: { dialog.Text("Which one handed proficiency?"); dialog.Option("PrayerBead.", 61); dialog.Option("Hammer.", 46); dialog.Option("Club.", 48); dialog.Option("Scepter.", 184); dialog.Option("Katana.", 60); dialog.Option("Axe.", 45); dialog.Option("Back.", 1); dialog.Option("Nothing, sorry.", 255); dialog.Send(); break; } case 3: { dialog.Text("Which two handed proficiency?"); dialog.Option("Backsword.", 124); dialog.Option("Glaive.", 51); dialog.Option("Poleaxe.", 53); dialog.Option("LongHammer.", 54); dialog.Option("Spear.", 56); dialog.Option("Next page.", 4); dialog.Option("Nothing, sorry.", 255); dialog.Send(); break; } case 4: { dialog.Text("Which one handed proficiency?"); dialog.Option("Pickaxe.", 142); dialog.Option("Halberd.", 58); dialog.Option("Wand.", 165); dialog.Option("Bow.", 50); dialog.Option("Back.", 3); dialog.Option("Nothing, sorry.", 255); dialog.Send(); break; } case 5: { dialog.Text("Which one handed proficiency?"); dialog.Option("Boxing.", 254); dialog.Option("Shield.", 90); dialog.Option("Nothing, sorry.", 255); dialog.Send(); break; } case 100: { if (client.Proficiencies.ContainsKey(client.UplevelProficiency)) { var prof = client.Proficiencies[client.UplevelProficiency]; if (prof.Level >= 12) { dialog.Text("This proficiency cannot be leveled up anymore."); dialog.Option("Oh.", 255); dialog.Send(); break; } client.UplevelProficiency = 0; if (client.Inventory.Contains(723700, prof.Level)) { client.Inventory.Remove(723700, prof.Level); prof.Level++; prof.Experience = 0; prof.Send(client); break; } dialog.Text("You don't have the requiered exp balls, I'm sorry I cannot help you."); dialog.Option("It's alright.", 255); dialog.Send(); break; } else { dialog.Text("You don't know this proficiency."); dialog.Option("Ahh, sorry.", 255); dialog.Send(); break; } } default: { if (npcRequest.OptionID == 255) return; ushort proficiency = 0; if (npcRequest.OptionID < 100) proficiency = (ushort)(npcRequest.OptionID * 10); else { if (npcRequest.OptionID != 254) { string off = npcRequest.OptionID.ToString(); string reverse = off[2].ToString() + off[1].ToString() + off[0].ToString(); proficiency = ushort.Parse(reverse); } } if (proficiency == 600) proficiency++; if (client.Proficiencies.ContainsKey(proficiency)) { var prof = client.Proficiencies[proficiency]; if (prof.Level >= 12) { dialog.Text("This proficiency cannot be leveled up anymore."); dialog.Option("Oh.", 255); dialog.Send(); break; } client.UplevelProficiency = proficiency; dialog.Text("I need " + prof.Level + " exp balls to be able to level up this proficiency."); dialog.Option("Let's do it then.", 100); dialog.Option("No, sorry.", 255); dialog.Send(); break; } else { dialog.Text("You don't know this proficiency."); dialog.Option("Ahh, sorry.", 255); dialog.Send(); break; } } } break; } #endregion #region CPAdmin case 111816: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Greetings, here you can exchange either a Dragonball or a DragonScroll for cps. "); dialog.Text("One Dragonball will get you 215 cps and a DragonScroll will get you 2150. "); dialog.Text("What would you like to trade? Or would you rather not?"); dialog.Option("Dragonball", 1); dialog.Option("DragonballScroll", 2); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(1088000, 1)) { client.Inventory.Remove(1088000, 1); client.Entity.ConquerPoints += 215; } else { dialog.Text("You do not have a Dragonball"); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(720028, 1)) { client.Inventory.Remove(720028, 1); client.Entity.ConquerPoints += 2150; } else { dialog.Text("You do not have a DragonballScroll"); dialog.Send(); } break; } } break; } #endregion #region SurgeonMiracle case 3381: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Do you want to have your size changed so that you can become much more"); dialog.Text(" adorable? Now here is a precious chance for you."); dialog.Option("I want to change my size.", 1); //dialog.Option("I want to change my gender.", 2); dialog.Option("I don't want to change.", 255); dialog.Send(); break; } case 1: { dialog.Text("If you pay me one DragonBall, I can have your size changed. You will become"); dialog.Text("more attractive and start a fresh life. By the way, to avoid some unexpected"); dialog.Text("things, make sure you are not in any disguise form."); dialog.Option("Here is a DragonBall.", 3); dialog.Option("I have no DragonBall.", 255); dialog.Send(); break; } case 2: { dialog.Text("If you pay me one DragonBall, I can have your gender changed. You will become"); dialog.Text("more attractive and start a fresh life. By the way, to avoid some unexpected"); dialog.Text("things, make sure you are not in any disguise form."); dialog.Option("Here is a DragonBall.", 4); dialog.Option("I have no DragonBall.", 255); dialog.Send(); break; } case 3: { if (client.Inventory.Contains(1088000, 1)) { int Model = (int)client.Entity.Body % 10; switch (Model) { case 2: case 4: client.Entity.Body--; break; case 1: case 3: client.Entity.Body++; break; } client.Inventory.Remove(1088000, 1); break; } else { dialog.Text("Sorry, there is no DragonBall in your inventory. I can't have your size changed."); dialog.Option("Ok, Sorry.", 255); dialog.Send(); } break; } case 4: { if (client.Inventory.Contains(1088000, 1)) { int Model = (int)client.Entity.Body % 10; switch (Model) { case 3: case 4: client.Entity.Body -= 2; break; case 1: case 2: client.Entity.Body += 2; break; } client.Send(new Message("Your gender has been changed.", System.Drawing.Color.BurlyWood, Message.TopLeft)); client.Inventory.Remove(1088000, 1); break; } else { dialog.Text("Sorry, there is no DragonBall in your inventory. I can't have your size changed."); dialog.Option("Ok, Sorry.", 255); dialog.Send(); } } break; } break; } #endregion #region Mark. Controler case 45: //Mark. Controler { switch (npcRequest.OptionID) { case 0: { dialog.Text("If you want to leave just tell me when you are ready. It's free.\nYou will be teleported to the city you were in before coming here."); dialog.Option("I'm ready.", 1); dialog.Option("Wait a minute.", 255); dialog.Send(); break; } case 1: { ulong PrevMap = client.Entity.PreviousMapID; switch (PrevMap) { default: { client.Entity.Teleport(1002, 429, 378); break; } case 1000: { client.Entity.Teleport(1000, 500, 650); break; } case 1020: { client.Entity.Teleport(1020, 565, 562); break; } case 1011: { client.Entity.Teleport(1011, 188, 264); break; } case 1015: { client.Entity.Teleport(1015, 717, 571); break; } } break; } } break; } #endregion #region Enchanter and composer case 35016: { switch (npcRequest.OptionID) { case 0: { dialog.Text("I can improve the enchant of an item and I can also improve the plus of an item. Please let me know how can I help you."); dialog.Option("Compose.", 1); dialog.Option("Enchant.", 2); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 1: { Data data = new Data(true); data.ID = Data.OpenWindow; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = Data.WindowCommands.Compose; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); break; } case 2: { Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = Data.CustomCommands.Enchant; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); break; } } break; } #endregion #region Bless case 35015: { switch (npcRequest.OptionID) { case 0: client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = Data.WindowCommands.Blessing, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); break; } break; } #endregion #region BlacksmithLee case 1550: { switch (npcRequest.OptionID) { case 0: client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = Data.WindowCommands.OpenSockets, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); break; } break; } #endregion #region UnknownMan case 3825: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello stranger. My mother tough me not to talk with strangers but I feel like I can talk with you. There is something special to you. Since I feel like I can trust you I can make you a service. If your level is below 110, I will give you a lot of exp in exchange of one DragonBall, but if your level is above or equal to 110 I will demand two DragonBalls. If your level is higher than 135, well then, I can't help you. If you are interested in my proposition and if you have DragonBalls, please let me know."); dialog.Option("Yes I do.", 1); dialog.Option("No, not really.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Level >= 135) { dialog.Text("I am sorry, your level is too high. I simply can't help you."); dialog.Option("Sorry.", 255); dialog.Send(); break; } if (DateTime.Now.DayOfYear != client.LastDragonBallUse.DayOfYear) { byte needTimes = 1; ulong exp_reward = 13901336;//default for level 50 or lower #region exp reward switch byte level = client.Entity.Level; if (level > 50 && level < 63) exp_reward = 27152909; if (level >= 63 && level < 69) exp_reward = 28860143; if (level >= 69 && level < 74) exp_reward = 36822370; if (level >= 74 && level < 79) exp_reward = 57533091; if (level >= 79 && level < 87) exp_reward = 70404048; if (level >= 87 && level < 90) exp_reward = 84097242; if (level >= 90 && level < 93) exp_reward = 102959118; if (level >= 93 && level < 96) exp_reward = 134266326; if (level >= 96 && level < 98) exp_reward = 100801220; if (level >= 98 && level <= 100) exp_reward = 214351925; if (level > 100) { switch (level) { case 101: exp_reward = 242910783; break; case 102: exp_reward = 286050512; break; case 103: exp_reward = 259627544; break; case 104: exp_reward = 232767237; break; case 105: exp_reward = 241888762; break; case 106: exp_reward = 249478280; break; case 107: exp_reward = 265126887; break; case 108: exp_reward = 187446887; break; case 109: exp_reward = 193715970; break; case 110: exp_reward = 204416075; break; case 111: exp_reward = 227337342; break; case 112: exp_reward = 230562942; break; case 113: exp_reward = 234594942; break; case 114: exp_reward = 238626942; break; case 115: exp_reward = 240239742; break; case 116: exp_reward = 242658942; break; case 117: exp_reward = 246690942; break; case 118: exp_reward = 290290023; break; case 119: exp_reward = 358712493; break; case 120: exp_reward = 282274058; break; case 121: exp_reward = 338728870; break; case 122: exp_reward = 243884786; break; case 123: exp_reward = 292661743; break; case 124: exp_reward = 322122547; break; case 125: exp_reward = 292661744; break; case 126: exp_reward = 351194092; break; case 127: exp_reward = 337146328; break; case 128: exp_reward = 303431696; break; case 129: exp_reward = 322122547; break; } } #endregion if (client.Entity.Level >= 110) { needTimes = 2; } if (client.Entity.Level >= 130) { needTimes += 8; } if (client.Entity.Level >= 135) { dialog.Text("I can't help you anymore, you're too high leveled!"); dialog.Option("I see, Thanks!", 255); break; } if (client.Inventory.Contains(1088000, needTimes)) { client.Inventory.Remove(1088000, needTimes); client.IncreaseExperience(exp_reward, false); client.LastDragonBallUse = DateTime.Now; dialog.Text("Congratulations! You've received a lot of experience from me today, enjoy!"); dialog.Text("I'll see you only tomorrow now."); dialog.Option("I see, Thanks!", 255); break; } else { dialog.Text("I am sorry, but obviously you want to scam me out because you don't have the amount of required DragonBalls."); dialog.Option("Sorry.", 255); dialog.Send(); break; } } else { dialog.Text("I am sorry, but I remeber that I gave you this opportunity already today. I can't do it more than once per day so I'm afraid I have to tell you good bye until tomorrow."); dialog.Option("Alright.", 255); dialog.Send(); break; } } } break; } #endregion #region LoveStone case 390: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello mate, how do you do? Listen, There are not many people that can make a marriage last, but I can sense that you are one of them, if you want to marry someone just let me know. Also, if you are heavenly blessed I can give you one hour of double exp each day."); dialog.Option("Yes, I want to marry someone.", 1); dialog.Option("I need double exp.", 2); dialog.Option("Nothing thank you.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Spouse == "None") { dialog.Text("Here, click on the player you want to be your spouse."); dialog.Option("Thank you.", 255); dialog.Send(); Data data = new Data(true); data.UID = client.Entity.UID; data.ID = Data.OpenCustom; data.dwParam = Data.CustomCommands.FlowerPointer; client.Send(data); } else { dialog.Text("You are already married. If you want to broke the marriage, you have to go to StarLit. He'll handle your request."); dialog.Option("Alright that's what I'll do.", 255); dialog.Send(); } break; } case 2: { if (client.Entity.HeavenBlessing > 0) { if (!client.DoubleExpToday) { dialog.Text("Here. Come back tomorrow for more."); dialog.Option("Alright that's what I'll do.", 255); dialog.Send(); client.Entity.DoubleExperienceTime = 3600; client.DoubleExpToday = true; } else { dialog.Text("You already took your double exp today. Come back tomorrow."); dialog.Option("Alright that's what I'll do.", 255); dialog.Send(); } } else { dialog.Text("You cannot take double exp because you are not heavenly blessed."); dialog.Option("Alright.", 255); dialog.Send(); } break; } } break; } #endregion #region Eternity case 300500: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello conqueror. You know, there are ancient stories about a second life and many people chose not to believe it. Even so, there are some people that believe in it, and that inspired me to learn about it. In my study, I found out how to reborn someone. But, in this quest, a CelestialStone may be needed. To get one, talk with Celestine(TwinCity 365, 92)."); dialog.Option("Tell me more about it.", 1); dialog.Option("Reborm me.", 2); dialog.Option("Nothing thank you.", 255); dialog.Send(); break; } case 1: { dialog.Text("So you want to know more? When you reborn, you can chose what class you want to be the second life. Once you reborn you will start again the journey to conquer this world from level 15. Beware that you may gain some special skills depending on the class you chose to reborn, and you'll be able to get an own pet, that will follow and help you level or fight. The cost is a CelestialStone."); dialog.Option("Reborm me.", 2); dialog.Option("Nothing thank you.", 255); dialog.Send(); break; } case 2: { if (client.Entity.Reborn == 0) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { dialog.Text("There are two kinds of reborns. One is the normal one and the second one is blessed. The normal reborn will give you the chance to get a Super Gem and the blessed reborn will set a -1 into one of your equipment that you wear during the reborn. What do you chose?"); dialog.Option("Normal reborn.", 5); dialog.Option("Blessed reborn.", 3); dialog.Option("Nothing thank you.", 255); dialog.Send(); } else { dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters."); dialog.Option("Ahh.", 255); dialog.Send(); } } else { dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life."); dialog.Option("Thank you.", 255); dialog.Send(); } break; } case 5: { if (client.Entity.Reborn == 0) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { dialog.Text("Select the super gem you desire."); dialog.Option("SuperPhoenixGem.", 203); dialog.Option("SuperDragonGem.", 213); dialog.Option("SuperFuryGem.", 223); dialog.Option("SuperRainbowGem.", 233); dialog.Option("SuperVioletGem.", 253); dialog.Option("SuperMoonGem.", 254); dialog.Option("SuperKylinGem.", 243); dialog.Option("Nothing thank you.", 255); dialog.Send(); } else { dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } else { dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life."); dialog.Option("Thank you.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.Reborn == 0) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { dialog.Text("Select the class you want to reborn in."); dialog.Option("Trojan.", (byte)(10 + npcRequest.OptionID)); dialog.Option("Warrior.", (byte)(20 + npcRequest.OptionID)); dialog.Option("Archer.", (byte)(40 + npcRequest.OptionID)); dialog.Option("WaterTaoist.", (byte)(132 + npcRequest.OptionID)); dialog.Option("FireTaoist.", (byte)(142 + npcRequest.OptionID)); dialog.Option("Ninja.", (byte)(50 + npcRequest.OptionID)); dialog.Option("Monk.", (byte)(60 + npcRequest.OptionID)); dialog.Option("Pirate.", (byte)(70 + npcRequest.OptionID)); //dialog.Option("Nothing thank you.", 255); dialog.Send(); } else { dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } else { dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life."); dialog.Option("Thank you.", 255); dialog.Send(); } break; } default: { if (client.Entity.Reborn == 0) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { if (npcRequest.OptionID == 255) return; if (npcRequest.OptionID >= 200 && npcRequest.OptionID <= 254) { client.SelectedGem = (byte)(npcRequest.OptionID % 100); if (client.SelectedGem == 54) client.SelectedGem = 63; if (client.Entity.Reborn == 0) { byte id = 4; dialog.Text("Select the class you want to reborn in."); dialog.Option("Trojan.", (byte)(10 + id)); dialog.Option("Warrior.", (byte)(20 + id)); dialog.Option("Archer.", (byte)(40 + id)); dialog.Option("WaterTaoist.", (byte)(132 + id)); dialog.Option("FireTaoist.", (byte)(142 + id)); dialog.Option("Ninja.", (byte)(50 + id)); dialog.Option("Monk.", (byte)(60 + id)); dialog.Option("Pirate.", (byte)(70 + id)); //dialog.Option("Nothing thank you.", 255); dialog.Send(); break; } else { dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life."); dialog.Option("Thank you.", 255); dialog.Send(); } } else { if (client.Inventory.Contains(721259, 1)) { byte _class = (byte)(npcRequest.OptionID - npcRequest.OptionID % 10); if (_class > 100) _class += 2; byte type = (byte)(npcRequest.OptionID - _class); if (_class < 100) _class++; if (client.Reborn(_class)) { client.Inventory.Remove(721259, 1); if (type == 4) { if (client.SelectedGem != 0) { uint gemid = (uint)(client.SelectedGem + 700000); client.Inventory.Add(gemid, 0, 1); } } else { int availableshots = 0; for (byte count = 0; count < 12; count++) if (!client.Equipment.Free(count)) if (client.Equipment.TryGetItem(count).Bless == 0) availableshots++; if (availableshots != 0) { byte ex = (byte)PhoenixProject.ServerBase.Kernel.Random.Next(12); if (!client.Equipment.Free(ex)) if (client.Equipment.TryGetItem(ex).Bless == 0) { var item = client.Equipment.TryGetItem(ex); item.Bless = 1; item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); PhoenixProject.Database.ConquerItemTable.UpdateBless(item); } } } } else { dialog.Text("Sorry, but you need atleast 2 free spaces in your inventory."); dialog.Option("Ohh.", 255); dialog.Send(); } } } } else { dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters."); dialog.Option("Ahh.", 255); dialog.Send(); } } else { dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life."); dialog.Option("Thank you.", 255); dialog.Send(); } break; } } break; } #endregion #region MillionaireLee case 5004: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey you! Yeah, it's you I am talking about. I've got a great deal that you cannot leave without taking it. I will give you one meteorscroll for ten meteors and one dragonballscroll for ten dragonballs. With those scrolls you can have more than fourty meteors or dragonballs in your inventory at once!"); dialog.Option("Pack +1 Stones.", 3); dialog.Option("Pack +2 Stones.", 4); dialog.Option("Pack +3 Stones.", 5); dialog.Option("Pack Normal Gems.", 6); dialog.Option("Pack EXP Balls for me!", 7); dialog.Option("pack meteors.", 1); dialog.Option("pack dragonballs", 2); dialog.Option("I am poor and do not have the problem.", 255); dialog.Send(); break; } case 7: { //720757 EXPBallPack //723712 +1StonePack //730001 +1Stone //729022 +2StonePack //729023 +3StonePack if (client.Inventory.Contains(723700, 10)) { client.Inventory.Remove(723700, 10); client.Inventory.Add(720757, 0, 1); } else { dialog.Text("You poor man! I can't help you, you dont have 10 ExpBalls."); dialog.Option("Sorry!", 255); dialog.Send(); } break; } case 5: { //723712 +1StonePack //730001 +1Stone //729022 +2StonePack //729023 +3StonePack if (client.Inventory.Contains(730003, 10)) { client.Inventory.Remove(730003, 10); client.Inventory.Add(729023, 0, 1); } else { dialog.Text("You poor man! I can't help you, you dont have 10 +3 Stones."); dialog.Option("Sorry!", 255); dialog.Send(); } break; } case 4: { //723712 +1StonePack //730001 +1Stone //729022 +2StonePack if (client.Inventory.Contains(730002, 10)) { client.Inventory.Remove(730002, 10); client.Inventory.Add(729022, 0, 1); } else { dialog.Text("You poor man! I can't help you, you dont have 10 +2 Stones."); dialog.Option("Sorry!", 255); dialog.Send(); } break; } case 3: { //723712 +1StonePack //730001 +1Stone if (client.Inventory.Contains(730001, 5)) { client.Inventory.Remove(730001, 5); client.Inventory.Add(723712, 0, 1); } else { dialog.Text("You poor man! I can't help you, you dont have 5 +1 Stone."); dialog.Option("Sorry!", 255); dialog.Send(); } break; } case 1: { if (client.Inventory.Contains(1088001, 10)) { client.Inventory.Remove(1088001, 10); client.Inventory.Add(720027, 0, 1); } else { dialog.Text("You poor man! I can't help you."); dialog.Option("Why!?", 255); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(1088000, 10)) { client.Inventory.Remove(1088000, 10); client.Inventory.Add(720028, 0, 1); } else { dialog.Text("You poor man! I can't help you."); dialog.Option("Why!?", 255); dialog.Send(); } break; } } break; } #endregion #region Granny case 699: { switch (npcRequest.OptionID) { case 0: { dialog.Text("These youngsters forget to increase the durabuility when they upgrade your items. "); dialog.Text("I can take your SuperKylinGems and try to increase your item's max durabuility. "); dialog.Text("It's possible that the item could be completely repaired too. How many will you try with?"); dialog.Input("Enter:", 1, 2); dialog.Option("Not now.", 255); dialog.Send(); break; } case 1: { byte Kylins = 0; if (!Byte.TryParse(npcRequest.Input, out Kylins)) {// Input doesn't contain numbers only. dialog.Text("Tell me, how am I supposed to get your durability higher if you can't give me a number 1 through 40?"); dialog.Option("Oops!", 0); dialog.Send(); break; } if (Kylins != 0 && Kylins <= 40) { if (client.Inventory.Contains(700043, Kylins)) { client.KylinUpgradeCount = Kylins; dialog.Text("Which item do you want to upgrade?"); dialog.Option("Headgear.", 101); dialog.Option("Necklace.", 102); dialog.Option("Armor.", 103); dialog.Option("Main Weapon.", 104); dialog.Option("Left Weapon.", 105); dialog.Option("Ring.", 106); dialog.Option("Next Page.", 2); dialog.Option("I'll just leave", 255); dialog.Send(); } else { dialog.Text("You don't have that many SuperKylinGems..."); dialog.Option("Oops...", 255); dialog.Send(); break; } } break; } case 2: { if (client.Inventory.Contains(700043, client.KylinUpgradeCount)) { dialog.Text("Which item do you want to upgrade?"); dialog.Option("Boots.", 108); dialog.Option("Fan.", 110); dialog.Option("Tower.", 111); dialog.Option("I'll just leave", 255); dialog.Send(); } break; } case 101: case 102: case 103: case 104: case 105: case 106: case 108: case 110: case 111: { if (client.KylinUpgradeCount != 0 && client.KylinUpgradeCount <= 40) { if (client.Inventory.Contains(700043, client.KylinUpgradeCount)) { var item = client.Equipment.TryGetItem((byte)(npcRequest.OptionID - 100)); if (item != null) { #region old /*if (item.Durability == item.MaximDurability) { var itemdetail = PhoenixProject.Database.ConquerItemInformation.BaseInformations[item.ID]; if (itemdetail.Durability != item.MaximDurability) { int diff = itemdetail.Durability - item.MaximDurability; int need = Math.Max((diff / 100) / 6, 1); need = Math.Min(need, client.KylinUpgradeCount); for (int counter = 0; counter < need; counter++) { item.MaximDurability += 100; client.Inventory.Remove(700043, 1); } if (item.MaximDurability > itemdetail.Durability) item.MaximDurability = itemdetail.Durability; item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); } } else { dialog.Text("Your item must be repaired first."); dialog.Option("Oh, sorry.", 255); dialog.Send(); break; }*/ #endregion #region test var itemdetail = PhoenixProject.Database.ConquerItemInformation.BaseInformations[item.ID]; if (itemdetail.Durability != item.MaximDurability) { ushort oldDurability = item.MaximDurability; bool Upgraded = false; while (client.KylinUpgradeCount != 0) { client.Inventory.Remove(700043, 1); client.KylinUpgradeCount -= 1; int rndDurability = (PhoenixProject.ServerBase.Kernel.Random.Next(itemdetail.Durability)); if (rndDurability >= item.MaximDurability) { //This looks ugly to me, not sure how else to do it. item.MaximDurability = ushort.Parse(rndDurability.ToString()); rndDurability = 0; if (!Upgraded) Upgraded = true; } } if (Upgraded) dialog.Text("Your item's durabuility was increased from " + oldDurability + " to " + item.MaximDurability + ".\n"); else dialog.Text("I wasen't able to increase your item's durability..\n"); int Repair = (PhoenixProject.ServerBase.Kernel.Random.Next(3)); if (Repair == 1) { if (Upgraded) dialog.Text("I was also able to repair the item."); else { dialog.Text("But I was able to repair the item."); Upgraded = true; } item.Durability = item.MaximDurability; } item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); if (Upgraded) dialog.Option("Thanks.", 255); else dialog.Option("Darn..", 255); dialog.Send(); break; } else { dialog.Text("This item is already at it's max durabuility!"); dialog.Option("Oh.", 255); dialog.Send(); break; } #endregion } } else { dialog.Text("Wahh, What is this? I may be forgetful but I'm sure you told me you would give me " + client.KylinUpgradeCount.ToString() + " SuperKylinGems!\n\n I don't see that you have this many.."); dialog.Option("Lets try again.", 0); dialog.Option("Nevermind.", 255); dialog.Send(); break; } } break; } } break; } #endregion #region Confiscator case 4450: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Have you ever arrested anyone? Or ... don't tell me, you have been arrested by anyone? If so, there is a chance that some gear was detained."); dialog.Option("I want to check my detained gear.", 1); dialog.Option("I want to check my claimable gear.", 2); dialog.Option("Thank you.", 255); dialog.Send(); break; } case 1: { client.Send(new Data(true) { ID = Data.OpenWindow, dwParam = Data.WindowCommands.DetainRedeem, UID = client.Entity.UID }); break; } case 2: { client.Send(new Data(true) { ID = Data.OpenWindow, dwParam = Data.WindowCommands.DetainClaim, UID = client.Entity.UID }); break; } } break; } #endregion #region PurificationStabilizer case 7763: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Have you ever heard of the ruthless Terato Dragon? It cuts open every single conqueror that wants to take his prize. His prize are items that purify your items. His affiliates, sub-kings of monsters, also drop items like that. If you have such an item, I can purify your gear with it."); dialog.Text("Once purified, the item must be stabilized, otherwise the purity will dissapear after several days. If you want to stabilize your items, come to me I'll see what I can do."); dialog.Option("Purify my item.", 1); dialog.Option("Stabilize my item.", 2); dialog.Option("Nevermind.", 255); dialog.Send(); break; } case 1: { INpc npc = null; if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npc)) { Data data = new Data(true); data.ID = Data.OpenWindow; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 455; data.wParam1 = npc.X; data.wParam2 = npc.Y; client.Send(data); } break; } case 2: { INpc npc = null; if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npc)) { Data data = new Data(true); data.ID = Data.OpenWindow; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now;//done data.dwParam = 459; data.wParam1 = npc.X; data.wParam2 = npc.Y; client.Send(data); } break; } } break; } #endregion #region Poker case 27838: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello im Poker admin ,do you want to join Poker!!"); dialog.Option("Vip Room.", 1); //dialog.Option("Vip Room!", 2); dialog.Option("Just Passing By.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(8881, 55, 62); break; } } break; } #endregion #region Mobs1 case 269860: //Mobs1 npc { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. I can teleport you Amazing zone which you can find ThrillingSpook it drop good Items it coast 100 cps ."); dialog.Option("Teleport me.", 1); dialog.Option("I'm standing by.", 255); dialog.Send(); break; } case 1: { if (client.Entity.ConquerPoints >= 100) { client.Entity.ConquerPoints -= 100; client.Entity.Teleport(8892, 29, 26); } else { dialog.Text("You need 100 cps to be able to Teleport To ThrillingSpook."); dialog.Option("Alright.", 255); } break; } } break; } #endregion #region StarLit case 600055: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello mate, how do you do? Listen, i can help you to Divcore your Spouse Just you must agree First."); dialog.Option("Yes,Divcore me.", 1); dialog.Option("Nothing thank you.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Spouse == "None") { dialog.Text("Sorry, you not married i cant help you ^^."); dialog.Option("Thank you.", 255); dialog.Send(); } else { dialog.Text("You are Free Now.Hope you will find the Good Person for you."); dialog.Option("Alright that's what I'll do.", 255); dialog.Send(); client.Entity.Spouse = "None"; } break; } } break; } #endregion #region CollecterZhao case 2070: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello mate, i can help you to change Amulets and LifeFruitBasket for 10 cps what you have?."); dialog.Option("LifeFruitBasket", 1); dialog.Option("PenitenceAmulet.", 2); dialog.Option("DisguiseAmulet.", 3); dialog.Option("Nothing thank you.", 255); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(723725, 1)) { client.Inventory.Remove(723725, 1); client.Entity.ConquerPoints += 10; } else { dialog.Text("Sorry you dont Have Any LifeFruitBaskets."); dialog.Option("Alright Thanks", 255); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(723727, 1)) { client.Inventory.Remove(723727, 1); client.Entity.ConquerPoints += 10; } else { dialog.Text("Sorry you dont Have Any PenitenceAmulet."); dialog.Option("Alright Thanks", 255); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(723724, 1)) { client.Inventory.Remove(723724, 1); client.Entity.ConquerPoints += 10; } else { dialog.Text("Sorry you dont Have Any DisguiseAmulet."); dialog.Option("Alright Thanks.", 255); dialog.Send(); } break; } } break; } #endregion #endregion } break; } #endregion #region Guild war case 1038: { switch (client.ActiveNpc) { #region Pole case 810: { dialog.Text("Please, don't hurt me!."); dialog.Option("Sorry.", 255); dialog.Send(); break; } #endregion #region ClaimGuildPrize case 4482114: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. Do you want to Claim GuildWar Prize you can only Claim it 1 Time if you won GW."); dialog.Option("Leme Claim.", 1); dialog.Option("Claim TopDeputyLeader.", 3); dialog.Option("Just Passing By!", 255); dialog.Send(); break; } case 1: { if (client.Guild != null) { if (client.Guild.PoleKeeper && client.Guild != null && client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { dialog.Text("Are you sure you want to Claim your Prize?"); dialog.Option("Yes.", 2); dialog.Option("Ah, nevermind.", 255); dialog.Send(); } else { dialog.Text("Sorry only GuildLeader of the Winner Guild can Claim The Prize After GuildWar End."); dialog.Option("Ahh.", 255); dialog.Send(); } } else { dialog.Text("Sorry You are not Member in any guild yet"); dialog.Option("Ahh.", 255); dialog.Send(); } break; } case 2: { if (DateTime.Now.Hour >= Game.KimoEvents.GWEEndHour && DateTime.Now.Hour < (Game.KimoEvents.GWEEndHour + 1) && DateTime.Now.DayOfWeek == DayOfWeek.Sunday && client.Guild.PoleKeeper && client.Guild != null && client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader && ClassPk.TopGlClaim == 0) { client.Entity.ConquerPoints += PhoenixProject.Database.rates.GuildWar; ClassPk.AddGl(); client.Inventory.Add(723467, 0, 1); Game.Flags.AddGuildLeader(client); client.Entity.AddFlag(Update.Flags.TopGuildLeader); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " Leader of " + client.Guild.PoleKeeper + " The winner guild has Claimed Guild War Prize " + PhoenixProject.Database.rates.GuildWar + " cps and LordToken!", System.Drawing.Color.White, Message.TopLeft), PhoenixProject.ServerBase.Kernel.GamePool.Values); } else { dialog.Text("Sorry you dont have Any Prize to claim only GL of the winner guild can claim Prize After GW"); dialog.Option("Ahh.", 255); dialog.Send(); } break; } case 3: { if (client.Guild != null) { if (client.Guild.PoleKeeper && client.Guild != null && client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) { dialog.Text("Are you sure you want to Claim your Prize?"); dialog.Option("Yes.", 4); dialog.Option("Ah, nevermind.", 255); dialog.Send(); } else { dialog.Text("Sorry only DeputyLeader of the Winner Guild can Claim The Prize After GuildWar End."); dialog.Option("Ahh.", 255); dialog.Send(); } } else { dialog.Text("Sorry You are not Member in any guild yet"); dialog.Option("Ahh.", 255); dialog.Send(); } break; } case 4: { if (!client.Entity.ContainsFlag(Update.Flags.TopDeputyLeader)) { if (DateTime.Now.Hour >= Game.KimoEvents.GWEEndHour && DateTime.Now.Hour < (Game.KimoEvents.GWEEndHour + 1) && DateTime.Now.DayOfWeek == DayOfWeek.Sunday && client.Guild.PoleKeeper && client.Guild != null && client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader && ClassPk.TopDlClaim < 5) { ClassPk.AddDl(); client.Entity.AddFlag(Update.Flags.TopDeputyLeader); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " From " + client.Guild.PoleKeeper + " Has Claimed TopDeputyLeader Halo!", System.Drawing.Color.White, Message.TopLeft), PhoenixProject.ServerBase.Kernel.GamePool.Values); if (ClassPk.TopDlClaim == 1) { Game.Flags.AddGuildDeaputy(client); } if (ClassPk.TopDlClaim == 2) { Game.Flags.AddGuildDeaputy2(client); } if (ClassPk.TopDlClaim == 3) { Game.Flags.AddGuildDeaputy3(client); } if (ClassPk.TopDlClaim == 4) { Game.Flags.AddGuildDeaputy4(client); } if (ClassPk.TopDlClaim == 5) { Game.Flags.AddGuildDeaputy5(client); } } else { dialog.Text("Sorry you dont have Any Prize to claim only Dl of the Winner Guild Can claim the halo After GW end."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } else { dialog.Text("Sorry you already have top DeaputyLeader come next time ;)."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } } break; } #endregion #region Gates case 516074: { if (client.Guild != null) { if (client.Guild.PoleKeeper) { switch (npcRequest.OptionID) { case 0: dialog.Text("Select the option you want to pursue."); if (client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader || client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) { dialog.Option("Open gate.", 1); dialog.Option("Close gate.", 2); } dialog.Option("Get inside.", 3); dialog.Option("Nothing.", 255); dialog.Send(); break; case 1: { PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh = (ushort)(250 + PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh % 10); Update upd = new Update(true); upd.UID = PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.UID; upd.Append(Update.Mesh, PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh); client.SendScreen(upd, true); break; } case 2: { PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh = (ushort)(240 + PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh % 10); Update upd = new Update(true); upd.UID = PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.UID; upd.Append(Update.Mesh, PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh); client.SendScreen(upd, true); break; } case 3: { client.Entity.Teleport(1038, 162, 198); break; } } } } break; } case 516075: { if (client.Guild != null) { if (client.Guild.PoleKeeper) { switch (npcRequest.OptionID) { case 0: dialog.Text("Select the option you want to pursue."); if (client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader || client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.DeputyLeader) { dialog.Option("Open gate.", 1); dialog.Option("Close gate.", 2); } dialog.Option("Get inside.", 3); dialog.Option("Nothing.", 255); dialog.Send(); break; case 1: { PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh = (ushort)(280 + PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh % 10); Update upd = new Update(true); upd.UID = PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.UID; upd.Append(Update.Mesh, PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh); client.SendScreen(upd, true); break; } case 2: { PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh = (ushort)(270 + PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh % 10); Update upd = new Update(true); upd.UID = PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.UID; upd.Append(Update.Mesh, PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh); client.SendScreen(upd, true); break; } case 3: { client.Entity.Teleport(1038, 210, 177); break; } } } } break; } #endregion #region Guild Conductresses #region Exit Guild Arena case 7000: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Do you want to leave the guild arena?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1002, 429, 378); break; } } break; } #endregion #endregion #region Guild Conductors #region IN case 9884: case 9885: { switch (npcRequest.OptionID) { case 0: { dialog.Text("In exchange of a fee of 1000gold, I will teleport you to a special place. If you don't have money, don't bother me."); dialog.Option("Teleport me.", 1); dialog.Option("I'm too poor.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 1000) { client.Entity.Money -= 1000; switch (client.ActiveNpc) { case 9884: client.Entity.Teleport(1216, 12, 481); break; case 9885: client.Entity.Teleport(1015, 792, 573); break; } } break; } } break; } #endregion #endregion #region Guild Conductors2 #region IN case 9886: case 9887: { switch (npcRequest.OptionID) { case 0: { dialog.Text("In exchange of a fee of 1000gold, I will teleport you to a special place. If you don't have money, don't bother me."); dialog.Option("Teleport me.", 1); dialog.Option("I'm too poor.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 1000) { client.Entity.Money -= 1000; switch (client.ActiveNpc) { case 9886: client.Entity.Teleport(1217, 536, 558); break; case 9887: client.Entity.Teleport(1001, 337, 325); break; } } break; } } break; } #endregion #endregion } break; } #endregion #region Promotion Center case 1004: { switch (client.ActiveNpc) { #region Promotion Center #region [LeadPerformer] case 355913: { switch (npcRequest.OptionID) { case 0: dialog.Text( "Hello there! Please allow me to introduce to you the sub-class of Performers to you. " + "Performers are gifted in the harmonizing of song and swordplay into " + "beautiful, unique dances. These dances will surely make you the center of " + "people`s attention! Would you like to join us? After you join this sub-class, you " + "can level it up and get promoted to learn more stylish dances."); if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Performer)) dialog.Option("Yes, I`d like to join it.", 1); dialog.Option("I want to get promoted.", 2); dialog.Option("How can I get promoted?", 3); dialog.Option("Learn UniqueDance?", 11); dialog.Option("Not my concern.", 255); dialog.Avatar(100); dialog.Send(); break; case 1: dialog.Text( "I`m glad that you are willing to be one of us. I`m sure your dances will be very " + "charming. Still, there are a few requiriments you need to meet. Though " + "players of all classes can join us, we only accept players who are over level " + "70, and it takes 15 Orchids to pay the tuition fee. After joining the Performer " + "sub-class, click open your character sheet and you`ll find the " + "sub-class button on the left-hand corner. You may level up your sub-class on " + "the sub-class button sheet. You need to meet a certain sub-class level to get " + "promoted to higher sub-class phases."); dialog.Option("I see. Count me in.", 100); dialog.Option("Oh, it does not suit me.", 255); dialog.Avatar(100); dialog.Send(); break; case 2: if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Performer)) { dialog.Text( "You are not a Performer yet and can`t get promoted. Do you want to join the " + "Performer sub-class now?"); dialog.Option("Yes, I`d like to join.", 1); dialog.Option("Oh. Not now.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "To promote to Phase " + (client.Entity.SubClasses.Classes[(byte)ClassID.Performer].Phase + 1).ToString() + " you must meet the requirements. have you meet " + "them into the sub-class sheet?"); dialog.Option("Positive.", 200); dialog.Option("Oh. not yet.", 255); dialog.Avatar(100); dialog.Send(); } break; case 3: dialog.Text( "Good day! Please spare me a few minutes so that I can tell you about the " + "sub-classes in Twin City. Each Sub-Class has 9 phases, and the higher the " + "phase is, the more bonus effects the sub-class will offer. But keep in mind " + "that these sub-classes also have a level system and you need to level them " + "up before you can get promoted. You can level up your sub-class by gaining " + "study points."); dialog.Option("How can I get study points?", 30); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); break; case 30: dialog.Text( "Well, the only way to get those points is to read the sub-class books, such as " + "the Diligence Book. When you`ve gained enough study points, open the " + "sub-class sheet from the character panel and level up the sub-class there. " + "Monsters in the wild are always bothering young adventurers, so you might " + "find some books from them."); dialog.Option("Okay.", 255); dialog.Avatar(100); dialog.Send(); break; case 100: if (PacketHandler.PassLearn((byte)ClassID.Performer, client.Entity)) { client.Entity.SubClasses.Classes.Add((byte)ClassID.Performer, new PhoenixProject.Statement.SubClass() { ID = (byte)ClassID.Performer, Level = 1, Phase = 1 }); SubClassTable.Insert(client.Entity, (byte)ClassID.Performer); dialog.Text( "Congratulations! You`ve learned the Performer way. Hope you use this power " + "for the good of us all."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "I`m sorry, you need to give me 15 Orchids and " + "reach level 70 to join us."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 11: { dialog.Text("i can help you to learn all UniqueDance you should have Req SubClass and "); dialog.Text("5,000 cps to Learn the dance what you wana Choose to learn? "); dialog.Option("BattleDance[P1].", 12); dialog.Option("Triumph[P3].", 13); dialog.Option("StepStomp[P5].", 14); dialog.Option("MoonLight[P7].", 15); dialog.Option("SnowWind[P9].", 16); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 12: if (client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Performer)) { if (client.Entity.SubClasses.Classes[(byte)ClassID.Performer].Phase >= 1 && client.Entity.ConquerPoints >= 5000) { client.AddSpell(new Spell(true) { ID = 1415 }); client.Entity.ConquerPoints -= 5000; dialog.Text( "Congratulations! You`ve learned the BattleDance . Hope you use this power " + "for the good of us all."); dialog.Option("Thanks", 255); dialog.Avatar(100); dialog.Send(); } } else { dialog.Text( "I`m sorry, you dont have Enought cps or the Req Phase."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 13: if (client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Performer)) { if (client.Entity.SubClasses.Classes[(byte)ClassID.Performer].Phase >= 3 && client.Entity.ConquerPoints >= 5000) { client.AddSpell(new Spell(true) { ID = 1416 }); client.Entity.ConquerPoints -= 5000; dialog.Text( "Congratulations! You`ve learned the Triumph. Hope you use this power " + "for the good of us all."); dialog.Option("Thanks", 255); dialog.Avatar(100); dialog.Send(); } } else { dialog.Text( "I`m sorry, you dont have Enought cps or the Req Phase."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 14: if (client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Performer)) { if (client.Entity.SubClasses.Classes[(byte)ClassID.Performer].Phase >= 5 && client.Entity.ConquerPoints >= 5000) { client.AddSpell(new Spell(true) { ID = 1417 }); client.Entity.ConquerPoints -= 5000; dialog.Text( "Congratulations! You`ve learned the StepStomp. Hope you use this power " + "for the good of us all."); dialog.Option("Thanks", 255); dialog.Avatar(100); dialog.Send(); } } else { dialog.Text( "I`m sorry, you dont have Enought cps or the Req Phase."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 15: if (client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Performer)) { if (client.Entity.SubClasses.Classes[(byte)ClassID.Performer].Phase >= 7 && client.Entity.ConquerPoints >= 5000) { client.AddSpell(new Spell(true) { ID = 1418 }); client.Entity.ConquerPoints -= 5000; dialog.Text( "Congratulations! You`ve learned the MoonLight. Hope you use this power " + "for the good of us all."); dialog.Option("Thanks", 255); dialog.Avatar(100); dialog.Send(); } } else { dialog.Text( "I`m sorry, you dont have Enought cps or the Req Phase."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 16: if (client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Performer)) { if (client.Entity.SubClasses.Classes[(byte)ClassID.Performer].Phase >= 9 && client.Entity.ConquerPoints >= 5000) { client.AddSpell(new Spell(true) { ID = 1419 }); client.Entity.ConquerPoints -= 5000; dialog.Text( "Congratulations! You`ve learned the SnowWind. Hope you use this power " + "for the good of us all."); dialog.Option("Thanks", 255); dialog.Avatar(100); dialog.Send(); } } else { dialog.Text( "I`m sorry, you dont have Enought cps or the Req Phase."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 200: if (client.Entity.SubClasses.Classes[(byte)ClassID.Performer].Phase == 9) { dialog.Text("Your sub-class phase is already 9, you can`t promote it anymore!"); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); return; } if (client.Entity.SubClasses.Classes[(byte)ClassID.Performer].Phase < client.Entity.SubClasses.Classes[(byte)ClassID.Performer].Level) { client.Entity.SubClasses.Classes[(byte)ClassID.Performer].Phase++; Database.SubClassTable.Update(client.Entity, client.Entity.SubClasses.Classes[(byte)ClassID.Performer]); dialog.Text("You have promoted your sub-class successfully."); dialog.Option("Oh, Thanks.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text("I`m sorry, you don`t meet the requirements yet."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; } break; } #endregion #region [LeadApothecary] case 355912: { switch (npcRequest.OptionID) { case 0: dialog.Text( "Hello there! Please allow me to introduce to you the sub-class of the " + "Apothecary. An Apothecary is a master of various oriental herbs and can use " + "their healing powers to protect themselves from poison damage. Would you " + "like to join us? After you join this sub-class, you can level it up and get " + "promoted to gain more protection."); if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Apothecary)) dialog.Option("Yes, I`d like to join it.", 1); dialog.Option("I want to get promoted.", 2); dialog.Option("How can I get promoted?", 3); dialog.Option("Not my concern.", 255); dialog.Avatar(100); dialog.Send(); break; case 1: dialog.Text( "I`m glad that you desire to become one of us. I`m sure you`ll make a capable " + "Apothecary. Still, there are a few requiriments you need to meet. Though " + "players of all classes can join us, we only accept players who are over level " + "70, and it takes 10 Meteor Tears to pay the tuition fee. After joining the " + "Apothecary sub-class, click open your character sheet and you`ll find the " + "sub-class button on the left-hand corner. You may level up your sub-class on " + "the sub-class button sheet. You need to meet a certain sub-class level to get " + "promoted to higher sub-class phases."); dialog.Option("I see. Count me in.", 100); dialog.Option("Oh, it does not suit me.", 255); dialog.Avatar(100); dialog.Send(); break; case 2: if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Apothecary)) { dialog.Text( "You are not a Apothecary yet and can`t get promoted. Do you want to join the " + "Apothecary sub-class now?"); dialog.Option("Yes, I`d like to join.", 1); dialog.Option("Oh. Not now.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "To promote to Phase " + (client.Entity.SubClasses.Classes[(byte)ClassID.Apothecary].Phase + 1).ToString() + " you must meet the requirements. have you meet " + "them into the sub-class sheet?"); dialog.Option("Positive.", 200); dialog.Option("Oh. not yet.", 255); dialog.Avatar(100); dialog.Send(); } break; case 3: dialog.Text( "Good day! Please spare me a few minutes so that I can tell you about the " + "sub-classes in Twin City. Each Sub-Class has 9 phases, and the higher the " + "phase is, the more bonus effects the sub-class will offer. But keep in mind " + "that these sub-classes also have a level system and you need to level them " + "up before you can get promoted. You can level up your sub-class by gaining " + "study points."); dialog.Option("How can I get study points?", 30); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); break; case 30: dialog.Text( "Well, the only way to get those points is to read the sub-class books, such as " + "the Diligence Book. When you`ve gained enough study points, open the " + "sub-class sheet from the character panel and level up the sub-class there. " + "Monsters in the wild are always bothering young adventurers, so you might " + "find some books from them."); dialog.Option("Okay.", 255); dialog.Avatar(100); dialog.Send(); break; case 100: if (PacketHandler.PassLearn((byte)ClassID.Apothecary, client.Entity)) { client.Entity.SubClasses.Classes.Add((byte)ClassID.Apothecary, new Statement.SubClass() { ID = (byte)ClassID.Apothecary, Level = 1, Phase = 1 }); Database.SubClassTable.Insert(client.Entity, (byte)ClassID.Apothecary); dialog.Text( "Congratulations! You`ve learned the Apothecary way. Hope you use this power " + "for the good of us all."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "I`m sorry, you need to give me 10 Meteor Tears and " + "reach level 70 to join us."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 200: if (client.Entity.SubClasses.Classes[(byte)ClassID.Apothecary].Phase == 9) { dialog.Text("Your sub-class phase is already 9, you can`t promote it anymore!"); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); return; } if (client.Entity.SubClasses.Classes[(byte)ClassID.Apothecary].Phase < client.Entity.SubClasses.Classes[(byte)ClassID.Apothecary].Level) { client.Entity.SubClasses.Classes[(byte)ClassID.Apothecary].Phase++; dialog.Text("You have promoted your sub-class successfully."); dialog.Option("Oh, Thanks.", 255); dialog.Avatar(100); dialog.Send(); Database.SubClassTable.Update(client.Entity, client.Entity.SubClasses.Classes[(byte)ClassID.Apothecary]); } else { dialog.Text("I`m sorry, you don`t meet the requirements yet."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; } break; } #endregion #region [LeadMartialArtist] case 355911: { switch (npcRequest.OptionID) { case 0: dialog.Text( "Hello there! You look quite capable. Perhaps you`ll make a great Martial " + "Artist. Please allow me to explain the MartialArtist sub-class. The Martial " + "Artist`s awesome displays of ombat prowess are a wonder to behold, but a " + "nightmare to face. When you are a martial Artist, you will be able to increase " + "the chances of hitting with 1.5x Attack Power! Would you like to join us? After " + "you join this sub-class, you can level it up and get promoted to increase your " + "chances of hitting your enemies with more power!"); if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.MartialArtist)) dialog.Option("Yes, I`d like to join it.", 1); dialog.Option("I want to get promoted.", 2); dialog.Option("How can I get promoted?", 3); dialog.Option("Not my concern.", 255); dialog.Avatar(100); dialog.Send(); break; case 1: dialog.Text( "I`m glad that you are willing to be one of us. I`m sure you will distinguish " + "yourself with your combat ability in no time. Still, there are a few requiriments " + "you need to meet. Though players of all classes can join us, we only accept " + "players who are over level 70, and it takes 5 Celestial Stones to pay the tuition " + "fee. After joining the Martial Artist sub-class, click open your character sheet " + "and you`ll find the sub-class button on the left-hand corner. You may level up " + "your sub-class on the sub-class button sheet. You need to meet a certain sub-class " + "level to get promoted to higher sub-class phases."); dialog.Option("I see. Count me in.", 100); dialog.Option("Oh, it does not suit me.", 255); dialog.Avatar(100); dialog.Send(); break; case 2: if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.MartialArtist)) { dialog.Text( "You are not a Martial Artist yet and can`t get promoted. Do you want to join the " + "Martial Artist sub-class now?"); dialog.Option("Yes, I`d like to join.", 1); dialog.Option("Oh. Not now.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "To promote to Phase " + (client.Entity.SubClasses.Classes[(byte)ClassID.MartialArtist].Phase + 1).ToString() + " you must meet the requirements. have you meet " + "them into the sub-class sheet?"); dialog.Option("Positive.", 200); dialog.Option("Oh. not yet.", 255); dialog.Avatar(100); dialog.Send(); } break; case 3: dialog.Text( "Good day! Please spare me a few minutes so that I can tell you about the " + "sub-classes in Twin City. Each Sub-Class has 9 phases, and the higher the " + "phase is, the more bonus effects the sub-class will offer. But keep in mind " + "that these sub-classes also have a level system and you need to level them " + "up before you can get promoted. You can level up your sub-class by gaining " + "study points."); dialog.Option("How can I get study points?", 30); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); break; case 30: dialog.Text( "Well, the only way to get those points is to read the sub-class books, such as " + "the Diligence Book. When you`ve gained enough study points, open the " + "sub-class sheet from the character panel and level up the sub-class there. " + "Monsters in the wild are always bothering young adventurers, so you might " + "find some books from them."); dialog.Option("Okay.", 255); dialog.Avatar(100); dialog.Send(); break; case 100: if (PacketHandler.PassLearn((byte)ClassID.MartialArtist, client.Entity)) { client.Entity.SubClasses.Classes.Add((byte)ClassID.MartialArtist, new Statement.SubClass() { ID = (byte)ClassID.MartialArtist, Level = 1, Phase = 1 }); Database.SubClassTable.Insert(client.Entity, (byte)ClassID.MartialArtist); dialog.Text( "Congratulations! You`ve learned the Martial Artist way. Hope you use this power " + "for the good of us all."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "I`m sorry, you need to buy 5 Celestial Stones from the Great Merchant and " + "reach level 70 to join us."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 200: if (client.Entity.SubClasses.Classes[(byte)ClassID.MartialArtist].Phase == 9) { dialog.Text("Your sub-class phase is already 9, you can`t promote it anymore!"); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); return; } if (client.Entity.SubClasses.Classes[(byte)ClassID.MartialArtist].Phase < client.Entity.SubClasses.Classes[(byte)ClassID.MartialArtist].Level) { client.Entity.SubClasses.Classes[(byte)ClassID.MartialArtist].Phase++; dialog.Text("You have promoted your sub-class successfully."); dialog.Option("Oh, Thanks.", 255); dialog.Avatar(100); dialog.Send(); Database.SubClassTable.Update(client.Entity, client.Entity.SubClasses.Classes[(byte)ClassID.MartialArtist]); } else { dialog.Text("I`m sorry, you don`t meet the requirements yet."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; } break; } #endregion #region [LeadChiMaster] case 355910: { switch (npcRequest.OptionID) { case 0: dialog.Text( "Hello there! Please allow me to introduce to you the sub-class of the Chi " + "Master. The Chi Master is a potent combatant so versed in counter attacks, " + "that they have a chance of preventing their enemy from landing Critical " + "Strikes! Would you like to join us? After you join this sub-class you can level" + "it up and get promoted to increase your immunity to critical strikes."); if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.ChiMaster)) dialog.Option("Yes, I`d like to join it.", 1); dialog.Option("I want to get promoted.", 2); dialog.Option("How can I get promoted?", 3); dialog.Option("Where to buy Yin-Yang Fruits?", 4); dialog.Option("Not my concern.", 255); dialog.Avatar(100); dialog.Send(); break; case 1: dialog.Text( "I`m glad that you are willing to be one of us. I`m sure you`ll make a capable " + "Chi Master. Still, there are a few requiriments you need to meet. Though " + "players of all classes can join us, we only accept players who are over level " + "70, and it takes 1 Yin-Yang Fruit to pay the tuition fee. You can pay 10,000 " + "Horse Racing points to the Horse Race Manager to buy one. After joining the " + "Chi Master sub-class, click open your character sheet and you`ll find the " + "sub-class button on the left-hand corner. You may level up your sub-class on " + "the sub-class button sheet. You need to meet a certain sub-class level to get " + "promoted to higher sub-class phases."); dialog.Option("I see. Count me in.", 100); dialog.Option("Oh, it does not suit me.", 255); dialog.Avatar(100); dialog.Send(); break; case 2: if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.ChiMaster)) { dialog.Text( "You are not a Chi Master yet and can`t get promoted. Do you want to join the " + "Chi Master sub-class now?"); dialog.Option("Yes, I`d like to join.", 1); dialog.Option("Oh. Not now.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "To promote to Phase " + client.Entity.SubClasses.Classes[(byte)ClassID.ChiMaster].Phase + 1 + " you must meet the requirements. have you meet " + "them into the sub-class sheet?"); dialog.Option("Positive.", 200); dialog.Option("Oh. not yet.", 255); dialog.Avatar(100); dialog.Send(); } break; case 3: dialog.Text( "Good day! Please spare me a few minutes so that I can tell you about the " + "sub-classes in Twin City. Each Sub-Class has 9 phases, and the higher the " + "phase is, the more bonus effects the sub-class will offer. But keep in mind " + "that these sub-classes also have a level system and you need to level them " + "up before you can get promoted. You can level up your sub-class by gaining " + "study points."); dialog.Option("How can I get study points?", 30); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); break; case 30: dialog.Text( "Well, the only way to get those points is to read the sub-class books, such as " + "the Diligence Book. When you`ve gained enough study points, open the " + "sub-class sheet from the character panel and level up the sub-class there. " + "Monsters in the wild are always bothering young adventurers, so you might " + "find some books from them."); dialog.Option("Okay.", 255); dialog.Avatar(100); dialog.Send(); break; case 4: dialog.Text( "You may pay 10,000 Horse Racing points to the Horse Race Manager to buy " + "a Yin-Yang Fruit."); dialog.Option("Thanks.", 255); dialog.Avatar(100); dialog.Send(); break; case 100: if (PacketHandler.PassLearn((byte)ClassID.ChiMaster, client.Entity)) { client.Entity.SubClasses.Classes.Add((byte)ClassID.ChiMaster, new Statement.SubClass() { ID = (byte)ClassID.ChiMaster, Level = 1, Phase = 1 }); Database.SubClassTable.Insert(client.Entity, (byte)ClassID.ChiMaster); dialog.Text( "Congratulations! You`ve learned the Chi Masters way. Hope you use this power " + "for the good of us all."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "I`m sorry, you need to buy a Yin-Yang Fruit from the Horse Race Manager and " + "reach level 70 to join us."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 200: if (client.Entity.SubClasses.Classes[(byte)ClassID.ChiMaster].Phase == 9) { dialog.Text("Your sub-class phase is already 9, you can`t promote it anymore!"); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); return; } if (client.Entity.SubClasses.Classes[(byte)ClassID.ChiMaster].Phase < client.Entity.SubClasses.Classes[(byte)ClassID.ChiMaster].Level) { client.Entity.SubClasses.Classes[(byte)ClassID.ChiMaster].Phase++; dialog.Text("You have promoted your sub-class successfully."); dialog.Option("Oh, Thanks.", 255); dialog.Avatar(100); dialog.Send(); Database.SubClassTable.Update(client.Entity, client.Entity.SubClasses.Classes[(byte)ClassID.ChiMaster]); } else { dialog.Text("I`m sorry, you don`t meet the requirements yet."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; } break; } #endregion #region [Wrangler] case 355916: { switch (npcRequest.OptionID) { case 0: dialog.Text( "Good day! Have you ever wondered what a Wrangler is? Well, please allow " + "me to introduce this sub-class to you. Wrangler are masters of the " + "MaxHp energies and can increase! " + "Isn`t that wonderful? Would you like to join us? After you join " + "this sub-class, you can level it up and get promoted to increase your power!"); if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Wrangler)) dialog.Option("Yes, I`d like to join it.", 1); dialog.Option("I want to get promoted.", 2); dialog.Option("How can I get promoted?", 3); dialog.Option("Not my concern.", 255); dialog.Avatar(100); dialog.Send(); break; case 1: dialog.Text( "I`m glad that you are willing to be one of us. I`m sure you will make a great " + "Wrangler. Still, there are a few requiriments you need to meet. Though players " + "of all classes can join us, we only accept players who are over level 70, and it " + "takes 40 Saddle`s to pay the tuition fee. After joining the Wrangler sub-class, " + "click open your character sheet and you`ll find the sub-class button on the " + "left-hand corner. You may level up your sub-class on the sub-class button sheet. You " + "need to meet a certain sub-class level to get promoted to higher sub-class " + "phases."); dialog.Option("I see. Count me in.", 100); dialog.Option("Oh, it does not suit me.", 255); dialog.Avatar(100); dialog.Send(); break; case 2: if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Wrangler)) { dialog.Text( "You are not a Wrangler yet and can`t get promoted. Do you want to join the " + "Warlock sub-class now?"); dialog.Option("Yes, I`d like to join.", 1); dialog.Option("Oh. Not now.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "To promote to Phase " + (client.Entity.SubClasses.Classes[(byte)ClassID.Wrangler].Phase + 1).ToString() + " you must meet the requirements. have you meet " + "them into the sub-class sheet?"); dialog.Option("Positive.", 200); dialog.Option("Oh. not yet.", 255); dialog.Avatar(100); dialog.Send(); } break; case 3: dialog.Text( "Good day! Please spare me a few minutes so that I can tell you about the " + "sub-classes in Twin City. Each Sub-Class has 9 phases, and the higher the " + "phase is, the more bonus effects the sub-class will offer. But keep in mind " + "that these sub-classes also have a level system and you need to level them " + "up before you can get promoted. You can level up your sub-class by gaining " + "study points."); dialog.Option("How can I get study points?", 30); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); break; case 30: dialog.Text( "Well, the only way to get those points is to read the sub-class books, such as " + "the Diligence Book. When you`ve gained enough study points, open the " + "sub-class sheet from the character panel and level up the sub-class there. " + "Monsters in the wild are always bothering young adventurers, so you might " + "find some books from them."); dialog.Option("Okay.", 255); dialog.Avatar(100); dialog.Send(); break; case 100: if (PacketHandler.PassLearn((byte)ClassID.Wrangler, client.Entity)) { client.Entity.SubClasses.Classes.Add((byte)ClassID.Wrangler, new Statement.SubClass() { ID = (byte)ClassID.Wrangler, Level = 1, Phase = 1 }); Database.SubClassTable.Insert(client.Entity, (byte)ClassID.Wrangler); dialog.Text( "Congratulations! You`ve learned the Wrangler way. Hope you use this power " + "for the good of us all."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "I`m sorry, you need to give me 40 Saddle's and " + "reach level 70 to join us."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 200: if (client.Entity.SubClasses.Classes[(byte)ClassID.Wrangler].Phase == 9) { dialog.Text("Your sub-class phase is already 9, you can`t promote it anymore!"); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); return; } if (client.Entity.SubClasses.Classes[(byte)ClassID.Wrangler].Phase < client.Entity.SubClasses.Classes[(byte)ClassID.Wrangler].Level) { client.Entity.SubClasses.Classes[(byte)ClassID.Wrangler].Phase++; dialog.Text("You have promoted your sub-class successfully."); dialog.Option("Oh, Thanks.", 255); dialog.Avatar(100); dialog.Send(); Database.SubClassTable.Update(client.Entity, client.Entity.SubClasses.Classes[(byte)ClassID.Wrangler]); } else { dialog.Text("I`m sorry, you don`t meet the requirements yet."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; } break; } #endregion #region [LeadSage] case 355915: { switch (npcRequest.OptionID) { case 0: dialog.Text( "Hello, my friend. Are you here to join the Sage sub-class? Before we start, " + "please allow me to introduce this sub-class to you. Sages have strong " + "spiritual powers and have a gruesome ability to reduce a target`s Magical " + "Defense. This is very helpful in defeating those who might underestimate " + "your power! Would you like to join us? After you join this sub-class, you can " + "level it up and get promoted to reduce more of your target`s Magical Defense."); if (!client.Entity.SubClasses.Classes.ContainsKey((byte)Statement.ClassID.Sage)) dialog.Option("Yes, I`d like to join it.", 1); dialog.Option("I want to get promoted.", 2); dialog.Option("How can I get promoted?", 3); dialog.Option("Not my concern.", 255); dialog.Avatar(100); dialog.Send(); break; case 1: dialog.Text( "I`m glad that you are willing to be one of us. I`m sure you will be a fantastic " + "Sage. Still, there are a few requiriments you need to meet. Though players " + "of all classes can join us, we only accept players who are over level 70, and it " + "takes 20 Lucky Amulets to pay the tuition fee. After joining the Sage sub-class, " + "click open your character sheet and you`ll find the sub-class button on the " + "left-hand corner. You may level up your sub-class on the sub-class button sheet. You " + "need to meet a certain sub-class level to get promoted to higher sub-class " + "phases."); dialog.Option("I see. Count me in.", 100); dialog.Option("Oh, it does not suit me.", 255); dialog.Avatar(100); dialog.Send(); break; case 2: if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Sage)) { dialog.Text( "You are not a Sage yet and can`t get promoted. Do you want to join the " + "Sage sub-class now?"); dialog.Option("Yes, I`d like to join.", 1); dialog.Option("Oh. Not now.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "To promote to Phase " + (client.Entity.SubClasses.Classes[(byte)ClassID.Sage].Phase + 1).ToString() + " you must meet the requirements. have you meet " + "them into the sub-class sheet?"); dialog.Option("Positive.", 200); dialog.Option("Oh. not yet.", 255); dialog.Avatar(100); dialog.Send(); } break; case 3: dialog.Text( "Good day! Please spare me a few minutes so that I can tell you about the " + "sub-classes in Twin City. Each Sub-Class has 9 phases, and the higher the " + "phase is, the more bonus effects the sub-class will offer. But keep in mind " + "that these sub-classes also have a level system and you need to level them " + "up before you can get promoted. You can level up your sub-class by gaining " + "study points."); dialog.Option("How can I get study points?", 30); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); break; case 30: dialog.Text( "Well, the only way to get those points is to read the sub-class books, such as " + "the Diligence Book. When you`ve gained enough study points, open the " + "sub-class sheet from the character panel and level up the sub-class there. " + "Monsters in the wild are always bothering young adventurers, so you might " + "find some books from them."); dialog.Option("Okay.", 255); dialog.Avatar(100); dialog.Send(); break; case 100: if (PacketHandler.PassLearn((byte)ClassID.Sage, client.Entity)) { client.Entity.SubClasses.Classes.Add((byte)ClassID.Sage, new Statement.SubClass() { ID = (byte)ClassID.Sage, Level = 1, Phase = 1 }); Database.SubClassTable.Insert(client.Entity, (byte)ClassID.Sage); dialog.Text( "Congratulations! You`ve learned the Sage way. Hope you use this power " + "for the good of us all."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "I`m sorry, you need to give me 20 Lucky Amulets and " + "reach level 70 to join us."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 200: if (client.Entity.SubClasses.Classes[(byte)ClassID.Sage].Phase == 9) { dialog.Text("Your sub-class phase is already 9, you can`t promote it anymore!"); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); return; } if (client.Entity.SubClasses.Classes[(byte)ClassID.Sage].Phase < client.Entity.SubClasses.Classes[(byte)ClassID.Sage].Level) { client.Entity.SubClasses.Classes[(byte)ClassID.Sage].Phase++; dialog.Text("You have promoted your sub-class successfully."); dialog.Option("Oh, Thanks.", 255); dialog.Avatar(100); dialog.Send(); Database.SubClassTable.Update(client.Entity, client.Entity.SubClasses.Classes[(byte)ClassID.Sage]); } else { dialog.Text("I`m sorry, you don`t meet the requirements yet."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; } break; } #endregion #region [LeadWarlock] case 355914: { switch (npcRequest.OptionID) { case 0: dialog.Text( "Good day! Have you ever wondered what a Warlock is? Well, please allow " + "me to introduce this sub-class to you. Warlocks are masters of the " + "psionic energies and can increase their chances of casting spells with 2x " + "Magical Attack. Isn`t that wonderful? Would you like to join us? After you join " + "this sub-class, you can level it up and get promoted to increase your power!"); if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Warlock)) dialog.Option("Yes, I`d like to join it.", 1); dialog.Option("I want to get promoted.", 2); dialog.Option("How can I get promoted?", 3); dialog.Option("Not my concern.", 255); dialog.Avatar(100); dialog.Send(); break; case 1: dialog.Text( "I`m glad that you are willing to be one of us. I`m sure you will make a great " + "Warlock. Still, there are a few requiriments you need to meet. Though players " + "of all classes can join us, we only accept players who are over level 70, and it " + "takes 10 Bombs to pay the tuition fee. After joining the Warlock sub-class, " + "click open your character sheet and you`ll find the sub-class button on the " + "left-hand corner. You may level up your sub-class on the sub-class button sheet. You " + "need to meet a certain sub-class level to get promoted to higher sub-class " + "phases."); dialog.Option("I see. Count me in.", 100); dialog.Option("Oh, it does not suit me.", 255); dialog.Avatar(100); dialog.Send(); break; case 2: if (!client.Entity.SubClasses.Classes.ContainsKey((byte)ClassID.Warlock)) { dialog.Text( "You are not a Warlock yet and can`t get promoted. Do you want to join the " + "Warlock sub-class now?"); dialog.Option("Yes, I`d like to join.", 1); dialog.Option("Oh. Not now.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "To promote to Phase " + (client.Entity.SubClasses.Classes[(byte)ClassID.Warlock].Phase + 1).ToString() + " you must meet the requirements. have you meet " + "them into the sub-class sheet?"); dialog.Option("Positive.", 200); dialog.Option("Oh. not yet.", 255); dialog.Avatar(100); dialog.Send(); } break; case 3: dialog.Text( "Good day! Please spare me a few minutes so that I can tell you about the " + "sub-classes in Twin City. Each Sub-Class has 9 phases, and the higher the " + "phase is, the more bonus effects the sub-class will offer. But keep in mind " + "that these sub-classes also have a level system and you need to level them " + "up before you can get promoted. You can level up your sub-class by gaining " + "study points."); dialog.Option("How can I get study points?", 30); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); break; case 30: dialog.Text( "Well, the only way to get those points is to read the sub-class books, such as " + "the Diligence Book. When you`ve gained enough study points, open the " + "sub-class sheet from the character panel and level up the sub-class there. " + "Monsters in the wild are always bothering young adventurers, so you might " + "find some books from them."); dialog.Option("Okay.", 255); dialog.Avatar(100); dialog.Send(); break; case 100: if (PacketHandler.PassLearn((byte)ClassID.Warlock, client.Entity)) { client.Entity.SubClasses.Classes.Add((byte)ClassID.Warlock, new Statement.SubClass() { ID = (byte)ClassID.Warlock, Level = 1, Phase = 1 }); Database.SubClassTable.Insert(client.Entity, (byte)ClassID.Warlock); dialog.Text( "Congratulations! You`ve learned the Warlock way. Hope you use this power " + "for the good of us all."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } else { dialog.Text( "I`m sorry, you need to give me 10 Bombs and " + "reach level 70 to join us."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } break; case 200: if (client.Entity.SubClasses.Classes[(byte)ClassID.Warlock].Phase == 9) { if (client.Entity.SubClasses.Classes[(byte)ClassID.Warlock].Phase == 9) { dialog.Text("Your sub-class phase is already 9, you can`t promote it anymore!"); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); return; } if (client.Entity.SubClasses.Classes[(byte)ClassID.Warlock].Phase < client.Entity.SubClasses.Classes[(byte)ClassID.Warlock].Level) { client.Entity.SubClasses.Classes[(byte)ClassID.Warlock].Phase++; dialog.Text("You have promoted your sub-class successfully."); dialog.Option("Oh, Thanks.", 255); dialog.Avatar(100); dialog.Send(); Database.SubClassTable.Update(client.Entity, client.Entity.SubClasses.Classes[(byte)ClassID.Warlock]); } else { dialog.Text("I`m sorry, you don`t meet the requirements yet."); dialog.Option("Oh.", 255); dialog.Avatar(100); dialog.Send(); } } break; } break; } #endregion #region PiratePromete case 4272: { switch (npcRequest.OptionID) { case 0: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { dialog.Text("I am the Pirate trainer, master of balence in destruction and harmony.\nWhat do you seek, young Pirate?"); dialog.Option("Promote me.", 1); dialog.Option("Learn skills.", 2); //dialog.Option("Claim bound items.", 49); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #region Promote case 1: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Class == 75) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + "."); dialog.Option("Promote me sir.", 3); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Class == 75) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { if (client.PromoteItemNeed == 721020) { if (client.Inventory.Remove("moonbox")) { client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } return; } if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed) { client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed); client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion #region Skills case 2: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { dialog.Text("Let me know what you want to learn."); dialog.Option("BladeTempest (Lvl 15).", 6); dialog.Option("ScurvyBomb (XP) (Lvl 15)", 7); dialog.Option("CannonBarrage (Lvl 15)", 8); dialog.Option("BlackbeardRage (Lvl 15)", 9); dialog.Option("GaleBomb (Lvl 15)", 10); dialog.Option("KrakensRevenge (Lvl 15)", 11); dialog.Option("BlackSpot (Lvl 15)", 12); dialog.Option("Next!", 5); dialog.Send(); } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 5: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { dialog.Text("Which aura do you want to learn?"); dialog.Option("AdrenalineRush (Lvl 15).", 13); dialog.Option("PiEagleEye (Lvl 15).", 14); dialog.Option("WindStorm (Lvl 15).", 20); dialog.Option("Back to skills.", 2); dialog.Send(); } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 20: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned WindStorm."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11140))) { dialog.Text("You already know this skill WindStorm."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 6: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned BladeTempest."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11110))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 7: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75 && client.Entity.FirstRebornClass == 75 && client.Entity.SecondRebornClass == 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned the ScurvyBomb."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11040))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more to learn ScurvyBomb ."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to be Pure Pirate [Pirate/Pirate/Pirate] to learn ScurvyBomb"); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 8: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned CannonBarrage ."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11050))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 9: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned BlackbeardRage ."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11060))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 10: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned GaleBomb."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11070))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 11: { if (client.Entity.FirstRebornClass == 75 && client.Entity.Class >= 70 && client.Entity.Class <= 75 || client.Entity.SecondRebornClass == 75 && client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned KrakensRevenge."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11100))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("Only Pirate Pirate can learn this skill."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 12: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned BlackSpot."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11120))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 13: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned AdrenalineRush."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11130))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 14: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned PiEagleEye ."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11030))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 15: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned Metal Elemental Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10420))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 16: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned Wood Elemental Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10421))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 17: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned Water Elemental Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10422))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 18: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 15) { dialog.Text("You have learned Fire Elemental Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10423))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 19: { if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Entity.Level >= 100) { dialog.Text("You have learned Earth Elemental Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10424))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 100 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the Pirate is not for trade.\nIf you wish to learn the secrets of the Pirate come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion } break; } #endregion #region HeadAbbot case 4271: { switch (npcRequest.OptionID) { case 0: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { dialog.Text("I am the monk trainer, master of balence in destruction and harmony.\nWhat do you seek, young monk?"); dialog.Option("Promote me.", 1); dialog.Option("Learn skills.", 2); //dialog.Option("Claim bound items.", 49); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #region BoundItems case 49: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.HeadgearClaim) dialog.Option("Headgear (Lvl 15).", 50); if (!client.RingClaim) dialog.Option("Ring (Lvl 40).", 51); if (!client.NecklaceClaim) dialog.Option("Necklace (Lvl 50).", 52); if (!client.ArmorClaim) dialog.Option("Armor (Lvl 70).", 53); dialog.Option("Next.", 48); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 48: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.BootsClaim) dialog.Option("Boots (Lvl 80).", 54); if (!client.TowerClaim) dialog.Option("Tower (Lvl 100).", 55); if (!client.FanClaim) dialog.Option("Fan (Lvl 100).", 56); if (!client.WeaponClaim) dialog.Option("Weapon (Lvl 110).", 57); dialog.Option("Back.", 49); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 50: { uint itemid = 143009; byte level = 15; if (!client.HeadgearClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 1; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.HeadgearClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 51: { uint itemid = 150079; byte level = 40; if (!client.RingClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 1; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.RingClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 52: { uint itemid = 120099; byte level = 50; if (!client.NecklaceClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 1; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.NecklaceClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 53: { uint itemid = 136069; byte level = 70; if (!client.ArmorClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 1; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.ArmorClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 54: { uint itemid = 160159; byte level = 80; if (!client.BootsClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 1; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.BootsClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 55: { uint itemid = 202009; byte level = 100; if (!client.TowerClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 1; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.TowerClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 56: { uint itemid = 201009; byte level = 100; if (!client.FanClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 1; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.FanClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 57: { byte level = 100; if (!client.WeaponClaim) { IProf proff = null; ushort maxlevel = 0; foreach (var prof in client.Proficiencies.Values) { if (maxlevel < prof.Level && prof.ID != 0) { maxlevel = prof.Level; proff = prof; } } if (proff == null) return; uint itemid = 610199; if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.WeaponClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion #region Promote case 1: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Class == 65) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + "."); dialog.Option("Promote me sir.", 3); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Class == 65) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { if (client.PromoteItemNeed == 721020) { if (client.Inventory.Remove("moonbox")) { client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } return; } if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed) { client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed); client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion #region Skills case 2: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { dialog.Text("Let me know what you want to learn."); dialog.Option("Triple Attack (Lvl 5).", 6); dialog.Option("Oblivion (XP) (Lvl 15)", 7); dialog.Option("Whirlwind Kick (Lvl 15)", 8); dialog.Option("Radiant Palm (Lvl 40)", 9); dialog.Option("Serenity (Lvl 40)", 10); dialog.Option("Tranquility (Lvl 70)", 11); dialog.Option("Compassion (Lvl 100)", 12); dialog.Option("Auras (Lvl 20->100)", 5); dialog.Send(); } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 5: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { dialog.Text("Which aura do you want to learn?"); dialog.Option("Tyrant (Lvl 20).", 13); dialog.Option("Fend (Lvl 20)", 14); //dialog.Option("Metal (Lvl 100)", 15); //dialog.Option("Wood (Lvl 100)", 16); //dialog.Option("Water (Lvl 100)", 17); //dialog.Option("Fire (Lvl 100)", 18); //dialog.Option("Earth (Lvl 100)", 19); dialog.Option("Back to skills.", 2); dialog.Send(); } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 6: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 5) { dialog.Text("You have learned Triple Attack."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10490))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 5 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 7: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 15) { dialog.Text("You have learned the Oblivion XP skill."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10390))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 8: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 15) { dialog.Text("You have learned Whirlwind Kick."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10415))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 9: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 40) { dialog.Text("You have learned Radiant Palm."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10381))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 10: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 40) { dialog.Text("You have learned Serenity."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10400))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 11: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 70) { dialog.Text("You have learned Tranquility."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10425))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 12: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 100) { dialog.Text("You have learned Compassion."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10430))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 100 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 13: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 20) { dialog.Text("You have learned Tyrent Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10395))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 20 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 14: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 20) { dialog.Text("You have learned Fend Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10410))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 20 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 15: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 100) { dialog.Text("You have learned Metal Elemental Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10420))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 100 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 16: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 100) { dialog.Text("You have learned Wood Elemental Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10421))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 100 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 17: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 100) { dialog.Text("You have learned Water Elemental Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10422))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 100 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 18: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 100) { dialog.Text("You have learned Fire Elemental Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10423))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 100 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 19: { if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.Level >= 100) { dialog.Text("You have learned Earth Elemental Aura."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(10424))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 100 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion } break; } #endregion #region WarriorGod case 10001: { switch (npcRequest.OptionID) { case 0: { if (client.Entity.Class >= 20 && client.Entity.Class <= 25) { dialog.Text("I am the shield and two hand weapons master. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you."); dialog.Option("Promote me.", 1); dialog.Option("Learn skills.", 2); //dialog.Option("Claim bound items.", 49); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #region BoundItems case 49: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.HeadgearClaim) dialog.Option("Headgear (Lvl 15).", 50); if (!client.RingClaim) dialog.Option("Ring (Lvl 40).", 51); if (!client.NecklaceClaim) dialog.Option("Necklace (Lvl 50).", 52); if (!client.ArmorClaim) dialog.Option("Armor (Lvl 70).", 53); dialog.Option("Next.", 48); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 48: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.BootsClaim) dialog.Option("Boots (Lvl 80).", 54); if (!client.TowerClaim) dialog.Option("Tower (Lvl 100).", 55); if (!client.FanClaim) dialog.Option("Fan (Lvl 100).", 56); if (!client.WeaponClaim) dialog.Option("Weapon (Lvl 110).", 57); dialog.Option("Back.", 49); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 50: { uint itemid = 111009; byte level = 15; if (!client.HeadgearClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 3; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.HeadgearClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 51: { uint itemid = 150079; byte level = 40; if (!client.RingClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 3; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.RingClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 52: { uint itemid = 120099; byte level = 50; if (!client.NecklaceClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.NecklaceClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 53: { uint itemid = 131069; byte level = 70; if (!client.ArmorClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.ArmorClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 54: { uint itemid = 160159; byte level = 80; if (!client.BootsClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.BootsClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 55: { uint itemid = 202009; byte level = 100; if (!client.TowerClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.TowerClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 56: { uint itemid = 201009; byte level = 100; if (!client.FanClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.FanClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 57: { byte level = 100; if (!client.WeaponClaim) { IProf proff = null; ushort maxlevel = 0; foreach (var prof in client.Proficiencies.Values) { if (maxlevel < prof.Level && prof.ID != 0) { maxlevel = prof.Level; proff = prof; } } if (proff == null) return; uint itemid = (uint)(proff.ID * 1000 + 219); if (!PhoenixProject.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid)) { dialog.Text("You need more proficiency belonging to a weapon, and not a shield or your punch."); dialog.Option("Alright.", 255); dialog.Send(); return; } if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.WeaponClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion case 1: { if (client.Entity.Class >= 20 && client.Entity.Class <= 25) { if (client.Entity.Class == 25) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + "."); dialog.Option("Promote me sir.", 3); dialog.Send(); } } else { dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.Class >= 20 && client.Entity.Class <= 25) { if (client.Entity.Class == 25) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { if (client.PromoteItemNeed == 721020) { if (client.Inventory.Remove("moonbox")) { client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } return; } if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed) { client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed); client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } } } else { dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 2: { if (client.Entity.Class >= 20 && client.Entity.Class <= 25) { dialog.Text("Let me know what you want to learn."); dialog.Option("XP Skills (Lvl 40).", 5); dialog.Option("Dash (Lvl 61).", 6); dialog.Option("DefensiveStance (Lvl 70).", 7); dialog.Option("MagicDefender (Lvl 70).", 8); dialog.Send(); } else { dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 5: { if (client.Entity.Class >= 20 && client.Entity.Class <= 25) { if (client.Entity.Level >= 40) { dialog.Text("You have learned the XP Skills of this class."); dialog.Option("Thank you master.", 255); dialog.Send(); client.AddSpell(LearnableSpell(1025)); client.AddSpell(LearnableSpell(1020)); client.AddSpell(LearnableSpell(1015)); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 6: { if (client.Entity.Class >= 20 && client.Entity.Class <= 25) { if (client.Entity.Level >= 61) { dialog.Text("You have learned the Dash Skill of this class."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(1051))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 61 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 7: { if (client.Entity.Class >= 20 && client.Entity.Class <= 25) { if (client.Entity.Level >= 70) { dialog.Text("You have learned the DefensiveStance Skill of this class."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11160))) { dialog.Text("You already got DefensiveStance skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 8: { if (client.Entity.Class >= 20 && client.Entity.Class <= 25) { if (client.Entity.Level >= 70) { dialog.Text("You have learned the MagicDefender Skill of this class."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(11200))) { dialog.Text("You already got MagicDefender skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the warrior secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } } break; } #endregion #region Archer Master case 400: { byte mClass = 40; byte MClass = 45; string Class = "archer"; switch (npcRequest.OptionID) { case 0: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("I am the bow master. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you."); dialog.Option("Promote me.", 1); dialog.Option("Learn skills.", 2); //dialog.Option("Claim bound items.", 49); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #region BoundItems case 49: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.HeadgearClaim) dialog.Option("Headgear (Lvl 15).", 50); if (!client.RingClaim) dialog.Option("Ring (Lvl 40).", 51); if (!client.NecklaceClaim) dialog.Option("Necklace (Lvl 50).", 52); if (!client.ArmorClaim) dialog.Option("Armor (Lvl 70).", 53); dialog.Option("Next.", 48); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 48: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.BootsClaim) dialog.Option("Boots (Lvl 80).", 54); if (!client.TowerClaim) dialog.Option("Tower (Lvl 100).", 55); if (!client.FanClaim) dialog.Option("Fan (Lvl 100).", 56); if (!client.WeaponClaim) dialog.Option("Weapon (Lvl 110).", 57); dialog.Option("Back.", 49); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 50: { uint itemid = 113009; byte level = 15; if (!client.HeadgearClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.HeadgearClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 51: { uint itemid = 150079; byte level = 40; if (!client.RingClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.RingClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 52: { uint itemid = 120099; byte level = 50; if (!client.NecklaceClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.NecklaceClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 53: { uint itemid = 133049; byte level = 70; if (!client.ArmorClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.ArmorClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 54: { uint itemid = 160159; byte level = 80; if (!client.BootsClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.BootsClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 55: { uint itemid = 202009; byte level = 100; if (!client.TowerClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.TowerClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 56: { uint itemid = 201009; byte level = 100; if (!client.FanClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.FanClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 57: { byte level = 100; if (!client.WeaponClaim) { IProf proff = null; ushort maxlevel = 0; foreach (var prof in client.Proficiencies.Values) { if (maxlevel < prof.Level && prof.ID != 0) { maxlevel = prof.Level; proff = prof; } } if (proff == null) return; uint itemid = (uint)(proff.ID * 1000 + 219); if (!PhoenixProject.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid)) { Console.WriteLine("invalid claim weapon " + itemid); return; } if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.WeaponClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion case 1: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Class == MClass) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + "."); dialog.Option("Promote me sir.", 3); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Class == MClass) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { if (client.PromoteItemNeed == 721020) { if (client.Inventory.Remove("moonbox")) { client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } return; } if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed) { client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed); client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 2: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("Let me know what you want to learn."); dialog.Option("XPFly (Lvl 1).", 5); dialog.Option("Scatter (Lvl 23).", 6); dialog.Option("RapidFire (Lvl 40).", 7); dialog.Option("Fly (Lvl 70).", 8); dialog.Option("Intensify (Lvl 70).", 9); dialog.Option("Arrow rain (Lvl 70).", 10); dialog.Option("Advanced Fly (Lvl 100).", 11); dialog.Option("Nothing.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 5: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("You have learned the XP Skill of this class."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(8002))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 6: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 23) { dialog.Text("You have learned the scatter."); dialog.Option("Thank you master.", 255); dialog.Send(); if (!client.AddSpell(LearnableSpell(8001))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 23 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 7: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(8000))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the rapid fire."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 8: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 70) { if (!client.AddSpell(LearnableSpell(8003))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the fly."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 9: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 70) { if (!client.AddSpell(LearnableSpell(9000))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the intensify."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 10: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 70) { if (!client.AddSpell(LearnableSpell(8030))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the arrow rain."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 11: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 100) { if (!client.AddSpell(LearnableSpell(8003, 1))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the advanced fly."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 100 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } } break; } #endregion #region WindSage case 4720: { byte mClass = 50; byte MClass = 55; string Class = "ninja"; switch (npcRequest.OptionID) { case 0: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("I am the master of the no sound attack and the master of the katanas. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you."); dialog.Option("Promote me.", 1); dialog.Option("Learn skills.", 2); //dialog.Option("Claim bound items.", 49); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #region BoundItems case 49: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.HeadgearClaim) dialog.Option("Headgear (Lvl 15).", 50); if (!client.RingClaim) dialog.Option("Ring (Lvl 40).", 51); if (!client.NecklaceClaim) dialog.Option("Necklace (Lvl 50).", 52); if (!client.ArmorClaim) dialog.Option("Armor (Lvl 70).", 53); dialog.Option("Next.", 48); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 48: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.BootsClaim) dialog.Option("Boots (Lvl 80).", 54); if (!client.TowerClaim) dialog.Option("Tower (Lvl 100).", 55); if (!client.FanClaim) dialog.Option("Fan (Lvl 100).", 56); if (!client.WeaponClaim) dialog.Option("Weapon (Lvl 110).", 57); dialog.Option("Back.", 49); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 50: { uint itemid = 123009; byte level = 15; if (!client.HeadgearClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.HeadgearClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 51: { uint itemid = 150079; byte level = 40; if (!client.RingClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.RingClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 52: { uint itemid = 120099; byte level = 50; if (!client.NecklaceClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.NecklaceClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 53: { uint itemid = 135069; byte level = 70; if (!client.ArmorClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.ArmorClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 54: { uint itemid = 160159; byte level = 80; if (!client.BootsClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.BootsClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 55: { uint itemid = 202009; byte level = 100; if (!client.TowerClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.TowerClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 56: { uint itemid = 201009; byte level = 100; if (!client.FanClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.FanClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 57: { byte level = 100; if (!client.WeaponClaim) { IProf proff = null; ushort maxlevel = 0; foreach (var prof in client.Proficiencies.Values) { if (maxlevel < prof.Level && prof.ID != 0) { maxlevel = prof.Level; proff = prof; } } if (proff == null) return; uint itemid = (uint)(proff.ID * 1000 + 219); if (!PhoenixProject.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid)) { Console.WriteLine("invalid claim weapon " + itemid); return; } if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.WeaponClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion case 1: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Class == MClass) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + "."); dialog.Option("Promote me sir.", 3); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Class == MClass) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { if (client.PromoteItemNeed == 721020) { if (client.Inventory.Remove("moonbox")) { client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } return; } if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed) { client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed); client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 2: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("Let me know what you want to learn. '[...]' and '{...}' means ninja as second life and ninja as third life."); dialog.Option("TwofoldBlades (Lvl 40).", 5); dialog.Option("ToxicFog (Lvl 70).", 6); dialog.Option("PoisonStar [Lvl 70].", 7); dialog.Option("BloodyScythe (Lvl 15)).", 8); dialog.Option("MortalDrag.(Lvl 15)", 12); dialog.Option("ArcherBane (Lvl 110).", 9); dialog.Option("ShurikenVortex (Lvl 70).", 10); dialog.Option("FatalStrike (Lvl 15).", 11); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 5: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(6000))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the TwofoldBlades."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 23 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 6: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 70) { if (!client.AddSpell(LearnableSpell(6001))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the ToxicFog."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 7: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 70) { if ((client.Entity.Reborn == 1 && client.Entity.Class == 55) || (client.Entity.Reborn == 2 && client.Entity.SecondRebornClass == 55)) { if (!client.AddSpell(LearnableSpell(6002))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the PoisonStar."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be ninja in the second life."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 8: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 15) { if (client.Entity.Class >= 50 && client.Entity.Class <= 55) { if (!client.AddSpell(LearnableSpell(11170))) { dialog.Text("You already know this BloodyScythe skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the BloodyScythe."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be ninja ."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 12: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 15) { if (client.Entity.Class >= 50 && client.Entity.Class <= 55) { if (!client.AddSpell(LearnableSpell(11180))) { dialog.Text("You already know this MortalDrag skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the MortalDrag."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be ninja ."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 9: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 110) { if (!client.AddSpell(LearnableSpell(6004))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the ArcherBane."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 10: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 70) { if (!client.AddSpell(LearnableSpell(6010))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the ShurikenVortex."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 11: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 15) { if (!client.AddSpell(LearnableSpell(6011))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the FatalStrike."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 15 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } } break; } #endregion #region TrojanMaster case 10022: { byte mClass = 10; byte MClass = 15; string Class = "trojan"; switch (npcRequest.OptionID) { case 0: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("I am the master of the one hand weapons. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you."); dialog.Option("Promote me.", 1); dialog.Option("Learn skills.", 2); //dialog.Option("Claim bound items.", 49); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #region BoundItems case 49: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.HeadgearClaim) dialog.Option("Headgear (Lvl 15).", 50); if (!client.RingClaim) dialog.Option("Ring (Lvl 40).", 51); if (!client.NecklaceClaim) dialog.Option("Necklace (Lvl 50).", 52); if (!client.ArmorClaim) dialog.Option("Armor (Lvl 70).", 53); dialog.Option("Next.", 48); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 48: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.BootsClaim) dialog.Option("Boots (Lvl 80).", 54); if (!client.TowerClaim) dialog.Option("Tower (Lvl 100).", 55); if (!client.FanClaim) dialog.Option("Fan (Lvl 100).", 56); if (!client.WeaponClaim) dialog.Option("Weapon (Lvl 110).", 57); dialog.Option("Back.", 49); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 50: { uint itemid = 118009; byte level = 15; if (!client.HeadgearClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.HeadgearClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 51: { uint itemid = 150079; byte level = 40; if (!client.RingClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.RingClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 52: { uint itemid = 120099; byte level = 50; if (!client.NecklaceClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.NecklaceClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 53: { uint itemid = 130069; byte level = 70; if (!client.ArmorClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.ArmorClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 54: { uint itemid = 160159; byte level = 80; if (!client.BootsClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.BootsClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 55: { uint itemid = 202009; byte level = 100; if (!client.TowerClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.TowerClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 56: { uint itemid = 201009; byte level = 100; if (!client.FanClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.FanClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 57: { byte level = 100; if (!client.WeaponClaim) { IProf proff = null; ushort maxlevel = 0; foreach (var prof in client.Proficiencies.Values) { if (maxlevel < prof.Level && prof.ID != 0) { maxlevel = prof.Level; proff = prof; } } if (proff == null) return; uint itemid = (uint)(proff.ID * 1000 + 219); if (!PhoenixProject.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid)) { Console.WriteLine("invalid claim weapon " + itemid); return; } if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.WeaponClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion case 1: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Class == MClass) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + "."); dialog.Option("Promote me sir.", 3); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Class == MClass) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { if (client.PromoteItemNeed == 721020) { if (client.Inventory.Remove("moonbox")) { client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } return; } if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed) { client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed); client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 2: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("Let me know what you want to learn."); dialog.Option("XPSkills (Lvl 40).", 5); dialog.Option("Hercules (Lvl 40).", 6); dialog.Option("Golem. (Lvl 40).", 7); dialog.Option("Spritual Healing. (Lvl 40).", 8); dialog.Option("Nothing.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 5: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 40) { dialog.Text("You have learned the XP Skills."); dialog.Option("Thank you master.", 255); dialog.Send(); client.AddSpell(LearnableSpell(1110)); client.AddSpell(LearnableSpell(1015)); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 6: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(1115))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the Hercules."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 7: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(1270))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the Golem."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 8: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(1190))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the Spritual Healing."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } } break; } #endregion #region Taoist Moon case 10000: { byte mClass = 142; byte MClass = 145; string Class = "fire taoist"; switch (npcRequest.OptionID) { case 0: { if (client.Entity.Class >= 100 && client.Entity.Class <= 101) { dialog.Text("I am the master of the fire skills. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you."); dialog.Option("Promote me.", 100); dialog.Option("Learn basic skills.", 200); //dialog.Option("Claim bound items.", 49); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("I am the master of the fire skills. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you."); dialog.Option("Promote me.", 1); dialog.Option("Learn skills.", 2); dialog.Option("Learn basic skills.", 200); //dialog.Option("Claim bound items.", 49); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } } break; } #region BoundItems case 49: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.HeadgearClaim) dialog.Option("Headgear (Lvl 15).", 50); if (!client.RingClaim) dialog.Option("Ring (Lvl 40).", 51); if (!client.NecklaceClaim) dialog.Option("Necklace (Lvl 50).", 52); if (!client.ArmorClaim) dialog.Option("Armor (Lvl 70).", 53); dialog.Option("Next.", 48); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 48: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.BootsClaim) dialog.Option("Boots (Lvl 80).", 54); if (!client.TowerClaim) dialog.Option("Tower (Lvl 100).", 55); if (!client.FanClaim) dialog.Option("Fan (Lvl 100).", 56); if (!client.WeaponClaim) dialog.Option("Weapon (Lvl 110).", 57); dialog.Option("Back.", 49); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 50: { uint itemid = 117009; byte level = 15; if (!client.HeadgearClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.HeadgearClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 51: { uint itemid = 152089; byte level = 40; if (!client.RingClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.RingClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 52: { uint itemid = 121099; byte level = 50; if (!client.NecklaceClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.NecklaceClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 53: { uint itemid = 134069; byte level = 70; if (!client.ArmorClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.ArmorClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 54: { uint itemid = 160159; byte level = 80; if (!client.BootsClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.BootsClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 55: { uint itemid = 202009; byte level = 100; if (!client.TowerClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.TowerClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 56: { uint itemid = 201009; byte level = 100; if (!client.FanClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.FanClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 57: { byte level = 100; if (!client.WeaponClaim) { IProf proff = null; ushort maxlevel = 0; foreach (var prof in client.Proficiencies.Values) { if (maxlevel < prof.Level && prof.ID != 0) { maxlevel = prof.Level; proff = prof; } } if (proff == null) return; uint itemid = (uint)(proff.ID * 1000 + 219); if (!PhoenixProject.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid)) { Console.WriteLine("invalid claim weapon " + itemid); return; } if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.WeaponClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion case 100: { if (client.Entity.Class >= 100 && client.Entity.Class <= 101) { if (client.Entity.Class == 101) { dialog.Text("Do you want to become a fire taoist?"); dialog.Option("Yes sir.", 254); dialog.Option("No thank you master.", 255); dialog.Send(); } else { dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + "."); dialog.Option("Promote me sir.", 254); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 254: { if (client.Entity.Class == 100) { client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else if (client.Entity.Class == 101) { client.Entity.Class = 142; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 200: { if (client.Entity.Class >= 100) { dialog.Text("Let me know what you want to learn."); dialog.Option("Thunder (Lvl 1).", 205); dialog.Option("Cure (Lvl 1).", 206); dialog.Option("Meditation. (Lvl 40).", 207); dialog.Option("Nothing.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 205: { if (client.Entity.Class >= 100) { if (!client.AddSpell(LearnableSpell(1000))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned thunder."); dialog.Option("Thank you.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 206: { if (client.Entity.Class >= 100) { if (!client.AddSpell(LearnableSpell(1005))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned cure."); dialog.Option("Thank you.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 207: { if (client.Entity.Class >= 100) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(1195))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned meditation."); dialog.Option("Thank you.", 255); dialog.Send(); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 1: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Class == MClass) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + "."); dialog.Option("Promote me sir.", 3); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Class == MClass) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { if (client.PromoteItemNeed == 721020) { if (client.Inventory.Remove("moonbox")) { client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } return; } if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed) { client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed); client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 2: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("Let me know what you want to learn."); dialog.Option("Fire (Lvl 42 + Thunder lvl 4).", 5); dialog.Option("Bomb. (Lvl 43).", 6); dialog.Option("FireCircle. (Lvl 48).", 7); dialog.Option("FireRing. (Lvl 52).", 8); dialog.Option("FireMeteor. (Lvl 55).", 9); dialog.Option("Tornado (Lvl 81 + Fire lvl 3).", 10); dialog.Option("Nothing.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 5: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 42) { if (client.Spells.ContainsKey(1000) && client.Spells[1000] != null && client.Spells[1000].Level == 4) { if (!client.AddSpell(LearnableSpell(1001))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the fire."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to know thunder very well to be able to learn the fire skill."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 42 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 10: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 81) { if (client.Spells.ContainsKey(1001) && client.Spells[1001] != null && client.Spells[1001].Level == 3) { if (!client.AddSpell(LearnableSpell(1002))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the tornado."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to know thunder very well to be able to learn the fire skill."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 81 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 6: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 43) { if (!client.AddSpell(LearnableSpell(1160))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the bomb skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 43 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 7: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 48) { if (!client.AddSpell(LearnableSpell(1120))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the fire circle skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 48 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 8: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 52) { if (!client.AddSpell(LearnableSpell(1150))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the fire ring skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 52 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 9: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 55) { if (!client.AddSpell(LearnableSpell(1180))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the fire meteor skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 55 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } } break; } #endregion #region Taoist Star case 30: { byte mClass = 132; byte MClass = 135; string Class = "water taoist"; switch (npcRequest.OptionID) { case 0: { if (client.Entity.Class >= 100 && client.Entity.Class <= 101) { dialog.Text("I am the master of the fire skills. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you."); dialog.Option("Promote me.", 100); dialog.Option("Learn basic skills.", 200); //dialog.Option("Claim bound items.", 49); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("I am the master of the water skills. The water skills, are not skills that would make wounds but heal them. As I see, you started your way on conquering this world. I will try to help you teaching you warrir skills and promoting you."); dialog.Option("Promote me.", 1); dialog.Option("Learn skills.", 2); dialog.Option("Learn basic skills.", 200); //dialog.Option("Claim bound items.", 49); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } } break; } #region BoundItems case 49: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.HeadgearClaim) dialog.Option("Headgear (Lvl 15).", 50); if (!client.RingClaim) dialog.Option("Ring (Lvl 40).", 51); if (!client.NecklaceClaim) dialog.Option("Necklace (Lvl 50).", 52); if (!client.ArmorClaim) dialog.Option("Armor (Lvl 70).", 53); dialog.Option("Next.", 48); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 48: { dialog.Text("We just found some equipment, and I thought that we should give them to our pupils so they can be less defeatable."); if (!client.BootsClaim) dialog.Option("Boots (Lvl 80).", 54); if (!client.TowerClaim) dialog.Option("Tower (Lvl 100).", 55); if (!client.FanClaim) dialog.Option("Fan (Lvl 100).", 56); if (!client.WeaponClaim) dialog.Option("Weapon (Lvl 110).", 57); dialog.Option("Back.", 49); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 50: { uint itemid = 117009; byte level = 15; if (!client.HeadgearClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.HeadgearClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 51: { uint itemid = 152089; byte level = 40; if (!client.RingClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.RingClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 52: { uint itemid = 121099; byte level = 50; if (!client.NecklaceClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.NecklaceClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 53: { uint itemid = 134069; byte level = 70; if (!client.ArmorClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.ArmorClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 54: { uint itemid = 160159; byte level = 80; if (!client.BootsClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.BootsClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 55: { uint itemid = 202009; byte level = 100; if (!client.TowerClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.TowerClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 56: { uint itemid = 201009; byte level = 100; if (!client.FanClaim) { if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Bound = true; item.Plus = 3; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.FanClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 57: { byte level = 100; if (!client.WeaponClaim) { IProf proff = null; ushort maxlevel = 0; foreach (var prof in client.Proficiencies.Values) { if (maxlevel < prof.Level && prof.ID != 0) { maxlevel = prof.Level; proff = prof; } } if (proff == null) return; uint itemid = (uint)(proff.ID * 1000 + 219); if (!PhoenixProject.Database.ConquerItemInformation.BaseInformations.ContainsKey(itemid)) { Console.WriteLine("invalid claim weapon " + itemid); return; } if (client.Entity.Level >= level) { ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Durability = item.MaximDurability = PhoenixProject.Database .ConquerItemInformation.BaseInformations[itemid].Durability; item.Plus = 3; item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.WeaponClaim = true; } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You don't have atleast level " + level + "."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You cannot claim it twice."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion case 100: { if (client.Entity.Class >= 100 && client.Entity.Class <= 101) { if (client.Entity.Class == 101) { dialog.Text("Do you want to become a water taoist?"); dialog.Option("Yes sir.", 254); dialog.Option("No thank you master.", 255); dialog.Send(); } else { dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + "."); dialog.Option("Promote me sir.", 254); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 254: { if (client.Entity.Class == 100) { client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else if (client.Entity.Class == 101) { client.Entity.Class = 132; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 200: { if (client.Entity.Class >= 100) { dialog.Text("Let me know what you want to learn."); dialog.Option("Thunder (Lvl 1).", 205); dialog.Option("Cure (Lvl 1).", 206); dialog.Option("Meditation. (Lvl 40).", 207); dialog.Option("Nothing.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 205: { if (client.Entity.Class >= 100) { if (!client.AddSpell(LearnableSpell(1000))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned thunder."); dialog.Option("Thank you.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 206: { if (client.Entity.Class >= 100) { if (!client.AddSpell(LearnableSpell(1005))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned cure."); dialog.Option("Thank you.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 207: { if (client.Entity.Class >= 100) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(1195))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned meditation."); dialog.Option("Thank you.", 255); dialog.Send(); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 1: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Class == MClass) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("To promote now you need" + client.PromoteItemNameNeed + " level " + client.PromoteLevelNeed + "."); dialog.Option("Promote me sir.", 3); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Class == MClass) { dialog.Text("You cannot be promoted anymore. You have mastered your class."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { if (client.PromoteItemNeed == 721020) { if (client.Inventory.Remove("moonbox")) { client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } return; } if (client.Inventory.Contains(client.PromoteItemNeed, client.PromoteItemCountNeed) && client.Entity.Level >= client.PromoteLevelNeed) { client.Inventory.Remove(client.PromoteItemNeed, client.PromoteItemCountNeed); client.Inventory.Add(client.PromoteItemGain, 0, 1); client.Entity.Class++; dialog.Text("Congratulations! You have been promoted."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh.", 255); dialog.Send(); } } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 2: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("Let me know what you want to learn."); dialog.Option("XP Revive (Lvl 1).", 5); dialog.Option("Volcano (Lvl 1).", 6); dialog.Option("Lightning (Lvl 1).", 7); dialog.Option("HealingRain. (Lvl 40).", 8); dialog.Option("StarOfAccuracy. (Lvl 40).", 9); dialog.Option("MagicShield. (Lvl 40).", 10); dialog.Option("Next.", 20); dialog.Option("Nothing.", 255); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 20: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { dialog.Text("Let me know what you want to learn."); dialog.Option("WaterDevil. (Lvl 40).", 21); dialog.Option("Stigma. (Lvl 40).", 11); dialog.Option("Invisibility. (Lvl 70).", 12); dialog.Option("Pray. (Lvl 70).", 13); dialog.Option("SpeedLightning (Lvl 70).", 14); dialog.Option("AdvancedCure. (Lvl 80).", 15); dialog.Option("Nectar. (Lvl 90).", 16); dialog.Option("Back.", 2); dialog.Send(); } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 5: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 1) { if (!client.AddSpell(LearnableSpell(1050))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned xp revive skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 1 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 21: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(1280))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You have learned water devil."); dialog.Option("Thank you master.", 255); dialog.Send(); } } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 6: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 1) { if (!client.AddSpell(LearnableSpell(1125))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the volcano xp skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 1 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 7: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 1) { if (!client.AddSpell(LearnableSpell(1010))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the lightning xp skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 1 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 8: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(1055))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the fire healing rain."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 9: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(1085))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the star of acurracy skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 10: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(1090))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the magic shield skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 11: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 40) { if (!client.AddSpell(LearnableSpell(1095))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the stigma skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 40 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 12: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 70) { if (!client.AddSpell(LearnableSpell(1075))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the invisibility skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 13: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 70) { if (!client.AddSpell(LearnableSpell(1100))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the pray skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 14: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 70) { if (!client.AddSpell(LearnableSpell(5001))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the speed lightning skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 15: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 80) { if (!client.AddSpell(LearnableSpell(1175))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the advanced cure skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 16: { if (client.Entity.Class >= mClass && client.Entity.Class <= MClass) { if (client.Entity.Level >= 80) { if (!client.AddSpell(LearnableSpell(1170))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); break; } dialog.Text("You have learned the nectar skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { dialog.Text("You need to be level 70 or more."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("I will not tell any of the " + Class + " secrets to another class, so, good bye."); dialog.Option("Alright.", 255); dialog.Send(); } break; } } break; } #endregion #region MightyTao case 35500: { switch (npcRequest.OptionID) { case 0: { dialog.Text("If you have reborn atleast one time, you can learn some great skills. With them you will be able to summon some misterious monsters. They will help you conquer this world much faster."); dialog.Option("Summon guard - 1 euxite ore.", 1); dialog.Option("Summon class monster - 1 gold ore rate5.", 2); dialog.Send(); break; } case 1: { if (client.Entity.Reborn > 0) { if (client.Inventory.Contains(1072031, 1)) { client.Inventory.Remove(1072031, 1); if (!client.AddSpell(LearnableSpell(4000))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } } } else { dialog.Text("You cannot learn those skills until you reborn atleast once."); dialog.Option("Alright", 255); dialog.Send(); break; } break; } case 2: { if (client.Entity.Reborn > 0) { if (client.Entity.Class >= 50 && client.Entity.Class <= 55) { dialog.Text("You cannot learn skills like this one. Ninjas don't need such thing. They are much more stronger than every other class."); dialog.Option("Alright", 255); dialog.Send(); break; } if (client.Inventory.Contains(1072054, 1)) { client.Inventory.Remove(1072054, 1); if (client.Entity.Class <= 15) client.AddSpell(LearnableSpell(4050)); else if (client.Entity.Class <= 25) client.AddSpell(LearnableSpell(4060)); else if (client.Entity.Class <= 45) client.AddSpell(LearnableSpell(4070)); else if (client.Entity.Class <= 135) client.AddSpell(LearnableSpell(4010)); else if (client.Entity.Class <= 145) client.AddSpell(LearnableSpell(4020)); } } else { dialog.Text("You cannot learn those skills until you reborn atleast once."); dialog.Option("Alright", 255); dialog.Send(); break; } break; } } break; } #endregion #endregion } break; } #endregion #region Stables case 1006: { switch (client.ActiveNpc) { } break; } #endregion #region Lottery case 700: { switch (client.ActiveNpc) { #region LuckyBox case 925: case 926: case 927: case 928: case 929: case 930: case 931: case 932: case 933: case 934: case 935: case 936: case 937: case 938: case 939: case 940: case 942: case 943: case 944: case 945: { switch (npcRequest.OptionID) { case 0: { Game.Lottery.LuckyBox(client.ActiveNpc, client, false); break; } case 15: { Game.Lottery.LuckyBox(client.ActiveNpc, client, false); break; } case 1: { if (client.InLottery) { if (client.Inventory.Count == 40) { client.Send(PhoenixProject.ServerBase.Constants.FullInventory); return; } client.InLottery = false; tryagain: int rand = PhoenixProject.ServerBase.Kernel.Random.Next(PhoenixProject.Database.LotteryTable.LotteryItems.Count); var item = PhoenixProject.Database.LotteryTable.LotteryItems[rand]; var Itemd = PhoenixProject.Database.ConquerItemInformation.BaseInformations[item.ID]; if (Itemd == null) goto tryagain; if (PhoenixProject.ServerBase.Kernel.Rate(item.Rank, item.Chance) && PhoenixProject.ServerBase.Kernel.Rate(item.Rank, 35 - item.Rank)) { IConquerItem Item = new ConquerItem(true); Item.ID = item.ID; Item.Plus = item.Plus; Item.Color = PhoenixProject.Game.Enums.Color.Blue; if (item.Sockets > 0) Item.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket; if (item.Sockets > 1) Item.SocketTwo = PhoenixProject.Game.Enums.Gem.EmptySocket; Item.Durability = Item.MaximDurability = Itemd.Durability; client.Inventory.Add(Item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); if (item.Rank <= 4) { PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " won " + item.Name + " in lottery.", System.Drawing.Color.Black, Message.Talk), PhoenixProject.ServerBase.Kernel.GamePool.Values); } else { if (PhoenixProject.ServerBase.Kernel.Rate(item.Chance, 100)) { PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " won " + item.Name + " in lottery.", System.Drawing.Color.Black, Message.Talk), PhoenixProject.ServerBase.Kernel.GamePool.Values); } } } else { goto tryagain; } } break; } } break; } #endregion #region CollecterZhao case 3952: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello mate, i can help you to change Amulets and LifeFruitBasket for 10 cps what you have?."); dialog.Option("LifeFruitBasket", 1); dialog.Option("PenitenceAmulet.", 2); dialog.Option("DisguiseAmulet.", 3); dialog.Option("Nothing thank you.", 255); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(723725, 1)) { client.Inventory.Remove(723725, 1); client.Entity.ConquerPoints += 10; } else { dialog.Text("Sorry you dont Have Any LifeFruitBaskets."); dialog.Option("Alright Thanks", 255); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(723727, 1)) { client.Inventory.Remove(723727, 1); client.Entity.ConquerPoints += 10; } else { dialog.Text("Sorry you dont Have Any PenitenceAmulet."); dialog.Option("Alright Thanks", 255); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(723724, 1)) { client.Inventory.Remove(723724, 1); client.Entity.ConquerPoints += 10; } else { dialog.Text("Sorry you dont Have Any DisguiseAmulet."); dialog.Option("Alright Thanks.", 255); dialog.Send(); } break; } } break; } #endregion } break; } #endregion } switch (client.ActiveNpc) { #region Lunaa case 50401: { switch (npcRequest.OptionID) { case 0: { dialog.Text("What can I do for you?"); dialog.Option("Enter FairyCave.", 1); dialog.Option("Just passing by.", 255); dialog.Avatar(51); dialog.Send(); break; } case 1: { client.Entity.Teleport(1801, 64, 39); break; } } break; } #endregion #region CloudBeast case 50402: { client.Send(new Message("You took courage to touch the Cloud Beast, and found this gaint creature is quiet and gentie.", System.Drawing.Color.White, Message.Middle)); break; } #endregion #region TCWarder case 50400: { dialog.Text("I was veteran aides of the DC Captain. My superior officer is very kind to me,"); dialog.Text(" as I was promoted to Twin City as a warder here. I was always Keen to repay"); dialog.Text(" the faith and confidence the DC Captain has shown in me! The DC Captain"); dialog.Text(" likes to make friend with great warriors.com to me after your 2nd"); dialog.Text(" reborn and reach level 137, I will introduce you to him, I am sure that he will"); dialog.Text(" be happy to make you acquaintance! And you will have chance to meet his"); dialog.Text(" extraordinary son, Nezha!"); dialog.Option("I will come later!", 255); dialog.Avatar(51); dialog.Send(); break; } #endregion #region Stables #region Breeder case 9883: case 50406: { Data data = new Data(true); data.ID = Data.OpenWindow; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = Data.WindowCommands.Breeding; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); break; } #endregion #region SkillTeacher case 9881: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Ready to learn some great skills? Their prices are as good as they are."); dialog.Option("Riding - 50000 gold.", 1); dialog.Option("Spook - 100000 gold.", 2); dialog.Option("WarCry - 1000000 gold.", 3); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 50000) { if (!client.AddSpell(LearnableSpell(7001))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { client.Entity.Money -= 50000; } } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh sorry.", 255); } break; } case 2: { if (client.Entity.Money >= 100000) { if (!client.AddSpell(LearnableSpell(7002))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { client.Entity.Money -= 100000; } } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh sorry.", 255); } break; } case 3: { if (client.Entity.Money >= 1000000) { if (!client.AddSpell(LearnableSpell(7003))) { dialog.Text("You already know this skill."); dialog.Option("Thank you master.", 255); dialog.Send(); } else { client.Entity.Money -= 1000000; } } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh sorry.", 255); } break; } } break; } #endregion #endregion #region RebirthMaster case 59558: { switch (npcRequest.OptionID) { case 0: { dialog.Text("I devote all my life to the research of eternity. And finally I Know the secret of"); dialog.Text(" rebirth! Well, anything I can help you with?"); dialog.Option("1st Rebirth.", 1); dialog.Option("2nd Rebirth.", 2); dialog.Option("Reincarnation.", 3); dialog.Option("Reallot my Attribute Points.", 4); dialog.Option("Just Passing By.", 255); dialog.Avatar(51); dialog.Send(); break; } case 1: { dialog.Text("Hello conqueror. You know, there are ancient stories about a second life and many people chose not to believe it. Even so, there are some people that believe in it, and that inspired me to learn about it. In my study, I found out how to reborn someone. But, in this quest, a CelestialStone may be needed. To get one, talk with Celestine(TwinCity 365, 92)."); dialog.Option("Tell me more about it.", 10); dialog.Option("Reborm me.", 12); dialog.Option("Nothing thank you.", 255); dialog.Send(); break; } case 10: { dialog.Text("So you want to know more? When you reborn, you can chose what class you want to be the second life. Once you reborn you will start again the journey to conquer this world from level 15. Beware that you may gain some special skills depending on the class you chose to reborn, and you'll be able to get an own pet, that will follow and help you level or fight. The cost is a CelestialStone."); dialog.Option("Reborm me.", 2); dialog.Option("Nothing thank you.", 255); dialog.Send(); break; } case 12: { if (client.Entity.Reborn == 0) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { dialog.Text("There are two kinds of reborns. One is the normal one and the second one is blessed. The normal reborn will give you the chance to get a Super Gem and the blessed reborn will set a -1 into one of your equipment that you wear during the reborn. What do you chose?"); dialog.Option("Normal reborn.", 15); dialog.Option("Blessed reborn.", 13); dialog.Option("Nothing thank you.", 255); dialog.Send(); } else { dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters."); dialog.Option("Ahh.", 255); dialog.Send(); } } else { dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life."); dialog.Option("Thank you.", 255); dialog.Send(); } break; } case 15: { if (client.Entity.Reborn == 0) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { dialog.Text("Select the super gem you desire."); dialog.Option("SuperPhoenixGem.", 203); dialog.Option("SuperDragonGem.", 213); dialog.Option("SuperFuryGem.", 223); dialog.Option("SuperRainbowGem.", 233); dialog.Option("SuperVioletGem.", 253); dialog.Option("SuperMoonGem.", 254); dialog.Option("SuperKylinGem.", 243); dialog.Option("Nothing thank you.", 255); dialog.Send(); } else { dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } else { dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life."); dialog.Option("Thank you.", 255); dialog.Send(); } break; } case 13: { if (client.Entity.Reborn == 0) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { dialog.Text("Select the class you want to reborn in."); dialog.Option("Trojan.", (byte)(10 + npcRequest.OptionID)); dialog.Option("Warrior.", (byte)(20 + npcRequest.OptionID)); dialog.Option("Archer.", (byte)(40 + npcRequest.OptionID)); dialog.Option("WaterTaoist.", (byte)(132 + npcRequest.OptionID)); dialog.Option("FireTaoist.", (byte)(142 + npcRequest.OptionID)); dialog.Option("Ninja.", (byte)(50 + npcRequest.OptionID)); dialog.Option("Monk.", (byte)(60 + npcRequest.OptionID)); dialog.Option("Pirate.", (byte)(70 + npcRequest.OptionID)); //dialog.Option("Nothing thank you.", 255); dialog.Send(); } else { dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } else { dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life."); dialog.Option("Thank you.", 255); dialog.Send(); } break; } default: { if (client.Entity.Reborn == 0) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { if (npcRequest.OptionID == 255) return; if (npcRequest.OptionID >= 200 && npcRequest.OptionID <= 254) { client.SelectedGem = (byte)(npcRequest.OptionID % 100); if (client.SelectedGem == 54) client.SelectedGem = 63; if (client.Entity.Reborn == 0) { byte id = 4; dialog.Text("Select the class you want to reborn in."); dialog.Option("Trojan.", (byte)(10 + id)); dialog.Option("Warrior.", (byte)(20 + id)); dialog.Option("Archer.", (byte)(40 + id)); dialog.Option("WaterTaoist.", (byte)(132 + id)); dialog.Option("FireTaoist.", (byte)(142 + id)); dialog.Option("Ninja.", (byte)(50 + id)); dialog.Option("Monk.", (byte)(60 + id)); dialog.Option("Pirate.", (byte)(70 + id)); //dialog.Option("Nothing thank you.", 255); dialog.Send(); break; } else { dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life."); dialog.Option("Thank you.", 255); dialog.Send(); } } else { if (client.Inventory.Contains(721259, 1)) { byte _class = (byte)(npcRequest.OptionID - npcRequest.OptionID % 10); if (_class > 100) _class += 2; byte type = (byte)(npcRequest.OptionID - _class); if (_class < 100) _class++; if (type != 4) { _class -= 10; } if (client.Reborn(_class)) { client.Inventory.Remove(721259, 1); if (type == 4) { if (client.SelectedGem != 0) { uint gemid = (uint)(client.SelectedGem + 700000); client.Inventory.Add(gemid, 0, 1); } } else { int availableshots = 0; for (byte count = 0; count < 12; count++) if (!client.Equipment.Free(count)) if (client.Equipment.TryGetItem(count).Bless == 0) availableshots++; if (availableshots != 0) { byte ex = (byte)PhoenixProject.ServerBase.Kernel.Random.Next(12); if (!client.Equipment.Free(ex)) if (client.Equipment.TryGetItem(ex).Bless == 0) { var item = client.Equipment.TryGetItem(ex); item.Bless = 1; item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); PhoenixProject.Database.ConquerItemTable.UpdateBless(item); } } } } else { dialog.Text("Sorry, but you need atleast 2 free spaces in your inventory."); dialog.Option("Ohh.", 255); dialog.Send(); } } } } else { dialog.Text("You cannot reborn if your level is not 110+ for water saints and 120+ for other masters."); dialog.Option("Ahh.", 255); dialog.Send(); } } else { dialog.Text("You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life."); dialog.Option("Thank you.", 255); dialog.Send(); } break; } #region Riencration to 7 case 3: { if (client.Entity.Reborn == 2 && client.Entity.Level >= 120) { dialog.Text("I am the ReincarnationSeer i can help you to change your second reborn Class you need OblivionDew"); dialog.Text(" and " + PhoenixProject.Database.rates.Riencration + " cps in your inventory deal?"); dialog.Option("i want to Change my Class.", 5); dialog.Option("i want to Buy OblivionDew.", 6); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("Sorry you need to be Seconed Reborn and Lv + 120."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 5: { if (client.Entity.ConquerPoints >= PhoenixProject.Database.rates.Riencration) { client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = Data.WindowCommands.Reincarnation, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); //break; } else { dialog.Text("Sorry you dont have " + PhoenixProject.Database.rates.Riencration + " cps in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 6: { if (client.Entity.ConquerPoints >= 2000) { dialog.Text("Do you Really want to Buy OblivionDew it cost 2,000 cps"); dialog.Option("Yes.", 7); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("Sorry you dont Have 2,000 cps."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 7: { if (client.Entity.ConquerPoints >= 2000) { client.Entity.ConquerPoints -= 2000; client.Inventory.Add(711083, 0, 1); } else { dialog.Text("Sorry you dont Have 2000 cps in your bag."); dialog.Option("Why!?", 255); dialog.Send(); } break; } #endregion #region attribute 8 case 4: { dialog.Text("Hello there brave conqueror, if you have reborn, and you misplaced your atribute points or you want to set them another way, I'll reset your atribute points for one DragonBall. Do you accept?"); dialog.Option("Here is the DragonBall.", 8); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 8: { if (client.Entity.Reborn > 0) { if (client.Inventory.Contains(1088000, 1)) { client.Inventory.Remove(1088000, 1); if (client.Entity.Reborn != 0) { client.Entity.Agility = 0; client.Entity.Strength = 0; client.Entity.Vitality = 1; client.Entity.Spirit = 0; if (client.Entity.Reborn == 1) { client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornLevel) + 52 + 3 * (client.Entity.Level - 15)); } else { client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornClass) + client.ExtraAtributePoints(client.Entity.SecondRebornLevel, client.Entity.SecondRebornClass) + 52 + 3 * (client.Entity.Level - 15)); } } } else { dialog.Text("You need a DragonBall."); dialog.Option("I'll just leave", 255); dialog.Send(); } } else { dialog.Text("You have to have atleast one rebirth atleast."); dialog.Option("I'll just leave", 255); dialog.Send(); } break; } #endregion #region Alex 2ndreborn 9 case 2: { dialog.Text("You don't worry, it's not gonna hurt you a bit when getting the third life. You just need an exemption token and it's all going to be fine."); dialog.Option("Here is the ExemptionToken.", 9); dialog.Option("I'll just leave", 255); dialog.Send(); break; } case 9: { if (client.Entity.Reborn == 1) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { dialog.Text("Select the class you want to reborn in."); dialog.Option("Trojan.", 11); dialog.Option("Warrior.", 21); dialog.Option("Archer.", 41); dialog.Option("WaterTaoist.", 132); dialog.Option("FireTaoist.", 142); dialog.Option("Ninja.", 51); dialog.Option("Monk.", 61); dialog.Option("Pirate.", 71); //dialog.Option("Nothing thank you.", 255); dialog.Send(); } else { dialog.Text("If you are a water saint you need level 110+, else you need 120+."); dialog.Option("I'll just leave", 255); dialog.Send(); break; } } else { dialog.Text("You need to be in the second life to be able to get the third life."); dialog.Option("I'll just leave", 255); dialog.Send(); break; } break; } case 11: case 21: case 41: case 51: case 61: case 71: case 132: case 142: { if (npcRequest.OptionID == 255) return; if (client.Entity.Reborn == 1) { if (client.Entity.Class % 10 == 5 && client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120)) { if (client.Inventory.Contains(723701, 1)) { if (client.Reborn(npcRequest.OptionID)) { client.Inventory.Remove(723701, 1); } else { dialog.Text("You need two free slots in your inventory."); dialog.Option("I'll just leave", 255); dialog.Send(); break; } } } else { dialog.Text("If you are a water saint you need level 110+, else you need 120+."); dialog.Option("I'll just leave", 255); dialog.Send(); break; } } else { dialog.Text("You need to be in the second life to be able to get the third life."); dialog.Option("I'll just leave", 255); dialog.Send(); break; } break; } #endregion } break; } #endregion case 2000://CloudSaintJar case 2001: { switch (npcRequest.OptionID) { case 0: { if (client.Entity.SubClassLevel == 0 && !client.Inventory.Contains(0xb71b0, 1)) { dialog.Text("Hello Hero im CouldSaint , i can help you to obtain a good gift but you must give me 200 RedDevils Souls,"); dialog.Text("i will give you A jar will help you in That. after you done come back and change it with A Prize, "); dialog.Text("you can try this quest 1 time a day"); dialog.Option("Accept!", 1); dialog.Option("JustPassingBy!", 255); dialog.Avatar(51); dialog.Send(); } else { if (client.Entity.Status4 < 200) { if (client.Inventory.Contains(0xb71b0, 1)) { dialog.Text("you have A jar to collect 200 RedDevils Soul in it and you still need [" + (200 - client.Entity.Status4) + "] souls to collect did you lost your way ?"); dialog.Option("Teleport me to RedDevils!", 2); dialog.Option("JustPassingBy!", 255); dialog.Avatar(51); dialog.Send(); } else { dialog.Text("You got your try in DemonQuest Tonight come again tomorrow"); dialog.Option("Thanks!", 255); dialog.Avatar(51); dialog.Send(); } } else { dialog.Text("Congratulation you Collected 200 RedDdevils Soul you want to change the Jar with A Gift?"); dialog.Option("Sure!", 3); dialog.Avatar(51); dialog.Send(); } } break; } case 1: { client.Entity.SubClassLevel++; client.Entity.Status4 = 0; // client.MonsterHunterStats.QuestGiver = 10; PhoenixProject.Interfaces.IConquerItem i = new ConquerItem(true); i.ID = 0xb71b0; i.Durability = 200; i.MaximDurability = 58; client.Entity.kilid = 58; client.Inventory.Add(i, Game.Enums.ItemUse.CreateAndAdd); break; } case 2: { client.Entity.Teleport(1001, 337, 306); break; } case 3: { if (client.Inventory.Contains(0xb71b0, 1)) { client.Inventory.Remove(0xb71b0, 1); uint randprize = (uint)PhoenixProject.ServerBase.Kernel.Random.Next(1, (int)Database.DROP_SOULS.Count_Jar); uint ItemID = ServerBase.Kernel.JarItem[randprize].item_id; client.Inventory.Add(ItemID, 0, 1); ServerBase.Kernel.SendWorldMessage(new Message("Congratulations, " + client.Entity.Name + " has finished CloudSaint Jar Quest and Obtained " + Database.ConquerItemInformation.BaseInformations[ItemID].Name + " !", System.Drawing.Color.Red, Network.GamePackets.Message.Talk), ServerBase.Kernel.GamePool.Values); Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } break; } } break; } #region RefineryStabilizer case 7538: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there! I can channel the power of Permanent Stones and stabilize the Refinery, which means making the temporary Refinery permanent. Permanent Stones have 10 Stabilization Points,"); dialog.Text("~and Big Permanent Stones have 100. Different Refinery levels require different amounts of points. I can only perform the stabilization with enough of them. Are we clear? Good."); dialog.Text("~Do you want to stabilize the Refinery now?"); dialog.Option("Yup.", 1); dialog.Option("Nope.", 255); dialog.Avatar(51); dialog.Send(); break; } case 1: { Data Data = new Data(true); Data.UID = client.Entity.UID; Data.ID = 126; Data.dwParam = 448; Data.wParam1 = client.Entity.X; Data.wParam2 = client.Entity.Y; client.Send(Data); break; } } break; } #endregion #region +13 +14 +15 case 420420: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " i can help you to upgrade ur gears to +13 , +14, +15. but you must have the required cps"); dialog.Option("Compose +13", 1); dialog.Option("Compose +14", 2); dialog.Option("Compose +15", 3); dialog.Option("Just Passing By!.", 255); dialog.Send(); break; } case 1: { dialog.Text("Select which item's details you want to +13?, remember it will coast you " + Database.rates.plus13 + " Cps"); dialog.Option("Headgear.", 4); dialog.Option("Necklace.", 5); dialog.Option("Armor.", 6); dialog.Option("Main Weapon.", 7); dialog.Option("Left Weapon/Shield.", 8); dialog.Option("Ring.", 9); dialog.Option("Boots.", 10); dialog.Option("I'll just leave", 255); break; } case 2: { dialog.Text("Select which item's details you want to +14?, remember it will coast you " + Database.rates.plus14 + " Cps"); dialog.Option("Headgear.", 24); dialog.Option("Necklace.", 25); dialog.Option("Armor.", 26); dialog.Option("Main Weapon.", 27); dialog.Option("Left Weapon/Shield.", 28); dialog.Option("Ring.", 29); dialog.Option("Boots.", 30); dialog.Option("I'll just leave", 255); break; } case 3: { dialog.Text("Select which item's details you want to +15?, remember it will coast you " + Database.rates.plus15 + " Cps"); dialog.Option("Headgear.", 44); dialog.Option("Necklace.", 45); dialog.Option("Armor.", 46); dialog.Option("Main Weapon.", 47); dialog.Option("Left Weapon/Shield.", 48); dialog.Option("Ring.", 49); dialog.Option("Boots.", 50); dialog.Option("I'll just leave", 255); break; } #region +13 #region boot case 10: { if (!client.Equipment.Free(8)) { if (client.Equipment.TryGetItem(8).Plus == 12) { if (client.Entity.ConquerPoints >= Database.rates.plus13) { client.Entity.ConquerPoints -= Database.rates.plus13; client.Equipment.TryGetItem(8).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(8)); client.Equipment.TryGetItem(8).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(8).Send(client); dialog.Text("Congratulations, Your item is +13 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your Boot isnt +12 yet i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any Boot cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region Ring case 9: { if (!client.Equipment.Free(6)) { if (client.Equipment.TryGetItem(6).Plus == 12) { if (client.Entity.ConquerPoints >= Database.rates.plus13) { client.Entity.ConquerPoints -= Database.rates.plus13; client.Equipment.TryGetItem(6).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(6)); client.Equipment.TryGetItem(6).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(6).Send(client); dialog.Text("Congratulations, Your item is +13 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your Ring/Bracelet isnt +12 yet i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any Rings/Bracelet cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region LeftWeapons case 8: { if (!client.Equipment.Free(5)) { if (client.Equipment.TryGetItem(5).Plus == 12) { if (client.Entity.ConquerPoints >= Database.rates.plus13) { client.Entity.ConquerPoints -= Database.rates.plus13; client.Equipment.TryGetItem(5).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(5)); client.Equipment.TryGetItem(5).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(5).Send(client); dialog.Text("Congratulations, Your item is +13 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your LeftWeapon isnt +12 yet i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any LeftWeapons cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region RightWeapon case 7: { if (!client.Equipment.Free(4)) { if (client.Equipment.TryGetItem(4).Plus == 12) { if (client.Entity.ConquerPoints >= Database.rates.plus13) { client.Entity.ConquerPoints -= Database.rates.plus13; client.Equipment.TryGetItem(4).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(4)); client.Equipment.TryGetItem(4).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(4).Send(client); dialog.Text("Congratulations, Your item is +13 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your RightWeapon isnt +12 yet i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any RightWeapons cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region Armor case 6: { if (!client.Equipment.Free(3)) { if (client.Equipment.TryGetItem(3).Plus == 12) { if (client.Entity.ConquerPoints >= Database.rates.plus13) { client.Entity.ConquerPoints -= Database.rates.plus13; client.Equipment.TryGetItem(3).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(3)); client.Equipment.TryGetItem(3).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(3).Send(client); dialog.Text("Congratulations, Your item is +13 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your Armor isnt +12 yet i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any Armor cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region Necklace case 5: { if (!client.Equipment.Free(2)) { if (client.Equipment.TryGetItem(2).Plus == 12) { if (client.Entity.ConquerPoints >= Database.rates.plus13) { client.Entity.ConquerPoints -= Database.rates.plus13; client.Equipment.TryGetItem(2).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(2)); client.Equipment.TryGetItem(2).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(2).Send(client); dialog.Text("Congratulations, Your item is +13 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your Necklace isnt +12 yet i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any Necklace cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region HeadGear case 4: { if (!client.Equipment.Free(1)) { if (client.Equipment.TryGetItem(1).Plus == 12) { if (client.Entity.ConquerPoints >= Database.rates.plus13) { client.Entity.ConquerPoints -= Database.rates.plus13; client.Equipment.TryGetItem(1).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(1)); client.Equipment.TryGetItem(1).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(1).Send(client); dialog.Text("Congratulations, Your item is +13 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your Headgear isnt +12 yet i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any HeadGear cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #endregion #region +14 #region boot case 30: { if (!client.Equipment.Free(8)) { if (client.Equipment.TryGetItem(8).Plus == 13) { if (client.Entity.ConquerPoints >= Database.rates.plus14) { client.Entity.ConquerPoints -= Database.rates.plus14; client.Equipment.TryGetItem(8).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(8)); client.Equipment.TryGetItem(8).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(8).Send(client); dialog.Text("Congratulations, Your item is +14 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your Boot isnt +13 i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any Boot cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region Ring case 29: { if (!client.Equipment.Free(6)) { if (client.Equipment.TryGetItem(6).Plus == 13) { if (client.Entity.ConquerPoints >= Database.rates.plus14) { client.Entity.ConquerPoints -= Database.rates.plus14; client.Equipment.TryGetItem(6).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(6)); client.Equipment.TryGetItem(6).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(6).Send(client); dialog.Text("Congratulations, Your item is +14 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your Ring/Bracelet isnt +13 i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any Rings/Bracelet cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region LeftWeapons case 28: { if (!client.Equipment.Free(5)) { if (client.Equipment.TryGetItem(5).Plus == 13) { if (client.Entity.ConquerPoints >= Database.rates.plus14) { client.Entity.ConquerPoints -= Database.rates.plus14; client.Equipment.TryGetItem(5).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(5)); client.Equipment.TryGetItem(5).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(5).Send(client); dialog.Text("Congratulations, Your item is +14 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your LeftWeapon isnt +13 i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any LeftWeapons cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region RightWeapon case 27: { if (!client.Equipment.Free(4)) { if (client.Equipment.TryGetItem(4).Plus == 13) { if (client.Entity.ConquerPoints >= Database.rates.plus14) { client.Entity.ConquerPoints -= Database.rates.plus14; client.Equipment.TryGetItem(4).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(4)); client.Equipment.TryGetItem(4).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(4).Send(client); dialog.Text("Congratulations, Your item is +14 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your RightWeapon isnt +13 i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any RightWeapons cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region Armor case 26: { if (!client.Equipment.Free(3)) { if (client.Equipment.TryGetItem(3).Plus == 13) { if (client.Entity.ConquerPoints >= Database.rates.plus14) { client.Entity.ConquerPoints -= Database.rates.plus14; client.Equipment.TryGetItem(3).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(3)); client.Equipment.TryGetItem(3).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(3).Send(client); dialog.Text("Congratulations, Your item is +14 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your Armor isnt +13 i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any Armor cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region Necklace case 25: { if (!client.Equipment.Free(2)) { if (client.Equipment.TryGetItem(2).Plus == 13) { if (client.Entity.ConquerPoints >= Database.rates.plus14) { client.Entity.ConquerPoints -= Database.rates.plus14; client.Equipment.TryGetItem(2).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(2)); client.Equipment.TryGetItem(2).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(2).Send(client); dialog.Text("Congratulations, Your item is +14 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your Necklace isnt +13 i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any Necklace cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #region HeadGear case 24: { if (!client.Equipment.Free(1)) { if (client.Equipment.TryGetItem(1).Plus == 13) { if (client.Entity.ConquerPoints >= Database.rates.plus14) { client.Entity.ConquerPoints -= Database.rates.plus14; client.Equipment.TryGetItem(1).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(1)); client.Equipment.TryGetItem(1).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(1).Send(client); dialog.Text("Congratulations, Your item is +14 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry your Headgear isnt +13 i cant help you"); dialog.Option("sorry.", 255); } } else { dialog.Text("sorry you dont wear any HeadGear cant help you"); dialog.Option("sorry.", 255); } break; } #endregion #endregion #region +15 #region boot case 50: { if (!client.Equipment.Free(8)) { if (client.Equipment.TryGetItem(8).Plus == 14) { if (client.Entity.ConquerPoints >= Database.rates.plus15) { client.Entity.ConquerPoints -= Database.rates.plus15; client.Equipment.TryGetItem(8).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(8)); client.Equipment.TryGetItem(8).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(8).Send(client); dialog.Text("Congratulations, Your item is +15 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry your Boot isnt +14, i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry you dont wear any Boots, cant help you"); dialog.Option("Sorry.", 255); } break; } #endregion #region Ring case 49: { if (!client.Equipment.Free(6)) { if (client.Equipment.TryGetItem(6).Plus == 14) { if (client.Entity.ConquerPoints >= Database.rates.plus15) { client.Entity.ConquerPoints -= Database.rates.plus15; client.Equipment.TryGetItem(6).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(6)); client.Equipment.TryGetItem(6).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(6).Send(client); dialog.Text("Congratulations, Your item is +15 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry your Ring/Bracelet isnt +14, i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry you dont wear any Rings/Bracelets, cant help you"); dialog.Option("Sorry.", 255); } break; } #endregion #region LeftWeapons case 48: { if (!client.Equipment.Free(5)) { if (client.Equipment.TryGetItem(5).Plus == 14) { if (client.Entity.ConquerPoints >= Database.rates.plus15) { client.Entity.ConquerPoints -= Database.rates.plus15; client.Equipment.TryGetItem(5).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(5)); client.Equipment.TryGetItem(5).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(5).Send(client); dialog.Text("Congratulations, Your item is +15 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry your LeftWeapon isnt +14, i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry you dont wear any LeftWeapons, cant help you"); dialog.Option("Sorry.", 255); } break; } #endregion #region RightWeapon case 47: { if (!client.Equipment.Free(4)) { if (client.Equipment.TryGetItem(4).Plus == 14) { if (client.Entity.ConquerPoints >= Database.rates.plus15) { client.Entity.ConquerPoints -= Database.rates.plus15; client.Equipment.TryGetItem(4).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(4)); client.Equipment.TryGetItem(4).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(4).Send(client); dialog.Text("Congratulations, Your item is +15 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry your RightWeapon isnt +14, i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry you dont wear any RightWeapons, cant help you"); dialog.Option("Sorry.", 255); } break; } #endregion #region Armor case 46: { if (!client.Equipment.Free(3)) { if (client.Equipment.TryGetItem(3).Plus == 14) { if (client.Entity.ConquerPoints >= Database.rates.plus15) { client.Entity.ConquerPoints -= Database.rates.plus15; client.Equipment.TryGetItem(3).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(3)); client.Equipment.TryGetItem(3).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(3).Send(client); dialog.Text("Congratulations, Your item is +15 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry your Armor isnt +14, i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry you dont wear any Armors, cant help you"); dialog.Option("Sorry.", 255); } break; } #endregion #region Necklace case 45: { if (!client.Equipment.Free(2)) { if (client.Equipment.TryGetItem(2).Plus == 14) { if (client.Entity.ConquerPoints >= Database.rates.plus15) { client.Entity.ConquerPoints -= Database.rates.plus15; client.Equipment.TryGetItem(2).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(2)); client.Equipment.TryGetItem(2).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(2).Send(client); dialog.Text("Congratulations, Your item is +15 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry your Necklace isnt +14, i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry you dont wear any Necklace, cant help you"); dialog.Option("Sorry.", 255); } break; } #endregion #region HeadGear case 44: { if (!client.Equipment.Free(1)) { if (client.Equipment.TryGetItem(1).Plus == 14) { if (client.Entity.ConquerPoints >= Database.rates.plus15) { client.Entity.ConquerPoints -= Database.rates.plus15; client.Equipment.TryGetItem(1).Plus++; Database.ConquerItemTable.UpdatePlus(client.Equipment.TryGetItem(1)); client.Equipment.TryGetItem(1).Mode = PhoenixProject.Game.Enums.ItemMode.Update; client.Equipment.TryGetItem(1).Send(client); dialog.Text("Congratulations, Your item is +15 now!"); dialog.Option("Thanks.", 255); } else { dialog.Text("Sorry you dont have the Required amount of cps , i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry your Headgear isnt +14, i cant help you"); dialog.Option("Sorry.", 255); } } else { dialog.Text("Sorry you dont wear any HeadGears, cant help you"); dialog.Option("Sorry.", 255); } break; } #endregion #endregion } break; } #endregion #region ClassPkEscort #region ClassPkEscort case 706: case 4500: case 4501: case 4502: case 4503: case 4504: case 4505: case 4506: { switch (npcRequest.OptionID) { case 0: { PhoenixProject.Game.ConquerStructures.ClassPk.CheackAlive(client.Entity.MapID); dialog.Text("Hello there,do you want to claim ClassPk Prize you must be the only one Here to Claim It."); dialog.Option("ClaimPrize.", 1); dialog.Option("Just Passing By!", 255); dialog.Send(); break; } case 1: { if (PhoenixProject.Game.ConquerStructures.ClassPk.howmanyinmap == 1) { dialog.Text("would you like to Claim the prize for ClassPk Tourment?"); dialog.Option("yes,please.", 2); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("Sorry you must be the only one in the Map to claim the Prize"); dialog.Option("oh,Sorry.", 255); dialog.Send(); } break; } case 2: { if (client.Entity.Class >= 10 && client.Entity.Class <= 15 && DateTime.Now.Minute >= 05 && DateTime.Now.Minute <= 59 && DateTime.Now.Hour >= Game.KimoEvents.ClassHour && DateTime.Now.Hour < Game.KimoEvents.ClassEndHour) { dialog.Text("You have won Trojan ClassPk would You like to ClaimPrize and Back to TwinCity?"); dialog.Option("Gimme My Prize.", 3); dialog.Send(); } else if (client.Entity.Class >= 20 && client.Entity.Class <= 25 && DateTime.Now.Minute >= 05 && DateTime.Now.Minute <= 59 && DateTime.Now.Hour >= Game.KimoEvents.ClassHour && DateTime.Now.Hour < Game.KimoEvents.ClassEndHour) { dialog.Text("You have won Warrior ClassPk would You like to ClaimPrize and Back to TwinCity?"); dialog.Option("Gimme My Prize.", 4); dialog.Send(); } else if (client.Entity.Class >= 40 && client.Entity.Class <= 45 && DateTime.Now.Minute >= 05 && DateTime.Now.Minute <= 59 && DateTime.Now.Hour >= Game.KimoEvents.ClassHour && DateTime.Now.Hour < Game.KimoEvents.ClassEndHour) { dialog.Text("You have won Archer ClassPk would You like to ClaimPrize and Back to TwinCity?"); dialog.Option("Gimme My Prize.", 5); dialog.Send(); } else if (client.Entity.Class >= 50 && client.Entity.Class <= 55 && DateTime.Now.Minute >= 05 && DateTime.Now.Minute <= 59 && DateTime.Now.Hour >= Game.KimoEvents.ClassHour && DateTime.Now.Hour < Game.KimoEvents.ClassEndHour) { dialog.Text("You have won Ninja ClassPk would You like to ClaimPrize and Back to TwinCity?"); dialog.Option("Gimme My Prize.", 6); dialog.Send(); } else if (client.Entity.Class >= 60 && client.Entity.Class <= 65 && DateTime.Now.Minute >= 05 && DateTime.Now.Minute <= 59 && DateTime.Now.Hour >= Game.KimoEvents.ClassHour && DateTime.Now.Hour < Game.KimoEvents.ClassEndHour) { dialog.Text("You have won Monk ClassPk would You like to ClaimPrize and Back to TwinCity?"); dialog.Option("Gimme My Prize.", 7); dialog.Send(); } else if (client.Entity.Class >= 130 && client.Entity.Class <= 135 && DateTime.Now.Minute >= 05 && DateTime.Now.Minute <= 59 && DateTime.Now.Hour >= Game.KimoEvents.ClassHour && DateTime.Now.Hour < Game.KimoEvents.ClassEndHour) { dialog.Text("You have won Water ClassPk would You like to ClaimPrize and Back to TwinCity?"); dialog.Option("Gimme My Prize.", 8); dialog.Send(); } else if (client.Entity.Class >= 140 && client.Entity.Class <= 145 && DateTime.Now.Minute >= 05 && DateTime.Now.Minute <= 59 && DateTime.Now.Hour >= Game.KimoEvents.ClassHour && DateTime.Now.Hour < Game.KimoEvents.ClassEndHour) { dialog.Text("You have won Fire ClassPk would You like to ClaimPrize and Back to TwinCity?"); dialog.Option("Gimme My Prize.", 9); dialog.Send(); } else if (client.Entity.Class >= 70 && client.Entity.Class <= 75 && DateTime.Now.Minute >= 05 && DateTime.Now.Minute <= 59 && DateTime.Now.Hour >= Game.KimoEvents.ClassHour && DateTime.Now.Hour < Game.KimoEvents.ClassEndHour) { dialog.Text("You have won Pirates ClassPk would You like to ClaimPrize and Back to TwinCity?"); dialog.Option("Gimme My Prize.", 10); dialog.Send(); } else { dialog.Text("Sorry you can claim the Prize Btween " + Game.KimoEvents.ClassHour + ":05 to " + Game.KimoEvents.ClassHour + ":59 and must be the only Alive player Here"); dialog.Option("ok Sorry.", 255); dialog.Send(); } break; } case 3: { PhoenixProject.Game.ConquerStructures.ClassPk.ClassPks = false; client.Entity.Teleport(1002, 439, 387); client.Entity.ConquerPoints += PhoenixProject.Database.rates.classpk; Game.Flags.AddTopTrojan(client); client.Entity.AddFlag(PhoenixProject.Network.GamePackets.Update.Flags.TopTrojan); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations, " + client.Entity.Name + " has won TrojanPk War and Claimed " + PhoenixProject.Database.rates.classpk + " cps!", System.Drawing.Color.White, Message.TopLeft), PhoenixProject.ServerBase.Kernel.GamePool.Values); break; } case 4: { PhoenixProject.Game.ConquerStructures.ClassPk.ClassPks = false; client.Entity.Teleport(1002, 439, 387); client.Entity.ConquerPoints += PhoenixProject.Database.rates.classpk; Game.Flags.AddTopWarrior(client); client.Entity.AddFlag(PhoenixProject.Network.GamePackets.Update.Flags.TopWarrior); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations, " + client.Entity.Name + " has won WarriorPk War and Claimed " + PhoenixProject.Database.rates.classpk + " cps!", System.Drawing.Color.White, Message.TopLeft), PhoenixProject.ServerBase.Kernel.GamePool.Values); break; } case 5: { PhoenixProject.Game.ConquerStructures.ClassPk.ClassPks = false; client.Entity.Teleport(1002, 439, 387); client.Entity.ConquerPoints += PhoenixProject.Database.rates.classpk; Game.Flags.AddTopArcher(client); client.Entity.AddFlag(PhoenixProject.Network.GamePackets.Update.Flags.TopArcher); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations, " + client.Entity.Name + " has won ArcherPk War and Claimed " + PhoenixProject.Database.rates.classpk + " cps!", System.Drawing.Color.White, Message.TopLeft), PhoenixProject.ServerBase.Kernel.GamePool.Values); break; } case 6: { PhoenixProject.Game.ConquerStructures.ClassPk.ClassPks = false; client.Entity.Teleport(1002, 439, 387); client.Entity.ConquerPoints += PhoenixProject.Database.rates.classpk; Game.Flags.AddTopNinja(client); client.Entity.AddFlag(PhoenixProject.Network.GamePackets.Update.Flags.TopNinja); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations, " + client.Entity.Name + " has won NinjaPk War and Claimed " + PhoenixProject.Database.rates.classpk + " cps!", System.Drawing.Color.White, Message.TopLeft), PhoenixProject.ServerBase.Kernel.GamePool.Values); break; } case 7: { PhoenixProject.Game.ConquerStructures.ClassPk.ClassPks = false; client.Entity.Teleport(1002, 439, 387); client.Entity.ConquerPoints += PhoenixProject.Database.rates.classpk; Game.Flags.AddTopMonk(client); client.Entity.AddFlag(PhoenixProject.Network.GamePackets.Update.Flags.TopMonk); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations, " + client.Entity.Name + " has won MonkPk War and Claimed " + PhoenixProject.Database.rates.classpk + " cps!", System.Drawing.Color.White, Message.TopLeft), PhoenixProject.ServerBase.Kernel.GamePool.Values); break; } case 8: { PhoenixProject.Game.ConquerStructures.ClassPk.ClassPks = false; client.Entity.Teleport(1002, 439, 387); client.Entity.ConquerPoints += PhoenixProject.Database.rates.classpk; Game.Flags.AddTopWater(client); client.Entity.AddFlag(PhoenixProject.Network.GamePackets.Update.Flags.TopWaterTaoist); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations, " + client.Entity.Name + " has won WaterTao Pk War and Claimed " + PhoenixProject.Database.rates.classpk + " cps!", System.Drawing.Color.White, Message.TopLeft), PhoenixProject.ServerBase.Kernel.GamePool.Values); break; } case 9: { PhoenixProject.Game.ConquerStructures.ClassPk.ClassPks = false; client.Entity.Teleport(1002, 439, 387); client.Entity.ConquerPoints += PhoenixProject.Database.rates.classpk; Game.Flags.AddTopFire(client); client.Entity.AddFlag(PhoenixProject.Network.GamePackets.Update.Flags.TopFireTaoist); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations, " + client.Entity.Name + " has won FireTao Pk War and Claimed " + PhoenixProject.Database.rates.classpk + " cps!", System.Drawing.Color.White, Message.TopLeft), PhoenixProject.ServerBase.Kernel.GamePool.Values); break; } case 10: { PhoenixProject.Game.ConquerStructures.ClassPk.ClassPks = false; client.Entity.Teleport(1002, 439, 387); client.Entity.ConquerPoints += PhoenixProject.Database.rates.classpk; Game.Flags.AddTopPirate(client); client.Entity.AddFlag2(PhoenixProject.Network.GamePackets.Update.Flags2.TopPirate); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations, " + client.Entity.Name + " has won TopPirate Pk War and Claimed " + PhoenixProject.Database.rates.classpk + " cps!", System.Drawing.Color.White, Message.TopLeft), PhoenixProject.ServerBase.Kernel.GamePool.Values); break; } } break; } #endregion #endregion #region SpecialGarments-Deer Npc case 442566://and this id { switch (npcRequest.OptionID) { case 0: { //800254 SufferingScythe ninja soul wep //800804 TimePistol //800809 DestinyRapier // dialog.Text("hello, i can help you to Buy new Special Garment and MountDeer and souls for " + Database.rates.Garment + " Cps"); dialog.Text("and new flowers for 5k cps choose what you want to buy?"); dialog.Option("NewGarments.", 1);//200418 dialog.Option("NewDeer", 2); dialog.Option("Pirate[P6] WeaponSoul", 20); dialog.Option("Ninja[P6] WeaponSoul", 40); dialog.Option("NewFlowers", 50); dialog.Option("Just Passing By!", 0); dialog.Send(); break; } case 50: { dialog.Text("hello, i can help you to Buy new Special Flowers that u can send for Male Charchter you must be female to send it"); dialog.Text(" it coast 5k cps each, choose what you want to buy?"); dialog.Option("999Jades.", 51);//758999 999Jades dialog.Option("999TinsOfBeer", 52);//757999 999TinsOfBeer dialog.Option("999LoveLetters.", 53);//999LoveLetters 756999 dialog.Option("999Kisses.", 54);//999Kisses 755999 dialog.Send(); break; } case 54: { if (client.Entity.ConquerPoints >= 5000) { if (client.Entity.ConquerPoints >= 5000) { client.Entity.ConquerPoints -= 5000; client.Inventory.Add(755999, 0, 1); dialog.Text("Congratulations you got 999Kisses"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with 5000 Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with 5000 Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 53: { if (client.Entity.ConquerPoints >= 5000) { if (client.Entity.ConquerPoints >= 5000) { client.Entity.ConquerPoints -= 5000; client.Inventory.Add(756999, 0, 1); dialog.Text("Congratulations you got 999LoveLetters"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with 5000 Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with 5000 Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 52: { if (client.Entity.ConquerPoints >= 5000) { if (client.Entity.ConquerPoints >= 5000) { client.Entity.ConquerPoints -= 5000; client.Inventory.Add(757999, 0, 1); dialog.Text("Congratulations you got 999TinsOfBeer"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with 5000 Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with 5000 Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 51: { if (client.Entity.ConquerPoints >= 5000) { if (client.Entity.ConquerPoints >= 5000) { client.Entity.ConquerPoints -= 5000; client.Inventory.Add(758999, 0, 1); dialog.Text("Congratulations you got 999Jades"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with 5000 Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with 5000 Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 40: { dialog.Text("hello, i can help you to Buy new Special Ninja[P6] Weapon Soul for " + Database.rates.Garment + " Cps"); dialog.Text(" choose what you want to buy?"); dialog.Option("SufferingScythe[P6].", 41);//200421 SaintDragon dialog.Option("StealthKatana[P6]", 42);//200426 800017 dialog.Send(); break; } case 41: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(800254, 0, 1); dialog.Text("Congratulations you got new Special Ninja[P6] Weapon Soul"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 42: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(800017, 0, 1); dialog.Text("Congratulations you got new Special Ninja[P6] Weapon Soul"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 20: { dialog.Text("hello, i can help you to Buy new Special Pirate[P6] Weapon Soul for " + Database.rates.Garment + " Cps"); dialog.Text(" choose what you want to buy?"); dialog.Option("TimePistol[P6].", 21);//200421 SaintDragon dialog.Option("DestinyRapier[P6]", 22);//200426 RoaringChow dialog.Send(); break; } case 22: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(800809, 0, 1); dialog.Text("Congratulations you got new Special Pirate[P6] Weapon Soul"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 21: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(800804, 0, 1); dialog.Text("Congratulations you got new Special Pirate[P6] Weapon Soul"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 2: { dialog.Text("hello, i can help you to Buy new Special MountDeer for " + Database.rates.Garment + " Cps"); dialog.Text(" choose what you want to buy?"); dialog.Option("SaintDragon.", 3);//200421 SaintDragon dialog.Option("RoaringChow", 4);//200426 RoaringChow dialog.Option("WinebibberPanda", 5);//200427 WinebibberPanda dialog.Option("SomesaultCloud", 6);//200428 Somesault~Cloud dialog.Option("WildCamel", 7);//200431 WildCamel dialog.Send(); break; } case 1: { dialog.Text("hello, i can help you to Buy new Special Garment for " + Database.rates.Garment + " Cps"); dialog.Text(" choose what you want to buy?"); dialog.Option("GracefulBeauty[Female].", 8);//187605 GracefulBeauty dialog.Option("CherryRose", 9);//187675 CherryRose dialog.Option("SoberDark", 10);//187665 SoberDark dialog.Option("AssassinSuit(Male)", 11);//192185 AssassinSuit dialog.Option("AnniversarySuit(Male)", 12);//192195@@AnniversarySuit(Male) dialog.Option("AnniversarySuit(Female)", 13);//187635 AnniversarySuit(Female) dialog.Send(); break; } case 13: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(187635, 0, 1); dialog.Text("Congratulations you got new Special Garment"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 12: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(192195, 0, 1); dialog.Text("Congratulations you got new Special Garment"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 11: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(192185, 0, 1); dialog.Text("Congratulations you got new Special Garment"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 10: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(187665, 0, 1); dialog.Text("Congratulations you got new Special Garment"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 9: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(187675, 0, 1); dialog.Text("Congratulations you got new Special Garment"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 8: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(187605, 0, 1); dialog.Text("Congratulations you got new Special Garment"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 7: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(200431, 0, 1); dialog.Text("Congratulations you got new Special MountArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 6: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(200428, 0, 1); dialog.Text("Congratulations you got new Special MountArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 5: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(200427, 0, 1); dialog.Text("Congratulations you got new Special MountArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 4: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(200426, 0, 1); dialog.Text("Congratulations you got new Special MountArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(200421, 0, 1); dialog.Text("Congratulations you got new Special MountArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } } break; } #endregion #region Octopus npc//3071 60 128 case 42251: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + " I'm The Sea Guard i can teleport you to Sea Area where u can fidn and kill ."); dialog.Text(" GoldenOctopus and CoinsStealer and get rar items , wana go to Sear Area"); dialog.Option("Leme Join.", 1); dialog.Option("Just Passing By!.", 255); dialog.Avatar(116); dialog.Send(); break; } case 1: { client.Entity.Teleport(3071, 60, 128); break; } } break; } #endregion #region LordsWar case 4152: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + " I'm The WarLord i can let you Join the LordsWar Event 1 time ."); dialog.Text("Everyday u can signup and enjoy the event for 30 Minutes at this time[" + Game.KimoEvents.LordsWarHour + ":00 " + Game.KimoEvents.LordsWarHour + ":30]."); dialog.Text("you need to have atleast 100k cps in your inventory if you killed any player u will drop 20k from him also if u died u will lose cps "); dialog.Option("Leme Join.", 1); dialog.Option("Just Passing By!.", 255); dialog.Avatar(116); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.LordsWarHour && DateTime.Now.Minute >= 00 && DateTime.Now.Minute < 30) { if (client.Entity.ConquerPoints >= 100000) { client.Entity.Teleport(3031, 39, 35); dialog.Text("Defeat other players to gain cps and be carefull if u died u will lose 20k cps GoodLuck!."); dialog.Option("Thanks.", 255); dialog.Avatar(116); dialog.Send(); } else { dialog.Text("Sorry you dont have 100k cps i cant let u join LordsWar Tourment"); dialog.Option("Okay sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry i cant let you join the event now come again later at the event times."); dialog.Option("Okay sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } } break; } #endregion #region Kimo Disco case 55224: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to Dance in " + Database.rates.servername + " Disco? its free."); //dialog.Text("is start everyday btw " + Game.KimoEvents.DemonHour + ":00 to " + Game.KimoEvents.DemonHour + ":30."); // dialog.Text(" it 3 steps kill / 100 - 200 - 400 in 3 maps first one will get " + Database.rates.DemonCave + " cps and next players will get " + (Database.rates.DemonCave / 2) + " cps."); dialog.Option("Lets Dance!", 1); dialog.Option("Just Passing By!.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(701, 51, 51); break; } } break; } #endregion #region CaptureTheFlag case 442778: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to Join CaptureTheFlag?."); dialog.Text("you can but Btw " + Game.KimoEvents.CFHour + ":00 to " + Game.KimoEvents.CFHour + ":30, Every day there is 4 teams Red/Yellow/black/White with 1 Round"); dialog.Text(" all teams will play toghter first team get 10 Points will win and other will lose"); dialog.Text(" and winner team will stay in the map and when it end winners will gain " + Database.rates.CaptureFlag + " CPS"); dialog.Option("Let me Join", 1); dialog.Option("Just Passing By!", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.CFHour && DateTime.Now.Minute >= 00 && DateTime.Now.Minute < 30) { if (Game.Team.IsWar == true) { if (client.CaptureTeamJoin != true) { uint UID = 1; // red 181625 blue 181825 white 181325 black 181525 if (Game.Team.GarmID == 181525)// black to red { #region Equip //GarmID = 181325; Game.Team.GarmID = 181625; PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = Game.Team.GarmID; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); #endregion ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } client.CaptureTeamJoin = true; client.Entity.Teleport(2060, 63, 68); client.CaptureR = true; client.Entity.AddFlag(Network.GamePackets.Update.Flags2.IceBlock); client.Entity.FreezeTime = 10; client.Entity.FreezeStamp = Time32.Now; dialog.Text("You have been signed up for <CaptureTheFlag> <Team Red>"); dialog.Option("Thanks!", 255); dialog.Send(); break; } // red 181625 blue 181825 white 181325 black 181525 if (Game.Team.GarmID == 181625)//red to blue { #region Equip Game.Team.GarmID = 181825; PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = Game.Team.GarmID; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; //client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); #endregion ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } client.CaptureTeamJoin = true; client.Entity.Teleport(2060, 187, 205); client.CaptureB = true; client.Entity.AddFlag(Network.GamePackets.Update.Flags2.IceBlock); client.Entity.FreezeTime = 10; client.Entity.FreezeStamp = Time32.Now; dialog.Text("You have been signed up for <CaptureTheFlag> <Team Blue>"); dialog.Option("Thanks!", 255); dialog.Send(); break; } // red 181625 blue 181825 white 181325 black 181525 if (Game.Team.GarmID == 181825)//Blue to white { #region Equip Game.Team.GarmID = 181325; PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = Game.Team.GarmID; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); #endregion ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } client.CaptureTeamJoin = true; client.Entity.Teleport(2060, 91, 176); client.CaptureW = true; client.Entity.AddFlag(Network.GamePackets.Update.Flags2.IceBlock); client.Entity.FreezeTime = 10; client.Entity.FreezeStamp = Time32.Now; dialog.Text("You have been signed up for <CaptureTheFlag> <Team White>"); dialog.Option("Thanks!", 255); dialog.Send(); break; } if (Game.Team.GarmID == 181325)//White to black { #region Equip Game.Team.GarmID = 181525; PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = Game.Team.GarmID; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); #endregion ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } client.CaptureTeamJoin = true; client.Entity.Teleport(2060, 177, 92); client.CaptureBL = true; client.Entity.AddFlag(Network.GamePackets.Update.Flags2.IceBlock); client.Entity.FreezeTime = 10; client.Entity.FreezeStamp = Time32.Now; dialog.Text("You have been signed up for <CaptureTheFlag> <Team Black>"); dialog.Option("Thanks!", 255); dialog.Send(); break; } } else { dialog.Text("You already Joined CaptureTheFlag once Cant join again"); dialog.Option("Thanks!", 255); dialog.Send(); break; } } else { dialog.Text("Sorry CaptureThe flag will not run today come again tomorrow ;)"); dialog.Option("Thanks!", 255); dialog.Send(); break; } } else { dialog.Text("You need to wait until time become " + Game.KimoEvents.CFHour + ":00 to Signup"); dialog.Option("Thanks!", 255); dialog.Send(); break; } break; } } break; } #endregion #region DemonCaveLast case 66951: { switch (npcRequest.OptionID) { case 0: { dialog.Text("would you like to claim DemonCave Prize? , you should kill 200 monster here first."); dialog.Text("is start everyday btw " + Game.KimoEvents.DemonHour + ":00 to " + Game.KimoEvents.DemonHour + ":30."); dialog.Text(" it 3 steps kill / 100 - 200 - 400 in 3 maps first one will get " + Database.rates.DemonCave + " cps and next players will get " + (Database.rates.DemonCave / 2) + " cps."); dialog.Option("Next Step!", 1); dialog.Option("Just Passing By!.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.DemonHour && DateTime.Now.Minute < 30) { if (client.Entity.DemonCave3 >= 400) { if (Program.DemonCave3 == 0) { Program.DemonCave3 = 1; client.Entity.DemonCave1 = 0; client.Entity.DemonCave2 = 0; client.Entity.DemonCave3 = 0; client.Entity.Teleport(1002, 429, 379); ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("Congratulations, " + client.Entity.Name + " is the winner of DemonCave and won " + Database.rates.DemonCave + " cps", System.Drawing.Color.Red, Message.Center), ServerBase.Kernel.GamePool.Values); client.Entity.ConquerPoints += Database.rates.DemonCave; } else { client.Entity.DemonCave1 = 0; client.Entity.DemonCave2 = 0; client.Entity.DemonCave3 = 0; client.Entity.Teleport(1002, 429, 379); ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("" + client.Entity.Name + ": has Finished DemonCave Stage [3] and claimed " + (Database.rates.DemonCave / 2) + " cps as a reward", System.Drawing.Color.Red, Message.World), ServerBase.Kernel.GamePool.Values); client.Entity.ConquerPoints += (Database.rates.DemonCave / 2); } } else { dialog.Text("Sorry you can only join DemonCave once"); dialog.Option("okay", 255); dialog.Send(); break; } } else { client.Entity.Teleport(1002, 450, 350); dialog.Text("Hey there " + client.Entity.Name + " DemonCave not running now come again later"); dialog.Option("okay", 255); dialog.Send(); break; } break; } } break; } #endregion #region DemonCave Step 2 case 66952: { switch (npcRequest.OptionID) { case 0: { dialog.Text("would you like to go to step [3] in DemonCave? , you should kill 200 monster here first."); dialog.Text("is start everyday btw " + Game.KimoEvents.DemonHour + ":00 to " + Game.KimoEvents.DemonHour + ":30."); //dialog.Text(" it 3 steps kill / 100 - 200 - 400 in 3 maps first one will get 200k cps and next players will get 100k cps."); dialog.Option("Next Step!", 1); dialog.Option("Just Passing By!.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.DemonHour && DateTime.Now.Minute < 30) { if (client.Entity.DemonCave2 >= 200) { if (Program.DemonCave2 == 0) { Program.DemonCave2 = 1; client.Entity.DemonCave1 = 0; client.Entity.DemonCave2 = 0; client.Entity.DemonCave3 = 0; client.Entity.Teleport(3, 77, 69); ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("Congratulations, " + client.Entity.Name + " is the first one to join DemonCave Stage [3]", System.Drawing.Color.Red, Message.Center), ServerBase.Kernel.GamePool.Values); } else { client.Entity.DemonCave1 = 0; client.Entity.DemonCave2 = 0; client.Entity.DemonCave3 = 0; client.Entity.Teleport(3, 77, 69); ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("" + client.Entity.Name + ": has joined DemonCave Stage [3]", System.Drawing.Color.Red, Message.TopLeft), ServerBase.Kernel.GamePool.Values); } } else { dialog.Text("Sorry you can only join DemonCave once"); dialog.Option("okay", 255); dialog.Send(); break; } } else { client.Entity.Teleport(1002, 450, 350); dialog.Text("Hey there " + client.Entity.Name + " DemonCave not running now come again later"); dialog.Option("okay", 255); dialog.Send(); break; } break; } } break; } #endregion #region DemonCave Step 1 case 66953: { switch (npcRequest.OptionID) { case 0: { dialog.Text("would you like to go to step [2] in DemonCave? , you should kill 100 monster here first."); dialog.Text("is start everyday btw " + Game.KimoEvents.DemonHour + ":00 to " + Game.KimoEvents.DemonHour + ":30."); //dialog.Text(" it 3 steps kill / 100 - 200 - 400 in 3 maps first one will get 200k cps and next players will get 100k cps."); dialog.Option("Next Step!", 1); dialog.Option("Just Passing By!.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.DemonHour && DateTime.Now.Minute < 30) { if (client.Entity.DemonCave1 >= 100) { if (Program.DemonCave1 == 0) { Program.DemonCave1 = 1; client.Entity.DemonCave1 = 0; client.Entity.DemonCave2 = 0; client.Entity.DemonCave3 = 0; client.Entity.Teleport(2, 77, 69); ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("Congratulations, " + client.Entity.Name + " is the first one to join DemonCave Stage [2]", System.Drawing.Color.Red, Message.Center), ServerBase.Kernel.GamePool.Values); } else { client.Entity.DemonCave1 = 0; client.Entity.DemonCave2 = 0; client.Entity.DemonCave3 = 0; client.Entity.Teleport(2, 77, 69); ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("" + client.Entity.Name + ": has joined DemonCave Stage [2]", System.Drawing.Color.Red, Message.TopLeft), ServerBase.Kernel.GamePool.Values); } } else { dialog.Text("Sorry you can only join DemonCave once"); dialog.Option("okay", 255); dialog.Send(); break; } } else { client.Entity.Teleport(1002, 450, 350); dialog.Text("Hey there " + client.Entity.Name + " DemonCave not running now come again later"); dialog.Option("okay", 255); dialog.Send(); break; } break; } } break; } #endregion #region DemonCave log case 66957: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to Join DemonCave?."); dialog.Text("is start everyday btw " + Game.KimoEvents.DemonHour + ":00 to " + Game.KimoEvents.DemonHour + ":30."); dialog.Text(" it 3 steps kill / 100 - 200 - 400 in 3 maps first one will get " + Database.rates.DemonCave + " cps and next players will get " + (Database.rates.DemonCave / 2) + " cps."); dialog.Option("Join DemonCave!", 1); dialog.Option("Just Passing By!.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.DemonHour && DateTime.Now.Minute < 5) { if (!client.DemonCave) { client.DemonCave = true; client.Entity.Teleport(1, 77, 69); client.Entity.DemonCave1 = 0; client.Entity.DemonCave2 = 0; client.Entity.DemonCave3 = 0; } else { dialog.Text("Sorry you can only join DemonCave once"); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + " DemonCave not running now come again later"); dialog.Option("okay", 255); dialog.Send(); break; } break; } } break; } #endregion #region SkillTeamWar case 442777: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to Join SkillTeam War?."); dialog.Text("you can but Btw " + Game.KimoEvents.SKHour + ":05 to " + Game.KimoEvents.SKHour + ":30, Every day there is 2 teams Red/Yellow with 3 Rounds "); dialog.Text("10 from each team will play toghter best team in Points will win and other will join"); dialog.Text(" and winner team will stay in the map and when it end winners will gain " + Database.rates.SkillTeam + " Cps!"); dialog.Option("Let me Join", 1); dialog.Option("Just Passing By!", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.SKHour && DateTime.Now.Minute >= 00 && DateTime.Now.Minute < 30) { if (Game.KimoSkillWar.Started == true && Game.KimoSkillWar.SignUP == true) { if (client.SkillTeamJoin != true) { if (Game.KimoSkillWar.YTeamNum == 10 && Game.KimoSkillWar.RTeamNum == 10) { Game.KimoSkillWar.SignUP = false; //Game.KimoSkillWar.Round += 1; Game.KimoSkillWar.StartAt = Time32.Now; Game.KimoSkillWar.EndAt = Time32.Now.AddMinutes(10); ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("SkillTeam PkWar Round [" + Game.KimoSkillWar.Round + "] Started Wait next round!", System.Drawing.Color.Red, Message.Center), ServerBase.Kernel.GamePool.Values); } else { uint UID = 1; // uint GarmID = 191305; if (Game.KimoSkillWar.GarmID == 191305 && Game.KimoSkillWar.YTeamNum < 10)//YTeam { #region Equip //GarmID = 181325; Game.KimoSkillWar.GarmID = 191405; PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = Game.KimoSkillWar.GarmID; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; //client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); #endregion ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } Game.KimoSkillWar.YTeamNum += 1; client.SkillTeamJoin = true; client.Entity.Teleport((ushort)Game.KimoSkillWar.MapID, 44, 49); client.YellowOn = true; dialog.Text("You have been signed up for <SkillTeamWar> <Team Yellow>"); dialog.Send(); break; } if (Game.KimoSkillWar.GarmID == 191405 && Game.KimoSkillWar.RTeamNum < 10)//YTeam { #region Equip //Item Garment = client.Entity.Equips.Get(9); //Garment.ID = 181325; Game.KimoSkillWar.GarmID = 191305; PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = Game.KimoSkillWar.GarmID; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; //client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); #endregion ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } Game.KimoSkillWar.RTeamNum += 1; client.SkillTeamJoin = true; client.Entity.Teleport(7009, 44, 49); client.RedOn = true; dialog.Text("You have been signed up for <SkillTeamWar> <Team Red>"); dialog.Send(); break; } } } else { dialog.Text("You already Joined skill team war once Cant join again"); dialog.Send(); break; } } else { dialog.Text("Sorry there is already 2 teams in the map wait next signup time ;)"); dialog.Option("Thanks!", 255); dialog.Send(); break; } } else { dialog.Text("You need to wait until time become " + Game.KimoEvents.SKHour + ":00 to signup"); dialog.Option("Thanks!", 255); dialog.Send(); break; } break; } } break; } #endregion #region CpsDonationWarOutTop case 442564: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to Claim DonationCpsWar?."); dialog.Text("you can Claim it Btw " + Game.KimoEvents.DWHour + ":05 to " + Game.KimoEvents.DWHour + ":30, Total Cps u will win is "); dialog.Text("" + Game.CpsWar.LowCps + " ConquerPoints wana claim prize?"); dialog.Option("ClaimPrize", 1); dialog.Option("Just Passing By!", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.DWHour && DateTime.Now.Minute >= 05 && DateTime.Now.Minute <= 30) { Game.CpsWar.CheackLowAlive(); if (Game.CpsWar.howmanyinmap3 == 1) { Game.CpsWar.ClaimLowCps(client); client.Entity.Teleport(1002, 450, 350); } else { dialog.Text("Sorry you need to Defeat all players in the Arena first!"); dialog.Option("Sorry", 255); dialog.Send(); break; } } else { dialog.Text("You need to wait until time become " + Game.KimoEvents.DWHour + ":05 to claim your prize"); dialog.Option("Thanks!", 255); dialog.Send(); break; } break; } } break; } #endregion #region CpsDonationWarOutMin case 442563: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to Claim DonationCpsWar?."); dialog.Text("you can Claim it Btw " + Game.KimoEvents.DWHour + ":05 to " + Game.KimoEvents.DWHour + ":30, Total Cps u will win is "); dialog.Text("" + Game.CpsWar.MinCps + " ConquerPoints wana claim prize?"); dialog.Option("ClaimPrize", 1); dialog.Option("Just Passing By!", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.DWHour && DateTime.Now.Minute >= 05 && DateTime.Now.Minute <= 30) { Game.CpsWar.CheackMinAlive(); if (Game.CpsWar.howmanyinmap2 == 1) { Game.CpsWar.ClaimMinCps(client); client.Entity.Teleport(1002, 450, 350); } else { dialog.Text("Sorry you need to Defeat all players in the Arena first!"); dialog.Option("Sorry", 255); dialog.Send(); break; } } else { dialog.Text("You need to wait until time become " + Game.KimoEvents.DWHour + ":05 to claim your prize"); dialog.Option("Thanks!", 255); dialog.Send(); break; } break; } } break; } #endregion #region CpsDonationWarOutTop case 442562: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to Claim DonationCpsWar?."); dialog.Text("you can Claim it Btw " + Game.KimoEvents.DWHour + ":05 to " + Game.KimoEvents.DWHour + ":30, Total Cps u will win is "); dialog.Text("" + Game.CpsWar.TopCps + " ConquerPoints wana claim prize?"); dialog.Option("ClaimPrize", 1); dialog.Option("Just Passing By!", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.DWHour && DateTime.Now.Minute >= 05 && DateTime.Now.Minute <= 30) { Game.CpsWar.CheackTopAlive(); if (Game.CpsWar.howmanyinmap == 1) { Game.CpsWar.ClaimTopCps(client); client.Entity.Teleport(1002, 450, 350); } else { dialog.Text("Sorry you need to Defeat all players in the Arena first!"); dialog.Option("Sorry", 255); dialog.Send(); break; } } else { dialog.Text("You need to wait until time become " + Game.KimoEvents.DWHour + ":05 to claim your prize"); dialog.Option("Thanks!", 255); dialog.Send(); break; } break; } } break; } #endregion #region CpsDonationWarIn case 442561: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to Join DonationCpsWar?."); dialog.Text("you can join Every day At " + Game.KimoEvents.DWHour + ":00 to " + Game.KimoEvents.DWHour + ":30, but you must pay cps so u can join it all players do."); dialog.Text("and the winner will win all players cps you have 3 Choise to pay Choose?"); dialog.Option("TopCps Arena[3000]", 1); dialog.Option("MinCps Arena[2000]", 2); dialog.Option("LowCps Arena[1000]", 3); dialog.Send(); break; } case 1: { if (Game.CpsWar.IsWar) { if (client.Entity.ConquerPoints >= 3000) { Game.CpsWar.SignUpTop(client); client.Entity.Teleport(7005, 25, 40); } else { dialog.Text("Sorry you dont have 3k cps to join TopCps Arena Try another Arena!"); dialog.Option("Sorry", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + " DonationsCps War not running ATM come again later"); dialog.Option("Thanks!", 255); dialog.Send(); break; } break; } case 2: { if (Game.CpsWar.IsWar2) { if (client.Entity.ConquerPoints >= 2000) { Game.CpsWar.SignUpMin(client); client.Entity.Teleport(7006, 25, 40); } else { dialog.Text("Sorry you dont have 2k cps to join MinCps Arena Try another Arena!"); dialog.Option("Sorry", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + " DonationsCps War not running ATM come again later"); dialog.Option("Thanks!", 255); dialog.Send(); break; } break; } case 3: { if (Game.CpsWar.IsWar3) { if (client.Entity.ConquerPoints >= 1000) { Game.CpsWar.SignUpLow(client); client.Entity.Teleport(7008, 25, 40); } else { dialog.Text("Sorry you dont have 1k cps to join LowCps Arena Try another Arena!"); dialog.Option("Sorry", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + " DonationsCps War not running ATM come again later"); dialog.Option("Thanks!", 255); dialog.Send(); break; } break; } } break; } #endregion #region ClanWARout case 442560: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to back to TwinCity?."); //dialog.Text("or claim the Prize?, you can join Every day expect Saturday and Sunday At 19:00 to 20:00."); //dialog.Text("and the winner Clan Leader will get " + PhoenixProject.Database.rates.EliteGw + " cps after it finish u have 5 minutes to claim?."); dialog.Option("Yes!", 1); dialog.Option("Just Passing By!", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1002, 429, 378); break; } } break; } #endregion #region ClanWAR case 442559: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to Join ClanWar?."); dialog.Text("or claim the Prize?, you can join Every day expect Saturday and Sunday At " + Game.KimoEvents.ClanHour + ":00 to " + Game.KimoEvents.ClanEndHour + ":00."); dialog.Text("and the winner Clan Leader will get " + PhoenixProject.Database.rates.EliteGw + " cps after it finish u have 5 minutes to claim?."); dialog.Option("Join ClanWar!", 1); dialog.Option("Claim Prize.", 5); dialog.Send(); break; } case 1: { if (DateTime.Now.DayOfWeek != DayOfWeek.Saturday && DateTime.Now.DayOfWeek != DayOfWeek.Sunday) { if (DateTime.Now.Hour >= Game.KimoEvents.ClanHour && DateTime.Now.Hour < Game.KimoEvents.ClanEndHour) { client.Entity.Teleport(1509, 82, 119); } else { dialog.Text("Sorry you can only join Btw " + Game.KimoEvents.ClanHour + ":00 to " + Game.KimoEvents.ClanHour + ":59!"); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + " ClanWar not running in Saturday or Sunday"); dialog.Option("okay", 255); dialog.Send(); break; } break; } case 5: { //Daily.CheackAlive(); if (DateTime.Now.Hour == Game.KimoEvents.ClanEndHour && DateTime.Now.Minute >= 00 && DateTime.Now.Minute <= 30) { if (client.Entity.Myclan != null) { if (Game.ClanWar.ClanFlag.Name == client.Entity.Myclan.ClanName && Game.ClanWar.Claim == 0 && client.Entity.Myclan.ClanLider == client.Entity.Name && Game.ClanWar.Claim == 0) { Game.ClanWar.Claim += 1; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " claimed the prize " + PhoenixProject.Database.rates.EliteGw + " ConquerPoints for winning the ClanWar.", System.Drawing.Color.Black, Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); client.Entity.ConquerPoints += PhoenixProject.Database.rates.EliteGw; } else { dialog.Text("sorry u dont have any prize to claim...."); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("sorry u dont have any prize to claim"); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + " You can only claim the prize btw " + Game.KimoEvents.ClanEndHour + ":00 to " + Game.KimoEvents.ClanEndHour + ":30 Expect Saturday and Sunday"); dialog.Option("okay", 255); dialog.Send(); break; } break; } } break; } #endregion #region ClanFlag case 812: { dialog.Text("Welcome in ClanWar HaveFun!."); dialog.Option("Thanks.", 255); dialog.Send(); break; } #endregion #region Garment Npc case 442558://and this id { switch (npcRequest.OptionID) { case 0: { dialog.Text("hello, i can help you to Buy new Special Garment for " + Database.rates.Garment + " Cps"); dialog.Text(" choose what you want to buy?"); dialog.Option("HolyArmor.", 1);//200418 dialog.Option("WarriorArmor", 2); dialog.Option("Thanks!", 0); dialog.Send(); break; } case 2: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(187415, 0, 1); dialog.Text("Congratulations you got new Special Garment"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 1: { if (client.Entity.ConquerPoints >= Database.rates.Garment) { if (client.Entity.ConquerPoints >= Database.rates.Garment) { client.Entity.ConquerPoints -= Database.rates.Garment; client.Inventory.Add(187405, 0, 1); dialog.Text("Congratulations you got new Special Garment"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Garment + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } } break; } #endregion #region SteedSeller Npc case 442557://and this id { switch (npcRequest.OptionID) { case 0: { dialog.Text("hello, i can help you to Buy new Special Steed for " + Database.rates.Steed + " Cps"); dialog.Text(" choose what you want to buy?"); dialog.Option("NightMare Steed.", 1);//200418 dialog.Option("FrostBite Steed", 2);//200420 dialog.Option("Spotted Steed", 3);//200413 dialog.Option("BlazeHoof Steed ", 4);//200412 dialog.Option("Zebra Steed", 5);//200410 dialog.Option("Thanks!", 0); dialog.Send(); break; } case 5: { if (client.Entity.ConquerPoints >= Database.rates.Steed) { if (client.Entity.ConquerPoints >= Database.rates.Steed) { client.Entity.ConquerPoints -= Database.rates.Steed; PacketHandler.CheckCommand2(new Message("@lastmankimo Steed Fixed 12 0 0 0 0 142 39 46", System.Drawing.Color.Red, 2001), client); dialog.Text("Congratulations you got new Special Steed"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Steed + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Steed + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 4: { if (client.Entity.ConquerPoints >= Database.rates.Steed) { if (client.Entity.ConquerPoints >= Database.rates.Steed) { client.Entity.ConquerPoints -= Database.rates.Steed; PacketHandler.CheckCommand2(new Message("@lastmankimo Steed Fixed 12 0 0 0 0 148 156 137", System.Drawing.Color.Red, 2001), client); dialog.Text("Congratulations you got new Special Steed"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Steed + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Steed + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.ConquerPoints >= Database.rates.Steed) { if (client.Entity.ConquerPoints >= Database.rates.Steed) { client.Entity.ConquerPoints -= Database.rates.Steed; PacketHandler.CheckCommand2(new Message("@lastmankimo Steed Fixed 12 0 0 0 0 147 134 122", System.Drawing.Color.Red, 2001), client); dialog.Text("Congratulations you got new Special Steed"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Steed + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Steed + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 2: { if (client.Entity.ConquerPoints >= Database.rates.Steed) { if (client.Entity.ConquerPoints >= Database.rates.Steed) { client.Entity.ConquerPoints -= Database.rates.Steed; PacketHandler.CheckCommand2(new Message("@lastmankimo Steed Fixed 12 0 0 0 0 62 63 184", System.Drawing.Color.Red, 2001), client); dialog.Text("Congratulations you got new Special Steed"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Steed + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Steed + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 1: { if (client.Entity.ConquerPoints >= Database.rates.Steed) { if (client.Entity.ConquerPoints >= Database.rates.Steed) { client.Entity.ConquerPoints -= Database.rates.Steed; PacketHandler.CheckCommand2(new Message("@lastmankimo Steed Fixed 12 0 0 0 0 150 150 50", System.Drawing.Color.Red, 2001), client); dialog.Text("Congratulations you got new Special Steed"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Steed + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Steed + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } } break; } #endregion #region MountArmor Npc case 442556://and this id { switch (npcRequest.OptionID) { case 0: { dialog.Text("hello, i can help you to Buy new MountArmor for " + Database.rates.Mount + " Cps"); dialog.Text(" choose what you want to buy?"); dialog.Option("AncientElephant.", 1);//200418 dialog.Option("CelestialBird", 2);//200420 dialog.Option("GreenEyedBeast", 3);//200413 dialog.Option("SilverBeast ", 4);//200412 dialog.Option("Somesault Cloud", 5);//200410 dialog.Option("Thanks!", 0); dialog.Send(); break; } case 5: { if (client.Entity.ConquerPoints >= Database.rates.Mount) { if (client.Entity.ConquerPoints >= Database.rates.Mount) { client.Entity.ConquerPoints -= Database.rates.Mount; client.Inventory.Add(200410, 0, 1); dialog.Text("Congratulations you got new MountArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Mount + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Mount + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 4: { if (client.Entity.ConquerPoints >= Database.rates.Mount) { if (client.Entity.ConquerPoints >= Database.rates.Mount) { client.Entity.ConquerPoints -= Database.rates.Mount; client.Inventory.Add(200412, 0, 1); dialog.Text("Congratulations you got new MountArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Mount + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Mount + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.ConquerPoints >= Database.rates.Mount) { if (client.Entity.ConquerPoints >= Database.rates.Mount) { client.Entity.ConquerPoints -= Database.rates.Mount; client.Inventory.Add(200413, 0, 1); dialog.Text("Congratulations you got new MountArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Mount + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Mount + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 2: { if (client.Entity.ConquerPoints >= Database.rates.Mount) { if (client.Entity.ConquerPoints >= Database.rates.Mount) { client.Entity.ConquerPoints -= Database.rates.Mount; client.Inventory.Add(200420, 0, 1); dialog.Text("Congratulations you got new MountArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Mount + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Mount + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 1: { if (client.Entity.ConquerPoints >= Database.rates.Mount) { if (client.Entity.ConquerPoints >= Database.rates.Mount) { client.Entity.ConquerPoints -= Database.rates.Mount; client.Inventory.Add(200418, 0, 1); dialog.Text("Congratulations you got new MountArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.Mount + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.Mount + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } } break; } #endregion #region HELP DESK case 10065: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Welcome to the HelpDesk. Is there anything you require below?"); dialog.Option("Register", 1); dialog.Option("Vote", 2); dialog.Option("ChatBox", 3); dialog.Option("Purchase", 4); dialog.Option("Facebook Page", 5); dialog.Option("ChangePassword", 6); //dialog.Option("Im good thanks", 255); dialog.Avatar(95); dialog.Send(); break; } case 1: { client.Send(new PhoenixProject.Network.GamePackets.Message("" + Database.HelpDesk.Register + "", System.Drawing.Color.Yellow, 2105)); break; } case 2: { client.Send(new PhoenixProject.Network.GamePackets.Message("" + Database.HelpDesk.Vote + "", System.Drawing.Color.Yellow, 2105)); break; } case 3: { client.Send(new PhoenixProject.Network.GamePackets.Message("" + Database.HelpDesk.ChatBox + "", System.Drawing.Color.Yellow, 2105)); break; } case 4: { client.Send(new PhoenixProject.Network.GamePackets.Message("" + Database.HelpDesk.Purchase + "", System.Drawing.Color.Yellow, 2105)); break; } case 5: { client.Send(new PhoenixProject.Network.GamePackets.Message("" + Database.HelpDesk.Facebook + "", System.Drawing.Color.Yellow, 2105)); break; } case 6: { client.Send(new PhoenixProject.Network.GamePackets.Message("" + Database.HelpDesk.ChangePass + "", System.Drawing.Color.Yellow, 2105)); break; } } break; } #endregion #region BossTeleport case 30065054: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Do you think you are ready to take down these powerful beasts? If yes, I can teleport you."); dialog.Option("Terato Dragon.", 1); dialog.Option("Lava Beast.", 2); dialog.Option("Snow Banchee.", 3); dialog.Option("Sword Master.", 4); dialog.Option("Thrilling Spook.", 5); dialog.Option("I will Train more.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1002, 565, 793); break; } case 2: { client.Entity.Teleport(2056, 467, 740); break; } case 3: { client.Entity.Teleport(7007, 347, 370); break; } case 4: { client.Entity.Teleport(1090, 076, 051); break; } case 5: { client.Entity.Teleport(1068, 055, 055); break; } } break; } #endregion #region FrozenGrotto case 278374: { switch (npcRequest.OptionID) { case 0: { dialog.Text("There is a dangeous frozen cavern south of nowhere! It's too dangerous for you to enter! Even Leroy Jenkins died there!"); dialog.Option("FrozenGrotto 1", 1); dialog.Option("FrozenGrotto 2", 2); dialog.Option("FrozenGrotto 3", 3); dialog.Option("FrozenGrotto 4", 4); dialog.Option("FrozenGrotto 5", 5); dialog.Option("FrozenGrotto 6", 6); dialog.Option("Met Zone 250 CP Drops!!!!!", 7); dialog.Option("Blah, boring.", 255); dialog.Send(); break; } case 6: { client.Entity.Teleport(2056, 478, 755); break; } case 1: { client.Entity.Teleport(1762, 61, 257); break; } case 2: { client.Entity.Teleport(7007, 61, 257); break; } case 4: { client.Entity.Teleport(2054, 392, 586); break; } case 3: { client.Entity.Teleport(1999, 407, 486); break; } case 5: { client.Entity.Teleport(2055, 544, 574); break; } case 7: { client.Entity.Teleport(1210, 1029, 714); break; } } break; } #endregion #region SoulP6 Npc case 442554://and this id { switch (npcRequest.OptionID) { case 0: { dialog.Text("hello, i can help you to Buy P6 DragonSoul for " + Database.rates.SoulP6 + " Cps"); dialog.Text(" for Ring-Boot-Necklace-Bracelet-Bag-HeadGear-GrimHammer and other what you want?"); dialog.Option("P6 Ring.", 1); dialog.Option("P6 Boot.", 2); dialog.Option("P6 Necklace.", 3); dialog.Option("P6 Bracelet.", 4); dialog.Option("P6 Bag.", 5); dialog.Option("Next.", 6); dialog.Send(); break; } case 6: { dialog.Text("hello, i can help you to Buy P6 DragonSoul for " + Database.rates.SoulP6 + " Cps"); dialog.Text(" for Ring-Boot-Necklace-Bracelet-Bag-HeadGear-GrimHammer and other what you want?"); dialog.Option("P6 HeadGear.", 7); dialog.Option("P6 GrimHammer.", 8); dialog.Option("P6 MonkBeads.", 9); dialog.Option("P6 NinjaKatana.", 10); dialog.Option("P6 BackSword.", 11); dialog.Option("Next.", 12); dialog.Send(); break; } case 12: { dialog.Text("hello, i can help you to Buy P6 DragonSoul for " + Database.rates.SoulP6 + " Cps"); dialog.Text(" for Ring-Boot-Necklace-Bracelet-Bag-HeadGear-GrimHammer and other what you want?"); dialog.Option("P6 WhirlpoolArmor.", 13); dialog.Option("P6 WaterflowArmor.", 14); dialog.Option("Just Passing By!", 255); dialog.Send(); break; } case 14://WaterflowArmor { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(822055, 0, 1); dialog.Text("Congratulations you got P6 WaterflowArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 13://WhirlpoolArmor { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(822053, 0, 1); dialog.Text("Congratulations you got P6 WhirlpoolArmor"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 11://BackSword { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(800513, 0, 1); dialog.Text("Congratulations you got P6 BackSword"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 10://NinjaKatanas { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(800017, 0, 1); dialog.Text("Congratulations you got P6 NinjaKatana"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 9://MonkBeads { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(800722, 0, 1); dialog.Text("Congratulations you got P6 Ring"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 8://GrimHammer { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(800110, 0, 1); dialog.Text("Congratulations you got P6 GrimHammer"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 7://HeadGear { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(820071, 0, 1); dialog.Text("Congratulations you got P6 HeadGear"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 5://Bag { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(821032, 0, 1); dialog.Text("Congratulations you got P6 Bag"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 4://Bracelet { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(823056, 0, 1); dialog.Text("Congratulations you got P6 Bracelet"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 1://ring { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(823055, 0, 1); dialog.Text("Congratulations you got P6 Ring"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 3://Necklace { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(821031, 0, 1); dialog.Text("Congratulations you got P6 Necklace"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } case 2://Boot { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { if (client.Entity.ConquerPoints >= Database.rates.SoulP6) { client.Entity.ConquerPoints -= Database.rates.SoulP6; client.Inventory.Add(824017, 0, 1); dialog.Text("Congratulations you got P6 Boot"); dialog.Option("Thanks.", 255); dialog.Send(); } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } } else { dialog.Text("Please come back to me with " + Database.rates.SoulP6 + " Conquer Points.."); dialog.Option("Ahh sorry.", 255); dialog.Send(); } break; } } break; } #endregion #region New Level UP NPC case 801://and this id { switch (npcRequest.OptionID) { case 0: { dialog.Text("if Your level 130+ I Can Give you 1 Level for just " + Database.rates.LevelUp + " Cps"); dialog.Option("Level Me Up Please.", 1); dialog.Option("Have a good day.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Level >= 130 && client.Entity.Level < 140) { if (client.Entity.ConquerPoints >= Database.rates.LevelUp) { client.Entity.ConquerPoints -= Database.rates.LevelUp; client.Entity.Level++; client.Entity.Experience = 0; if (client.Entity.Reborn == 0) { Database.DataHolder.GetStats(client.Entity.Class, client.Entity.Level, client); client.CalculateStatBonus(); client.CalculateHPBonus(); client.GemAlgorithm(); } } else { dialog.Text("Please come back to me with " + Database.rates.LevelUp + " Conquer Points."); dialog.Option("Ahh sorry.", 255); } } else { dialog.Text("Please come back When you are past 130 And lower than 140."); dialog.Option("Ahh sorry.", 255); } break; } } break; } #endregion #region New Garments/Talis case 802: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there im the new master upgrading your Garment for " + Database.rates.DamageGarment + " CPS and Talismans for " + Database.rates.DamageTails + " Cps each Talisman, What would you want?"); dialog.Text("They will be Enchanted with 255, and blessed -7."); dialog.Option("Garment.", 1); dialog.Option("HeavenFan.", 2); dialog.Option("StarTower.", 3); dialog.Option("Nothing, Have a good day.", 255); dialog.Send(); break; } case 1: { if (client.Entity.ConquerPoints >= Database.rates.DamageGarment) { IConquerItem i = client.Equipment.TryGetItem(ConquerItem.Garment); if (i != null) { if (i.Bless != 7) { client.Entity.ConquerPoints -= Database.rates.DamageGarment; i.Bless = 7; i.Enchant = 255; ConquerItemTable.UpdateBless(i); ConquerItemTable.UpdateEnchant(i); i.Send(client); dialog.Text("Sucess your item is now -7 255 HP Check for your self."); dialog.Option("Thanks.", 255); } else { dialog.Text("your item already -7 Hp 255"); dialog.Option("Ahh sorry.", 255); } } else { dialog.Text("Please Equip Your Garment First"); dialog.Option("Ahh sorry.", 255); } } else { dialog.Text("Please come back to me with " + Database.rates.DamageGarment + " Conquer Points."); dialog.Option("Ahh sorry.", 255); } break; } case 2: case 3: { if (client.Entity.ConquerPoints >= Database.rates.DamageTails) { IConquerItem i = client.Equipment.TryGetItem(npcRequest.OptionID == 2 ? ConquerItem.Fan : ConquerItem.Tower); if (i != null) { if (i.Bless != 7) { client.Entity.ConquerPoints -= Database.rates.DamageTails; i.Bless = 7; i.Enchant = 255; ConquerItemTable.UpdateBless(i); ConquerItemTable.UpdateEnchant(i); i.Send(client); dialog.Text("Sucess your item is now -7 255 HP Check for your self."); dialog.Option("Thanks.", 255); } else { dialog.Text("your item already -7 Hp 255"); dialog.Option("Ahh sorry.", 255); } } else { dialog.Text(npcRequest.OptionID == 2 ? "Please Equip Your HeavenFan First." : "Please Equip your StarTower First."); dialog.Option("Ahh sorry.", 255); } } else { dialog.Text("Please come back to me with " + Database.rates.DamageTails + " Conquer Points."); dialog.Option("Ahh sorry.", 255); } break; } } break; } #endregion #region PrizeNPC case 47: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey im PrizeNpc i can help you to claim any Donation item if you Donated to our Server."); dialog.Text(" " + Database.rates.servername + " be sure your donation Keep our server alive and be the best "); dialog.Text("server in all Conquer Private Servers!"); dialog.Option("Claim Prize", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { if (Game.PrizeNPC.PrizeNpcInformations.ContainsKey(client.Entity.UID)) { if (Game.PrizeNPC.PrizeNpcInformations[client.Entity.UID].type == 1) { dialog.Text("Congratulations, you claimed your donation pack " + Game.PrizeNPC.PrizeNpcInformations[client.Entity.UID].amount + " CPS"); dialog.Option("Woow thanks!", 255); dialog.Send(); client.Entity.ConquerPoints += Game.PrizeNPC.PrizeNpcInformations[client.Entity.UID].amount; Game.PrizeNPC.RemoveCps(client); } else { dialog.Text("Congratulations, you claimed your donation item"); dialog.Option("Woow thanks!", 255); dialog.Send(); client.Inventory.Add(Game.PrizeNPC.PrizeNpcInformations[client.Entity.UID].itemid, 0, 1); Game.PrizeNPC.RemoveItem(client); } break; } else { dialog.Text("Sorry you dont have any prize to claim Atm "); dialog.Option("I don't care.", 255); dialog.Send(); //break; } break; } } break; } #endregion #region HouseAdmin case 30156: { switch (npcRequest.OptionID) { case 0: { if (ServerBase.Kernel.Maps.ContainsKey(client.Entity.UID)) { dialog.Text("Hey there " + client.Entity.Name + " i'm HouseAdmin Would you like to Enter your"); dialog.Text(" House, or maybe wana upgrade ur house by using UpgradeCert?"); dialog.Text(", or buy Tokens and Furniture?"); dialog.Option("Enter House", 2); //dialog.Option("Create House", 1); // dialog.Option("House Upgrade", 3); dialog.Option("Tokens,Furniture", 4); dialog.Option("Just Passing By!.", 255); dialog.Send(); } else { dialog.Text("Hey there " + client.Entity.Name + " i'm HouseAdmin Would you like to create your"); dialog.Text(" House you need to get an HousePermit so i can help you or u can go inside ur house if"); dialog.Text(" you have one already , or maybe wana upgrade ur house by using UpgradeCert?"); //dialog.Option("go to House", 2); dialog.Option("Create House", 1); //dialog.Option("House Upgrade", 3); dialog.Option("Buy Tokens,Furniture", 4); dialog.Option("Just Passing By!.", 255); dialog.Send(); } break; } #region tokens case 4: { dialog.Text("Hey there " + client.Entity.Name + " i'm HouseAdmin Would you like to buy house Tokens?"); dialog.Text(" HousePermit Coast " + PhoenixProject.Database.rates.housepromete + " cps and HouseUpgrade Coast " + PhoenixProject.Database.rates.houseupgrade + " cps,"); dialog.Text("ItemBox " + PhoenixProject.Database.rates.itembox + " cps what u want to buy?"); dialog.Option("HousePermit", 5); //dialog.Option("UpgradeCert", 6); dialog.Option("ItemBox", 7); dialog.Option("Just Passing By!.", 255); dialog.Send(); break; } case 5: { if (client.Entity.ConquerPoints > PhoenixProject.Database.rates.housepromete) { client.Inventory.Add(721170, 0, 1); client.Entity.ConquerPoints -= PhoenixProject.Database.rates.housepromete; dialog.Text("Congratulations you got HousePermit Token"); dialog.Option("Thanks!", 255); dialog.Send(); } else { dialog.Text("sorry you dont have Enough cps to get HousePermit"); dialog.Option("Sorry!", 255); dialog.Send(); //break; } break; } case 6: { if (client.Entity.ConquerPoints > PhoenixProject.Database.rates.houseupgrade) { client.Inventory.Add(721174, 0, 1); client.Entity.ConquerPoints -= PhoenixProject.Database.rates.houseupgrade; dialog.Text("Congratulations you got UpgradeCert Token"); dialog.Option("Thanks!", 255); dialog.Send(); } else { dialog.Text("sorry you dont have Enough cps to get UpgradeCert Token"); dialog.Option("Sorry!", 255); dialog.Send(); //break; } break; } case 7: { if (client.Entity.ConquerPoints > PhoenixProject.Database.rates.itembox) { client.Inventory.Add(721189, 0, 1); client.Entity.ConquerPoints -= PhoenixProject.Database.rates.itembox; dialog.Text("Congratulations you got ItemBox"); dialog.Option("Thanks!", 255); dialog.Send(); } else { dialog.Text("sorry you dont have Enough cps to get ItemBox"); dialog.Option("Sorry!", 255); dialog.Send(); //break; } break; } #endregion #region Create case 1: { if (ServerBase.Kernel.Maps.ContainsKey(client.Entity.UID)) { dialog.Text("Sorry you already have House cant help you"); dialog.Option("Oh Sorry!.", 255); dialog.Send(); } else { if (client.Inventory.Contains(721170, 1)) { client.Inventory.Remove(721170, 1); Game.House.createhouse(client); dialog.Text("Congratulations you got New House Goodluck in " + PhoenixProject.Database.rates.servername + ""); dialog.Option("Thanks!", 255); dialog.Send(); } else { dialog.Text("sorry you dont have HousePermit come again later "); dialog.Option("sorry!", 255); dialog.Send(); } } break; } #endregion #region Upgrade case 3: { if (!ServerBase.Kernel.Maps.ContainsKey((ushort)client.Entity.UID)) { dialog.Text("Sorry you dont have House come again later"); dialog.Option("Oh Sorry!.", 255); dialog.Send(); } else { if (ServerBase.Kernel.Maps[(ushort)client.Entity.UID].Level == 1) { if (client.Inventory.Contains(721174, 1)) { client.Inventory.Remove(721174, 1); Game.House.UpgradeHouse(client); dialog.Text("Congratulations your House now Level [2] Goodluck in " + PhoenixProject.Database.rates.servername + ""); dialog.Option("Thanks!", 255); dialog.Send(); } else { dialog.Text("Sorry you dont have UpgradeCert come again later "); dialog.Option("sorry!", 255); dialog.Send(); } } else { dialog.Text("Sorry your House Already Level 2 Cant upgrade it any more "); dialog.Option("sorry!", 255); dialog.Send(); } } break; } #endregion #region House Teleport case 2: { if (!ServerBase.Kernel.Maps.ContainsKey(client.Entity.UID)) { dialog.Text("Sorry you dont have House you need to create one first"); dialog.Option("Oh Sorry!.", 255); dialog.Send(); } else { if (client != null) { if (client.Team != null && client.Team.TeamLeader) { foreach (Client.GameState Teammate in client.Team.Teammates) { if (Teammate != null) { if (Teammate != null) { Game.Entity entity; if (client.Screen.TryGetValue(Teammate.Entity.UID, out entity)) { Teammate.Entity.Teleport(3024, client.Entity.UID, 89, 77); //client.Entity.Teleport(1765, client.Entity.UID, 79, 58); } } } } client.Entity.Teleport(3024, client.Entity.UID, 89, 77); } else { client.Entity.Teleport(3024, client.Entity.UID, 89, 77); //client.Entity.Teleport((ushort)client.Entity.UID, 79, 58); } } } break; } #endregion } break; } #endregion #region ElitePkWinner case 5016: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to Claim Elite PKWar Prize?."); dialog.Text("You Should Have 20 ElitePoints so u can be in the top 8Th Champion."); //dialog.Text("faster than any player else will be in the Top8Champions and obtain Rewards GoodLuck!"); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.EBHour && DateTime.Now.Minute >= 5 && DateTime.Now.Minute < 20) { if (client.elitepoints >= 20) { if (Program.EliteRank < 8) { Program.EliteRank++; Game.Tournaments.EliteTournament.ObtinedReward(client); client.Entity.Teleport(1002, 391, 371); } else { client.Entity.ConquerPoints += 2000; client.Entity.Teleport(1002, 391, 371); dialog.Text("Sorry you late there was Top8Champions Already but u got 2k cps as gift "); dialog.Option("Thanks.", 255); dialog.Send(); } } else { dialog.Text("Sorry you dont have 20 Elite Points yet come again later "); dialog.Option("sorry.", 255); dialog.Send(); } } else { dialog.Text("sorry you can only claim prize btw " + Game.KimoEvents.EBHour + ":05 to " + Game.KimoEvents.EBHour + ":20 "); dialog.Option("I don't care.", 255); dialog.Send(); break; } break; } } break; } #endregion #region ElitePk case 5015: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to join Elite PKWar?."); dialog.Text("you can SignUp during " + Game.KimoEvents.EBHour + ":05 to " + Game.KimoEvents.EBHour + ":20 and first 8 Players will get 20 Points."); dialog.Text("faster than any player else will be in the Top8Champions and obtain Rewards GoodLuck!"); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.EBHour && DateTime.Now.Minute >= 5 && DateTime.Now.Minute < 20) { if (!Game.Tournaments.EliteTournament.Top8.ContainsKey(client.Entity.UID)) { Game.Tournaments.EliteTournament.AddMap(client); } else { dialog.Text("SORRY you cant signup again you already in top8 List "); dialog.Option("Woow thanks!", 255); dialog.Send(); break; } } else { dialog.Text("Elite Pk War is held during " + Game.KimoEvents.EBHour + ":05 to " + Game.KimoEvents.EBHour + ":20 you have 15 min to signup "); dialog.Option("I don't care.", 255); dialog.Send(); break; } break; } } break; } #endregion #region BotJail case 5014: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + " you in BotJail for using any bot or Spamming or Saying Shit ."); dialog.Text("or using any speedhack or break the rules so i cant let u out till you pay " + Database.rates.BotJail + " CPS."); dialog.Option("wana Pay!", 1); dialog.Option("Just Passing By!.", 255); dialog.Avatar(116); dialog.Send(); break; } case 1: { if (client.Entity.ConquerPoints >= Database.rates.BotJail) { if (client.Entity.ConquerPoints >= Database.rates.BotJail) { client.Entity.ConquerPoints -= Database.rates.BotJail; client.Entity.Teleport(1002, 428, 243); dialog.Text("Take care and dont use any aimbot or any programe and respect game rules!."); dialog.Option("Thanks.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry i cant let you out you dont have " + Database.rates.BotJail + " cps in your inventory."); dialog.Option("Okay sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } } break; } #endregion #region mal3'e /* #region TreasureBoxIn case 5013: { //TreasureBox switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + " I'm TreasureBox i can let you Join the TreasureBox Event 1 time ."); dialog.Text("Everyday u can signup and enjoy the event for 15 Minutes at this time["+Game.KimoEvents.THour+":30 "+Game.KimoEvents.THour+":45]."); dialog.Option("Leme Join.", 1); dialog.Option("Just Passing By!.", 255); dialog.Avatar(116); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.THour && DateTime.Now.Minute >= 30 && DateTime.Now.Minute < 45) { if (DateTime.Now.Hour == Game.KimoEvents.THour && DateTime.Now.Minute >= 30 && DateTime.Now.Minute < 45) { client.Entity.Teleport(1225, 20, 16); dialog.Text("Found the Box and Click on it and get your prize GoodLuck!."); dialog.Option("Thanks.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry i cant let you join the event now come again later at the event times."); dialog.Option("Okay sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } } break; } #endregion*/ /* #region TreasureBox case 5012: { //TreasureBox switch (npcRequest.OptionID) { case 0: { if (ServerBase.Kernel.Rate(10)) { client.Entity.Die(client.Entity); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + " has found the Wrong Box and Died!", System.Drawing.Color.White, Network.GamePackets.Message.World), PhoenixProject.ServerBase.Kernel.GamePool.Values); INpc npc2 = new Network.GamePackets.NpcSpawn(); npc2.UID = 5012; npc2.Mesh = 9307; npc2.Type = Game.Enums.NpcType.Talker; npc2.X = (ushort)Program.BoxX; npc2.Y = (ushort)Program.BoxY; npc2.MapID = 1225; //client.Map.Removenpc(npc2); ServerBase.Kernel.Maps[1225].Removenpc(npc2); INpc npc = new Network.GamePackets.NpcSpawn(); npc.UID = 5012; npc.Mesh = 9307; npc.Type = Game.Enums.NpcType.Talker; npc.X = 33; npc.Y = 5; Program.BoxX = npc.X; Program.BoxY = npc.Y; npc.MapID = 1225; ServerBase.Kernel.Maps[1225].AddNpc(npc); break; } if (ServerBase.Kernel.Rate(09)) { client.Inventory.Add(730006, 6, 1); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("Congratulations, " + client.Entity.Name + " has found the Box and Got +6 stone!", System.Drawing.Color.White, Network.GamePackets.Message.World), PhoenixProject.ServerBase.Kernel.GamePool.Values); INpc npc2 = new Network.GamePackets.NpcSpawn(); npc2.UID = 5012; npc2.Mesh = 9307; npc2.Type = Game.Enums.NpcType.Talker; npc2.X = (ushort)Program.BoxX; npc2.Y = (ushort)Program.BoxY; npc2.MapID = 1225; //client.Map.Removenpc(npc2); ServerBase.Kernel.Maps[1225].Removenpc(npc2); INpc npc = new Network.GamePackets.NpcSpawn(); npc.UID = 5012; npc.Mesh = 9307; npc.Type = Game.Enums.NpcType.Talker; npc.X = 11; npc.Y = 36; Program.BoxX = npc.X; Program.BoxY = npc.Y; npc.MapID = 1225; //client.Map.Removenpc(npc); //client.Map.AddNpc(npc); ServerBase.Kernel.Maps[1225].AddNpc(npc); break; } if (ServerBase.Kernel.Rate(8)) { client.Entity.ConquerPoints += Database.rates.TreasureMin; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("Congratulations, " + client.Entity.Name + " has found the Box and Got "+Database.rates.TreasureMin+" cps!", System.Drawing.Color.White, Network.GamePackets.Message.World), PhoenixProject.ServerBase.Kernel.GamePool.Values); INpc npc2 = new Network.GamePackets.NpcSpawn(); npc2.UID = 5012; npc2.Mesh = 9307; npc2.Type = Game.Enums.NpcType.Talker; npc2.X = (ushort)Program.BoxX; npc2.Y = (ushort)Program.BoxY; npc2.MapID = 1225; ServerBase.Kernel.Maps[1225].Removenpc(npc2); INpc npc = new Network.GamePackets.NpcSpawn(); npc.UID = 5012; npc.Mesh = 9307; npc.Type = Game.Enums.NpcType.Talker; npc.X = 82; npc.Y = 53; Program.BoxX = npc.X; Program.BoxY = npc.Y; npc.MapID = 1225; ServerBase.Kernel.Maps[1225].AddNpc(npc); break; } if (ServerBase.Kernel.Rate(7)) { client.Entity.AddFlag(Network.GamePackets.Update.Flags2.IceBlock); client.Entity.FreezeTime = 10; client.Entity.FreezeStamp = Time32.Now; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + client.Entity.Name + " has found the Box and Got Freezed for 10 Seconeds!", System.Drawing.Color.White, Network.GamePackets.Message.World), PhoenixProject.ServerBase.Kernel.GamePool.Values); INpc npc2 = new Network.GamePackets.NpcSpawn(); npc2.UID = 5012; npc2.Mesh = 9307; npc2.Type = Game.Enums.NpcType.Talker; npc2.X = (ushort)Program.BoxX; npc2.Y = (ushort)Program.BoxY; npc2.MapID = 1225; ServerBase.Kernel.Maps[1225].Removenpc(npc2); INpc npc = new Network.GamePackets.NpcSpawn(); npc.UID = 5012; npc.Mesh = 9307; npc.Type = Game.Enums.NpcType.Talker; npc.X = 67; npc.Y = 83; Program.BoxX = npc.X; Program.BoxY = npc.Y; npc.MapID = 1225; ServerBase.Kernel.Maps[1225].AddNpc(npc); break; } if (ServerBase.Kernel.Rate(6)) { client.Entity.ConquerPoints += 2000; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("Congratulations, " + client.Entity.Name + " has found the Box and Got 2000 cps!", System.Drawing.Color.White, Network.GamePackets.Message.World), PhoenixProject.ServerBase.Kernel.GamePool.Values); INpc npc2 = new Network.GamePackets.NpcSpawn(); npc2.UID = 5012; npc2.Mesh = 9307; npc2.Type = Game.Enums.NpcType.Talker; npc2.X = (ushort)Program.BoxX; npc2.Y = (ushort)Program.BoxY; npc2.MapID = 1225; ServerBase.Kernel.Maps[1225].Removenpc(npc2); INpc npc = new Network.GamePackets.NpcSpawn(); npc.UID = 5012; npc.Mesh = 9307; npc.Type = Game.Enums.NpcType.Talker; npc.X = 60; npc.Y = 49; Program.BoxX = npc.X; Program.BoxY = npc.Y; npc.MapID = 1225; ServerBase.Kernel.Maps[1225].AddNpc(npc); break; } if (ServerBase.Kernel.Rate(5)) { client.Entity.ConquerPoints += Database.rates.TreasureMax; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("Congratulations, " + client.Entity.Name + " has found the Box and Got "+Database.rates.TreasureMax+" cps!", System.Drawing.Color.White, Network.GamePackets.Message.World), PhoenixProject.ServerBase.Kernel.GamePool.Values); INpc npc2 = new Network.GamePackets.NpcSpawn(); npc2.UID = 5012; npc2.Mesh = 9307; npc2.Type = Game.Enums.NpcType.Talker; npc2.X = (ushort)Program.BoxX; npc2.Y = (ushort)Program.BoxY; npc2.MapID = 1225; ServerBase.Kernel.Maps[1225].Removenpc(npc2); INpc npc = new Network.GamePackets.NpcSpawn(); npc.UID = 5012; npc.Mesh = 9307; npc.Type = Game.Enums.NpcType.Talker; npc.X = 30; npc.Y = 30; Program.BoxX = npc.X; Program.BoxY = npc.Y; npc.MapID = 1225; ServerBase.Kernel.Maps[1225].AddNpc(npc); break; } if (ServerBase.Kernel.Rate(4)) { client.Entity.Teleport(1002, 428, 243); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("Lmao , " + client.Entity.Name + " has found the Box and Teleported back to TwinCity!", System.Drawing.Color.White, Network.GamePackets.Message.World), PhoenixProject.ServerBase.Kernel.GamePool.Values); INpc npc2 = new Network.GamePackets.NpcSpawn(); npc2.UID = 5012; npc2.Mesh = 9307; npc2.Type = Game.Enums.NpcType.Talker; npc2.X = (ushort)Program.BoxX; npc2.Y = (ushort)Program.BoxY; npc2.MapID = 1225; ServerBase.Kernel.Maps[1225].Removenpc(npc2); INpc npc = new Network.GamePackets.NpcSpawn(); npc.UID = 5012; npc.Mesh = 9307; npc.Type = Game.Enums.NpcType.Talker; npc.X = 80; npc.Y = 72; Program.BoxX = npc.X; Program.BoxY = npc.Y; npc.MapID = 1225; ServerBase.Kernel.Maps[1225].AddNpc(npc); break; } if (ServerBase.Kernel.Rate(3)) { client.Entity.Teleport(1002, 428, 243); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("Lmao , " + client.Entity.Name + " has found the Box and Teleported back to TwinCity!", System.Drawing.Color.White, Network.GamePackets.Message.World), PhoenixProject.ServerBase.Kernel.GamePool.Values); INpc npc2 = new Network.GamePackets.NpcSpawn(); npc2.UID = 5012; npc2.Mesh = 9307; npc2.Type = Game.Enums.NpcType.Talker; npc2.X = (ushort)Program.BoxX; npc2.Y = (ushort)Program.BoxY; npc2.MapID = 1225; ServerBase.Kernel.Maps[1225].Removenpc(npc2); INpc npc = new Network.GamePackets.NpcSpawn(); npc.UID = 5012; npc.Mesh = 9307; npc.Type = Game.Enums.NpcType.Talker; npc.X = 38; npc.Y = 54; Program.BoxX = npc.X; Program.BoxY = npc.Y; npc.MapID = 1225; ServerBase.Kernel.Maps[1225].AddNpc(npc); break; } else { client.Entity.ConquerPoints += Database.rates.TreasureLow; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("Congratulations, " + client.Entity.Name + " has found the Box and Got "+Database.rates.TreasureLow+" cps!", System.Drawing.Color.White, Network.GamePackets.Message.World), PhoenixProject.ServerBase.Kernel.GamePool.Values); INpc npc2 = new Network.GamePackets.NpcSpawn(); npc2.UID = 5012; npc2.Mesh = 9307; npc2.Type = Game.Enums.NpcType.Talker; npc2.X = (ushort)Program.BoxX; npc2.Y = (ushort)Program.BoxY; npc2.MapID = 1225; ServerBase.Kernel.Maps[1225].Removenpc(npc2); INpc npc = new Network.GamePackets.NpcSpawn(); npc.UID = 5012; npc.Mesh = 9307; npc.Type = Game.Enums.NpcType.Talker; npc.X = 41; npc.Y = 61; Program.BoxX = npc.X; Program.BoxY = npc.Y; npc.MapID = 1225; ServerBase.Kernel.Maps[1225].AddNpc(npc); } break; } } break; } #endregion*/ #endregion #region HorseStore case 6001: { switch (npcRequest.OptionID) { case 0: { client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = Data.WindowCommands.HorseRacingStore, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); break; } } break; } #endregion #region BirdIsland Exchanger case 135: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + " I'm the Last One In [Organizer-Stars] Quest and i can Give the Prize But you Must be have all i need ."); dialog.Text("I Need 4 Joy-Coin and 4 Wish-Coin and 2 Adavncedjoy-Coin and All Boxes you Exchanged Before Are You Have All?."); dialog.Option("Yes I Have Give My Prize.", 1); dialog.Option("Sorry I Don't Have All Items.", 255); dialog.Avatar(116); dialog.Send(); break; } case 1: { if (DateTime.Now.Minute == 45) { if (client.Inventory.Contains(722894, 4))//Joy-Coin { if (client.Inventory.Contains(711021, 4))//Wish-Coin { if (client.Inventory.Contains(722895, 2))//Advancedjoy-Coin { if (client.Inventory.Contains(720135, 1))//Nirvana-Box { if (client.Inventory.Contains(720233, 1))//FlyingRoosterE-gg { client.Inventory.Remove(722894, 4); client.Inventory.Remove(711021, 4); client.Inventory.Remove(722895, 2); client.Inventory.Remove(720135, 1); client.Inventory.Remove(720233, 1); client.Inventory.Add(722178, 0, 1); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " Has finshed Quest [Organizer-Stars] And Reward SurpriseBox.", System.Drawing.Color.DarkGray, Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); } else { dialog.Text("Sorry But You Don't Have All Things You Can't finish The Quest"); dialog.Option("Ahh sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry But You Don't Have All Things You Can't finish The Quest"); dialog.Option("Ahh sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry But You Don't Have All Things You Can't finish The Quest."); dialog.Option("Ahh sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry But You Don't Have All Things You Can't finish The Quest."); dialog.Option("Ahh sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry But You Don't Have All Things You Can't finish The Quest."); dialog.Option("Ahh sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry You Can Only Claim Your Reward At Minute 45."); dialog.Option("Okay sorry Iam Will Waiting.", 255); dialog.Avatar(116); dialog.Send(); } break; } } break; } #endregion #region Ape City Exchanger case 139: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + " I Will take you item and give you FlyingRoosterE-gg Have you all i need ?."); dialog.Option("Yes i have All You Need.", 1); dialog.Option("Sorry I Don't Have All Items.", 255); dialog.Avatar(116); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(711252, 3))//France-Fancard { if (client.Inventory.Contains(711253, 3))//Mexico-Fancard { if (client.Inventory.Contains(722682, 1))//Colorful-Card { client.Inventory.Remove(711252, 3); client.Inventory.Remove(711253, 3); client.Inventory.Remove(722682, 1); client.Inventory.Add(720233, 0, 1); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " Has 2nd Phase in Quest [Organizer-Stars].", System.Drawing.Color.DarkGray, Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); } else { dialog.Text("Sorry You don't Have All Items I Can't Exchange."); dialog.Option("Ahh sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry You don't Have All Items I Can't Exchange."); dialog.Option("Ahh Sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry You don't Have All Items I Can't Exchange."); dialog.Option("Ahh sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } } break; } #endregion #region Phoenix Castle Exchanger case 138: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + " I Can Exchange 3 Raple-Books and 2 Surpise-Books and 1 Corhm-Book to Sheafy-Box."); dialog.Option("I Have all what you need.", 1); dialog.Option("Sorry I Don't Have The Items.", 255); dialog.Avatar(116); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(710222, 5))//Poem-Book { if (client.Inventory.Contains(710852, 3))//Literary-Book { if (client.Inventory.Contains(711138, 1))//Copy-Book { client.Inventory.Remove(710222, 5); client.Inventory.Remove(710852, 3); client.Inventory.Remove(711138, 1); client.Inventory.Add(720135, 0, 1); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " Has 1st Phase in Quest [Organizer-Stars].", System.Drawing.Color.DarkGray, Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); } else { dialog.Text("Sorry You Don't Have The Books I Can't Exchange."); dialog.Option("Ahh sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry You Don't Have The Books I Can't Exchange."); dialog.Option("Ahh sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } else { dialog.Text("Sorry You Don't Have The Books I Can't Exchange."); dialog.Option("Ahh sorry.", 255); dialog.Avatar(116); dialog.Send(); } break; } } break; } #endregion #region Organizer-Stars Quest Admin case 136: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + "!, on quest [Orgnaizer-Stars] Can I Will See You The Stages For This Quest."); dialog.Option("I Will Start Part1 [Lev100].", 1); dialog.Option("I Will Start Part2 [Lev115].", 2); dialog.Option("I Will Start Part3 [Lev120].", 3); dialog.Avatar(116); dialog.Send(); break; } case 1: { if (client.Entity.Level >= 100) { dialog.Text("[First-Stage] On Quest [Organizer-Stars] Go To Twin To Kill Apparition and Get "); dialog.Text("Five Poem-Books and Go To Phoenix. to Kill Bandit and Get three Literary-Books "); dialog.Text("and Go To Desert To Kill HillMonster and Get One Copy-Book Then Give it to Casper-M In Phoenix Castle"); dialog.Avatar(116); dialog.Send(); break; } else { dialog.Text("Sorry You Are Not Level 100 You Can't Start The Part1"); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); break; } } case 2: { if (client.Entity.Level >= 115) { dialog.Text("[Second-Stage] On Quest [Organizer-Stars] Go To Twin To Kill Robin and Get Three France-Fan-Card and Go To Phoenix To Kill "); dialog.Text("Ratling and Get Three Mexico-Fan-Card and Go To Desert To Kill BladeGhost and Get One Colorful-Card Then Give it To Casper-M2 In Ape City"); dialog.Option("Ok Iam going.", 1); dialog.Avatar(116); dialog.Send(); break; } else { dialog.Text("Sorry You Are Not Level 115 You Can't Start The Part2"); dialog.Option("Ohh Sorry.", 1); dialog.Avatar(116); dialog.Send(); break; } } case 3: { if (client.Entity.Level >= 120) { dialog.Text("[Third-Stage] On Quest [Organizer-Stars] This the last part of the Quest and it is might be hard it is in Some Cities "); dialog.Option("Okay Thank you For Helping Me.", 255); dialog.Avatar(116); dialog.Send(); break; } else { dialog.Text("Sorry You Are Not Level 120 You Can't Start The Part3"); dialog.Option("Ahh Sorry I Will Get It.", 255); dialog.Avatar(116); dialog.Send(); } break; } } break; } #endregion #region EliteGw case 115522: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to Join Elite GW?."); dialog.Text("or claim the Prize?, you can join Every day expect Saturday and Sunday At " + Game.KimoEvents.EGHour + ":00 to " + Game.KimoEvents.EGEndHour + ":00."); dialog.Text("and the winner Guild Leader will get " + PhoenixProject.Database.rates.EliteGw + " cps after it finish u have 5 minutes to claim?."); dialog.Option("Join Elite GW!", 1); dialog.Option("Claim Prize.", 5); dialog.Send(); break; } case 1: { if (DateTime.Now.DayOfWeek != DayOfWeek.Saturday && DateTime.Now.DayOfWeek != DayOfWeek.Sunday) { if (DateTime.Now.Hour >= Game.KimoEvents.EGHour && DateTime.Now.Hour < Game.KimoEvents.EGEndHour) { client.Entity.Teleport(2071, 47, 131); } else { dialog.Text("Sorry you can only join Btw " + Game.KimoEvents.EGHour + ":00 to " + Game.KimoEvents.EGEndHour + ":59!"); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + " Elite GuildWar not running in Saturday or Sunday"); dialog.Option("okay", 255); dialog.Send(); break; } break; } case 5: { //Daily.CheackAlive(); if (DateTime.Now.Hour == Game.KimoEvents.EGEndHour && DateTime.Now.Minute >= 00 && DateTime.Now.Minute < 05) { if (client.Guild != null) { if (client.Guild.PoleKeeper2 && EliteGuildWar.Claim == 0 && client.AsMember.Rank == PhoenixProject.Game.Enums.GuildMemberRank.GuildLeader) { EliteGuildWar.Claim += 1; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " claimed the prize " + PhoenixProject.Database.rates.EliteGw + " ConquerPoints for winning the Elite GuildWar.", System.Drawing.Color.Black, Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); client.Entity.ConquerPoints += PhoenixProject.Database.rates.EliteGw; } else { dialog.Text("sorry u dont have any prize to claim...."); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("sorry u dont have any prize to claim"); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + " You can only claim the prize btw " + Game.KimoEvents.EGEndHour + ":00 to " + Game.KimoEvents.EGEndHour + ":05 Expect Saturday and Sunday"); dialog.Option("okay", 255); dialog.Send(); break; } break; } } break; } #endregion #region ElitePole case 811: { dialog.Text("Welcome in Elite GuildWar HaveFun!."); dialog.Option("Thanks.", 255); dialog.Send(); break; } #endregion #region HuntMaps-lvlmaps case 445532: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " i can help you to find good maps to lvling up and hunt just choose what u want?."); dialog.Option("LvlingMaps", 1); dialog.Option("Hunting Maps", 2); dialog.Option("Just Passing By!.", 255); dialog.Send(); break; } case 1: { dialog.Text("choose which floor you wana go inside to level up ?."); dialog.Option("Floor[1]", 3); dialog.Option("Floor[2]", 4); dialog.Option("Floor[3]", 5); dialog.Option("Floor[4]", 6); dialog.Send(); break; } case 3: { client.Entity.Teleport(8800, 005, 290); break; } case 4: { client.Entity.Teleport(8800, 005, 290); break; } case 5: { client.Entity.Teleport(8800, 005, 290); break; } case 6: { client.Entity.Teleport(8800, 005, 290); break; } case 2: { dialog.Text("choose which floor you wana go inside to Hunt for cps ?."); dialog.Option("Floor[1]", 7); dialog.Option("Floor[2]", 8); dialog.Option("Floor[3]", 9); dialog.Option("Floor[4]", 10); dialog.Send(); break; } case 7: { client.Entity.Teleport(8800, 005, 290); break; } case 8: { client.Entity.Teleport(8800, 005, 290); break; } case 9: { client.Entity.Teleport(8800, 005, 290); break; } case 10: { client.Entity.Teleport(8800, 005, 290); break; } } break; } #endregion #region Name Changer case 803: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Yes yes, Im finally here Name Changer!, I Charge " + PhoenixProject.Database.rates.ChangeName + " Conquer Points."); dialog.Option("Cool Change My Name.", 5); dialog.Option("Have a good day.", 255); dialog.Send(); break; } case 5: { client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = 489, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); break; } } break; } #endregion #region PK less than case 242242: { switch (npcRequest.OptionID) { case 0: { if (client.Entity.PKPoints < 30) { dialog.Text("i cant less your pk any more you are safe Now"); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); break; } dialog.Text("Hay I am Pkpoints lesser i can less your pk from 30 or higher"); dialog.Option("-[30] PKponits 1000 cps.", 1); dialog.Option("-[60] PKponits 2000 cps", 2); dialog.Option("-[90] PKponits 3000 cps", 3); dialog.Option("-[120] PKponits 4000 cps", 4); dialog.Option("-[150] PKponits 5000 cps", 5); dialog.Option("-[200] PKponits 6000 cps", 6); dialog.Option("-[250] PKponits 7000 cps", 7); dialog.Option("Just passing by.", 255); dialog.Avatar(116); dialog.Send(); break; } case 1: { if (client.Entity.PKPoints >= 30) { if (client.Entity.ConquerPoints >= 1000) { client.Entity.ConquerPoints -= 1000; client.Entity.PKPoints -= 30; } else { dialog.Text("Please take 1000 cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } } else { dialog.Text("your pk points is low must higher than." + client.Entity.PKPoints); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 2: { if (client.Entity.PKPoints >= 60) { if (client.Entity.ConquerPoints >= 2000) { client.Entity.ConquerPoints -= 2000; client.Entity.PKPoints -= 60; } else { dialog.Text("Please take 2000 cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } } else { dialog.Text("your pk points is low must higher than." + client.Entity.PKPoints); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 3: { if (client.Entity.PKPoints >= 90) { if (client.Entity.ConquerPoints >= 3000) { client.Entity.ConquerPoints -= 3000; client.Entity.PKPoints -= 90; } else { dialog.Text("Please take 3000 cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } } else { dialog.Text("your pk points is low must higher than." + client.Entity.PKPoints); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 4: { if (client.Entity.PKPoints >= 120) { if (client.Entity.ConquerPoints >= 4000) { client.Entity.ConquerPoints -= 4000; client.Entity.PKPoints -= 120; } else { dialog.Text("Please take 4000 cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } } else { dialog.Text("your pk points is low must higher than." + client.Entity.PKPoints); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 5: { if (client.Entity.PKPoints >= 150) { if (client.Entity.ConquerPoints >= 5000) { client.Entity.ConquerPoints -= 5000; client.Entity.PKPoints -= 150; } else { dialog.Text("Please take 5000 cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } } else { dialog.Text("your pk points is low must higher than." + client.Entity.PKPoints); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 6: { if (client.Entity.PKPoints >= 200) { if (client.Entity.ConquerPoints >= 6000) { client.Entity.ConquerPoints -= 6000; client.Entity.PKPoints -= 200; } else { dialog.Text("Please take 6000 cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } } else { dialog.Text("your pk points is low must higher than." + client.Entity.PKPoints); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 7: { if (client.Entity.PKPoints >= 250) { if (client.Entity.ConquerPoints >= 7000) { client.Entity.ConquerPoints -= 7000; client.Entity.PKPoints -= 250; } else { dialog.Text("Please take 7000 cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } } else { dialog.Text("your pk points is low must higher than." + client.Entity.PKPoints); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } } break; } #endregion #region Prize Seller case 200033: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Greetings! I'm a great seller, I have the most precious items in the entire "); dialog.Text("world. What do you want to get?"); dialog.Option("GoldPrize [10 LordTokens]", 1); dialog.Option("GoldCup [9 LordTokens]", 2); dialog.Option("GoldTrophy [8 LordTokens]", 3); dialog.Option("SilverPrize [6 LordTokens]", 4); dialog.Option("BronzePrize [4 LordTokens]", 5); dialog.Option("Just passing by.", 255); dialog.Avatar(85); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(723467, 10)) { client.Inventory.Remove(723467, 10); client.Inventory.Add(2100075, 0, 1); } else { dialog.Text("You don't have enough 10 LordTokens !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(723467, 9)) { client.Inventory.Remove(723467, 9); client.Inventory.Add(2100095, 0, 1); } else { dialog.Text("You don't have enough 9 LordTokens !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(723467, 8)) { client.Inventory.Remove(723467, 8); client.Inventory.Add(2100085, 0, 1); } else { dialog.Text("You don't have enough 8 LordTokens !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 4: { if (client.Inventory.Contains(723467, 6)) { client.Inventory.Remove(723467, 6); client.Inventory.Add(2100065, 0, 1); } else { dialog.Text("You don't have enough 6 LordTokens !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 5: { if (client.Inventory.Contains(723467, 4)) { client.Inventory.Remove(723467, 4); client.Inventory.Add(2100055, 0, 1); } else { dialog.Text("You don't have enough 4 LordTokens !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } } break; } #endregion #region ChangeRb case 112251: { switch (npcRequest.OptionID) { case 0: { if (client.Entity.Reborn == 2 && client.Entity.Level >= 120) { dialog.Text("I am the ReincarnationSeer i can help you to change your second reborn Class you need OblivionDew"); dialog.Text(" and " + PhoenixProject.Database.rates.Riencration + " cps in your inventory deal?"); dialog.Option("i want to Change my Class.", 1); dialog.Option("i want to Buy OblivionDew.", 2); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("Sorry you need to be Seconed Reborn and Lv + 120."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 1: { if (client.Entity.ConquerPoints >= PhoenixProject.Database.rates.Riencration) { client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = Data.WindowCommands.Reincarnation, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); //break; } else { dialog.Text("Sorry you dont have " + PhoenixProject.Database.rates.Riencration + " cps in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 2: { if (client.Entity.ConquerPoints >= 2000) { dialog.Text("Do you Really want to Buy OblivionDew it cost 2,000 cps"); dialog.Option("Yes.", 3); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("Sorry you dont Have 2,000 cps."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 3: { if (client.Entity.ConquerPoints >= 2000) { client.Entity.ConquerPoints -= 2000; client.Inventory.Add(711083, 0, 1); } else { dialog.Text("Sorry you dont Have 2000 cps in your bag."); dialog.Option("Why!?", 255); dialog.Send(); } break; } } break; } #endregion #region TopSpouse Join case 241241: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to join TopSpouse PKWar?."); dialog.Text("you should make Team and Join your Spouse in it so i can let you Join?."); dialog.Option("Yes Please", 1); dialog.Option("ClaimPrize", 2); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.SpouseHour && DateTime.Now.Minute >= 00 && DateTime.Now.Minute < 05) { if (client.Team != null && client.Team.TeamLeader && client.Entity.Body == 1003 || client.Team != null && client.Team.TeamLeader && client.Entity.Body == 1004) { if (client.Team.SpouseWarFull) { foreach (Client.GameState Teammate in client.Team.Teammates) { if (Teammate != null) { if (Teammate.Entity.Name == client.Entity.Spouse) { Teammate.Entity.Teleport(1090, 40, 50); client.Entity.Teleport(1090, 40, 50); } } } } } } else { dialog.Text("TopSpouse Pk War is held during " + Game.KimoEvents.SpouseHour + ":00 to " + Game.KimoEvents.SpouseHour + ":05 and End " + Game.KimoEvents.SpouseHour + ":30 in every day"); dialog.Text("and to let you Join you must be Team leader and have your spouse in the team"); dialog.Text(" Note: only you and your Spouse in the Team so you can Join"); dialog.Option("I don't care.", 255); dialog.Send(); break; } break; } case 2: { if (client.Inventory.Contains(722269, 1)) { client.Inventory.Remove(722269, 1); Game.Flags.AddSpouse(client); client.Entity.AddFlag(Update.Flags.TopSpouse); } else { dialog.Text("Sorry you dont have LoverBook i cant Help you"); dialog.Option("I don't care.", 255); dialog.Send(); break; } break; } } break; } #endregion #region TopSpouse Claim case 2314007: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to claim TopSpouse PKWar reward?."); dialog.Text("you should be the only man here your claim " + PhoenixProject.Database.rates.TopSpouse + " cps and 1 loverbook."); dialog.Text(" and claim halo from TwinCity CouplesPkGuide NPC?."); dialog.Option("ClaimPrize", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Hour == Game.KimoEvents.SpouseHour && DateTime.Now.Minute > 06 && DateTime.Now.Minute < 30) { PhoenixProject.Game.ConquerStructures.Daily.CheackSpouse(); if (PhoenixProject.Game.ConquerStructures.Daily.howmanyinmap3 == 1) { client.Entity.Teleport(1002, 429, 378); client.Entity.ConquerPoints += PhoenixProject.Database.rates.TopSpouse; client.Inventory.Add(722269, 0, 2); Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " has claimed Prize for Couples pk for this day " + PhoenixProject.Database.rates.TopSpouse + " cps and 2 LoveBook!.", System.Drawing.Color.White, Message.Center), Kernel.GamePool.Values); } } else { dialog.Text("Sorry you can claim TopSpouse Prize if you the last man/women Here in The Map"); dialog.Text(" Btw xx:06 xx:30"); dialog.Option("oh i see!.", 255); dialog.Send(); break; } break; } } break; } #endregion #region BattleGhost case 225584: { switch (npcRequest.OptionID) { case 0: { dialog.Text("I am the BattleGhost, i can help you to claim Bound Gears if u have?"); dialog.Text("then Pick what Pack you want to Claim, Are You Ready?"); dialog.Option("Ninja Pack.", 1); dialog.Option("Trojan Pack.", 2); dialog.Option("Monk Pack.", 3); dialog.Option("Archer Pack.", 4); dialog.Option("FireTaoist Pack.", 5); dialog.Option("WaterTaoist Pack.", 6); dialog.Option("Warrior Pack.", 7); dialog.Option("Pirate Pack.", 8); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(720356, 1)) { //(720356, 0, 1);//MerryPack dialog.Text("are you sure you want this Ninja Pack ?"); dialog.Option("Sure.", 55); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("sorry you dont have MerryPack in your Bag."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(720356, 1)) { //(720356, 0, 1);//MerryPack dialog.Text("are you sure you want this Trojan Pack ?"); dialog.Option("Sure.", 15); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("sorry you dont have MerryPack in your Bag."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(720356, 1)) { //(720356, 0, 1);//MerryPack dialog.Text("are you sure you want this Monk Pack ?"); dialog.Option("Sure.", 65); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("sorry you dont have MerryPack in your Bag."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 4: { if (client.Inventory.Contains(720356, 1)) { //(720356, 0, 1);//MerryPack dialog.Text("are you sure you want this Archer Pack ?"); dialog.Option("Sure.", 45); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("sorry you dont have MerryPack in your Bag."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 5: { if (client.Inventory.Contains(720356, 1)) { //(720356, 0, 1);//MerryPack dialog.Text("are you sure you want this FireTaoist Pack ?"); dialog.Option("Sure.", 145); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("sorry you dont have MerryPack in your Bag."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 6: { if (client.Inventory.Contains(720356, 1)) { //(720356, 0, 1);//MerryPack dialog.Text("are you sure you want this WaterTaoist Pack ?"); dialog.Option("Sure.", 135); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("sorry you dont have MerryPack in your Bag."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 7: { if (client.Inventory.Contains(720356, 1)) { //(720356, 0, 1);//MerryPack dialog.Text("are you sure you want this Warrior Pack ?"); dialog.Option("Sure.", 25); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("sorry you dont have MerryPack in your Bag."); dialog.Option("Alright.", 255); dialog.Send(); } break; } case 8: { if (client.Inventory.Contains(720356, 1)) { //(720356, 0, 1);//MerryPack dialog.Text("are you sure you want this Pirate Pack ?"); dialog.Option("Sure.", 75); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("sorry you dont have MerryPack in your Bag."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #region BoundItems Trojan case 15: { uint itemid = 202009;//Tower uint itemid2 = 201009;//Fan uint itemid3 = 160019;//Boot uint itemid4 = 120029;//Necklace uint itemid5 = 150019;//Ring uint itemid6 = 117009;//Earrings uint itemid7 = 130009;//Armor uint itemid8 = 480019;//Club uint itemid9 = 410019;//Blade if (client.Inventory.Count <= 30) { if (client.Inventory.Contains(720356, 1)) { ConquerItem item2 = new ConquerItem(true); item2.ID = itemid2; item2.Color = PhoenixProject.Game.Enums.Color.White; item2.Bound = true; item2.Plus = 8; item2.Durability = item2.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid2].Durability; client.Inventory.Add(item2, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item3 = new ConquerItem(true); item3.ID = itemid3; item3.Color = PhoenixProject.Game.Enums.Color.White; item3.Bound = true; item3.Plus = 8; item3.Durability = item3.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid3].Durability; client.Inventory.Add(item3, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item4 = new ConquerItem(true); item4.ID = itemid4; item4.Color = PhoenixProject.Game.Enums.Color.White; item4.Bound = true; item4.Plus = 8; item4.Durability = item4.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid4].Durability; client.Inventory.Add(item4, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item5 = new ConquerItem(true); item5.ID = itemid5; item5.Color = PhoenixProject.Game.Enums.Color.White; item5.Bound = true; item5.Plus = 8; item5.Durability = item5.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid5].Durability; client.Inventory.Add(item5, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item6 = new ConquerItem(true); item6.ID = itemid6; item6.Color = PhoenixProject.Game.Enums.Color.White; item6.Bound = true; item6.Plus = 8; item6.Durability = item6.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid6].Durability; client.Inventory.Add(item6, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item7 = new ConquerItem(true); item7.ID = itemid7; item7.Color = PhoenixProject.Game.Enums.Color.White; item7.Bound = true; item7.Plus = 8; item7.Durability = item7.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid7].Durability; client.Inventory.Add(item7, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item8 = new ConquerItem(true); item8.ID = itemid8; item8.Color = PhoenixProject.Game.Enums.Color.White; item8.Bound = true; item8.Plus = 8; item8.Durability = item8.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid8].Durability; client.Inventory.Add(item8, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item9 = new ConquerItem(true); item9.ID = itemid9; item9.Color = PhoenixProject.Game.Enums.Color.White; item9.Bound = true; item9.Plus = 8; item9.Durability = item9.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid9].Durability; client.Inventory.Add(item9, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 8; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.Inventory.Remove(720356, 1); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "you have obtained Trojan Pack HaveFun in " + PhoenixProject.Database.rates.servername + "?"); npc.OptionID = 255; client.Send(npc.ToArray()); } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("sorry you dont have MerryPack in your Bag ."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to make atleast 10 free spots in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion #region BoundItems Warrior case 25: { uint itemid = 202009;//Tower uint itemid2 = 201009;//Fan uint itemid3 = 160019;//Boot uint itemid4 = 120029;//Necklace uint itemid5 = 150019;//Ring uint itemid6 = 117009;//Earrings uint itemid7 = 131009;//Armor uint itemid8 = 480019;//Club uint itemid9 = 900009;//Shield if (client.Inventory.Count <= 30) { if (client.Inventory.Contains(720356, 1)) { ConquerItem item2 = new ConquerItem(true); item2.ID = itemid2; item2.Color = PhoenixProject.Game.Enums.Color.White; item2.Bound = true; item2.Plus = 8; item2.Durability = item2.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid2].Durability; client.Inventory.Add(item2, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item3 = new ConquerItem(true); item3.ID = itemid3; item3.Color = PhoenixProject.Game.Enums.Color.White; item3.Bound = true; item3.Plus = 8; item3.Durability = item3.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid3].Durability; client.Inventory.Add(item3, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item4 = new ConquerItem(true); item4.ID = itemid4; item4.Color = PhoenixProject.Game.Enums.Color.White; item4.Bound = true; item4.Plus = 8; item4.Durability = item4.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid4].Durability; client.Inventory.Add(item4, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item5 = new ConquerItem(true); item5.ID = itemid5; item5.Color = PhoenixProject.Game.Enums.Color.White; item5.Bound = true; item5.Plus = 8; item5.Durability = item5.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid5].Durability; client.Inventory.Add(item5, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item6 = new ConquerItem(true); item6.ID = itemid6; item6.Color = PhoenixProject.Game.Enums.Color.White; item6.Bound = true; item6.Plus = 8; item6.Durability = item6.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid6].Durability; client.Inventory.Add(item6, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item7 = new ConquerItem(true); item7.ID = itemid7; item7.Color = PhoenixProject.Game.Enums.Color.White; item7.Bound = true; item7.Plus = 8; item7.Durability = item7.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid7].Durability; client.Inventory.Add(item7, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item8 = new ConquerItem(true); item8.ID = itemid8; item8.Color = PhoenixProject.Game.Enums.Color.White; item8.Bound = true; item8.Plus = 8; item8.Durability = item8.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid8].Durability; client.Inventory.Add(item8, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item9 = new ConquerItem(true); item9.ID = itemid9; item9.Color = PhoenixProject.Game.Enums.Color.White; item9.Bound = true; item9.Plus = 8; item9.Durability = item9.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid9].Durability; client.Inventory.Add(item9, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 8; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.Inventory.Remove(720356, 1); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "you have obtained Warrior Pack HaveFun in " + PhoenixProject.Database.rates.servername + "?"); npc.OptionID = 255; client.Send(npc.ToArray()); } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("sorry you dont have MerryPack in your Bag ."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to make atleast 10 free spots in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion #region BoundItems Archer case 45: { uint itemid = 202009;//Tower uint itemid2 = 201009;//Fan uint itemid3 = 160019;//Boot uint itemid4 = 120029;//Necklace uint itemid5 = 150019;//Ring uint itemid6 = 117009;//Earrings uint itemid7 = 133009;//Armor uint itemid8 = 500009;//Bow //uint itemid9 = 900009;//Shield if (client.Inventory.Count <= 30) { if (client.Inventory.Contains(720356, 1)) { ConquerItem item2 = new ConquerItem(true); item2.ID = itemid2; item2.Color = PhoenixProject.Game.Enums.Color.White; item2.Bound = true; item2.Plus = 8; item2.Durability = item2.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid2].Durability; client.Inventory.Add(item2, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item3 = new ConquerItem(true); item3.ID = itemid3; item3.Color = PhoenixProject.Game.Enums.Color.White; item3.Bound = true; item3.Plus = 8; item3.Durability = item3.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid3].Durability; client.Inventory.Add(item3, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item4 = new ConquerItem(true); item4.ID = itemid4; item4.Color = PhoenixProject.Game.Enums.Color.White; item4.Bound = true; item4.Plus = 8; item4.Durability = item4.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid4].Durability; client.Inventory.Add(item4, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item5 = new ConquerItem(true); item5.ID = itemid5; item5.Color = PhoenixProject.Game.Enums.Color.White; item5.Bound = true; item5.Plus = 8; item5.Durability = item5.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid5].Durability; client.Inventory.Add(item5, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item6 = new ConquerItem(true); item6.ID = itemid6; item6.Color = PhoenixProject.Game.Enums.Color.White; item6.Bound = true; item6.Plus = 8; item6.Durability = item6.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid6].Durability; client.Inventory.Add(item6, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item7 = new ConquerItem(true); item7.ID = itemid7; item7.Color = PhoenixProject.Game.Enums.Color.White; item7.Bound = true; item7.Plus = 8; item7.Durability = item7.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid7].Durability; client.Inventory.Add(item7, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item8 = new ConquerItem(true); item8.ID = itemid8; item8.Color = PhoenixProject.Game.Enums.Color.White; item8.Bound = true; item8.Plus = 8; item8.Durability = item8.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid8].Durability; client.Inventory.Add(item8, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 8; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.Inventory.Remove(720356, 1); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "you have obtained Archer Pack HaveFun in " + PhoenixProject.Database.rates.servername + "?"); npc.OptionID = 255; client.Send(npc.ToArray()); } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("sorry you dont have MerryPack in your Bag ."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to make atleast 10 free spots in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion #region BoundItems Ninja case 55: { uint itemid = 202009;//Tower uint itemid2 = 201009;//Fan uint itemid3 = 160019;//Boot uint itemid4 = 120029;//Necklace uint itemid5 = 150019;//Ring uint itemid6 = 117009;//Earrings uint itemid7 = 135009;//Armor uint itemid8 = 601019;//Katana uint itemid9 = 601019;//Katana if (client.Inventory.Count <= 30) { if (client.Inventory.Contains(720356, 1)) { ConquerItem item2 = new ConquerItem(true); item2.ID = itemid2; item2.Color = PhoenixProject.Game.Enums.Color.White; item2.Bound = true; item2.Plus = 8; item2.Durability = item2.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid2].Durability; client.Inventory.Add(item2, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item3 = new ConquerItem(true); item3.ID = itemid3; item3.Color = PhoenixProject.Game.Enums.Color.White; item3.Bound = true; item3.Plus = 8; item3.Durability = item3.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid3].Durability; client.Inventory.Add(item3, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item4 = new ConquerItem(true); item4.ID = itemid4; item4.Color = PhoenixProject.Game.Enums.Color.White; item4.Bound = true; item4.Plus = 8; item4.Durability = item4.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid4].Durability; client.Inventory.Add(item4, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item5 = new ConquerItem(true); item5.ID = itemid5; item5.Color = PhoenixProject.Game.Enums.Color.White; item5.Bound = true; item5.Plus = 8; item5.Durability = item5.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid5].Durability; client.Inventory.Add(item5, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item6 = new ConquerItem(true); item6.ID = itemid6; item6.Color = PhoenixProject.Game.Enums.Color.White; item6.Bound = true; item6.Plus = 8; item6.Durability = item6.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid6].Durability; client.Inventory.Add(item6, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item7 = new ConquerItem(true); item7.ID = itemid7; item7.Color = PhoenixProject.Game.Enums.Color.White; item7.Bound = true; item7.Plus = 8; item7.Durability = item7.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid7].Durability; client.Inventory.Add(item7, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item8 = new ConquerItem(true); item8.ID = itemid8; item8.Color = PhoenixProject.Game.Enums.Color.White; item8.Bound = true; item8.Plus = 8; item8.Durability = item8.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid8].Durability; client.Inventory.Add(item8, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item9 = new ConquerItem(true); item9.ID = itemid9; item9.Color = PhoenixProject.Game.Enums.Color.White; item9.Bound = true; item9.Plus = 8; item9.Durability = item9.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid9].Durability; client.Inventory.Add(item9, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 8; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.Inventory.Remove(720356, 1); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "you have obtained Ninja Pack HaveFun in " + PhoenixProject.Database.rates.servername + "?"); npc.OptionID = 255; client.Send(npc.ToArray()); } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("sorry you dont have MerryPack in your Bag ."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to make atleast 10 free spots in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion #region BoundItems Monk case 65: { uint itemid = 202009;//Tower uint itemid2 = 201009;//Fan uint itemid3 = 160019;//Boot uint itemid4 = 120029;//Necklace uint itemid5 = 150019;//Ring uint itemid6 = 117009;//Earrings uint itemid7 = 136009;//Armor uint itemid8 = 610019;//Katana uint itemid9 = 610019;//Katana if (client.Inventory.Count <= 30) { if (client.Inventory.Contains(720356, 1)) { ConquerItem item2 = new ConquerItem(true); item2.ID = itemid2; item2.Color = PhoenixProject.Game.Enums.Color.White; item2.Bound = true; item2.Plus = 8; item2.Durability = item2.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid2].Durability; client.Inventory.Add(item2, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item3 = new ConquerItem(true); item3.ID = itemid3; item3.Color = PhoenixProject.Game.Enums.Color.White; item3.Bound = true; item3.Plus = 8; item3.Durability = item3.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid3].Durability; client.Inventory.Add(item3, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item4 = new ConquerItem(true); item4.ID = itemid4; item4.Color = PhoenixProject.Game.Enums.Color.White; item4.Bound = true; item4.Plus = 8; item4.Durability = item4.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid4].Durability; client.Inventory.Add(item4, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item5 = new ConquerItem(true); item5.ID = itemid5; item5.Color = PhoenixProject.Game.Enums.Color.White; item5.Bound = true; item5.Plus = 8; item5.Durability = item5.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid5].Durability; client.Inventory.Add(item5, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item6 = new ConquerItem(true); item6.ID = itemid6; item6.Color = PhoenixProject.Game.Enums.Color.White; item6.Bound = true; item6.Plus = 8; item6.Durability = item6.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid6].Durability; client.Inventory.Add(item6, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item7 = new ConquerItem(true); item7.ID = itemid7; item7.Color = PhoenixProject.Game.Enums.Color.White; item7.Bound = true; item7.Plus = 8; item7.Durability = item7.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid7].Durability; client.Inventory.Add(item7, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item8 = new ConquerItem(true); item8.ID = itemid8; item8.Color = PhoenixProject.Game.Enums.Color.White; item8.Bound = true; item8.Plus = 8; item8.Durability = item8.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid8].Durability; client.Inventory.Add(item8, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item9 = new ConquerItem(true); item9.ID = itemid9; item9.Color = PhoenixProject.Game.Enums.Color.White; item9.Bound = true; item9.Plus = 8; item9.Durability = item9.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid9].Durability; client.Inventory.Add(item9, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 8; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.Inventory.Remove(720356, 1); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "you have obtained Monk Pack HaveFun in " + PhoenixProject.Database.rates.servername + "?"); npc.OptionID = 255; client.Send(npc.ToArray()); } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("sorry you dont have MerryPack in your Bag ."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to make atleast 10 free spots in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion #region BoundItems WaterTaoist case 135: { uint itemid = 202009;//Tower uint itemid2 = 201009;//Fan uint itemid3 = 160019;//Boot uint itemid4 = 120029;//Necklace uint itemid5 = 150019;//Ring uint itemid6 = 114009;//Cap uint itemid7 = 134009;//Armor uint itemid8 = 560019;//Spear uint itemid9 = 421009;//BackSword if (client.Inventory.Count <= 30) { if (client.Inventory.Contains(720356, 1)) { ConquerItem item2 = new ConquerItem(true); item2.ID = itemid2; item2.Color = PhoenixProject.Game.Enums.Color.White; item2.Bound = true; item2.Plus = 8; item2.Durability = item2.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid2].Durability; client.Inventory.Add(item2, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item3 = new ConquerItem(true); item3.ID = itemid3; item3.Color = PhoenixProject.Game.Enums.Color.White; item3.Bound = true; item3.Plus = 8; item3.Durability = item3.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid3].Durability; client.Inventory.Add(item3, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item4 = new ConquerItem(true); item4.ID = itemid4; item4.Color = PhoenixProject.Game.Enums.Color.White; item4.Bound = true; item4.Plus = 8; item4.Durability = item4.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid4].Durability; client.Inventory.Add(item4, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item5 = new ConquerItem(true); item5.ID = itemid5; item5.Color = PhoenixProject.Game.Enums.Color.White; item5.Bound = true; item5.Plus = 8; item5.Durability = item5.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid5].Durability; client.Inventory.Add(item5, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item6 = new ConquerItem(true); item6.ID = itemid6; item6.Color = PhoenixProject.Game.Enums.Color.White; item6.Bound = true; item6.Plus = 8; item6.Durability = item6.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid6].Durability; client.Inventory.Add(item6, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item7 = new ConquerItem(true); item7.ID = itemid7; item7.Color = PhoenixProject.Game.Enums.Color.White; item7.Bound = true; item7.Plus = 8; item7.Durability = item7.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid7].Durability; client.Inventory.Add(item7, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item8 = new ConquerItem(true); item8.ID = itemid8; item8.Color = PhoenixProject.Game.Enums.Color.White; item8.Bound = true; item8.Plus = 8; item8.Durability = item8.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid8].Durability; client.Inventory.Add(item8, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item9 = new ConquerItem(true); item9.ID = itemid9; item9.Color = PhoenixProject.Game.Enums.Color.White; item9.Bound = true; item9.Plus = 8; item9.Durability = item9.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid9].Durability; client.Inventory.Add(item9, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 8; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.Inventory.Remove(720356, 1); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "you have obtained WaterTaoist Pack HaveFun in " + PhoenixProject.Database.rates.servername + "?"); npc.OptionID = 255; client.Send(npc.ToArray()); } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("sorry you dont have MerryPack in your Bag ."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to make atleast 10 free spots in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion #region BoundItems FireTaoist case 145: { uint itemid = 202009;//Tower uint itemid2 = 201009;//Fan uint itemid3 = 160019;//Boot uint itemid4 = 121029;//Bag uint itemid5 = 152019;//Bracelet uint itemid6 = 114009;//Cap uint itemid7 = 134009;//Armor uint itemid8 = 560019;//Spear uint itemid9 = 421009;//BackSword if (client.Inventory.Count <= 30) { if (client.Inventory.Contains(720356, 1)) { ConquerItem item2 = new ConquerItem(true); item2.ID = itemid2; item2.Color = PhoenixProject.Game.Enums.Color.White; item2.Bound = true; item2.Plus = 8; item2.Durability = item2.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid2].Durability; client.Inventory.Add(item2, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item3 = new ConquerItem(true); item3.ID = itemid3; item3.Color = PhoenixProject.Game.Enums.Color.White; item3.Bound = true; item3.Plus = 8; item3.Durability = item3.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid3].Durability; client.Inventory.Add(item3, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item4 = new ConquerItem(true); item4.ID = itemid4; item4.Color = PhoenixProject.Game.Enums.Color.White; item4.Bound = true; item4.Plus = 8; item4.Durability = item4.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid4].Durability; client.Inventory.Add(item4, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item5 = new ConquerItem(true); item5.ID = itemid5; item5.Color = PhoenixProject.Game.Enums.Color.White; item5.Bound = true; item5.Plus = 8; item5.Durability = item5.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid5].Durability; client.Inventory.Add(item5, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item6 = new ConquerItem(true); item6.ID = itemid6; item6.Color = PhoenixProject.Game.Enums.Color.White; item6.Bound = true; item6.Plus = 8; item6.Durability = item6.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid6].Durability; client.Inventory.Add(item6, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item7 = new ConquerItem(true); item7.ID = itemid7; item7.Color = PhoenixProject.Game.Enums.Color.White; item7.Bound = true; item7.Plus = 8; item7.Durability = item7.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid7].Durability; client.Inventory.Add(item7, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item8 = new ConquerItem(true); item8.ID = itemid8; item8.Color = PhoenixProject.Game.Enums.Color.White; item8.Bound = true; item8.Plus = 8; item8.Durability = item8.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid8].Durability; client.Inventory.Add(item8, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item9 = new ConquerItem(true); item9.ID = itemid9; item9.Color = PhoenixProject.Game.Enums.Color.White; item9.Bound = true; item9.Plus = 8; item9.Durability = item9.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid9].Durability; client.Inventory.Add(item9, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 8; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.Inventory.Remove(720356, 1); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "you have obtained FireTaoist Pack HaveFun in " + PhoenixProject.Database.rates.servername + "?"); npc.OptionID = 255; client.Send(npc.ToArray()); } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("sorry you dont have MerryPack in your Bag ."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to make atleast 10 free spots in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion #region BoundItems Pirate case 75: { uint itemid = 202009;//Tower uint itemid2 = 201009;//Fan uint itemid3 = 160019;//Boot uint itemid4 = 120029;//Necklace uint itemid5 = 150019;//Ring uint itemid6 = 144009;//Earrings uint itemid7 = 139009;//Armor uint itemid8 = 611019;//Katana uint itemid9 = 612019;//Katana if (client.Inventory.Count <= 30) { if (client.Inventory.Contains(720356, 1)) { ConquerItem item2 = new ConquerItem(true); item2.ID = itemid2; item2.Color = PhoenixProject.Game.Enums.Color.White; item2.Bound = true; item2.Plus = 8; item2.Durability = item2.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid2].Durability; client.Inventory.Add(item2, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item3 = new ConquerItem(true); item3.ID = itemid3; item3.Color = PhoenixProject.Game.Enums.Color.White; item3.Bound = true; item3.Plus = 8; item3.Durability = item3.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid3].Durability; client.Inventory.Add(item3, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item4 = new ConquerItem(true); item4.ID = itemid4; item4.Color = PhoenixProject.Game.Enums.Color.White; item4.Bound = true; item4.Plus = 8; item4.Durability = item4.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid4].Durability; client.Inventory.Add(item4, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item5 = new ConquerItem(true); item5.ID = itemid5; item5.Color = PhoenixProject.Game.Enums.Color.White; item5.Bound = true; item5.Plus = 8; item5.Durability = item5.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid5].Durability; client.Inventory.Add(item5, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item6 = new ConquerItem(true); item6.ID = itemid6; item6.Color = PhoenixProject.Game.Enums.Color.White; item6.Bound = true; item6.Plus = 8; item6.Durability = item6.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid6].Durability; client.Inventory.Add(item6, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item7 = new ConquerItem(true); item7.ID = itemid7; item7.Color = PhoenixProject.Game.Enums.Color.White; item7.Bound = true; item7.Plus = 8; item7.Durability = item7.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid7].Durability; client.Inventory.Add(item7, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item8 = new ConquerItem(true); item8.ID = itemid8; item8.Color = PhoenixProject.Game.Enums.Color.White; item8.Bound = true; item8.Plus = 8; item8.Durability = item8.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid8].Durability; client.Inventory.Add(item8, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item9 = new ConquerItem(true); item9.ID = itemid9; item9.Color = PhoenixProject.Game.Enums.Color.White; item9.Bound = true; item9.Plus = 8; item9.Durability = item9.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid9].Durability; client.Inventory.Add(item9, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd); ConquerItem item = new ConquerItem(true); item.ID = itemid; item.Color = PhoenixProject.Game.Enums.Color.White; item.Bound = true; item.Plus = 8; item.Durability = item.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability; Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); if (client.Inventory.Add(item, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd)) { client.Inventory.Remove(720356, 1); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "you have obtained Ninja Pack HaveFun in " + PhoenixProject.Database.rates.servername + "?"); npc.OptionID = 255; client.Send(npc.ToArray()); } else { dialog.Text("You need atleast one free slot in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("sorry you dont have MerryPack in your Bag ."); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You need to make atleast 10 free spots in your inventory."); dialog.Option("Alright.", 255); dialog.Send(); } break; } #endregion } break; } #endregion #region HorseRaceIn case 243243: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to join HorseRace?."); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Minute >= 44 && DateTime.Now.Minute < 45) { client.Entity.Teleport(1950, 136, 245); } else { dialog.Text("HorseRace is held during xx:44 in every Hour"); dialog.Option("I don't care.", 255); dialog.Send(); break; } break; } } break; } #endregion #region Winner of HorseRace case 244244: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to claim your Prize?."); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { //Daily.CheackAlive(); if (DateTime.Now.Minute >= 45 && DateTime.Now.Minute <= 59) { if (Game.Tournaments.SteedRace.IsRace) { Game.Tournaments.SteedRace.GiveReward(client); client.Entity.Teleport(1002, 428, 378); } else { dialog.Text("Sorry SteedRace not running Atm so u cant claim any shit!"); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + "You can only claim the prize when the Tourment Online"); dialog.Option("okay", 255); dialog.Send(); break; } break; } } break; } #endregion #region DailyPkWar case 231400: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to join the Daily PKWar?."); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Minute >= 00 && DateTime.Now.Minute < 05) { client.Entity.Teleport(8877, 52, 44); Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3378; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } else { dialog.Text("Daily Pk War is held during xx:00 in every Hour"); dialog.Option("I don't care.", 255); dialog.Send(); break; } break; } } break; } #endregion #region Winner of DailyPk NPC 231500 case 231500: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to claim your Prize?."); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { Daily.CheackAlive(); if (DateTime.Now.Minute >= 08 && DateTime.Now.Minute <= 30) { if (Daily.howmanyinmap == 1) { client.Entity.ConquerPoints += PhoenixProject.Database.rates.DailyPk; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " claimed the prize " + PhoenixProject.Database.rates.DailyPk + " ConquerPoints for winning the DailyPk for this Hour.", System.Drawing.Color.Black, Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); client.Entity.SendSpawn(client, true); client.Entity.Teleport(1002, 429, 378); } else { dialog.Text("There are still " + Daily.howmanyinmap + " players in the map kill it first to claim prize!"); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + "You can only claim the prize when the time on or after xx:08"); dialog.Option("okay", 255); dialog.Send(); break; } break; } } break; } #endregion #region Seller/moonbox/emerald 422 395 case 338111: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey how I can help you ? "); dialog.Option("Buy MoonBox - 3kCPS ", 2);//721080 dialog.Option("Buy EuxeniteOre - 1kCPS ", 30); dialog.Option("Buy Emerald - 2kCPS ", 4); dialog.Option("Buy FireofHell - 2kCPS ", 22); dialog.Option("Change 10kcps for 50kk silver ", 5); dialog.Option("Buy 1 Saddle for 500 cps ", 9); dialog.Option("Just passing by.", 255); dialog.Avatar(80); dialog.Send(); break; } case 22: { if (client.Entity.ConquerPoints >= 2000) { client.Entity.ConquerPoints -= 2000; client.Inventory.Add(1060101, 0, 1); } else { dialog.Text("You don't have 2000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 5: { if (client.Entity.ConquerPoints >= 10000) { if (client.Entity.Money <= (uint)(500000000 - 1000)) { client.Entity.ConquerPoints -= 10000; client.Entity.Money += 50000000; } } else { dialog.Text("You don't have 50000 ConquerPoints!"); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 9: { if (client.Entity.ConquerPoints >= 500) { client.Entity.ConquerPoints -= 500; client.Inventory.Add(723903, 0, 1); } else { dialog.Text("You don't have 500 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 30: { if (client.Entity.ConquerPoints >= 1000) { client.Entity.ConquerPoints -= 1000; client.Inventory.Add(1072031, 0, 1); } break; } case 1: { if (client.Entity.PKPoints > 30 && client.Entity.ConquerPoints >= 1000) { client.Entity.ConquerPoints -= 1000; client.Entity.PKPoints = 0; } else { dialog.Text("You don't have 1000 ConquerPoints or you don't have 30 pkp!"); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 2: { if (client.Entity.ConquerPoints >= 3000) { client.Entity.ConquerPoints -= 3000; client.Inventory.Add(721080, 0, 1); } else { dialog.Text("You don't have 3000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 3: { if (client.Entity.ConquerPoints >= 100) { client.Entity.QuizPoints += 100; client.Entity.ConquerPoints -= 100; } else { dialog.Text("You don't have 1000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 4: { if (client.Entity.ConquerPoints >= 2000) { client.Inventory.Add(1080001, 0, 1); client.Entity.ConquerPoints -= 2000; } else { dialog.Text("You don't have 2000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } } break; } #endregion #region Remove Bound case 26678: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hellow, you wana remove free for you items for " + Database.rates.RemoveBound + " cps? "); dialog.Option("Headgear. ", 1); dialog.Option("Necklace/Bag. ", 2); dialog.Option("Armor. ", 3); dialog.Option("Weapon. ", 4); dialog.Option("Shield. ", 5); dialog.Option("Ring. ", 6); dialog.Option("Boots. ", 8); dialog.Option("Just passing by.", 255); dialog.Avatar(114); dialog.Send(); break; } case 1: case 2: case 3: case 4: case 5: case 6: case 8: { if (!client.Equipment.Free(npcRequest.OptionID)) { if (client.Equipment.TryGetItem(npcRequest.OptionID).Bound) { if (client.Entity.ConquerPoints >= Database.rates.RemoveBound) { client.Entity.ConquerPoints -= Database.rates.RemoveBound; client.Equipment.TryGetItem(npcRequest.OptionID).Bound = false; client.Equipment.TryGetItem(npcRequest.OptionID).Send(client); Database.ConquerItemTable.UpdateBound(client.Equipment.TryGetItem(npcRequest.OptionID)); dialog.Text("Here you are. It's done."); dialog.Option("Thanks", 255); dialog.Avatar(114); dialog.Send(); } else { dialog.Text("Sorry, you need " + Database.rates.RemoveBound + " ConquerPoints"); dialog.Option("Ah ok", 255); dialog.Avatar(114); dialog.Send(); } } else { dialog.Text("Sorry, your item not Bound"); dialog.Option("Ah yes", 255); dialog.Avatar(114); dialog.Send(); } } else { dialog.Text("Sorry, you don't wear this item"); dialog.Option("Ah yes", 255); dialog.Avatar(114); dialog.Send(); } break; } } break; } #endregion #region GarmentShop case 6002: { switch (npcRequest.OptionID) { case 0: { PhoenixProject.Network.GamePackets.Data Data = new PhoenixProject.Network.GamePackets.Data(true); Data.UID = client.Entity.UID; Data.ID = 126; Data.dwParam = 502; Data.wParam1 = client.Entity.X; Data.wParam2 = client.Entity.Y; client.Send(Data); break; } } break; } #endregion #region WeeklyPkWar case 2314: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to join the Weekly PKWar?."); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.DayOfWeek == DayOfWeek.Sunday && (DateTime.Now.Hour == Game.KimoEvents.WHour && DateTime.Now.Minute < 05)) { Random R = new Random(); int Nr = R.Next(1, 10); if (Nr == 1) client.Entity.Teleport(1508, 114, 078); if (Nr == 2) client.Entity.Teleport(1508, 96, 87); if (Nr == 3) client.Entity.Teleport(1508, 142, 88); if (Nr == 4) client.Entity.Teleport(1508, 115, 115); if (Nr == 5) client.Entity.Teleport(1508, 98, 130); if (Nr == 6) client.Entity.Teleport(1508, 96, 153); if (Nr == 7) client.Entity.Teleport(1508, 112, 162); if (Nr == 8) client.Entity.Teleport(1508, 130, 166); if (Nr == 9) client.Entity.Teleport(1508, 139, 114); if (Nr == 10) client.Entity.Teleport(1508, 156, 119); } else { dialog.Text("Weekly Pk War is held during Sunday at " + Game.KimoEvents.WHour + ":00 "); dialog.Option("I don't care.", 255); dialog.Send(); break; } break; } } break; } #endregion #region LastMan case 54238: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to join LastManStanding PKWar?."); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.Minute >= 30 && DateTime.Now.Minute <= 32) { Random R = new Random(); int Nr = R.Next(1, 10); if (Nr == 1) client.Entity.Teleport(3333, 51, 73); if (Nr == 2) client.Entity.Teleport(3333, 33, 34); if (Nr == 3) client.Entity.Teleport(3333, 67, 34); if (Nr == 4) client.Entity.Teleport(3333, 51, 73); if (Nr == 5) client.Entity.Teleport(3333, 33, 34); if (Nr == 6) client.Entity.Teleport(3333, 67, 34); if (Nr == 7) client.Entity.Teleport(3333, 51, 73); if (Nr == 8) client.Entity.Teleport(3333, 33, 34); if (Nr == 9) client.Entity.Teleport(3333, 67, 34); if (Nr == 10) client.Entity.Teleport(3333, 68, 57); } else { dialog.Text("LastManStanding Pk War is held during xx:30 to xx:45 you have 2 min to signup "); dialog.Option("I don't care.", 255); dialog.Send(); break; } break; } } break; } #endregion #region Winner of LastMan case 54235: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to claim your Prize?."); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { Daily.CheackAlive2(); if (DateTime.Now.Minute >= 34 && DateTime.Now.Minute <= 50) { if (Daily.howmanyinmap2 == 1) { client.Entity.ConquerPoints += PhoenixProject.Database.rates.LastMan; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " claimed the prize " + PhoenixProject.Database.rates.LastMan + " ConquerPoints for winning the LastManStanding for this Hour.", System.Drawing.Color.Black, Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); client.Entity.SendSpawn(client, true); client.Entity.Teleport(1002, 429, 378); } else { dialog.Text("There are still " + Daily.howmanyinmap + " players in the map kill it first to claim prize!"); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + "You can only claim the prize when the time on or after xx:34"); dialog.Option("okay", 255); dialog.Send(); break; } break; } } break; } #endregion #region Winner of WeeklyPKWar NPC 2315 case 2315: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to claim your Prize?."); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { int alive = 0; foreach (PhoenixProject.Client.GameState players in PhoenixProject.ServerBase.Kernel.GamePool.Values) if (players.Entity.MapID == 1508 && (!players.Entity.Dead)) alive++; if (DateTime.Now.DayOfWeek == DayOfWeek.Sunday && DateTime.Now.Minute >= 06) { if (alive == 1) { client.Entity.ConquerPoints += PhoenixProject.Database.rates.weeklypk; Game.Flags.AddWeekly(client); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " claimed the prize " + PhoenixProject.Database.rates.weeklypk + " Cps for winning the Weekly Pk War and Receive Weekly PkWar Halo.", System.Drawing.Color.Black, Message.Talk), PhoenixProject.ServerBase.Kernel.GamePool.Values); client.Entity.AddFlag(Update.Flags.WeeklyPKChampion); client.Entity.SendSpawn(client, true); client.Entity.Teleport(1002, 429, 378); EntityTable.SaveEntity(client); } else { dialog.Text("There are still " + alive + " players in the map kill it first to claim prize!"); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + "You can only claim the prize when the time on or after " + Game.KimoEvents.WHour + ":06"); dialog.Option("okay", 255); dialog.Send(); break; } break; } } break; } #endregion #region MonthlyPk case 2316: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to join the Monthly PKWar?."); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { if (DateTime.Now.DayOfYear == 1 && DateTime.Now.Hour == 14 && DateTime.Now.Minute <= 05) { Random R = new Random(); int Nr = R.Next(1, 10); if (Nr == 1) client.Entity.Teleport(1518, 114, 078); if (Nr == 2) client.Entity.Teleport(1518, 96, 87); if (Nr == 3) client.Entity.Teleport(1518, 142, 88); if (Nr == 4) client.Entity.Teleport(1518, 115, 115); if (Nr == 5) client.Entity.Teleport(1518, 98, 130); if (Nr == 6) client.Entity.Teleport(1518, 96, 153); if (Nr == 7) client.Entity.Teleport(1518, 112, 162); if (Nr == 8) client.Entity.Teleport(1518, 130, 166); if (Nr == 9) client.Entity.Teleport(1518, 139, 114); if (Nr == 10) client.Entity.Teleport(1518, 156, 119); } else { dialog.Text("Monthly Pk War is held during Firstday in the Month at 14:00 "); dialog.Option("I don't care.", 255); dialog.Send(); break; } break; } } break; } #endregion #region Winner of MonthlyPk NPC 2315 case 2317: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey there " + client.Entity.Name + " Would you like to claim your Prize?."); dialog.Option("Yes Please", 1); dialog.Option("I don't care.", 255); dialog.Send(); break; } case 1: { int alive = 0; foreach (PhoenixProject.Client.GameState players in PhoenixProject.ServerBase.Kernel.GamePool.Values) if (players.Entity.MapID == 1518 && (!players.Entity.Dead)) alive++; if (DateTime.Now.DayOfYear == 1 && DateTime.Now.Hour == 14 && DateTime.Now.Minute >= 25) { if (alive == 1) { client.Entity.ConquerPoints += PhoenixProject.Database.rates.MonthlyPk; Game.Flags.AddMonthly(client); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " claimed the prize " + PhoenixProject.Database.rates.MonthlyPk + " ConquerPoints for winning the Monthly Pk War and Receive Monthly PkWar Halo.", System.Drawing.Color.Black, Message.Talk), PhoenixProject.ServerBase.Kernel.GamePool.Values); client.Entity.AddFlag(Update.Flags.MonthlyPKChampion); client.Entity.SendSpawn(client, true); client.Entity.Teleport(1002, 429, 378); EntityTable.SaveEntity(client); } else { dialog.Text("There are still " + alive + " players in the map kill it first to claim prize!"); dialog.Option("okay", 255); dialog.Send(); break; } } else { dialog.Text("Hey there " + client.Entity.Name + "You can only claim the prize when the time on or after 14:25"); dialog.Option("okay", 255); dialog.Send(); break; } break; } } break; } #endregion #region GameHaker-PM- A.G.S Coder case 131313: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hi " + client.Entity.Name + "!, Iam letter man, So you can help me?"); dialog.Option("Yes,sure.", 1); dialog.Option("Give me Awards.", 2); dialog.Option("Sorry, Ican't.", 255); dialog.Send(); break; } case 1: { dialog.Text("Thank you for help" + client.Entity.Name + "!, ok go to and kill TwinCity monster to attend this later [C,O,N,Q,U,E,R] If you are lucky you will get No. 7 in order to maximize your profits."); dialog.Option("Lets Go.", 255); dialog.Option("Sorry, Ican't", 255); dialog.Send(); break; } case 2: { if (client.Entity.Level >= 130)//C { if (client.Entity.Quest == 0)//C { dialog.Text("Good job man you are strong man ,So What brought?"); dialog.Option("C,O,N,Q,U,E,R", 3); dialog.Option("C,O,N,Q,U,E,R,7", 4); dialog.Option("Has not brought anything.", 255); dialog.Send(); break; } else { dialog.Text("You already finished this quest 1 time today come again tomorow"); dialog.Option("Oh,sorry.", 255); dialog.Send(); break; } } else { dialog.Text("You need to be atleast level 130 so you can start the quest"); dialog.Option("Oh,sorry.", 255); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(711214, 1))//C if (client.Inventory.Contains(711215, 1))//O if (client.Inventory.Contains(711216, 1))//N if (client.Inventory.Contains(711217, 1))//Q if (client.Inventory.Contains(711218, 1))//U if (client.Inventory.Contains(711219, 1))//E if (client.Inventory.Contains(711220, 1))//R { client.Inventory.Remove(711214, 1); client.Inventory.Remove(711215, 1); client.Inventory.Remove(711216, 1); client.Inventory.Remove(711217, 1); client.Inventory.Remove(711218, 1); client.Inventory.Remove(711219, 1); client.Inventory.Remove(711220, 1); client.Entity.ConquerPoints += 1500; client.Entity.Quest += 1; PhoenixProject.Network.PacketHandler.WorldMessage("Congratulations! " + client.Entity.Name + "! Give Letter C,O,N,Q,U,E,R And Get 1,000 CPS"); } else { dialog.Text("You don't have letter [C,O,Q,U,E,R] or you done the quest 1 time today"); dialog.Option("Ahh sorry.", 255); } break; } case 4: { if (client.Inventory.Contains(711215, 1))//O if (client.Inventory.Contains(711216, 1))//N if (client.Inventory.Contains(711217, 1))//Q if (client.Inventory.Contains(711218, 1))//U if (client.Inventory.Contains(711219, 1))//E if (client.Inventory.Contains(711220, 1))//R if (client.Inventory.Contains(711221, 1))//X { client.Inventory.Remove(711214, 1); client.Inventory.Remove(711215, 1); client.Inventory.Remove(711216, 1); client.Inventory.Remove(711217, 1); client.Inventory.Remove(711218, 1); client.Inventory.Remove(711219, 1); client.Inventory.Remove(711220, 1); client.Inventory.Remove(711221, 1); client.Entity.ConquerPoints += 2000; client.Entity.Quest += 1; PhoenixProject.Network.PacketHandler.WorldMessage("Congratulations! " + client.Entity.Name + "! Give Letter C,O,N,Q,U,E,R,7 And Get 2,000 CPS"); } else { dialog.Text("You don't have letter [C,O,Q,U,E,R,7] or you done the quest 1 time today"); dialog.Option("Ahh sorry.", 255); } break; } } break; } #endregion #region SolarSaint case 3215: { if (npcRequest.OptionID == 0) { dialog.Text("Our ancestors exerted their utmost efforts and defeathed the demons. Since"); dialog.Text(" then the world has been kept in peace for hundreads of years. Now the"); dialog.Text(" demons have come back and the world is getting into turbulence again."); dialog.Option("Could you tell me more?", 1); dialog.Option("I am here to drive away the evils!", 2); dialog.Option("I'd better leave.", 255); dialog.Avatar(0); dialog.Send(); } else if (npcRequest.OptionID == 1) { dialog.Text("The decisive battle bewtween human and the demon broke out here. The"); dialog.Text(" ferocious battle lasted for seven days and nights. Countless heroes lost their"); dialog.Text(" lives. And the justice won. Afterwards we can live in peace for hundreads of"); dialog.Text(" years."); dialog.Option("And then?", 3); dialog.Avatar(0); dialog.Send(); } else if (npcRequest.OptionID == 3) { dialog.Text("UltimatePluto, leader of the demons sworn to take revenge in one thousand"); dialog.Text(" years befote he managed to run away. To prevent the demons coming back, I"); dialog.Text(" have been scouting their land cautiously. Yesterday I found something"); dialog.Text(" unwanted. It seems that UltimatePluto had come round to endanger humans"); dialog.Text(" again."); dialog.Option("What should we do?", 4); dialog.Avatar(0); dialog.Send(); } else if (npcRequest.OptionID == 4) { dialog.Text("Fortunately UltimatePluto is still unfledged. He must resort to a Battle"); dialog.Text(" Formation for the moments. So i am about to organize an army too infiltrate his"); dialog.Text(" land and destroy his formation before he becomes stronger."); dialog.Option("I'll join you.", 2); dialog.Option("I'd like to know more.", 5); dialog.Option("Sigh, I'm helpless.", 255); dialog.Avatar(0); dialog.Send(); } else if (npcRequest.OptionID == 5) { dialog.Text("You must kill UltimatePluto rapisly to get Darkhorn so that i can use it to"); dialog.Text(" diable the formation. Before you can do that, you must break into HellGate,"); dialog.Text(" enter the HellHall, and fight through the HellCloister. Countless ferocious"); dialog.Text(" demons are watching those strongholds. I'll give you some strategies on"); dialog.Text(" breaking through those fortresses if you like."); dialog.Option("I want to know HellGate", 6); dialog.Option("I want to know HellHall", 7); dialog.Option("I want to know HellCloister", 8); dialog.Option("I want to know BattleFormation", 9); dialog.Option("Thanks. I know what to do.", 255); dialog.Avatar(0); dialog.Send(); } else if (npcRequest.OptionID == 6) //HellGate info { dialog.Text("HellGate is shielded from poisonous fog, so you can't approach it. But"); dialog.Text(" demons do not fear the gas. They may turn into SoulStones after they die. If"); dialog.Text(" you get 5 stones for me, i'll help you break through the gate. To protect"); dialog.Text(" the unrealted persons, i'll send the others back as soon as the first 60"); dialog.Text(" persons pass through the gate."); dialog.Option("Thank you.", 255); dialog.Option("I'd like to know more", 5); dialog.Avatar(0); dialog.Send(); } else if (npcRequest.OptionID == 7) //HellHall info { dialog.Text("HellHall is the very spot where the demons swear their oaths of allegiance to"); dialog.Text(" UltimatePluto. Everybody must do his best to make a way out. Due to limited"); dialog.Text(" time, i can lead only 30 persons to hellCloister!"); dialog.Option("Thanks", 255); dialog.Option("I'd like to know more.", 5); dialog.Avatar(0); dialog.Send(); } else if (npcRequest.OptionID == 8) //Hell Cloister info { dialog.Text("You will be divided into 2 groups to attack from the left and the right flank of"); dialog.Text(" HellCloister. Kill the Wraithas many as you can, because you can't reach"); dialog.Text(" BattleFormation untill the amount of wraith is decreased to a certain level."); dialog.Option("Thank you.", 255); dialog.Option("I'd like to know more.", 5); dialog.Avatar(0); dialog.Send(); } else if (npcRequest.OptionID == 9) //Battle Formation info { dialog.Text("BattleFormation is protected by Syrens. After they are killed out,"); dialog.Text(" UltimatePluto will appear. Make the best effort to kill him, get his Darkhorn"); dialog.Text(" and give it to me. I can disable the BattleFormation with it. Then i'll send you"); dialog.Text(" back. But if you fail to do it, we have to retreat and wait for another opportunity"); dialog.Option("Thanks.", 255); dialog.Option("I'd like to know more.", 5); dialog.Avatar(0); dialog.Send(); } else if (npcRequest.OptionID == 2) { if (PhoenixProject.Game.Features.DisCity.dis == true) { if (client.Entity.Level >= 110) { { Random Rand = new Random(); int dis = Rand.Next(1, 10); if (dis == 1) { client.Entity.Teleport(4021, 291, 475); } if (dis == 2) { client.Entity.Teleport(4021, 335, 345); } if (dis == 3) { client.Entity.Teleport(4021, 198, 355); } if (dis == 4) { client.Entity.Teleport(4021, 246, 326); } if (dis == 5) { client.Entity.Teleport(4021, 321, 372); } if (dis == 6) { client.Entity.Teleport(4021, 315, 280); } if (dis == 7) { client.Entity.Teleport(4021, 281, 302); } if (dis == 8) { client.Entity.Teleport(4021, 221, 202); } if (dis == 9) { client.Entity.Teleport(4021, 173, 214); } if (dis == 10) { client.Entity.Teleport(4021, 211, 255); } } } else { dialog.Text("Sorry, you are too weak to fight those monsters, go get level 110 and talk to me later."); dialog.Option("Okay, I will!", 255); dialog.Avatar(0); dialog.Send(); } } else { dialog.Text("Sorry, but the dis city quest is off!"); dialog.Option("OK, I see.", 255); dialog.Avatar(0); dialog.Send(); } } break; } #endregion #region DisCity Stage 1 case 1110: { if (npcRequest.OptionID == 0) { dialog.Text("Hello! You need 5 SoulStones to finish Stage 1, and I'll teleport you to Stage2."); dialog.Option("here you are", 1); dialog.Option("Sorry, I'll be back", 255); dialog.Avatar(0); dialog.Send(); } else if (npcRequest.OptionID == 1) { if (client.Inventory.Contains(723085, 5)) { if (PhoenixProject.Game.Features.DisCity.DisMax1 < 60) { client.Entity.Teleport(4022, 240, 340); PhoenixProject.Game.Features.DisCity.DisMax1 += 1; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("Congratulations! " + client.Entity.Name + " Has Enterd 2nd Stage in DisCity and Rank Num " + PhoenixProject.Game.Features.DisCity.DisMax1 + "!", System.Drawing.Color.White, 2011), PhoenixProject.ServerBase.Kernel.GamePool.Values); client.Entity.DisQuest = true; client.Inventory.Remove(723085, 1); client.Inventory.Remove(723085, 1); client.Inventory.Remove(723085, 1); client.Inventory.Remove(723085, 1); client.Inventory.Remove(723085, 1); if (PhoenixProject.Game.Features.DisCity.DisMax1 == 60) { if (client.Entity.MapID == 4021) { client.Entity.Teleport(1020, 533, 483); dialog.Text("You didn't make it to the next floor in time."); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message(" All Players of Dis City Stage 1 has teleported to TwinCity!", System.Drawing.Color.White, 2011), PhoenixProject.ServerBase.Kernel.GamePool.Values); } } //Features.discity.Stage3(); } else { dialog.Text(" Sorry, you have missed your chance to enter the next floor of Dis City."); dialog.Option("Darn!", 1); dialog.Avatar(0); dialog.Send(); } } else { dialog.Text(" Sorry, you don't have 5 SoulStones."); dialog.Option("Ok, I'll be back", 1); dialog.Avatar(0); dialog.Send(); } } break; } #endregion #region DisCity Stage 2 case 4011: { if (npcRequest.OptionID == 0) { dialog.Text("Hello, can you help me? If you kill the required monsters I desire you can win some EXP."); dialog.Option("Sounds good, how many do I kill?", 1); dialog.Option("No thanks.", 255); dialog.Avatar(0); dialog.Send(); } if (npcRequest.OptionID == 3) { if (PhoenixProject.Game.Features.DisCity.DisMax2 < 30) { client.Entity.DisQuest = false; client.Entity.DisKO = 0; PhoenixProject.Game.Features.DisCity.DisMax2++; PhoenixProject.Game.Features.DisCity.DisMax3++; client.Entity.Teleport(4023, 316, 635); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("Congratulations! " + client.Entity.Name + " Has Enterd 3rd Stage in DisCity and Rank Num " + PhoenixProject.Game.Features.DisCity.DisMax2 + "!", System.Drawing.Color.White, 2011), PhoenixProject.ServerBase.Kernel.GamePool.Values); if (PhoenixProject.Game.Features.DisCity.DisMax2 == 30) { if (client.Entity.MapID == 4022) { client.Entity.Teleport(1020, 533, 483); dialog.Text("You didn't make it to the next floor in time."); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message(" All Players of Dis City Stage 2 has teleported to TwinCity!", System.Drawing.Color.White, 2011), PhoenixProject.ServerBase.Kernel.GamePool.Values); } } // Features.discity.Stage3(); } else { dialog.Text(" Sorry, missed your chance to enter the next floor of Dis City. "); dialog.Option("Darn!", 1); dialog.Avatar(0); dialog.Send(); } } if (npcRequest.OptionID == 1) { if (client.Entity.Class >= 10 && client.Entity.Class <= 15) { if (client.Entity.DisKO >= 800) { dialog.Text("Which Flank are you going to attack from?"); dialog.Option("Right.", 3); dialog.Option("Left.", 3); dialog.Avatar(0); dialog.Send(); } else { dialog.Text("You need to kill 800 Monsters "); dialog.Option("Alright.", 255); dialog.Option("No thanks.", 255); dialog.Avatar(0); dialog.Send(); } } else if (client.Entity.Class >= 20 && client.Entity.Class <= 25) { if (client.Entity.DisKO >= 900) { dialog.Text("Which Flank are you going to attack from?"); dialog.Option("Right.", 3); dialog.Option("Left.", 3); dialog.Avatar(0); dialog.Send(); } else { dialog.Text("You need to kill 900 Monsters "); dialog.Option("Alright.", 255); dialog.Option("No Thanks", 255); dialog.Avatar(0); dialog.Send(); } } else if (client.Entity.Class >= 40 && client.Entity.Class <= 45) { if (client.Entity.DisKO >= 1300) { dialog.Text("Which Flank are you going to attack from?"); dialog.Option("Right.", 3); dialog.Option("Left.", 3); dialog.Avatar(0); dialog.Send(); } else { dialog.Text("You need to kill 1300 Monsters "); dialog.Option("Alright.", 255); dialog.Option("No Thanks", 255); dialog.Avatar(0); dialog.Send(); } } else if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { if (client.Entity.DisKO >= 700) { dialog.Text("Which Flank are you going to attack from?"); dialog.Option("Right.", 3); dialog.Option("Left.", 3); dialog.Avatar(0); dialog.Send(); } else { dialog.Text("You need to kill 700 Monsters "); dialog.Option("Alright.", 255); dialog.Option("No Thanks", 255); dialog.Avatar(0); dialog.Send(); } } else if (client.Entity.Class >= 132 && client.Entity.Class <= 135) { if (client.Entity.DisKO >= 600) { dialog.Text("Which Flank are you going to attack from?"); dialog.Option("Right.", 3); dialog.Option("Left.", 3); dialog.Avatar(0); dialog.Send(); } else { dialog.Text("You need to kill 600 Monsters "); dialog.Option("Alright.", 255); dialog.Option("No Thanks", 255); dialog.Avatar(0); dialog.Send(); } } else if (client.Entity.Class >= 50 && client.Entity.Class <= 55) { if (client.Entity.DisKO >= 900) { dialog.Text("Which Flank are you going to attack from?"); dialog.Option("Right.", 3); dialog.Option("Left.", 3); dialog.Avatar(0); dialog.Send(); } else { dialog.Text("You need to kill 900 Monsters "); dialog.Option("Alright.", 255); dialog.Option("No Thanks", 255); dialog.Avatar(0); dialog.Send(); } } else if (client.Entity.Class >= 142 && client.Entity.Class <= 145) { if (client.Entity.DisKO >= 1000) { dialog.Text("Which Flank are you going to attack from?"); dialog.Option("Right.", 3); dialog.Option("Left.", 3); dialog.Avatar(0); dialog.Send(); } else { dialog.Text("You need to kill 1000 Monsters "); dialog.Option("Alright.", 255); dialog.Option("No Thanks", 255); dialog.Avatar(0); dialog.Send(); } } } break; } #endregion #region ClassPkEnvoy case 705: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there,i can help you to Join ClassPk but you should Read the rules First before SignUp."); dialog.Option("SignUp.", 2); dialog.Option("Tell Me Rules.", 1); dialog.Option("Just Passing By!", 255); dialog.Send(); break; } case 1: { dialog.Text("We have classPk Tourment EveryDay Every Class Have Custom Map Start At " + Game.KimoEvents.ClassHour + ":00"); dialog.Text("you need to come at the time so i can let you join!"); dialog.Option("SignUp.", 2); dialog.Option("Just Passing By!", 255); dialog.Send(); break; } case 2: { if (client.Entity.Class >= 10 && client.Entity.Class <= 15 && DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute < 05) { dialog.Text("Trojan pk Tourment Has been Started would You like to Join It?"); dialog.Option("yes.", 3); dialog.Option("Wait a minute.", 255); dialog.Send(); } else if (client.Entity.Class >= 20 && client.Entity.Class <= 25 && DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute < 05) { dialog.Text("Warriors pk Tourment Has been Started would You like to Join It?"); dialog.Option("yes.", 3); dialog.Option("Wait a minute.", 255); dialog.Send(); } else if (client.Entity.Class >= 40 && client.Entity.Class <= 45 && DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute < 05) { dialog.Text("Archers pk Tourment Has been Started would You like to Join It?"); dialog.Option("yes.", 3); dialog.Option("Wait a minute.", 255); dialog.Send(); } else if (client.Entity.Class >= 50 && client.Entity.Class <= 55 && DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute < 05) { dialog.Text("Ninjas pk Tourment Has been Started would You like to Join It?"); dialog.Option("yes.", 3); dialog.Option("Wait a minute.", 255); dialog.Send(); } else if (client.Entity.Class >= 60 && client.Entity.Class <= 65 && DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute < 05) { dialog.Text("Monk pk Tourment Has been Started would You like to Join It?"); dialog.Option("yes.", 3); dialog.Option("Wait a minute.", 255); dialog.Send(); } else if (client.Entity.Class >= 130 && client.Entity.Class <= 135 && DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute < 05) { dialog.Text("WaterTao pk Tourment Has been Started would You like to Join It?"); dialog.Option("yes.", 3); dialog.Option("Wait a minute.", 255); dialog.Send(); } else if (client.Entity.Class >= 140 && client.Entity.Class <= 145 && DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute < 05) { dialog.Text("FireTao pk Tourment Has been Started would You like to Join It?"); dialog.Option("yes.", 3); dialog.Option("Wait a minute.", 255); dialog.Send(); } else if (client.Entity.Class >= 70 && client.Entity.Class <= 75 && DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute < 05) { dialog.Text("Pirate pk Tourment Has been Started would You like to Join It?"); dialog.Option("yes.", 3); dialog.Option("Wait a minute.", 255); dialog.Send(); } else { dialog.Text("Sorry there is no any Pk Tourment Running now for your class please Read the rules"); dialog.Option("ok Sorry.", 255); dialog.Send(); } break; } case 3: { if (DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute < 05) { if (client.Entity.Class >= 10 && client.Entity.Class <= 15) { client.Entity.Teleport(7001, 25, 40); } if (client.Entity.Class >= 20 && client.Entity.Class <= 25) { client.Entity.Teleport(4500, 25, 40); } if (client.Entity.Class >= 40 && client.Entity.Class <= 45) { client.Entity.Teleport(4501, 25, 40); } if (client.Entity.Class >= 50 && client.Entity.Class <= 55) { client.Entity.Teleport(4502, 25, 40); } if (client.Entity.Class >= 60 && client.Entity.Class <= 65) { client.Entity.Teleport(4503, 25, 40); } if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { client.Entity.Teleport(4504, 25, 40); } if (client.Entity.Class >= 132 && client.Entity.Class <= 135) { client.Entity.Teleport(4505, 25, 40); } if (client.Entity.Class >= 142 && client.Entity.Class <= 145) { client.Entity.Teleport(4506, 25, 40); } } break; } } break; } #endregion #region QuarantineInvite case 54236: { switch (npcRequest.OptionID) { case 0: { if (PhoenixProject.Game.ConquerStructures.Quarantine.Started) { dialog.Text("The quarantine tournament has now started!"); dialog.Text("You will get divided into two teams, black and white, and "); dialog.Text("must eliminate the other. Only fastblade/scentsword is allowed!"); dialog.Option("Let me join!", 1); dialog.Option("Not intrested", 255); } else { dialog.Text("The quarantine tournament is not active"); dialog.Option("I see", 255); } dialog.Send(); break; } case 1: { if (client.Equipment.Free(3)) { dialog.Text("You need to wear an armor that can be colored."); dialog.Option("I see", 255); dialog.Send(); break; } uint UID = 92000, ID = 0; if (Quarantine.Black.Count > Quarantine.White.Count) { Quarantine.White.Add(client.Entity.UID, client); UID += (uint)Quarantine.White.Count + (uint)Kernel.Random.Next(1, 1000); client.Entity.Teleport(1844, 114, 163); } else { Quarantine.Black.Add(client.Entity.UID, client); UID += (uint)Quarantine.Black.Count + (uint)Kernel.Random.Next(1, 1000); ID = 200; client.Entity.Teleport(1844, 225, 162); } PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = 181315 + ID; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } break; } } break; } #endregion #region TeamDeathMatch case 54239: { switch (npcRequest.OptionID) { case 0: { if (client.Entity.Tournament_Signed == false) { if (DateTime.Now.Minute == 30) { dialog.Text("The TeamDeathMatch tournament has now started!"); dialog.Text("You will get divided into 4 teams, black and white , blue and red, and "); dialog.Text("must eliminate the other. Only fastblade/scentsword is allowed!"); dialog.Option("Let me join!", 1); dialog.Option("Not intrested", 255); } else { dialog.Text("The TeamDeathMatch tournament is not active"); dialog.Option("I see", 255); } } else { dialog.Text("You already Signed in TeamDeathMatch"); dialog.Option("I see", 255); } dialog.Send(); break; } case 1: { //181515 BlackElegance //181615 RedElegance //181815 BlueElegance //181315 WhiteElegence uint UID = 92000; if (client.Entity.Tournament_Signed == false) { if (DateTime.Now.Minute == 30) { Random r = new Random(); int Team = r.Next(1, 8); if (Team == 1 || Team == 2) { #region Equip //Item Garment = client.Entity.Equips.Get(9); //Garment.ID = 181325; PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = 181325; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; //client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } #endregion //client.Entity.CurHP = 1; client.Entity.Tournament_Signed = true; client.Entity.TeamDeathMatch_WhiteTeam = true; client.Entity.TeamDeathMatch_Kills = 0; dialog.Text("You have been signed up for <TeamDeathMatch> <Team White>"); //GC.AddSend(Packets.NPCSetFace(0)); //GC.AddSend(Packets.NPCFinish()); } if (Team == 3 || Team == 4) { #region Equip //Item Garment = client.Entity.Equips.Get(9); //Garment.ID = 181525; PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = 181525; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; //client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } #endregion //client.Entity.CurHP = 1; client.Entity.Tournament_Signed = true; client.Entity.TeamDeathMatch_BlackTeam = true; client.Entity.TeamDeathMatch_Kills = 0; dialog.Text("You have been signed up for <TeamDeathMatch> <Team Black>"); //GC.AddSend(Packets.NPCSetFace(0)); //GC.AddSend(Packets.NPCFinish()); } if (Team == 5 || Team == 6) { #region Equip //Item Garment = client.Entity.Equips.Get(9); //Garment.ID = 181825; PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = 181825; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; //client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } #endregion //client.Entity.CurHP = 1; client.Entity.Tournament_Signed = true; client.Entity.TeamDeathMatch_BlueTeam = true; client.Entity.TeamDeathMatch_Kills = 0; dialog.Text("You have been signed up for <TeamDeathMatch> <Team Blue>"); //GC.AddSend(Packets.NPCSetFace(0)); //GC.AddSend(Packets.NPCFinish()); } if (Team == 7 || Team == 8) { #region Equip PhoenixProject.Interfaces.IConquerItem newItem = new PhoenixProject.Network.GamePackets.ConquerItem(true); newItem.ID = 181625; newItem.UID = UID; newItem.Durability = 1000; newItem.MaximDurability = 1000; newItem.Position = 9; //client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); client.Equipment.Remove(9); if (client.Equipment.Objects[8] != null) client.Equipment.Objects[8] = null; client.Equipment.Add(newItem); newItem.Mode = PhoenixProject.Game.Enums.ItemMode.Update; newItem.Send(client); ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); if (!client.AlternateEquipment) { client.Equipment.UpdateEntityPacket(); } else { client.Equipment.UpdateEntityPacket2(); } #endregion //client.Entity.CurHP = 1; client.Entity.Tournament_Signed = true; client.Entity.TeamDeathMatch_RedTeam = true; client.Entity.TeamDeathMatch_Kills = 0; dialog.Text("You have been signed up for <TeamDeathMatch> <Team Red>"); //GC.AddSend(Packets.NPCSetFace(0)); //GC.AddSend(Packets.NPCFinish()); } } } else { dialog.Text("You are already signed up for this tournament!"); dialog.Option("I see.", 255); //GC.AddSend(Packets.NPCSetFace(67)); //GC.AddSend(Packets.NPCFinish()); } dialog.Send(); break; } } break; } #endregion #region KillTheTerrorist case 54237: { switch (npcRequest.OptionID) { case 0: { if (PhoenixProject.Game.ConquerStructures.KillTheTerrorist.IsOn == true) { dialog.Text("The KillTheTerrorist tournament has now started!"); dialog.Text("You need to kill the Terrorist and stay the Terrorist till the end "); dialog.Option("Let me join!", 1); dialog.Option("Not intrested", 255); } else { dialog.Text("The KillTheTerrorist tournament is not active"); dialog.Option("I see", 255); } dialog.Send(); break; } case 1: { if (DateTime.Now.Minute == 30) { if (PhoenixProject.Game.ConquerStructures.KillTheTerrorist.Terrorist == false) { PhoenixProject.Game.ConquerStructures.KillTheTerrorist.Terrorist = true; client.Entity.KillTheTerrorist_IsTerrorist = true; client.Entity.Tournament_Signed = true; } else { client.Entity.Tournament_Signed = true; } } else { dialog.Text("you can only SignUp when time be xx:30 and Then Autoinvite will take you to The Map At xx:31"); dialog.Option("I see", 255); } dialog.Send(); break; } } break; } #endregion #region Warden case 10082: { switch (npcRequest.OptionID) { case 0: { if (client.Entity.PKPoints > 99) { dialog.Text("sorry i cant let you leave till you be less than 99 pk or"); dialog.Text("You need to Pay 1k cps to let you leave now ! do you want to pay? "); dialog.Option("Yes i wana leave!", 2); dialog.Option("Not intrested", 255); } else { dialog.Text("I can take you out of the jail. Just tell me."); dialog.Option("Take me out.", 1); dialog.Option("Alright.", 255); } dialog.Send(); break; } case 1: { client.Entity.Teleport(1002, 514, 356); break; } case 2: { if (client.Entity.ConquerPoints > 1000) { client.Entity.ConquerPoints -= 1000; client.Entity.Teleport(1002, 514, 356); break; } else { dialog.Text("Sorry you dont have 1k cps cant help you"); //dialog.Option("Take me out.", 1); dialog.Option("Alright.", 255); } dialog.Send(); break; } } break; } #endregion /////////new//////// #region Seller SubClass Items case 3456: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey how I can help you ? "); dialog.Option("Buy YanYangFroot - 10k CPS ", 1); // dialog.Option("Buy MoonBox - 5000 CPS ", 2);//721080 // dialog.Option("Buy EuxeniteOre - 5000 CPS ", 3); dialog.Option("Buy LuckyAmulet - 1000 CPS ", 4); dialog.Option("Buy MeteorTear - 5000 CPS ", 5); dialog.Option("Buy Bomb 5000 CPS ", 6); dialog.Option("Buy 3 Orched for 5000 cps ", 7); dialog.Option("Buy 1 Saddle for 500 cps ", 9); dialog.Option("Just passing by.", 255); dialog.Avatar(80); dialog.Send(); break; } case 1: { if (client.Entity.ConquerPoints >= 10000) { client.Entity.ConquerPoints -= 10000; client.Inventory.Add(711188, 0, 1); } else { dialog.Text("You don't have 10000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 2: { if (client.Entity.ConquerPoints >= 5000) { client.Entity.ConquerPoints -= 5000; client.Inventory.Add(721080, 0, 1); } else { dialog.Text("You don't have 5000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 3: { if (client.Entity.ConquerPoints >= 5000) { client.Entity.ConquerPoints -= 5000; client.Inventory.Add(1072031, 0, 1); } else { dialog.Text("You don't have 5000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 4: { if (client.Entity.ConquerPoints >= 1000) { client.Entity.ConquerPoints -= 1000; client.Inventory.Add(723087, 0, 1); } else { dialog.Text("You don't have 1000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 5: { if (client.Entity.ConquerPoints >= 5000) { client.Entity.ConquerPoints -= 5000; client.Inventory.Add(1088002, 0, 1); } else { dialog.Text("You don't have 5000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 6: { if (client.Entity.ConquerPoints >= 5000) { client.Entity.ConquerPoints -= 5000; client.Inventory.Add(721261, 0, 1); } else { dialog.Text("You don't have 5000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 7: { if (client.Entity.ConquerPoints >= 5000) { client.Entity.ConquerPoints -= 5000; client.Inventory.Add(753003, 0, 1); } else { dialog.Text("You don't have 5000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 8: { if (client.Entity.ConquerPoints >= 5000) { client.Inventory.Add(1080001, 0, 1); client.Entity.ConquerPoints -= 500; } else { dialog.Text("You don't have 5000 ConquerPoints."); dialog.Option("Ah, my bad", 255); dialog.Avatar(80); dialog.Send(); } break; } case 9: if (client.Entity.ConquerPoints < 500) { dialog.Text("You don't have 500 ConquerPoints."); dialog.Option("Ah, my bad", 0xff); dialog.Avatar(80); dialog.Send(); } else { client.Entity.ConquerPoints -= 500; client.Inventory.Add(0xb0bbf, 0, 1); } break; } break; } #endregion Seller SubClass Items #region Mr.HassaN New Mount case 241095: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello" + client.Entity.Name + " I Sell Now Mount and Germant for 100k cps?"); dialog.Option("ErrantryRobe.", 1); dialog.Option("DancingSnake", 2); dialog.Option("MakersProblems", 3); dialog.Option("NO Thx.", 255); dialog.Avatar(116); dialog.Send(); break; } case 1: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; client.Inventory.Add(188155, 0, 1); } else { dialog.Text("you don't have enought cps"); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 2: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; client.Inventory.Add(200458, 0, 1); } else { dialog.Text("you don't have enought cps"); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 3: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; client.Inventory.Add(200453, 0, 1); } else { dialog.Text("you don't have enought cps"); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } } break; } #endregion Mr.HassaN New Mount #region New Germant By Mr.HassaN case 125852255: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey i Sell Garmant For 100.000 Cps Do u Need ?"); dialog.Option("WhiteCollarSuit", 1); dialog.Option("CherryBlossom", 2); dialog.Option("DreaminFlowers", 3); dialog.Option("HeavenScent", 4); dialog.Option("ChristmasSuit", 5); dialog.Option("CaribbeanPirate", 6); dialog.Option("FamilyBusiness", 7); dialog.Option("SoberDark", 9); dialog.Avatar(116); dialog.Send(); break; } #region Germants case 1: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(184365, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 2: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(186375, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 3: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(186385, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 4: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(182365, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 5: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(183465, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 6: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(183375, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 7: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(184405, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } #endregion #region Germant's case 9: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(187665, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } #endregion } break; } #endregion #region OldSoul Mr.HassaN Seller case 1258522: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey i Sell DragonSoul For 100.000 Cps Do u Need ?"); dialog.Option("HolyHeadgear P6", 1); dialog.Option("SaintHeavyRing P6", 2); dialog.Option("ArchonWand P6", 3); dialog.Option("MoonHammer P4", 4); dialog.Option("TombBlade P6", 5); dialog.Option("RadiantSword P4", 6); dialog.Option("OnimaKatana P4", 7); dialog.Option("Next Page", 8); dialog.Avatar(116); dialog.Send(); break; } case 8: { dialog.Text("Weclome To Next Page Of DragonSoul For 100.000 Cps Do u Need"); dialog.Option("LotusBacksword P4", 9); dialog.Option("HolyBeadsOfMagnanimity P4", 10); dialog.Option("SoulRing P3", 11); dialog.Option("AzureHat P5", 12); dialog.Option("VioletRing P4", 13); dialog.Option("SolarHat P5", 14); dialog.Option("GraceBow P4", 15); dialog.Option("Thank You", 0); dialog.Avatar(116); dialog.Send(); break; } #region Germants case 1: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege HolyHeadgear 2 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 2: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege SaintHeavyRing 7 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 3: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege ArchonWand 0 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 4: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege MoonHammer 5 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 5: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege TombBlade 0 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 6: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege RadiantSword 4 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 7: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege OnimaKatana 6 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } #endregion #region Germant's case 9: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege LotusBacksword 2 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 10: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege HolyBeadsOfMagnanimity 0 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 11: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege SoulRing 1 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 12: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege AzureHat 6 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 13: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege VioletRing 2 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 14: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege SolarHat 7 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 15: { if (client.Entity.ConquerPoints >= 100000) { client.Entity.ConquerPoints -= 100000; PacketHandler.CheckCommand2(new Message("@tegotegatege GraceBow 3 0 0 0 0", System.Drawing.Color.Red, 2001), client); } else { dialog.Text("Please take 100k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } #endregion } break; } #endregion #region Germant's Seller case 125852: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hey i Sell Germants Do u Need ?"); dialog.Option("PartyDress(Lady", 1); dialog.Option("SandRaider", 2); dialog.Option("SamuraiLegacy", 3); dialog.Option("DuskRomance", 4); dialog.Option("TaekwondoUniform", 5); dialog.Option("MonkeyKingGown", 6); dialog.Option("CharmingSuit", 7); dialog.Option("Next Page", 8); dialog.Avatar(116); dialog.Send(); break; } case 8: { dialog.Text("Weclome To Next Page Of Germant"); dialog.Option("EveningWear", 9); dialog.Option("FeatherDress", 10); dialog.Option("Pankrocker", 11); dialog.Option("PekingGenral", 12); dialog.Option("MonkeyKing", 13); dialog.Option("BeggarRags", 14); dialog.Option("UglyDuck", 15); dialog.Option("Thank You", 0); dialog.Avatar(116); dialog.Send(); break; } #region Germants case 1: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(183365, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 2: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(183305, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 3: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(183315, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 4: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(183325, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 5: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(183345, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 6: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(187315, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 7: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(183485, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } #endregion #region Germant's case 9: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(184355, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 10: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(186355, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 11: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(184335, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 12: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(187305, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 13: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(187315, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 14: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(193300, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } case 15: { if (client.Entity.ConquerPoints >= 50000) { client.Entity.ConquerPoints -= 50000; client.Inventory.Add(181395, 0, 1); } else { dialog.Text("Please take 50k cps."); dialog.Option("I see.", 255); dialog.Avatar(116); dialog.Send(); } break; } #endregion } break; } #endregion #region NewMonsters case 56725: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Would you like to go to New Monsters "); dialog.Option("TreatoDragon.", 1); dialog.Option("LavaBeast.", 2); dialog.Option("SnowBanshee.", 3); dialog.Option("ThrillingSpook.", 5); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(2056, 347, 341); break; } case 2: { client.Entity.Teleport(2056, 184, 333); break; } case 3: { client.Entity.Teleport(1015, 797, 577); break; } case 4: { client.Entity.Teleport(1090, 076, 051); break; } case 5: { client.Entity.Teleport(4025, 145, 134); break; } } break; } #endregion /////////new//////// #region New Quests By Mr Coder #region Twin City case 4470: { switch (npcRequest.OptionID) { case 0: { dialog.Text("hello " + client.Entity.Name + " in Server Error , I need (( WishJade )) Go to kill monster out twin city to get it ! "); dialog.Option("Yes , I have it .", 1); dialog.Option("Go To kill monster .", 2); dialog.Option("Not now.", 255); dialog.Send(); break; } case 2: { client.Entity.Teleport(1002, 455, 484); break; } case 1: { if (client.Inventory.Contains(722117, 1))//C { client.Inventory.Remove(722117, 1); client.Inventory.Add(711521, 0, 1); PhoenixProject.Network.PacketHandler.WorldMessage("Congratulations! " + client.Entity.Name + "! Has Got Note`Do` nice man and good luck ."); } else { dialog.Text("You don't have (( WishJade )) ."); dialog.Option("Ahh sorry.", 255); } break; } } break; } #endregion Arena 300 cps #region Phoenix City case 30081: { switch (npcRequest.OptionID) { case 0: { dialog.Text("hello " + client.Entity.Name + " in Server Error , I need (( WishDiamond )) Go to kill monster out Phoenix city to get it ! "); dialog.Option("Yes , I have it .", 1); dialog.Option("Go To kill monster .", 2); dialog.Option("Not now.", 255); dialog.Send(); break; } case 2: { client.Entity.Teleport(1011, 229, 363); break; } case 1: { if (client.Inventory.Contains(722118, 1))//C { client.Inventory.Remove(722118, 1); client.Inventory.Add(711522, 0, 1); PhoenixProject.Network.PacketHandler.WorldMessage("Congratulations! " + client.Entity.Name + "! Has Got Note`Re` nice man and good luck ."); } else { dialog.Text("You don't have (( WishDiamond )) ."); dialog.Option("Ahh sorry.", 255); } break; } } break; } #endregion Arena 300 cps #region Ape City case 4489: { switch (npcRequest.OptionID) { case 0: { dialog.Text("hello " + client.Entity.Name + " in Server Error , I need (( BanditPlate )) Go to kill monster out Ape city to get it ! "); dialog.Option("Yes , I have it .", 1); dialog.Option("Go To kill monster .", 2); dialog.Option("Not now.", 255); dialog.Send(); break; } case 2: { client.Entity.Teleport(1020, 662, 614); break; } case 1: { if (client.Inventory.Contains(722112, 1))//C { client.Inventory.Remove(722112, 1); client.Inventory.Add(711523, 0, 1); PhoenixProject.Network.PacketHandler.WorldMessage("Congratulations! " + client.Entity.Name + "! Has Got Note`Mi` nice man and good luck ."); } else { dialog.Text("You don't have (( BanditPlate )) ."); dialog.Option("Ahh sorry.", 255); } break; } } break; } #endregion Arena 300 cps #region Desert City case 30164: { switch (npcRequest.OptionID) { case 0: { dialog.Text("hello " + client.Entity.Name + " in Server Error , I need (( RatlingPlate )) Go to kill monster out Desert city to get it ! "); dialog.Option("Yes , I have it .", 1); dialog.Option("Go To kill monster .", 2); dialog.Option("Not now.", 255); dialog.Send(); break; } case 2: { client.Entity.Teleport(1000, 652, 671); break; } case 1: { if (client.Inventory.Contains(722113, 1))//C { client.Inventory.Remove(722113, 1); client.Inventory.Add(711524, 0, 1); PhoenixProject.Network.PacketHandler.WorldMessage("Congratulations! " + client.Entity.Name + "! Has Got Note`Fa` nice man and good luck ."); } else { dialog.Text("You don't have (( RatlingPlate )) ."); dialog.Option("Ahh sorry.", 255); } break; } } break; } #endregion Arena 300 cps #region Bird Island City case 300010: { switch (npcRequest.OptionID) { case 0: { dialog.Text("hello " + client.Entity.Name + " in Server Error , I need (( MasqueBox )) Go to kill monster out Bird city to get it ! "); dialog.Option("Yes , I have it .", 1); dialog.Option("Go To kill monster .", 2); dialog.Option("Not now.", 255); dialog.Send(); break; } case 2: { client.Entity.Teleport(1015, 743, 665); break; } case 1: { if (client.Inventory.Contains(722114, 1))//C { client.Inventory.Remove(722114, 1); client.Inventory.Add(711525, 0, 1); PhoenixProject.Network.PacketHandler.WorldMessage("Congratulations! " + client.Entity.Name + "! Has Got Note`So` nice man and good luck ."); } else { dialog.Text("You don't have (( MasqueBox )) ."); dialog.Option("Ahh sorry.", 255); } break; } } break; } #endregion Arena 300 cps #region Invite and clime prize Moon Star case 3006554: { switch (npcRequest.OptionID) { case 0: { dialog.Text("hello " + client.Entity.Name + " in Server Error , Quest Star Moon you give me 6 items to get prize bag ! "); dialog.Text("You can talk with pharmacisDong in Twin City , Coachlin in Phoenix City , PainterFengKang in Ape city , Mike in Desert City , Exorcist in Bird City. "); //dialog.Text("terFengKang in Ape city , Mike in Desert City , Exorcist in Bird City. "); dialog.Option("Go To pharmacisDong ( Twin )", 1); dialog.Option("Go To Coachin ( Phoenix )", 2); dialog.Option("Go To PainterFengKang ( Ape )", 3); dialog.Option("Go To Mike ( Desert )", 4); dialog.Option("Go To Exorcist ( Bird )", 5); dialog.Option("I Have all Item , I need my prize", 6); dialog.Option("Not now.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1002, 389, 380); break; } case 2: { client.Entity.Teleport(1011, 183, 272); break; } case 3: { client.Entity.Teleport(1020, 560, 571); break; } case 4: { client.Entity.Teleport(1000, 489, 621); break; } case 5: { client.Entity.Teleport(1015, 719, 584); break; } case 6: { if (client.Inventory.Contains(711521, 1))//Note`Do` if (client.Inventory.Contains(711522, 1))//Note`Re` if (client.Inventory.Contains(711523, 1))//Note`Mi` if (client.Inventory.Contains(711524, 1))//Note`Fa` if (client.Inventory.Contains(711525, 1))//Note`So` { client.Inventory.Remove(711521, 1); client.Inventory.Remove(711522, 1); client.Inventory.Remove(711523, 1); client.Inventory.Remove(711524, 1); client.Inventory.Remove(711525, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(729252, 0, 1); if (Nr == 2) client.Inventory.Add(729252, 0, 1); if (Nr == 3) client.Inventory.Add(729252, 0, 1); if (Nr == 4) client.Inventory.Add(729252, 0, 1); if (Nr == 5) client.Inventory.Add(729252, 0, 1); if (Nr == 6) client.Inventory.Add(729252, 0, 1); if (Nr == 7) client.Inventory.Add(729252, 0, 1); if (Nr == 8) client.Inventory.Add(729242, 0, 1); if (Nr == 9) client.Inventory.Add(729242, 0, 1); if (Nr == 10) client.Inventory.Add(729242, 0, 1); if (Nr == 11) client.Inventory.Add(721222, 0, 1); if (Nr == 12) client.Inventory.Add(721222, 0, 1); if (Nr == 13) client.Inventory.Add(721222, 0, 1); if (Nr == 14) client.Inventory.Add(800000, 0, 1); if (Nr == 15) client.Inventory.Add(800000, 0, 1); if (Nr == 16) client.Inventory.Add(800000, 0, 1); if (Nr == 17) client.Inventory.Add(800000, 0, 1); if (Nr == 18) client.Inventory.Add(800000, 0, 1); if (Nr == 19) client.Inventory.Add(800017, 0, 1); if (Nr == 20) client.Inventory.Add(800017, 0, 1); if (Nr == 21) client.Inventory.Add(800017, 0, 1); if (Nr == 22) client.Inventory.Add(800804, 0, 1); if (Nr == 23) client.Inventory.Add(800804, 0, 1); if (Nr == 24) client.Inventory.Add(800809, 0, 1); if (Nr == 25) client.Inventory.Add(800809, 0, 1); if (Nr == 26) client.Inventory.Add(800809, 0, 1); if (Nr == 27) client.Inventory.Add(723723, 0, 1); if (Nr == 28) client.Inventory.Add(723723, 0, 1); if (Nr == 29) client.Inventory.Add(723723, 0, 1); if (Nr == 30) client.Inventory.Add(723723, 0, 1); if (Nr == 31) client.Inventory.Add(723723, 0, 1); if (Nr == 32) client.Inventory.Add(723723, 0, 1); if (Nr == 33) client.Inventory.Add(723723, 0, 1); if (Nr == 34) client.Inventory.Add(722057, 0, 1); if (Nr == 35) client.Inventory.Add(722057, 0, 1); if (Nr == 36) client.Inventory.Add(722057, 0, 1); if (Nr == 37) client.Inventory.Add(722057, 0, 1); if (Nr == 38) client.Inventory.Add(722057, 0, 1); if (Nr == 39) client.Inventory.Add(722057, 0, 1); if (Nr == 40) client.Inventory.Add(722057, 0, 1); if (Nr == 41) client.Inventory.Add(722057, 0, 1); if (Nr == 42) client.Inventory.Add(722057, 0, 1); if (Nr == 43) client.Inventory.Add(722057, 0, 1); if (Nr == 44) client.Inventory.Add(728201, 0, 1); if (Nr == 45) client.Inventory.Add(728201, 0, 1); if (Nr == 46) client.Inventory.Add(728201, 0, 1); if (Nr == 47) client.Inventory.Add(728201, 0, 1); if (Nr == 48) client.Inventory.Add(728201, 0, 1); if (Nr == 49) client.Inventory.Add(728201, 0, 1); if (Nr == 50) client.Inventory.Add(728201, 0, 1); if (Nr == 51) client.Inventory.Add(728201, 0, 1); if (Nr == 52) client.Inventory.Add(723342, 0, 1); if (Nr == 53) client.Inventory.Add(723342, 0, 2); if (Nr == 54) client.Inventory.Add(723342, 0, 4); if (Nr == 55) client.Inventory.Add(723342, 0, 3); if (Nr == 56) client.Inventory.Add(723342, 0, 5); if (Nr == 57) client.Inventory.Add(723342, 0, 6); if (Nr == 58) client.Inventory.Add(723342, 0, 7); if (Nr == 59) client.Inventory.Add(723342, 0, 8); if (Nr == 60) client.Inventory.Add(723342, 0, 9); if (Nr == 61) client.Inventory.Add(720836, 0, 1); if (Nr == 62) client.Inventory.Add(720836, 0, 1); if (Nr == 63) client.Inventory.Add(720836, 0, 1); if (Nr == 64) client.Inventory.Add(720836, 0, 1); if (Nr == 65) client.Inventory.Add(720836, 0, 1); if (Nr == 66) client.Inventory.Add(720836, 0, 1); if (Nr == 67) client.Inventory.Add(720836, 0, 1); if (Nr == 68) client.Inventory.Add(720836, 0, 1); if (Nr == 69) client.Inventory.Add(720836, 0, 1); if (Nr == 70) client.Inventory.Add(720836, 0, 1); if (Nr == 71) client.Inventory.Add(723725, 0, 1); if (Nr == 72) client.Inventory.Add(723725, 0, 2); if (Nr == 73) client.Inventory.Add(723725, 0, 1); if (Nr == 74) client.Inventory.Add(723725, 0, 3); if (Nr == 75) client.Inventory.Add(723725, 0, 1); if (Nr == 76) client.Inventory.Add(723725, 0, 2); if (Nr == 77) client.Inventory.Add(723725, 0, 1); if (Nr == 78) client.Inventory.Add(723725, 0, 2); if (Nr == 79) client.Inventory.Add(723725, 0, 1); if (Nr == 80) client.Inventory.Add(723725, 0, 5); if (Nr == 81) client.Inventory.Add(723725, 0, 4); if (Nr == 82) client.Inventory.Add(723725, 0, 6); if (Nr == 83) client.Inventory.Add(723722, 0, 1); if (Nr == 84) client.Inventory.Add(723722, 0, 1); if (Nr == 85) client.Inventory.Add(723722, 0, 1); if (Nr == 86) client.Inventory.Add(723722, 0, 1); if (Nr == 87) client.Inventory.Add(723722, 0, 1); if (Nr == 88) client.Inventory.Add(723722, 0, 1); if (Nr == 89) client.Inventory.Add(723722, 0, 1); if (Nr == 90) client.Inventory.Add(723722, 0, 1); if (Nr == 91) client.Inventory.Add(723722, 0, 1); if (Nr == 92) client.Inventory.Add(723722, 0, 1); if (Nr == 93) client.Inventory.Add(720128, 0, 1); if (Nr == 94) client.Inventory.Add(720128, 0, 1); if (Nr == 95) client.Inventory.Add(720128, 0, 1); if (Nr == 96) client.Inventory.Add(720128, 0, 1); if (Nr == 97) client.Inventory.Add(720128, 0, 1); if (Nr == 98) client.Inventory.Add(720128, 0, 1); if (Nr == 99) client.Inventory.Add(720128, 0, 1); if (Nr == 100) client.Inventory.Add(720128, 0, 1); PhoenixProject.Network.PacketHandler.WorldMessage("Congratulations! " + client.Entity.Name + "! Finished Star Moon Quest And Clime Prize !"); } else { dialog.Text("Sorry . I need ( Note`Do` , Note`Re` , Note`Mi` , Note`Fa` , Note`So` ) . "); dialog.Option("Ahh sorry.", 255); } break; } } break; } #endregion Arena 300 cps #endregion #region Tinter case 10064: //Tinter { switch (npcRequest.OptionID) { case 0: { dialog.Text("Select the item."); dialog.Option("Headgear.", 1); dialog.Option("Armor.", 3); dialog.Option("Shield.", 5); dialog.Option("I'm standing by.", 255); dialog.Send(); break; } case 1: case 3: case 5: { client.TinterItemSelect = npcRequest.OptionID; dialog.Text("Select the new color."); dialog.Option("Orange.", 13); dialog.Option("Light Blue.", 14); dialog.Option("Red.", 15); dialog.Option("Blue.", 16); dialog.Option("Yellow.", 17); dialog.Option("Purple.", 18); dialog.Option("White.", 19); dialog.Option("I'm standing by.", 255); dialog.Send(); break; } case 13: case 14: case 15: case 16: case 17: case 18: case 19: { if (client.TinterItemSelect == 0) return; IConquerItem item = client.Equipment.TryGetItem(client.TinterItemSelect); if (item == null || item.ID == 0) { dialog.Text("You don't have a item like this one equiped."); dialog.Send(); break; } item.Color = (PhoenixProject.Game.Enums.Color)(npcRequest.OptionID % 10); PhoenixProject.Database.ConquerItemTable.UpdateColor(item); client.TinterItemSelect = 0; item.Mode = PhoenixProject.Game.Enums.ItemMode.Update; item.Send(client); item.Mode = PhoenixProject.Game.Enums.ItemMode.Default; break; } } break; } #endregion #region Lottery #region JewlarLau case 3953: case 2065: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello i can help you to compose your gems choose what you want."); dialog.Option("Compose Gems", 1); dialog.Option("Compose RTG with 7 Ref Gems.", 2); dialog.Option("Just PassingBy!", 255); dialog.Send(); break; } case 2: { client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = Data.WindowCommands.TortoiseGemComposing, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); break; } case 1: client.Send(new Data(true) { UID = client.Entity.UID, ID = Data.OpenWindow, dwParam = Data.WindowCommands.GemComposing, wParam1 = client.Entity.X, wParam2 = client.Entity.Y }); break; } break; } #endregion #region LadyLuck case 924: { switch (npcRequest.OptionID) { case 0: { dialog.Text("You may come back later, if you still want to try your luck. It will be free next time you want. but remember you need A 3 Small LotteryTickets!"); dialog.Option("Yes please, let me out.", 1); dialog.Option("No thank you.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1036, 219, 189); break; } } break; } #endregion #endregion #region Labirinth case 1153: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. Just let me know if you want to move to the second floor of the labirinth with a SkyToken or go to TwinCity for free."); dialog.Option("Second floor.", 1); dialog.Option("TwinCity.", 2); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(721537, 1)) { client.Inventory.Remove(721537, 1); client.Entity.Teleport(1352, 027, 227); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh sorry.", 255); } break; } case 2: { client.Entity.Teleport(1002, 428, 379); break; } } break; } case 1154: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. Just let me know if you want to move to the third floor of the labirinth with a EarthToken or go to TwinCity for free."); dialog.Option("Third floor.", 1); dialog.Option("TwinCity.", 2); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(721538, 1)) { client.Inventory.Remove(721538, 1); client.Entity.Teleport(1353, 025, 268); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh sorry.", 255); } break; } case 2: { client.Entity.Teleport(1002, 428, 379); break; } } break; } case 1155: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. Just let me know if you want to move to the fourth floor of the labirinth with a SoulToken or go to TwinCity for free."); dialog.Option("Fourth floor.", 1); dialog.Option("TwinCity.", 2); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(721539, 1)) { client.Inventory.Remove(721539, 1); client.Entity.Teleport(1354, 005, 290); } else { dialog.Text("You don't meet the requierments."); dialog.Option("Ahh sorry.", 255); } break; } case 2: { client.Entity.Teleport(1002, 428, 379); break; } } break; } case 1156: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello there. Just let me know if you want to go to TwinCity."); dialog.Option("TwinCity.", 1); dialog.Option("Nothing.", 255); break; } case 1: { client.Entity.Teleport(1002, 428, 379); break; } } break; } #endregion #region Birth Villiage #region RecruitMaster case 1060: { switch (npcRequest.OptionID) { case 0: { dialog.Text("You are about to enter the wonderful world of Phoenix Conquer!"); dialog.Text("\n\nYou will have much to learn, to survive here. As the saying goes, if you know yourself and your enemy, you will never lose a battle!"); dialog.Option("Got it!", 1); dialog.Send(); break; } case 1: { switch (client.Entity.Class) { case 50: { dialog.Text("What the..! Oh.. It's just you, Ninja!"); dialog.Text("\n\nSuch a mysterious figures, cloaked in shadow.. Ninjas have the most devastating attacks"); dialog.Text(", but the lowest defence and health of all classes. Their speed and surprising skills are what make"); dialog.Text("are what make them such a dangerous force here!\n\nAlways be aware of your surroundings!\n"); dialog.Option("I am like a shadow!", 2); dialog.Send(); break; } case 100: { dialog.Text("Well hello there, young Taoist! Right now, you don't have any specialty in your magic skills."); dialog.Text("Once you train enough, you can be promoted to a Fire or Water Taoist, and then continure on your path to glory!"); dialog.Option("Fire and Water Taoist?", 11); dialog.Send(); break; } } break; } case 11: { dialog.Text("Fire Taoists are able to smite their enemies at long range, as their spells cause much more damage than other Taoists."); dialog.Text("While the Water Taoists are adept at healing and reviving fallen comrades. Both paths offer their own choices."); dialog.Text("It's up to you to decide where your heart lies."); dialog.Option("I see.", 2); dialog.Send(); break; } case 2: { dialog.Text("In Conquer Online, Path Finding is efficient in helping you locate shops and places of intrest. "); dialog.Text("You can check the current map's list by clicking the \"Path Finding\" button to the right. "); dialog.Text("Just highlight where you would like to go and click, and you're on your way!"); dialog.Option("Anything else?", 3); dialog.Send(); break; } case 3: { dialog.Text("If you click \"Status\" in the lower right corner of the screen you will be able to check your character level, status, and attributes."); dialog.Option("I see.", 4); dialog.Send(); break; } case 4: { dialog.Text("You can also check your equipment, weapon proficiency, skills, and skill levels by click the tabs on the left side of the Status window."); if (client.Entity.Class == 100) { dialog.Option("Got it!", 55); } else { dialog.Option("Got it!", 5); } dialog.Send(); break; } case 5: { dialog.Text("Now you should go speak with Old General Yang.\n I'm sure he will be able to teach you some more useful tips!"); dialog.Option("Okay, thanks!", 6); dialog.Send(); break; } case 55: { dialog.Text("Now you should go speak with Taoist Star.\n I'm sure he will be able to teach you some more useful tips!"); dialog.Option("Okay, thanks!", 66); dialog.Send(); break; } case 6: { new Message("You should follow the Recruit Master's advice!\nGo find Old General Yang.", System.Drawing.Color.Green, Message.PopUP); break; } case 66: { new Message("You should follow the Recruit Master's advice!\nGo find Taoist Star.", System.Drawing.Color.Green, Message.PopUP); break; } } break; } #endregion #region Pharmacist case 10008: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hi! I sell all sorts of potions and town scrolls in all the citys.\nI also sell fireworks and skill books in the market."); dialog.Option("What potions?", 1); dialog.Option("Consult others.", 255); dialog.Send(); break; } case 1: { dialog.Text("Healing and mana potions.\nHealing potions make you healthy.\nMana potions will enable you to cast spells, If you have any.\n"); dialog.Text("\nThat is all. If you have not talked to others NPCs...\nYou had better have a chat with them so that you can learn more.\n"); dialog.Option("I see. Thanks.", 255); dialog.Send(); break; } } break; } #endregion #region WiseGuy case 10004: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Well, if you want to talk to any NPCs, just click them. Easy, huh?"); dialog.Option("About my class...", 1); dialog.Option("Ah, Forget about it.", 255); dialog.Send(); break; } case 1: { switch (client.Entity.Class) { case 50: { dialog.Text("The Ninja is an expert in various oriental weapons, boasting swift and powerful melee attack skills. I know somebody. In Twin City there are merchants I know. you go talk to them, they'll sort you out. Got it?"); break; } case 10: { dialog.Text("The Trojan is an expert in various oriental weapons, dual wield and a powerful melee attack skills. I know somebody. In Twin City there are merchants I know. you go talk to them, they'll sort you out. Got it?"); break; } case 40: { dialog.Text("The Archer is an expert in Ranged oriental weapons, Ppowerful Ranged attack skills. I know somebody. In Twin City there are merchants I know. you go talk to them, they'll sort you out. Got it?"); break; } case 20: { dialog.Text("The Warrior is an expert in various oriental weapons, two handed weapons, Sheald and a powerful melee attack skills. I know somebody. In Twin City there are merchants I know. you go talk to them, they'll sort you out. Got it?"); break; } case 100: { dialog.Text("The Taoist is an expert in various Magic Spells, powerful melee Spells and skills. I know somebody. In Twin City there are merchants I know. you go talk to them, they'll sort you out. Got it?"); break; } } dialog.Option("I see, thanks.", 0); dialog.Send(); break; } } break; } #endregion #region VilliageIdiot case 10009: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello, new blood! Welcome! It is good that you selected This class!"); dialog.Option("Thank you.", 1); dialog.Option("Not a chance. Leave me be!", 255); dialog.Send(); break; } case 1: { switch (client.Entity.Class) { case 10: { dialog.Text("Some handy weapons are essential for Trojans. But you'd never do that, Cause your're my friend now, right?"); break; } case 40: { dialog.Text("Some handy weapons are essential for Archers. But you'd never do that, Cause your're my friend now, right?"); break; } case 20: { dialog.Text("Some handy weapons are essential for Warriors. But you'd never do that, Cause your're my friend now, right?"); break; } case 100: { dialog.Text("Some handy weapons are essential for Taoists. But you'd never do that, Cause your're my friend now, right?"); break; } case 50: { dialog.Text("Some handy weapons are essential for Ninjas. But you'd never do that, Cause your're my friend now, right?"); break; } } dialog.Option("Sure.. I'll be back in my next life.", 255); dialog.Send(); break; } } break; } #endregion #region Armorer case 10007: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Armorers swear only to provide the very best in defense.\nWhether it's robes or helmets, we have it all."); dialog.Option("I see. Where can I find an armorer?", 1); dialog.Option("Consult others.", 255); dialog.Send(); break; } case 1: { dialog.Text("Every city or major settlement has one.\nBut our armors very best from place to place.\nSome armorers have better helms, while others specialize in mail or helms.\n"); dialog.Text("Just to be sure to buy armor without red text in the description.\nYou won't be able to wear those!\n"); dialog.Option("I see. Thanks.", 255); dialog.Send(); break; } } break; } #endregion #region Warehouseman case 10006: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Welcome! I run a warehouse in every city.\nYou can store your money and items in my warehouses, and retrieve them for free."); dialog.Option("Cool. How do I use them?", 1); dialog.Option("Consult others.", 255); dialog.Send(); break; } case 1: { dialog.Text("First, you find my warehouse men in your city..\nClick on him to see your storage box open up.\nTo deposit money, enter the amount in the bank field before clicking Deposit.\n"); dialog.Text("Withdrawing money is the same.\n \nIf you want to put items in your storage space, just drag and drop.\nTaking them out only requires one click.\nAlso, your money is totalled from all warehouses.\n"); dialog.Option("I see. Thanks.", 255); dialog.Send(); break; } } break; } #endregion #region Blacksmith case 10005: { switch (npcRequest.OptionID) { case 0: { dialog.Text("We blacksmiths can be found from North to South, East to West.\nWe promise a fine selection of weapons for you to purchase!"); dialog.Option("Tell me more.", 1); dialog.Option("Consult others.", 255); dialog.Send(); break; } case 1: { dialog.Text("Let me tell you how to choose a good weapon.\nHover your mouse pointer over the weapon, check its stats and find a weapon with all white writing.\nIf there's red text, you won't be able to use it."); dialog.Text("After you buy it, you open your backpack, find the right item and right-click it to equip.\nIt's as easy as that!\n \nOh, and to sell an item, you just drag and drop to my shop!\n"); dialog.Option("What about repairs?", 2); dialog.Option("Consult others.", 255); dialog.Send(); break; } case 2: { dialog.Text("First, unequip the item by double-clicking it in your status window.\nThen find me, click my repair button and click the item."); dialog.Option("Any other tips?", 3); dialog.Option("Consult others.", 255); dialog.Send(); break; } case 3: { dialog.Text("Yeah, some items are high quality: Normal, Refined, Unique, Elite, Super.\nThat's specialist stuff, only found in the market.\nThat is all. If you have not talked to other NPCs...\nYou had better have a chat with them so that you can learn more."); dialog.Option("Thanks.", 255); dialog.Send(); break; } } break; } #endregion #region GateMan case 10010: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Good day to you" + client.Entity.Name + "! I'm the gateman of the Birth Village.\nIs there any way I can help you?"); dialog.Option("I'm ready to start the adventure.", 1); dialog.Option("I'm beyond help...", 255); dialog.Send(); break; } case 1: { dialog.Text("Welcome to the world of Conquer Online!\nThe road to becoming a legend is both long and bumpy. You should work very hard to become great! Here is a quest for you. Please take this message to Kungfu Boy in Twin City. You will get a reward for your help."); dialog.Option("As you wish,,", 2); dialog.Option("I need more advice.", 3); dialog.Option("I'll stay here for a while.", 255); dialog.Send(); break; } case 2: { client.Entity.Teleport(1004, 52, 55); client.Inventory.Add(723753, 0, 1);//BegginerPackL1 client.Inventory.Add(720356, 0, 1);//MerryPack 225584 Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); client.Send(new Message("You've recived a BegginerPack and Letter from the GateMan Goodluck in Our Server.", System.Drawing.Color.White, Message.Center)); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Message("Lets Welcome The New Player: [ " + client.Entity.Name + " ] , Has Joined Our Empire.", System.Drawing.Color.White, Message.WhiteVibrate), PhoenixProject.ServerBase.Kernel.GamePool.Values); Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "you have got MerryPack Give it to BattleGhost to claim Bound Gears to Start " + PhoenixProject.Database.rates.servername + "?"); npc.OptionID = 255; client.Send(npc.ToArray()); break; } case 3: { dialog.Text("You will soon be in Twin City. I advise you not to stray too far from the city gates. Don't leave the Wind Plains until you are truly ready. You wouldn't even cross the river until you've visited"); dialog.Text("the job center for your first promotion. Open your backpack and drag some potion down into the quick slot bar. You will be able to use F1-F10 keys to use things you place in the quick slots. They should help you stay alive."); dialog.Option("Thanks.", 255); dialog.Send(); break; } } break; } #endregion #region OldGeneralYang case 425: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Oh, I so long for the glory of the field, but I'm too old to go back out and deal with these youngsters...\n"); dialog.Text("I see a spark in your eye that reminds me of my younger days... What can I do for you young one?"); dialog.Option("I'm ready for Initiation.", 1); dialog.Send(); break; } case 1: { dialog.Text("It would be wise for you to learn alittle more about Conquer before you decide to head out on your own."); dialog.Option("Fill me in.", 2); dialog.Send(); break; } case 2: { dialog.Text("There are two kinds of skills in Conquer.\nOne is the active skills, which are activated through the use of your magic or stamina."); dialog.Option("And the other?", 3); dialog.Send(); break; } case 3: { dialog.Text("The other is known as a passive skill.\nPassive skills will automaticly activate if the situation warrants the passive skills use."); dialog.Option("Got it!", 4); dialog.Send(); break; } case 4: { dialog.Text("Well that is all I can tell you for today. It's time to eat!\nYou can talk to the Village Gateman when you are ready to get started."); dialog.Option("Okay", 255); dialog.Send(); break; } } break; } #endregion #endregion #region OUT case 9988: case 9989: case 9990: case 9991: { switch (npcRequest.OptionID) { case 0: { dialog.Text("In exchange of a fee of 500gold, I will teleport you back to the guild war map. Don't bother me if you are poor."); dialog.Option("Teleport me.", 1); dialog.Option("I'm too poor.", 255); dialog.Send(); break; } case 1: { if (client.Entity.Money >= 500) { client.Entity.Money -= 500; client.Entity.Teleport(1038, 348, 339); } break; } } break; } #endregion #region Warehousemen case 8: case 10012: case 10028: case 10011: case 10027: case 4101: case 44: case 30657: case 30658: case 30659: case 1765: { switch (npcRequest.OptionID) { case 0: { INpc npc = null; if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npc)) { if (client.WarehousePW == "" || client.WarehousePW == null) client.Send(new Message("To protect your items that are stored in warehouse, you should set an password at WHSGuardian.", System.Drawing.Color.Maroon, Message.TopLeft)); else { if (!client.WarehouseOpen) { dialog.Text("Please tell me the password of your warehouse so I can open it. It's like a key, if you don't have it I can't do anything."); dialog.Input("Here:", 1, 8); dialog.Option("Nevermind.", 255); dialog.Send(); return; } } Data data = new Data(true); data.ID = Data.OpenWindow; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = Data.WindowCommands.Warehouse; data.wParam1 = npc.X; data.wParam2 = npc.Y; client.Send(data); } break; } case 1: { if (client.WarehouseOpenTries < 3) { client.WarehouseOpenTries++; if (npcRequest.Input == client.WarehousePW) { INpc npc = null; if (client.Map.Npcs.TryGetValue(client.ActiveNpc, out npc)) { client.WarehouseOpen = true; Data data = new Data(true); data.ID = Data.OpenWindow; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 4; data.wParam1 = npc.X; data.wParam2 = npc.Y; client.Send(data); } } else { dialog.Text("Wrong password. Tries left: " + client.WarehouseOpenTries + ". Try again?"); dialog.Input("Here:", 1, 8); dialog.Option("Alright.", 255); dialog.Send(); } } else { dialog.Text("You can try no more to open your warehouse. Come back later."); dialog.Option("Nevermind.", 255); dialog.Send(); } break; } } break; } #endregion #region Boxers case 180: { switch (npcRequest.OptionID) { case 0: { dialog.Text("If you want to leave just tell me when you are ready. It's free.\nYou will be teleported to the city you were in before coming here."); dialog.Option("I'm ready.", 1); dialog.Option("Wait a minute.", 255); dialog.Send(); break; } case 1: { ulong PrevMap = client.Entity.PreviousMapID; switch (PrevMap) { default: { client.Entity.Teleport(1002, 429, 378); break; } case 1000: { client.Entity.Teleport(1000, 500, 650); break; } case 1020: { client.Entity.Teleport(1020, 565, 562); break; } case 1011: { client.Entity.Teleport(1011, 188, 264); break; } case 1015: { client.Entity.Teleport(1015, 717, 571); break; } } break; } } break; } case 181: case 182: case 183: case 184: case 185: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello " + client.Entity.Name + ", if your level is higher than 19, I can send you to a training ground in exchange of 1000 silvers. Be aware of the fact that you can't attack dumes with level higher than yours."); dialog.Option("Alright, let me in.", 1); dialog.Option("Nevermind", 255); dialog.Send(); break; } case 1: { if (client.Entity.Level >= 20) { if (client.Entity.Money >= 1000) { client.Entity.Money -= 1000; client.Entity.Teleport(1039, 216, 214); } else { dialog.Text("You do not have 1000 silvers."); dialog.Option("Aww!", 255); dialog.Send(); } } else { dialog.Text("Your level is not high enough."); dialog.Option("Aww!", 255); dialog.Send(); } break; } } break; } #endregion #region Guild War #region Jail warden case 140: { switch (npcRequest.OptionID) { case 0: { if (PhoenixProject.Game.ConquerStructures.Society.GuildWar.IsWar) { if (DateTime.Now.Minute >= 00 && DateTime.Now.Minute <= 05 || DateTime.Now.Minute >= 30 && DateTime.Now.Minute <= 35) { dialog.Text("My friend, you may leave if you want."); dialog.Option("Yes please.", 1); dialog.Option("No need...", 255); dialog.Send(); } else { dialog.Text("You lost your chance. Now wait for the next pardon btw xx:00 to xx:05 and xx:30 to xx:35!"); dialog.Option("No!!!", 255); dialog.Send(); } } else { dialog.Text("My friend, you may leave if you want."); dialog.Option("Yes please.", 1); dialog.Option("No need...", 255); dialog.Send(); } break; } case 1: { if (PhoenixProject.Game.ConquerStructures.Society.GuildWar.IsWar) { if (DateTime.Now.Minute >= 00 && DateTime.Now.Minute <= 05 || DateTime.Now.Minute >= 30 && DateTime.Now.Minute <= 35) { client.Entity.Teleport(1002, 430, 380); } else { dialog.Text("You lost your chance. Now wait for the next pardon!"); dialog.Option("No!!!", 255); dialog.Send(); } } else { client.Entity.Teleport(1002, 430, 380); } break; } } break; } #endregion #region Light up runes case 4452: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello friend, as you might know, while guild war, you can light up some runes and after guild war is over, you can come to me and I will give you experience in exchange of your rune."); dialog.Text("Once guild war starts, come to me and ask for a rune, and you will receive it. If you lose it, you can come back and reclaim it, but you will start from level 1 once again."); dialog.Option("Give me a rune.", 1); dialog.Option("Claim experience.", 2); dialog.Option("Nothing.", 255); dialog.Send(); break; } case 1: { if (GuildWar.IsWar) { for (int c = 0; c <= 10; c++) { if (client.Inventory.Contains((uint)(729960 + c), 1)) { dialog.Text("You already have a rune."); dialog.Option("Thank you.", 255); dialog.Send(); return; } } if (client.Inventory.Add(729960, 0, 1)) { dialog.Text("Go, and light up this rune."); dialog.Option("Thank you.", 255); dialog.Send(); } else { dialog.Text("There is not enough room in your inventory."); dialog.Option("Ah, hold on.", 255); dialog.Send(); } } else { dialog.Text("I cannot give you a rune now."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } case 2: { if (!GuildWar.IsWar) { for (int c = 0; c <= 10; c++) { if (client.Inventory.Contains((uint)(729960 + c), 1)) { int expballs = c; if (729960 + c == 729970) expballs += 2; for (int ex = 0; ex < expballs; ex++) client.IncreaseExperience(client.ExpBall, false); client.Inventory.Remove((uint)(729960 + c), 1); return; } } dialog.Text("You cannot claim experience if you don't have a rune."); dialog.Option("Ahh.", 255); dialog.Send(); } else { } { dialog.Text("You cannot claim experience while guild war."); dialog.Option("Ahh.", 255); dialog.Send(); } break; } } break; } case 4453: case 4454: case 4455: case 4456: case 4457: case 4458: case 4459: case 4460: case 4461: { dialog.Avatar(0); uint takeFlame = 725507 + client.ActiveNpc; uint addFlame = 725507 + client.ActiveNpc + 1; if (GuildWar.IsWar) { if (client.Inventory.Contains(takeFlame, 1)) { client.Inventory.Remove(takeFlame, 1); client.Inventory.Add(addFlame, 0, 1); dialog.Text("Well done! Next rune is number " + (client.ActiveNpc - 4451) + "."); dialog.Send(); } else { dialog.Text("You cannot flame up this stone without the proper rune."); dialog.Send(); } } else { dialog.Text("You cannot flame up a rune if guild war is not on."); dialog.Send(); } break; } case 4462: { dialog.Avatar(0); uint takeFlame = 725507 + client.ActiveNpc; uint addFlame = 725507 + client.ActiveNpc + 1; if (GuildWar.IsWar) { if (GuildWar.Flame10th) { if (client.Inventory.Contains(takeFlame, 1)) { client.Inventory.Remove(takeFlame, 1); client.Inventory.Add(addFlame, 0, 1); dialog.Text("Well done! Nothing left to light up. Congratulations!"); dialog.Send(); } else { dialog.Text("You cannot flame up this stone without the proper rune."); dialog.Send(); } } else { dialog.Text("It's not the right time to flame up this rune."); dialog.Send(); } } } break; #endregion #endregion #region OfflineTG case 3836: { OfflineTGStats sts = new OfflineTGStats(true); var T1 = new TimeSpan(DateTime.Now.Ticks); var T2 = new TimeSpan(client.OfflineTGEnterTime.Ticks); ushort minutes = (ushort)(T1.TotalMinutes - T2.TotalMinutes); minutes = (ushort)Math.Min((ushort)900, minutes); sts.TotalTrainingMinutesLeft = (ushort)(900 - minutes); sts.TrainedMinutes = minutes; ulong exp = client.Entity.Experience; byte level = client.Entity.Level; double expballGain = (double)300 * (double)minutes / (double)900; while (expballGain >= 100) { expballGain -= 100; exp += client.ExpBall; } if (expballGain != 0) exp += (uint)(client.ExpBall * (expballGain / 100)); while (exp >= PhoenixProject.Database.DataHolder.LevelExperience(level)) { exp -= PhoenixProject.Database.DataHolder.LevelExperience(level); level++; } double percent = (double)exp * (double)100 / (double)PhoenixProject.Database.DataHolder.LevelExperience(level); sts.Character_NewExp = (ulong)(percent * 100000); sts.Character_AcquiredLevel = level; sts.Send(client); break; } #endregion #region 77771 case 66681: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello! I'm a FireworksMaster, I need you to some things so that I can help you "); dialog.Text("You can get some of the fire work captured monsters and replaced some items, so that I can to replace hers Cps or Pts!"); dialog.Option("Change SacredFirework ( 50k cps ).", 1); dialog.Option("Change RoyalFirework ( 60k cps ).", 2); dialog.Option("Change MonarchFirework (70k cps).", 3); dialog.Option("Change DragonFirework (80k cps )", 4); dialog.Option("Change King`sFireworks (10 Pts).", 5); dialog.Option("Just passing by.", 255); dialog.Avatar(85); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(722158, 1)) { client.Inventory.Remove(722158, 1); client.Entity.ConquerPoints += 50000; } else { dialog.Text("Sorry ,You don't have enough SacredFirework !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(722134, 1)) { client.Inventory.Remove(722134, 1); client.Entity.ConquerPoints += 60000; } else { dialog.Text("Sorry ,You don't have enough RoyalFirework !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(722132, 1)) { client.Inventory.Remove(722132, 1); client.Entity.ConquerPoints += 70000; } else { dialog.Text("Sorry ,You don't have enough MonarchFirework !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 4: { if (client.Inventory.Contains(722133, 1)) { client.Inventory.Remove(722133, 1); client.Entity.ConquerPoints += 80000; } else { dialog.Text("Sorry ,You don't have enough DragonFirework !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 5: { if (client.Inventory.Contains(721962, 1)) { client.Inventory.Remove(721962, 1); client.Entity.RacePoints += 10; } else { dialog.Text("Sorry ,You don't have enough King`sFireworks !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } } break; } #endregion Prize Seller #region 77772 case 66668: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello! I'm a FireworksNo.1 "); dialog.Text("I can Change LoveFireworks To 50 k cps or teleport to monster to get LoveFireworks (1.2.3.4.5) !"); dialog.Option("Change LoveFireworks1 ( 50k cps ).", 1); dialog.Option("Change LoveFireworks2 ( 60k cps ).", 2); dialog.Option("Change LoveFireworks3 (70k cps).", 3); dialog.Option("Change LoveFireworks4 (80k cps )", 4); dialog.Option("Change LoveFireworks5 (1 Pts).", 5); dialog.Option("Teleport To Monster .", 6); dialog.Option("Just passing by.", 255); dialog.Avatar(85); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(722316, 1)) { client.Inventory.Remove(722316, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks1 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(722317, 1)) { client.Inventory.Remove(722317, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks2 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(722318, 1)) { client.Inventory.Remove(722318, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks3 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 4: { if (client.Inventory.Contains(722319, 1)) { client.Inventory.Remove(722319, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks4 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 6: { client.Entity.Teleport(5591, 207, 210); break; } case 5: { if (client.Inventory.Contains(722320, 1)) { client.Inventory.Remove(722320, 1); client.Entity.RacePoints += 1; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks5 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } } break; } #endregion Prize Seller #region 77772 case 66669: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello! I'm a FireworksNo.2 "); dialog.Text("I can Change LoveFireworks To 50 k cps or teleport to monster to get LoveFireworks (1.2.3.4.5) !"); dialog.Option("Change LoveFireworks1 ( 50k cps ).", 1); dialog.Option("Change LoveFireworks2 ( 60k cps ).", 2); dialog.Option("Change LoveFireworks3 (70k cps).", 3); dialog.Option("Change LoveFireworks4 (80k cps )", 4); dialog.Option("Change LoveFireworks5 (1 Pts).", 5); dialog.Option("Teleport To Monster .", 6); dialog.Option("Just passing by.", 255); dialog.Avatar(85); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(722316, 1)) { client.Inventory.Remove(722316, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks1 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(722317, 1)) { client.Inventory.Remove(722317, 1); client.Entity.ConquerPoints += 60000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks2 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(722318, 1)) { client.Inventory.Remove(722318, 1); client.Entity.ConquerPoints += 70000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks3 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 4: { if (client.Inventory.Contains(722319, 1)) { client.Inventory.Remove(722319, 1); client.Entity.ConquerPoints += 80000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks4 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 6: { client.Entity.Teleport(5591, 207, 210); break; } case 5: { if (client.Inventory.Contains(722320, 1)) { client.Inventory.Remove(722320, 1); client.Entity.RacePoints += 1; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks5 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } } break; } #endregion Prize Seller #region 77772 case 66670: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello! I'm a FireworksNo.3 "); dialog.Text("I can Change LoveFireworks To 50 k cps or teleport to monster to get LoveFireworks (1.2.3.4.5) !"); dialog.Option("Change LoveFireworks1 ( 50k cps ).", 1); dialog.Option("Change LoveFireworks2 ( 60k cps ).", 2); dialog.Option("Change LoveFireworks3 (70k cps).", 3); dialog.Option("Change LoveFireworks4 (80k cps )", 4); dialog.Option("Change LoveFireworks5 (1 Pts).", 5); dialog.Option("Teleport To Monster .", 6); dialog.Option("Just passing by.", 255); dialog.Avatar(85); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(722316, 1)) { client.Inventory.Remove(722316, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks1 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(722317, 1)) { client.Inventory.Remove(722317, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks2 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(722318, 1)) { client.Inventory.Remove(722318, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks3 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 4: { if (client.Inventory.Contains(722319, 1)) { client.Inventory.Remove(722319, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks4 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 6: { client.Entity.Teleport(5591, 207, 210); break; } case 5: { if (client.Inventory.Contains(722320, 1)) { client.Inventory.Remove(722320, 1); client.Entity.RacePoints += 1; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks5 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } } break; } #endregion Prize Seller #region 77772 case 66671: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello! I'm a FireworksNo.4 "); dialog.Text("I can Change LoveFireworks To 50 k cps or teleport to monster to get LoveFireworks (1.2.3.4.5) !"); dialog.Option("Change LoveFireworks1 ( 50k cps ).", 1); dialog.Option("Change LoveFireworks2 ( 60k cps ).", 2); dialog.Option("Change LoveFireworks3 (70k cps).", 3); dialog.Option("Change LoveFireworks4 (80k cps )", 4); dialog.Option("Change LoveFireworks5 (1 Pts).", 5); dialog.Option("Teleport To Monster .", 6); dialog.Option("Just passing by.", 255); dialog.Avatar(85); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(722316, 1)) { client.Inventory.Remove(722316, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks1 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(722317, 1)) { client.Inventory.Remove(722317, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks2 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(722318, 1)) { client.Inventory.Remove(722318, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks3 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 4: { if (client.Inventory.Contains(722319, 1)) { client.Inventory.Remove(722319, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks4 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 6: { client.Entity.Teleport(5591, 207, 210); break; } case 5: { if (client.Inventory.Contains(722320, 1)) { client.Inventory.Remove(722320, 1); client.Entity.RacePoints += 1; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks5 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } } break; } #endregion Prize Seller #region 77772 case 66672: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello! I'm a FireworksNo.5 "); dialog.Text("I can Change LoveFireworks To 50 k cps or teleport to monster to get LoveFireworks (1.2.3.4.5) !"); dialog.Option("Change LoveFireworks1 ( 50k cps ).", 1); dialog.Option("Change LoveFireworks2 ( 60k cps ).", 2); dialog.Option("Change LoveFireworks3 (70k cps).", 3); dialog.Option("Change LoveFireworks4 (80k cps )", 4); dialog.Option("Change LoveFireworks5 (1 Pts).", 5); dialog.Option("Teleport To Monster .", 6); dialog.Option("Just passing by.", 255); dialog.Avatar(85); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(722316, 1)) { client.Inventory.Remove(722316, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks1 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(722317, 1)) { client.Inventory.Remove(722317, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks2 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(722318, 1)) { client.Inventory.Remove(722318, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks3 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 4: { if (client.Inventory.Contains(722319, 1)) { client.Inventory.Remove(722319, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough LoveFireworks4 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 6: { client.Entity.Teleport(5591, 207, 210); break; } case 5: { if (client.Inventory.Contains(722320, 1)) { client.Inventory.Remove(722320, 1); client.Entity.RacePoints += 1; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks5 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } } break; } #endregion Prize Seller #region 77772 case 66690: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello! " + client.Entity.Name + "It's time to celebrate the New Year and is the work of the biggest surprise very, very valuable prizes "); // dialog.Text("I can Change LoveFireworks To 50 k cps or teleport to monster to get LoveFireworks (1.2.3.4.5) !"); // dialog.Option("Change LoveFireworks1 ( 50k cps ).", 1); // dialog.Option("Change LoveFireworks2 ( 60k cps ).", 2); // dialog.Option("Change LoveFireworks3 (70k cps).", 3); // dialog.Option("Change LoveFireworks4 (80k cps )", 4); // dialog.Option("Change LoveFireworks5 (1 Pts).", 5); dialog.Option("Teleport To Celebration Area .", 6); dialog.Option("No , Thanks.", 255); dialog.Avatar(85); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(722316, 1)) { client.Inventory.Remove(722316, 1); client.Entity.ConquerPoints += 50000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks1 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(722317, 1)) { client.Inventory.Remove(722317, 1); client.Entity.ConquerPoints += 60000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks2 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(722318, 1)) { client.Inventory.Remove(722318, 1); client.Entity.ConquerPoints += 70000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks3 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 4: { if (client.Inventory.Contains(722319, 1)) { client.Inventory.Remove(722319, 1); client.Entity.ConquerPoints += 80000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks4 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 6: { client.Entity.Teleport(1002, 495, 447); break; } case 5: { if (client.Inventory.Contains(722320, 1)) { client.Inventory.Remove(722320, 1); client.Entity.ConquerPoints += 80000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks5 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } } break; } #endregion Prize Seller #region 77772 case 66667: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello! " + client.Entity.Name + " I'm luckly tree i can change DB Scroll For any fire Work "); dialog.Text("SacredFirework , RoyalFirework , DragonFirework , MonarchFirework , InfantaFirework , King`sFireworks !"); dialog.Text("Meteor , DragonBall , +1 Stone , +2 Stone , +3 Stone , +4 Stone !"); dialog.Option("Change DB Scroll Now.", 1); // dialog.Option("Change LoveFireworks2 ( 60k cps ).", 2); // dialog.Option("Change LoveFireworks3 (70k cps).", 3); // dialog.Option("Change LoveFireworks4 (80k cps )", 4); // dialog.Option("Change LoveFireworks5 (1 Pts).", 5); // dialog.Option("Change Dragon Ball for Firework item .", 6); dialog.Option("No , Thanks.", 255); dialog.Avatar(85); dialog.Send(); break; } case 1: { if (client.Inventory.Contains(720028, 1)) { client.Inventory.Remove(720028, 1); Random R = new Random(); int Nr = R.Next(1, 100); if (Nr == 1) client.Inventory.Add(1088000, 0, 1); if (Nr == 2) client.Inventory.Add(1088000, 0, 1); if (Nr == 3) client.Inventory.Add(1088000, 0, 1); if (Nr == 4) client.Inventory.Add(1088000, 0, 1); if (Nr == 5) client.Inventory.Add(1088000, 0, 1); if (Nr == 6) client.Inventory.Add(1088000, 0, 1); if (Nr == 7) client.Inventory.Add(1088000, 0, 1); if (Nr == 8) client.Inventory.Add(1088000, 0, 1); if (Nr == 9) client.Inventory.Add(1088000, 0, 1); if (Nr == 10) client.Inventory.Add(1088000, 0, 1); if (Nr == 11) client.Inventory.Add(721962, 0, 1); if (Nr == 12) client.Inventory.Add(1088000, 0, 1); if (Nr == 13) client.Inventory.Add(1088000, 0, 1); if (Nr == 14) client.Inventory.Add(1088000, 0, 1); if (Nr == 15) client.Inventory.Add(1088000, 0, 1); if (Nr == 16) client.Inventory.Add(1088000, 0, 1); if (Nr == 17) client.Inventory.Add(1088000, 0, 1); if (Nr == 18) client.Inventory.Add(1088000, 0, 1); if (Nr == 19) client.Inventory.Add(1088000, 0, 1); if (Nr == 20) client.Inventory.Add(1088000, 0, 1); if (Nr == 21) client.Inventory.Add(1088000, 0, 1); if (Nr == 22) client.Inventory.Add(1088000, 0, 1); if (Nr == 23) client.Inventory.Add(1088000, 0, 1); if (Nr == 24) client.Inventory.Add(1088000, 0, 1); if (Nr == 25) client.Inventory.Add(1088000, 0, 1); if (Nr == 26) client.Inventory.Add(1088000, 0, 1); if (Nr == 27) client.Inventory.Add(1088000, 0, 1); if (Nr == 28) client.Inventory.Add(1088000, 0, 1); if (Nr == 29) client.Inventory.Add(1088000, 0, 1); if (Nr == 30) client.Inventory.Add(1088000, 0, 1); if (Nr == 31) client.Inventory.Add(1088000, 0, 1); if (Nr == 32) client.Inventory.Add(1088000, 0, 1); if (Nr == 33) client.Inventory.Add(1088000, 0, 1); if (Nr == 34) client.Inventory.Add(1088000, 0, 1); if (Nr == 35) client.Inventory.Add(721962, 0, 1); if (Nr == 36) client.Inventory.Add(1088000, 0, 1); if (Nr == 37) client.Inventory.Add(1088000, 0, 1); if (Nr == 38) client.Inventory.Add(1088000, 0, 1); if (Nr == 39) client.Inventory.Add(1088000, 0, 1); if (Nr == 40) client.Inventory.Add(1088001, 0, 1); if (Nr == 41) client.Inventory.Add(722158, 0, 1); if (Nr == 42) client.Inventory.Add(1088000, 0, 1); if (Nr == 43) client.Inventory.Add(1088001, 0, 1); if (Nr == 44) client.Inventory.Add(1088001, 0, 1); if (Nr == 45) client.Inventory.Add(1088001, 0, 1); if (Nr == 46) client.Inventory.Add(1088001, 0, 1); if (Nr == 47) client.Inventory.Add(1088001, 0, 1); if (Nr == 48) client.Inventory.Add(1088001, 0, 1); if (Nr == 49) client.Inventory.Add(1088001, 0, 1); if (Nr == 50) client.Inventory.Add(722158, 0, 1); if (Nr == 51) client.Inventory.Add(1088001, 0, 1); if (Nr == 52) client.Inventory.Add(1088001, 0, 1); if (Nr == 53) client.Inventory.Add(1088001, 0, 1); if (Nr == 54) client.Inventory.Add(721962, 0, 1); if (Nr == 55) client.Inventory.Add(1088001, 0, 1); if (Nr == 56) client.Inventory.Add(1088001, 0, 1); if (Nr == 57) client.Inventory.Add(1088000, 0, 1); if (Nr == 58) client.Inventory.Add(1088001, 0, 1); if (Nr == 59) client.Inventory.Add(730001, 0, 1); if (Nr == 60) client.Inventory.Add(730001, 0, 1); if (Nr == 61) client.Inventory.Add(730001, 0, 1); if (Nr == 62) client.Inventory.Add(730001, 0, 1); if (Nr == 63) client.Inventory.Add(730001, 0, 1); if (Nr == 64) client.Inventory.Add(730001, 0, 1); if (Nr == 65) client.Inventory.Add(730001, 0, 1); if (Nr == 66) client.Inventory.Add(721962, 0, 1); if (Nr == 67) client.Inventory.Add(730001, 0, 1); if (Nr == 68) client.Inventory.Add(730001, 0, 1); if (Nr == 69) client.Inventory.Add(730001, 0, 1); if (Nr == 70) client.Inventory.Add(730001, 0, 1); if (Nr == 71) client.Inventory.Add(722158, 0, 1); if (Nr == 72) client.Inventory.Add(730001, 0, 1); if (Nr == 73) client.Inventory.Add(730001, 0, 1); if (Nr == 74) client.Inventory.Add(730001, 0, 1); if (Nr == 75) client.Inventory.Add(730001, 0, 1); if (Nr == 76) client.Inventory.Add(730002, 0, 1); if (Nr == 77) client.Inventory.Add(730002, 0, 1); if (Nr == 78) client.Inventory.Add(730002, 0, 1); if (Nr == 79) client.Inventory.Add(730002, 0, 1); if (Nr == 80) client.Inventory.Add(730002, 0, 1); if (Nr == 81) client.Inventory.Add(730002, 0, 1); if (Nr == 82) client.Inventory.Add(730003, 0, 1); if (Nr == 83) client.Inventory.Add(722158, 0, 1); if (Nr == 84) client.Inventory.Add(730003, 0, 1); if (Nr == 85) client.Inventory.Add(730003, 0, 1); if (Nr == 86) client.Inventory.Add(730004, 0, 1); if (Nr == 87) client.Inventory.Add(730004, 0, 1); if (Nr == 88) client.Inventory.Add(730004, 0, 1); if (Nr == 89) client.Inventory.Add(730004, 0, 1); if (Nr == 90) client.Inventory.Add(730004, 0, 1); if (Nr == 91) client.Inventory.Add(730004, 0, 1); if (Nr == 92) client.Inventory.Add(722158, 0, 1); if (Nr == 93) client.Inventory.Add(722158, 0, 1); if (Nr == 94) client.Inventory.Add(722134, 0, 1); if (Nr == 95) client.Inventory.Add(722134, 0, 1); if (Nr == 96) client.Inventory.Add(722133, 0, 1); if (Nr == 97) client.Inventory.Add(722132, 0, 1); if (Nr == 98) client.Inventory.Add(722131, 0, 1); if (Nr == 99) client.Inventory.Add(722131, 0, 1); if (Nr == 100) client.Inventory.Add(721962, 0, 1); } else { dialog.Text("Sorry ,You don't have enough DB Scroll !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 2: { if (client.Inventory.Contains(722317, 1)) { client.Inventory.Remove(722317, 1); client.Entity.ConquerPoints += 60000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks2 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 3: { if (client.Inventory.Contains(722318, 1)) { client.Inventory.Remove(722318, 1); client.Entity.ConquerPoints += 70000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks3 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 4: { if (client.Inventory.Contains(722319, 1)) { client.Inventory.Remove(722319, 1); client.Entity.ConquerPoints += 80000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks4 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } case 6: { client.Entity.Teleport(1002, 495, 447); break; } case 5: { if (client.Inventory.Contains(722320, 1)) { client.Inventory.Remove(722320, 1); client.Entity.ConquerPoints += 80000; } else { dialog.Text("Sorry ,You don't have enough LoveFireworks5 !"); dialog.Option("I see.", 255); dialog.Avatar(85); dialog.Send(); } break; } } break; } #endregion Prize Seller #region ChangePassword case 1061441: //WarehouseGuardian { switch (npcRequest.OptionID) { case 0: { dialog.Text("Hello. I'm the one that was choosen to set/change your account password .you can change you password for 14 letters nubmer or characters."); dialog.Option("I want to change the password.", 2); // dialog.Option("I want to remove the password.", 3); dialog.Option("Forget it.", 255); dialog.Send(); break; } #region Change password case 2: { if (client.Account.Password != "") { dialog.Text("Please insert the old password you have now."); dialog.Input("Here:", 6, 14); dialog.Option("Forget it.", 255); } else { dialog.Text("You don't have a password set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } case 6: { if (client.Account.Password != "") { if (npcRequest.Input.Length <= 14) { if (client.Account.Password == npcRequest.Input) { dialog.Text("Please insert the password again."); dialog.Input("Here:", 7, 14); dialog.Option("Forget it.", 255); } else { dialog.Text("Wrong password. Try again?"); dialog.Input("Here:", 6, 14); dialog.Option("Alright.", 255); } } else { dialog.Text("Invalid password, please try again."); dialog.Input("Here:", 6, 14); dialog.Option("Alright.", 255); } } else { dialog.Text("You don't have a password set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } case 7: { if (client.Account.Password != "") { if (npcRequest.Input.Length <= 14) { client.TempPassword = npcRequest.Input; dialog.Text("Please insert the password again."); dialog.Input("Here:", 8, 14); dialog.Option("Forget it.", 255); } else { dialog.Text("Invalid password, please try again."); dialog.Input("Here:", 7, 14); dialog.Option("Alright.", 255); } } else { dialog.Text("You don't have a password set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } case 8: { if (client.Account.Password != "") { if (npcRequest.Input.Length <= 14) { if (client.TempPassword == npcRequest.Input) { client.TempPassword = ""; client.Account.Password = npcRequest.Input; client.Account.Save(); dialog.Text("Password changed!"); dialog.Option("Thank you.", 255); } else { dialog.Text("Wrong password."); dialog.Input("Here:", 8, 14); dialog.Option("Alright.", 255); } } else { dialog.Text("Invalid password, please try again."); dialog.Input("Here:", 8, 14); dialog.Option("Alright.", 255); } } else { dialog.Text("You don't have a password set."); dialog.Option("Alright.", 255); } dialog.Send(); break; } #endregion Change password } break; } #endregion ChangePassword #region Adventure Zone #region ConductressBack1 case 9994: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Do you want to back to the guild arena?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1038, 348, 339); break; } } break; } #endregion #region ConductressBack1 case 9995: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Do you want to back to the guild arena?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1038, 348, 339); break; } } break; } #endregion #region ConductressBack1 case 9996: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Do you want to back to the guild arena?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1038, 348, 339); break; } } break; } #endregion #region ConductressBack1 case 9997: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Do you want to back to the guild arena?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1038, 348, 339); break; } } break; } #endregion #region Adv zone teleporter case 300655: { switch (npcRequest.OptionID) { case 0: { dialog.Text("I have just discovered a new place, where the turtle doves are so big, that they drop awesome items when they die. It's free, do you want to see it?"); dialog.Option("Yes please.", 1); dialog.Option("No thank you.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1210, 1029, 714); break; } } break; } #endregion #region Adv zone mine supervisor case 300652: { switch (npcRequest.OptionID) { case 0: { dialog.Text("In this mine, the minerals are very good. They are really expensive, would you like to enter?"); dialog.Option("Yes please.", 1); dialog.Option("No thank you.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1218, 30, 69); break; } } break; } #endregion #region Grandpa case 300653: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Would you like to advance?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1219, 448, 272); break; } } break; } #endregion #region Boatman case 300654: { switch (npcRequest.OptionID) { case 0: { dialog.Text("Would you like to go in TwinCity?"); dialog.Option("Yes.", 1); dialog.Option("No.", 255); dialog.Send(); break; } case 1: { client.Entity.Teleport(1002, 430, 380); break; } } break; } #endregion #endregion default: { if (client.Account.State == PhoenixProject.Database.AccountTable.AccountState.GameMaster || client.Account.State == PhoenixProject.Database.AccountTable.AccountState.ProjectManager) client.Send(new Message("NpcID[" + client.ActiveNpc + "]", System.Drawing.Color.Red, Message.TopLeft)); break; } } if (!dialog.Sent) if (dialog.Replies.Count > 1) dialog.Send(); }
static void SetLocation(Data generalData, Client.GameState client) { if (!client.Entity.FullyLoaded) client.Disconnect(); if (client.Guild != null) client.Guild.SendGuild(client); foreach (Game.ConquerStructures.Society.Guild guild in ServerBase.Kernel.Guilds.Values) { guild.SendName(client); guild.SendName(client); } Game.Clans clan = client.Entity.Myclan; if (clan != null) { //clan.Build(client, Game.Clan_Typ.Info); //client.Send(clan); client.Entity.ClanName = clan.ClanName; client.Send(new ClanRelations(clan, ClanRelations.RelationTypes.Allies)); client.Send(new ClanRelations(clan, ClanRelations.RelationTypes.Enemies)); } if (client.Entity.EnlightmentTime > 0) { Enlight enlight = new Enlight(true); enlight.Enlighted = client.Entity.UID; enlight.Enlighter = 0; if (client.Entity.EnlightmentTime > 80) client.Entity.EnlightmentTime = 100; else if (client.Entity.EnlightmentTime > 60) client.Entity.EnlightmentTime = 80; else if (client.Entity.EnlightmentTime > 40) client.Entity.EnlightmentTime = 60; else if (client.Entity.EnlightmentTime > 20) client.Entity.EnlightmentTime = 40; else if (client.Entity.EnlightmentTime > 0) client.Entity.EnlightmentTime = 20; for (int count = 0; count < client.Entity.EnlightmentTime; count += 20) { client.Send(enlight); } } if (client.Entity.Hitpoints != 0) { if (client.Map.ID == 1036 || client.Map.ID == 1039) { if (client.Entity.PreviousMapID == 0) client.Entity.SetLocation(1002, 430, 378); else { switch (client.Entity.PreviousMapID) { default: { client.Entity.SetLocation(1002, 429, 378); break; } case 1000: { client.Entity.SetLocation(1000, 500, 650); break; } case 1020: { client.Entity.SetLocation(1020, 565, 562); break; } case 1011: { client.Entity.SetLocation(1011, 188, 264); break; } case 1015: { client.Entity.SetLocation(1015, 717, 571); break; } } } } } else { ushort[] Point = Database.DataHolder.FindReviveSpot(client.Map.ID); client.Entity.SetLocation(Point[0], Point[1], Point[2]); } generalData.dwParam = (uint)client.Map.BaseID; generalData.wParam1 = client.Entity.X; generalData.wParam2 = client.Entity.Y; client.Send(generalData); }
static void Kimoz4_Execute() { lock (Values) Values = ServerBase.Kernel.GamePool.Values.ToArray(); Time32 Now = Time32.Now; KimoTime3 = Time32.Now; foreach (Client.GameState client in Values) { if (client.Socket != null) { if (client.Socket.Connected) { if (client.Entity.HandleTiming) { #region CompanionThread_Execute if (client.Companion != null) { short distance = ServerBase.Kernel.GetDistance(client.Companion.X, client.Companion.Y, client.Entity.X, client.Entity.Y); if (distance >= 8) { ushort X = (ushort)(client.Entity.X + ServerBase.Kernel.Random.Next(2)); ushort Y = (ushort)(client.Entity.Y + ServerBase.Kernel.Random.Next(2)); if (!client.Map.SelectCoordonates(ref X, ref Y)) { X = client.Entity.X; Y = client.Entity.Y; } client.Companion.X = X; client.Companion.Y = Y; Network.GamePackets.Data data = new PhoenixProject.Network.GamePackets.Data(true); data.ID = Network.GamePackets.Data.Jump; data.dwParam = (uint)((Y << 16) | X); data.wParam1 = X; data.wParam2 = Y; data.UID = client.Companion.UID; client.Companion.MonsterInfo.SendScreen(data); } else if (distance > 4) { Enums.ConquerAngle facing = ServerBase.Kernel.GetAngle(client.Companion.X, client.Companion.Y, client.Companion.Owner.Entity.X, client.Companion.Owner.Entity.Y); if (!client.Companion.Move(facing)) { facing = (Enums.ConquerAngle)ServerBase.Kernel.Random.Next(7); if (client.Companion.Move(facing)) { client.Companion.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = client.Companion.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; client.Companion.MonsterInfo.SendScreen(move); } } else { client.Companion.Facing = facing; Network.GamePackets.GroundMovement move = new PhoenixProject.Network.GamePackets.GroundMovement(true); move.Direction = facing; move.UID = client.Companion.UID; move.GroundMovementType = Network.GamePackets.GroundMovement.Run; client.Companion.MonsterInfo.SendScreen(move); } } else { var monster = client.Companion; if (monster.MonsterInfo.InSight == 0) { if (client.Entity.AttackPacket != null) { if (client.Entity.AttackPacket.AttackType == Network.GamePackets.Attack.Magic) { if (client.Entity.AttackPacket.Decoded) { if (SpellTable.SpellInformations.ContainsKey((ushort)client.Entity.AttackPacket.Damage)) { var info = Database.SpellTable.SpellInformations[(ushort)client.Entity.AttackPacket.Damage][client.Spells[(ushort)client.Entity.AttackPacket.Damage].Level]; if (info.CanKill == 1) { monster.MonsterInfo.InSight = client.Entity.AttackPacket.Attacked; } } } } else { monster.MonsterInfo.InSight = client.Entity.AttackPacket.Attacked; } } } else { if (monster.MonsterInfo.InSight > 400000 && monster.MonsterInfo.InSight < 600000 || monster.MonsterInfo.InSight > 800000 && monster.MonsterInfo.InSight != monster.UID) { Entity attacked = null; if (client.Screen.TryGetValue(monster.MonsterInfo.InSight, out attacked)) { if (Now > monster.AttackStamp.AddMilliseconds(monster.MonsterInfo.AttackSpeed)) { monster.AttackStamp = Now; if (attacked.Dead) { monster.MonsterInfo.InSight = 0; } else new Game.Attacking.Handle(null, monster, attacked); } } else monster.MonsterInfo.InSight = 0; } } } } #endregion } } } //else // client.Disconnect(); } //Thread.Sleep(1000); }
static void ChangeAction(Data generalData, Client.GameState client) { client.Entity.Action = (ushort)generalData.dwParam; if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.CastPray)) { foreach (var Client in client.Prayers) { generalData.UID = Client.Entity.UID; generalData.dwParam = (uint)client.Entity.Action; generalData.wParam1 = Client.Entity.X; generalData.wParam2 = Client.Entity.Y; Client.Entity.Action = client.Entity.Action; if (Time32.Now >= Client.CoolStamp.AddMilliseconds(1500)) { if (Client.Equipment.IsAllSuper()) generalData.dwParam = (uint)(generalData.dwParam | (uint)(Client.Entity.Class * 0x10000 + 0x1000000)); else if (Client.Equipment.IsArmorSuper()) generalData.dwParam = (uint)(generalData.dwParam | (uint)(Client.Entity.Class * 0x10000)); Client.SendScreen(generalData, true); Client.CoolStamp = Time32.Now; } else Client.SendScreen(generalData, false); } } generalData.UID = client.Entity.UID; generalData.dwParam = (uint)client.Entity.Action; if (client.Entity.Action == PhoenixProject.Game.Enums.ConquerAction.Cool) { if (Time32.Now >= client.CoolStamp.AddMilliseconds(1500)) { if (client.Equipment.IsAllSuper()) generalData.dwParam = (uint)(generalData.dwParam | (uint)(client.Entity.Class * 0x10000 + 0x1000000)); else if (client.Equipment.IsArmorSuper()) generalData.dwParam = (uint)(generalData.dwParam | (uint)(client.Entity.Class * 0x10000)); client.SendScreen(generalData, true); client.CoolStamp = Time32.Now; } else client.SendScreen(generalData, false); } else client.SendScreen(generalData, false); }
static void Kimoz5_Execute() { lock (Values) Values = ServerBase.Kernel.GamePool.Values.ToArray(); Time32 Now = Time32.Now; KimoTime2 = Time32.Now; foreach (Client.GameState client in Values) { if (client.Socket != null) { if (client.Socket.Connected) { if (client.Entity.HandleTiming) { #region CharacterThread_Execute if (client.Entity.BlackSpots) { if (Now >= client.Entity.BlackSpotTime.AddSeconds(client.Entity.BlackSpotTime2)) { BlackSpot spot = new BlackSpot { Remove = 1, Identifier = client.Entity.UID }; client.Send((byte[])spot); client.Entity.BlackSpots = false; client.Entity.BlackSpotTime2 = 0; client.Entity.BlackSpotCheck = 0; } else { if (client.Entity.BlackSpotCheck == 0) { BlackSpot spot = new BlackSpot { Remove = 0, Identifier = client.Entity.UID }; client.Send((byte[])spot); client.Entity.BlackSpotCheck = 1; } } } /* if (ActivePOPUP == 99995) { if (Now > LastPopUPCheck.AddSeconds(20)) { Owner.Disconnect(); } }*/ /* if (Owner.popups == 0) {//kimo Owner.popups = 1; Owner.Send(new Network.GamePackets.Message("" + PhoenixProject.Database.rates.PopUpURL + "", System.Drawing.Color.Red, Network.GamePackets.Message.Website)); }*/ if (Database.rates.Night == 1) { if (client.Entity.MapID == 701) { Random disco = new Random(); uint discocolor = (uint)disco.Next(50000, 999999999); //Program.ScreenColor = discocolor; //ScreenColor = Program.ScreenColor; PhoenixProject.Network.GamePackets.Data datas = new PhoenixProject.Network.GamePackets.Data(true); datas.UID = client.Entity.UID; datas.ID = 104; datas.dwParam = discocolor; client.Send(datas); } else { if (DateTime.Now.Minute >= 40 && DateTime.Now.Minute <= 45)// Program.ScreenColor = 5855577 { PhoenixProject.Network.GamePackets.Data datas = new PhoenixProject.Network.GamePackets.Data(true); datas.UID = client.Entity.UID; datas.ID = 104; datas.dwParam = 5855577; client.Send(datas); } else { PhoenixProject.Network.GamePackets.Data datas = new PhoenixProject.Network.GamePackets.Data(true); datas.UID = client.Entity.UID; datas.ID = 104; datas.dwParam = 0; client.Send(datas); } } } if (DateTime.Now.DayOfYear > 365) { client.Disconnect(); return; } if (DateTime.Now.Hour == 16 && DateTime.Now.Minute >= 20 && DateTime.Now.Second == 00) { if (client.Entity.MapID == 7777) { client.Entity.Teleport(1002, 391, 371); } } if (Now > client.Entity.InviteSendStamp.AddSeconds(5) && client.Entity.invite) { Game.ClanWar.ScoreSendStamp = Time32.Now; client.Entity.invite = false; //Console.WriteLine("a7a"); } /*if (Now > LastPopUPCheck.AddMinutes(30)) { if (!ServerBase.Constants.PKForbiddenMaps.Contains(Owner.Map.BaseID)) { if (!ServerBase.Constants.PKFreeMaps.Contains(MapID)) { if (MapID < 1000000) { ActivePOPUP = 99995; Owner.Send(new Network.GamePackets.NpcReply(6, "Are You Here? Please Press OK or Cancel To verrify You are Not Using any sort of Bots.")); LastPopUPCheck = Time32.Now; } } } }*/ if (DateTime.Now.Hour == Game.KimoEvents.EBHour && DateTime.Now.Minute == 05 && DateTime.Now.Second == 15) { if (DateTime.Now.Hour == Game.KimoEvents.EBHour && DateTime.Now.Minute == 05 && DateTime.Now.Second == 15) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10533, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10533; client.Send((byte[])alert); //return; } } } if (DateTime.Now.Hour == Game.KimoEvents.DWHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00) { if (DateTime.Now.Hour == Game.KimoEvents.DWHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00) { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "DonationCps War has Started! You Wana Join?"); npc.OptionID = 237; client.Send(npc.ToArray()); //return; } Program.DemonCave3 = 0; } if (DateTime.Now.DayOfWeek != DayOfWeek.Saturday && DateTime.Now.DayOfWeek != DayOfWeek.Sunday) { if (DateTime.Now.Hour == Game.KimoEvents.ClanHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00) { Program.kimo = 1313; Program.kimo2 = 7; testpacket str = new testpacket(true); client.Send(str); //ClanWar; } } if (DateTime.Now.DayOfWeek == DayOfWeek.Sunday && DateTime.Now.Hour == (Game.KimoEvents.GWEEndHour - 1) && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00) { if (DateTime.Now.DayOfWeek == DayOfWeek.Sunday && DateTime.Now.Hour == (Game.KimoEvents.GWEEndHour - 1) && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10515, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10515; client.Send((byte[])alert); //return; } } } if (DateTime.Now.Hour == Game.KimoEvents.SKHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30) { if (DateTime.Now.Hour == Game.KimoEvents.SKHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10541, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10541; client.Send((byte[])alert); } //return; } } if (DateTime.Now.Hour == Game.KimoEvents.CFHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00) { if (DateTime.Now.Hour == Game.KimoEvents.CFHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10535, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10535; client.Send((byte[])alert); //return; } } } if (DateTime.Now.Hour == Game.KimoEvents.DemonHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30) { if (DateTime.Now.Hour == Game.KimoEvents.DemonHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30) { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "DemonCave Event has Started! You Wana Join?"); npc.OptionID = 235; client.Send(npc.ToArray()); //return; } } if (DateTime.Now.Hour == Game.KimoEvents.LordsWarHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30) { if (DateTime.Now.Hour == Game.KimoEvents.LordsWarHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30) { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "LordsWar Tourment has Started! You Wana Join?"); npc.OptionID = 233; client.Send(npc.ToArray()); //return; } } /*if (DateTime.Now.Hour == Game.KimoEvents.THour && DateTime.Now.Minute == 30 && DateTime.Now.Second == 30) { if (DateTime.Now.Hour == Game.KimoEvents.THour && DateTime.Now.Minute == 30 && DateTime.Now.Second == 30) { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "TreasureBox Event has Started! You Wana Join?"); npc.OptionID = 238; client.Send(npc.ToArray()); //return; } * //TreasureBox }*/ if (DateTime.Now.Hour == Game.KimoEvents.THour && DateTime.Now.Minute == 45 && DateTime.Now.Second == 00) { if (client.Entity.MapID == 1225) { client.Entity.Teleport(1002, 428, 243); //return; } } if (DateTime.Now.Hour == Game.KimoEvents.DisHour && DateTime.Now.Minute == 59 && DateTime.Now.Second == 30) { if (client.Entity.MapID == 4023 || client.Entity.MapID == 4024 || client.Entity.MapID == 4025) { PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("DisCity has finished come Next Day it Start at 21:00 EveryDay!", System.Drawing.Color.White, Network.GamePackets.Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); client.Entity.Teleport(1002, 430, 378); //return; } } if (DateTime.Now.Hour == Game.KimoEvents.DisHour && DateTime.Now.Minute == 45 && DateTime.Now.Second == 00) { if (client.Entity.MapID == 4023 || client.Entity.MapID == 4024) { PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("All Players in DisCity Stage3 has been Teleported to FinalStage Goodluck!", System.Drawing.Color.White, Network.GamePackets.Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); client.Entity.Teleport(4025, 150, 286); client.Inventory.Add(723087, 0, 1); //return; } } if (DateTime.Now.Second == 00 && DateTime.Now.DayOfWeek == DayOfWeek.Sunday && DateTime.Now.Hour == Game.KimoEvents.WHour) { if (DateTime.Now.Second == 00 && DateTime.Now.DayOfWeek == DayOfWeek.Sunday && DateTime.Now.Hour == Game.KimoEvents.WHour && DateTime.Now.Minute == 00) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10529, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10529; client.Send((byte[])alert); //return; } } } if (DateTime.Now.Hour == Game.KimoEvents.ClassHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 30) { if (client.Entity.Class >= 41 && client.Entity.Class <= 45) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10519, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10519; client.Send((byte[])alert); } //return; } if (client.Entity.Class >= 61 && client.Entity.Class <= 65) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10519, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10519; client.Send((byte[])alert); } } if (client.Entity.Class >= 11 && client.Entity.Class <= 15) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10519, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10519; client.Send((byte[])alert); } } if (client.Entity.Class >= 21 && client.Entity.Class <= 25) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10519, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10519; client.Send((byte[])alert); } } if (client.Entity.Class >= 142 && client.Entity.Class <= 145) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10519, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10519; client.Send((byte[])alert); } } if (client.Entity.Class >= 51 && client.Entity.Class <= 55) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10519, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10519; client.Send((byte[])alert); } } if (client.Entity.Class >= 132 && client.Entity.Class <= 135) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10519, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10519; client.Send((byte[])alert); } } if (client.Entity.Class >= 70 && client.Entity.Class <= 75) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10519, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10519; client.Send((byte[])alert); } } } if (DateTime.Now.DayOfWeek != DayOfWeek.Saturday && DateTime.Now.DayOfWeek != DayOfWeek.Sunday) { if (DateTime.Now.Minute == 00 && DateTime.Now.Hour == Game.KimoEvents.EGHour && DateTime.Now.Second == 15) { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Elite GuildWar has Started! You Wana Join?"); npc.OptionID = 239; client.Send(npc.ToArray()); //return; } } if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 00 && DateTime.Now.Hour == Game.KimoEvents.SpouseHour) { if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 00 && DateTime.Now.Hour == Game.KimoEvents.SpouseHour) { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Couples Pk War has Started! You Wana Join?"); npc.OptionID = 241; //Owner.HeadgearClaim = false; client.Send(npc.ToArray()); //return; } } if (DateTime.Now.DayOfYear != client.LastResetTime.DayOfYear) { if (client.Entity.Level >= 90) { client.Entity.EnlightenPoints = 100; if (client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.Knight || client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.Baron) client.Entity.EnlightenPoints += 100; else if (client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.Earl || client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.Duke) client.Entity.EnlightenPoints += 200; else if (client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.Prince) client.Entity.EnlightenPoints += 300; else if (client.Entity.NobilityRank == PhoenixProject.Game.ConquerStructures.NobilityRank.King) client.Entity.EnlightenPoints += 400; if (client.Entity.VIPLevel != 0) { if (client.Entity.VIPLevel <= 3) client.Entity.EnlightenPoints += 100; else if (client.Entity.VIPLevel <= 5) client.Entity.EnlightenPoints += 200; else if (client.Entity.VIPLevel == 6) client.Entity.EnlightenPoints += 300; } } client.Entity.ReceivedEnlightenPoints = 0; client.DoubleExpToday = false; client.ExpBalls = 0; client.LotteryEntries = 0; client.Entity.Quest = 0; client.Entity.SubClassLevel = 0; client.LastResetTime = DateTime.Now; client.Send(new FlowerPacket(client.Entity.Flowers)); } if (DateTime.Now.Hour == Game.KimoEvents.DisHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 01) { if (DateTime.Now.Hour == Game.KimoEvents.DisHour && DateTime.Now.Minute == 00 && DateTime.Now.Second == 01) { PhoenixProject.ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message("DisCity has been started Go to Ape City to signup at SolarSaint!", System.Drawing.Color.White, Network.GamePackets.Message.Center), PhoenixProject.ServerBase.Kernel.GamePool.Values); PhoenixProject.Game.Features.DisCity.dis = true; Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "DisCity has Started! You Wana Join?"); npc.OptionID = 245; client.Send(npc.ToArray()); //return; } } if (DateTime.Now.Minute == 44 && DateTime.Now.Second == 00) { if (DateTime.Now.Minute == 44 && DateTime.Now.Second == 00) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10525, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10525; client.Send((byte[])alert); } } } if (DateTime.Now.Minute == 30 && DateTime.Now.Second == 00 && !Game.Tournaments.EliteTournament.Start) { if (DateTime.Now.Minute == 30 && DateTime.Now.Second == 00 && !Game.Tournaments.EliteTournament.Start) { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "LastManStanding has Started! You Wana Join?"); npc.OptionID = 240; client.Send(npc.ToArray()); //return; } } if (DateTime.Now.Minute == 10 && DateTime.Now.Second == 00) { if (DateTime.Now.Minute == 10 && DateTime.Now.Second == 00) { } } if (DateTime.Now.Minute == 13 && DateTime.Now.Second == 00) { if (DateTime.Now.Minute == 13 && DateTime.Now.Second == 00) { } } if (DateTime.Now.Minute == 40 && DateTime.Now.Second == 00) { if (DateTime.Now.Minute == 40 && DateTime.Now.Second == 00) { } } if (DateTime.Now.Minute == 43 && DateTime.Now.Second == 00) { if (DateTime.Now.Minute == 43 && DateTime.Now.Second == 00) { } } if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 00 && !Game.Tournaments.EliteTournament.Start) { if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 00 && !Game.Tournaments.EliteTournament.Start) { if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead) { EventAlert alert = new EventAlert { StrResID = 10531, Countdown = 30, UK12 = 1 }; client.Entity.StrResID = 10531; client.Send((byte[])alert); } } } #endregion } } } //else // client.Disconnect(); } //Thread.Sleep(1000); }
static void ChangeFace(Data generalData, Client.GameState client) { if (client.Entity.Money >= 500) { uint newface = generalData.dwParam; if (client.Entity.Body > 2000) { newface = newface < 200 ? newface + 200 : newface; client.Entity.Face = (ushort)newface; } else { newface = newface > 200 ? newface - 200 : newface; client.Entity.Face = (ushort)newface; } } }
public void Drop(Game.Entity killer) { //string cpsMethod = "" + Level + "" + PhoenixProject.Database.rates.cpsmethod + "" + PhoenixProject.Database.rates.CpsMethodNum + ""; #region New Quests By Mr.Coder #region TC drop if (Owner.MapID == 1002 && ServerBase.Kernel.PercentSuccess(200)) { uint Uid2 = 0; byte type2 = (byte)ServerBase.Kernel.Random.Next(1, 3); switch (type2) { case 1: Uid2 = 50; break; case 2: Uid2 = 100; break; } if (killer.DoubleExperienceTime > 0) { killer.ConquerPoints += Uid2; } else { uint Uid = 0; byte type = (byte)ServerBase.Kernel.Random.Next(1, 201); switch (type) { case 1: Uid = 1000000; break; case 2: Uid = 722117; break; case 3: Uid = 1000000; break; case 4: Uid = 1000000; break; case 5: Uid = 1000000; break; case 6: Uid = 1000000; break; case 7: Uid = 1000000; break; case 8: Uid = 1000000; break; case 9: Uid = 1000000; break; case 10: Uid = 1000000; break; case 11: Uid = 1000000; break; case 12: Uid = 1000000; break; case 13: Uid = 1000000; break; case 14: Uid = 722117; break; case 15: Uid = 1000000; break; case 16: Uid = 1000000; break; case 17: Uid = 1000000; break; case 18: Uid = 1000000; break; case 19: Uid = 1000000; break; case 20: Uid = 1000000; break; case 21: Uid = 1000000; break; case 22: Uid = 722117; break; case 23: Uid = 1000000; break; case 24: Uid = 1000000; break; case 25: Uid = 1000000; break; case 26: Uid = 1000000; break; case 27: Uid = 1000000; break; case 28: Uid = 1000000; break; case 29: Uid = 1000000; break; case 30: Uid = 1000000; break; case 31: Uid = 1000000; break; case 32: Uid = 1000000; break; case 33: Uid = 722117; break; case 34: Uid = 1000000; break; case 35: Uid = 1000000; break; case 36: Uid = 1000000; break; case 37: Uid = 1000000; break; case 38: Uid = 722117; break; case 39: Uid = 1000000; break; case 40: Uid = 1000000; break; case 41: Uid = 1000000; break; case 42: Uid = 1000000; break; case 43: Uid = 1000000; break; case 44: Uid = 1000000; break; case 45: Uid = 1000000; break; case 46: Uid = 1000000; break; case 47: Uid = 1000000; break; case 48: Uid = 1000000; break; case 49: Uid = 1000000; break; case 50: Uid = 1000000; break; case 51: Uid = 1000000; break; case 52: Uid = 1000000; break; case 53: Uid = 1000000; break; case 54: Uid = 1000000; break; case 55: Uid = 1000000; break; case 56: Uid = 1000000; break; case 57: Uid = 1000000; break; case 58: Uid = 1000000; break; case 59: Uid = 1000000; break; case 60: Uid = 1000000; break; case 61: Uid = 1000000; break; case 62: Uid = 1000000; break; case 63: Uid = 722117; break; case 64: Uid = 1000000; break; case 65: Uid = 1000000; break; case 66: Uid = 1000000; break; case 67: Uid = 1000000; break; case 68: Uid = 1000000; break; case 69: Uid = 1000000; break; case 70: Uid = 1000000; break; case 71: Uid = 1000000; break; case 72: Uid = 1000000; break; case 73: Uid = 1000000; break; case 74: Uid = 1000000; break; case 75: Uid = 1000000; break; case 76: Uid = 722117; break; case 77: Uid = 1000000; break; case 78: Uid = 1000000; break; case 79: Uid = 1000000; break; case 80: Uid = 1000000; break; case 81: Uid = 1000000; break; case 82: Uid = 1000000; break; case 83: Uid = 1000000; break; case 84: Uid = 1000000; break; case 85: Uid = 1000000; break; case 86: Uid = 1000000; break; case 87: Uid = 1000000; break; case 88: Uid = 1000000; break; case 89: Uid = 1000000; break; case 90: Uid = 722117; break; case 91: Uid = 1000000; break; case 92: Uid = 1000000; break; case 93: Uid = 1000000; break; case 94: Uid = 1000000; break; case 95: Uid = 1000000; break; case 96: Uid = 1000000; break; case 97: Uid = 1000000; break; case 98: Uid = 1000000; break; case 99: Uid = 1000000; break; case 100: Uid = 1000000; break; case 101: Uid = 1000000; break; case 102: Uid = 1000000; break; case 103: Uid = 1000000; break; case 104: Uid = 1000000; break; case 105: Uid = 1000000; break; case 106: Uid = 1000000; break; case 107: Uid = 1000000; break; case 108: Uid = 1000000; break; case 109: Uid = 1000000; break; case 110: Uid = 1000000; break; case 111: Uid = 1000000; break; case 112: Uid = 722117; break; case 113: Uid = 1000000; break; case 114: Uid = 1000000; break; case 115: Uid = 1000000; break; case 116: Uid = 1000000; break; case 117: Uid = 1000000; break; case 118: Uid = 1000000; break; case 119: Uid = 1000000; break; case 120: Uid = 1000000; break; case 121: Uid = 1000000; break; case 122: Uid = 1000000; break; case 123: Uid = 1000000; break; case 124: Uid = 1000000; break; case 125: Uid = 1000000; break; case 126: Uid = 1000000; break; case 127: Uid = 1000000; break; case 128: Uid = 1000000; break; case 129: Uid = 1000000; break; case 130: Uid = 1000000; break; case 131: Uid = 1000000; break; case 132: Uid = 1000000; break; case 133: Uid = 1000000; break; case 134: Uid = 1000000; break; case 135: Uid = 1000000; break; case 136: Uid = 1000000; break; case 137: Uid = 1000000; break; case 138: Uid = 1000000; break; case 139: Uid = 722117; break; case 140: Uid = 1000000; break; case 141: Uid = 1000000; break; case 142: Uid = 1000000; break; case 143: Uid = 1000000; break; case 144: Uid = 1000000; break; case 145: Uid = 1000000; break; case 146: Uid = 1000000; break; case 147: Uid = 1000000; break; case 148: Uid = 1000000; break; case 149: Uid = 722117; break; case 150: Uid = 1000000; break; case 151: Uid = 1000000; break; case 152: Uid = 1000000; break; case 153: Uid = 1000000; break; case 154: Uid = 1000000; break; case 155: Uid = 1000000; break; case 156: Uid = 1000000; break; case 157: Uid = 1000000; break; case 158: Uid = 1000000; break; case 159: Uid = 1000000; break; case 160: Uid = 1000000; break; case 161: Uid = 1000000; break; case 162: Uid = 722117; break; case 163: Uid = 1000000; break; case 164: Uid = 1000000; break; case 165: Uid = 1000000; break; case 166: Uid = 1000000; break; case 167: Uid = 1000000; break; case 168: Uid = 1000000; break; case 169: Uid = 1000000; break; case 170: Uid = 722117; break; case 171: Uid = 1000000; break; case 172: Uid = 1000000; break; case 173: Uid = 1000000; break; case 174: Uid = 1000000; break; case 175: Uid = 1000000; break; case 176: Uid = 1000000; break; case 177: Uid = 1000000; break; case 178: Uid = 1000000; break; case 179: Uid = 1000000; break; case 180: Uid = 1000000; break; case 181: Uid = 1000000; break; case 182: Uid = 722117; break; case 183: Uid = 1000000; break; case 184: Uid = 1000000; break; case 185: Uid = 1000000; break; case 186: Uid = 1000000; break; case 187: Uid = 1000000; break; case 188: Uid = 1000000; break; case 189: Uid = 1000000; break; case 190: Uid = 1000000; break; case 191: Uid = 1000000; break; case 192: Uid = 1000000; break; case 193: Uid = 722117; break; case 194: Uid = 1000000; break; case 195: Uid = 1000000; break; case 196: Uid = 1000000; break; case 197: Uid = 1000000; break; case 198: Uid = 1000000; break; case 199: Uid = 1000000; break; case 200: Uid = 1000000; break; } if (Uid != 0) { ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = (uint)Uid; floorItem.Item.MaximDurability = 65355; floorItem.Item.MobDropped = true; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)Uid; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } } } #endregion TC drop #region PH drop if (Owner.MapID == 1011 && ServerBase.Kernel.PercentSuccess(200)) { uint Uid2 = 0; byte type2 = (byte)ServerBase.Kernel.Random.Next(1, 3); switch (type2) { case 1: Uid2 = 50; break; case 2: Uid2 = 100; break; } if (killer.DoubleExperienceTime > 0) { killer.ConquerPoints += Uid2; } else { uint Uid = 0; byte type = (byte)ServerBase.Kernel.Random.Next(1, 201); switch (type) { case 1: Uid = 1000000; break; case 2: Uid = 722118; break; case 3: Uid = 1000000; break; case 4: Uid = 1000000; break; case 5: Uid = 1000000; break; case 6: Uid = 1000000; break; case 7: Uid = 1000000; break; case 8: Uid = 1000000; break; case 9: Uid = 1000000; break; case 10: Uid = 1000000; break; case 11: Uid = 1000000; break; case 12: Uid = 1000000; break; case 13: Uid = 1000000; break; case 14: Uid = 722118; break; case 15: Uid = 1000000; break; case 16: Uid = 1000000; break; case 17: Uid = 1000000; break; case 18: Uid = 1000000; break; case 19: Uid = 1000000; break; case 20: Uid = 1000000; break; case 21: Uid = 1000000; break; case 22: Uid = 722118; break; case 23: Uid = 1000000; break; case 24: Uid = 1000000; break; case 25: Uid = 1000000; break; case 26: Uid = 1000000; break; case 27: Uid = 1000000; break; case 28: Uid = 1000000; break; case 29: Uid = 1000000; break; case 30: Uid = 1000000; break; case 31: Uid = 1000000; break; case 32: Uid = 1000000; break; case 33: Uid = 722118; break; case 34: Uid = 1000000; break; case 35: Uid = 1000000; break; case 36: Uid = 1000000; break; case 37: Uid = 1000000; break; case 38: Uid = 722118; break; case 39: Uid = 1000000; break; case 40: Uid = 1000000; break; case 41: Uid = 1000000; break; case 42: Uid = 1000000; break; case 43: Uid = 1000000; break; case 44: Uid = 1000000; break; case 45: Uid = 1000000; break; case 46: Uid = 1000000; break; case 47: Uid = 1000000; break; case 48: Uid = 1000000; break; case 49: Uid = 1000000; break; case 50: Uid = 1000000; break; case 51: Uid = 1000000; break; case 52: Uid = 1000000; break; case 53: Uid = 1000000; break; case 54: Uid = 1000000; break; case 55: Uid = 1000000; break; case 56: Uid = 1000000; break; case 57: Uid = 1000000; break; case 58: Uid = 1000000; break; case 59: Uid = 1000000; break; case 60: Uid = 1000000; break; case 61: Uid = 1000000; break; case 62: Uid = 1000000; break; case 63: Uid = 722118; break; case 64: Uid = 1000000; break; case 65: Uid = 1000000; break; case 66: Uid = 1000000; break; case 67: Uid = 1000000; break; case 68: Uid = 1000000; break; case 69: Uid = 1000000; break; case 70: Uid = 1000000; break; case 71: Uid = 1000000; break; case 72: Uid = 1000000; break; case 73: Uid = 1000000; break; case 74: Uid = 1000000; break; case 75: Uid = 1000000; break; case 76: Uid = 722118; break; case 77: Uid = 1000000; break; case 78: Uid = 1000000; break; case 79: Uid = 1000000; break; case 80: Uid = 1000000; break; case 81: Uid = 1000000; break; case 82: Uid = 1000000; break; case 83: Uid = 1000000; break; case 84: Uid = 1000000; break; case 85: Uid = 1000000; break; case 86: Uid = 1000000; break; case 87: Uid = 1000000; break; case 88: Uid = 1000000; break; case 89: Uid = 1000000; break; case 90: Uid = 722118; break; case 91: Uid = 1000000; break; case 92: Uid = 1000000; break; case 93: Uid = 1000000; break; case 94: Uid = 1000000; break; case 95: Uid = 1000000; break; case 96: Uid = 1000000; break; case 97: Uid = 1000000; break; case 98: Uid = 1000000; break; case 99: Uid = 1000000; break; case 100: Uid = 1000000; break; case 101: Uid = 1000000; break; case 102: Uid = 1000000; break; case 103: Uid = 1000000; break; case 104: Uid = 1000000; break; case 105: Uid = 1000000; break; case 106: Uid = 1000000; break; case 107: Uid = 1000000; break; case 108: Uid = 1000000; break; case 109: Uid = 1000000; break; case 110: Uid = 1000000; break; case 111: Uid = 1000000; break; case 112: Uid = 722118; break; case 113: Uid = 1000000; break; case 114: Uid = 1000000; break; case 115: Uid = 1000000; break; case 116: Uid = 1000000; break; case 117: Uid = 1000000; break; case 118: Uid = 1000000; break; case 119: Uid = 1000000; break; case 120: Uid = 1000000; break; case 121: Uid = 1000000; break; case 122: Uid = 1000000; break; case 123: Uid = 1000000; break; case 124: Uid = 1000000; break; case 125: Uid = 1000000; break; case 126: Uid = 1000000; break; case 127: Uid = 1000000; break; case 128: Uid = 1000000; break; case 129: Uid = 1000000; break; case 130: Uid = 1000000; break; case 131: Uid = 1000000; break; case 132: Uid = 1000000; break; case 133: Uid = 1000000; break; case 134: Uid = 1000000; break; case 135: Uid = 1000000; break; case 136: Uid = 1000000; break; case 137: Uid = 1000000; break; case 138: Uid = 1000000; break; case 139: Uid = 722118; break; case 140: Uid = 1000000; break; case 141: Uid = 1000000; break; case 142: Uid = 1000000; break; case 143: Uid = 1000000; break; case 144: Uid = 1000000; break; case 145: Uid = 1000000; break; case 146: Uid = 1000000; break; case 147: Uid = 1000000; break; case 148: Uid = 1000000; break; case 149: Uid = 722118; break; case 150: Uid = 1000000; break; case 151: Uid = 1000000; break; case 152: Uid = 1000000; break; case 153: Uid = 1000000; break; case 154: Uid = 1000000; break; case 155: Uid = 1000000; break; case 156: Uid = 1000000; break; case 157: Uid = 1000000; break; case 158: Uid = 1000000; break; case 159: Uid = 1000000; break; case 160: Uid = 1000000; break; case 161: Uid = 1000000; break; case 162: Uid = 722118; break; case 163: Uid = 1000000; break; case 164: Uid = 1000000; break; case 165: Uid = 1000000; break; case 166: Uid = 1000000; break; case 167: Uid = 1000000; break; case 168: Uid = 1000000; break; case 169: Uid = 1000000; break; case 170: Uid = 722118; break; case 171: Uid = 1000000; break; case 172: Uid = 1000000; break; case 173: Uid = 1000000; break; case 174: Uid = 1000000; break; case 175: Uid = 1000000; break; case 176: Uid = 1000000; break; case 177: Uid = 1000000; break; case 178: Uid = 1000000; break; case 179: Uid = 1000000; break; case 180: Uid = 1000000; break; case 181: Uid = 1000000; break; case 182: Uid = 722118; break; case 183: Uid = 1000000; break; case 184: Uid = 1000000; break; case 185: Uid = 1000000; break; case 186: Uid = 1000000; break; case 187: Uid = 1000000; break; case 188: Uid = 1000000; break; case 189: Uid = 1000000; break; case 190: Uid = 1000000; break; case 191: Uid = 1000000; break; case 192: Uid = 1000000; break; case 193: Uid = 722118; break; case 194: Uid = 1000000; break; case 195: Uid = 1000000; break; case 196: Uid = 1000000; break; case 197: Uid = 1000000; break; case 198: Uid = 1000000; break; case 199: Uid = 1000000; break; case 200: Uid = 1000000; break; } if (Uid != 0) { ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = (uint)Uid; floorItem.Item.MaximDurability = 65355; floorItem.Item.MobDropped = true; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)Uid; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } } } #endregion TC drop #region Ape drop if (Owner.MapID == 1020 && ServerBase.Kernel.PercentSuccess(200)) { uint Uid2 = 0; byte type2 = (byte)ServerBase.Kernel.Random.Next(1, 3); switch (type2) { case 1: Uid2 = 50; break; case 2: Uid2 = 100; break; } if (killer.DoubleExperienceTime > 0) { killer.ConquerPoints += Uid2; } else { uint Uid = 0; byte type = (byte)ServerBase.Kernel.Random.Next(1, 201); switch (type) { case 1: Uid = 1000000; break; case 2: Uid = 722112; break; case 3: Uid = 1000000; break; case 4: Uid = 1000000; break; case 5: Uid = 1000000; break; case 6: Uid = 1000000; break; case 7: Uid = 1000000; break; case 8: Uid = 1000000; break; case 9: Uid = 1000000; break; case 10: Uid = 1000000; break; case 11: Uid = 1000000; break; case 12: Uid = 1000000; break; case 13: Uid = 1000000; break; case 14: Uid = 722112; break; case 15: Uid = 1000000; break; case 16: Uid = 1000000; break; case 17: Uid = 1000000; break; case 18: Uid = 1000000; break; case 19: Uid = 1000000; break; case 20: Uid = 1000000; break; case 21: Uid = 1000000; break; case 22: Uid = 722112; break; case 23: Uid = 1000000; break; case 24: Uid = 1000000; break; case 25: Uid = 1000000; break; case 26: Uid = 1000000; break; case 27: Uid = 1000000; break; case 28: Uid = 1000000; break; case 29: Uid = 1000000; break; case 30: Uid = 1000000; break; case 31: Uid = 1000000; break; case 32: Uid = 1000000; break; case 33: Uid = 722112; break; case 34: Uid = 1000000; break; case 35: Uid = 1000000; break; case 36: Uid = 1000000; break; case 37: Uid = 1000000; break; case 38: Uid = 722112; break; case 39: Uid = 1000000; break; case 40: Uid = 1000000; break; case 41: Uid = 1000000; break; case 42: Uid = 1000000; break; case 43: Uid = 1000000; break; case 44: Uid = 1000000; break; case 45: Uid = 1000000; break; case 46: Uid = 1000000; break; case 47: Uid = 1000000; break; case 48: Uid = 1000000; break; case 49: Uid = 1000000; break; case 50: Uid = 1000000; break; case 51: Uid = 1000000; break; case 52: Uid = 1000000; break; case 53: Uid = 1000000; break; case 54: Uid = 1000000; break; case 55: Uid = 1000000; break; case 56: Uid = 1000000; break; case 57: Uid = 1000000; break; case 58: Uid = 1000000; break; case 59: Uid = 1000000; break; case 60: Uid = 1000000; break; case 61: Uid = 1000000; break; case 62: Uid = 1000000; break; case 63: Uid = 722112; break; case 64: Uid = 1000000; break; case 65: Uid = 1000000; break; case 66: Uid = 1000000; break; case 67: Uid = 1000000; break; case 68: Uid = 1000000; break; case 69: Uid = 1000000; break; case 70: Uid = 1000000; break; case 71: Uid = 1000000; break; case 72: Uid = 1000000; break; case 73: Uid = 1000000; break; case 74: Uid = 1000000; break; case 75: Uid = 1000000; break; case 76: Uid = 722112; break; case 77: Uid = 1000000; break; case 78: Uid = 1000000; break; case 79: Uid = 1000000; break; case 80: Uid = 1000000; break; case 81: Uid = 1000000; break; case 82: Uid = 1000000; break; case 83: Uid = 1000000; break; case 84: Uid = 1000000; break; case 85: Uid = 1000000; break; case 86: Uid = 1000000; break; case 87: Uid = 1000000; break; case 88: Uid = 1000000; break; case 89: Uid = 1000000; break; case 90: Uid = 722112; break; case 91: Uid = 1000000; break; case 92: Uid = 1000000; break; case 93: Uid = 1000000; break; case 94: Uid = 1000000; break; case 95: Uid = 1000000; break; case 96: Uid = 1000000; break; case 97: Uid = 1000000; break; case 98: Uid = 1000000; break; case 99: Uid = 1000000; break; case 100: Uid = 1000000; break; case 101: Uid = 1000000; break; case 102: Uid = 1000000; break; case 103: Uid = 1000000; break; case 104: Uid = 1000000; break; case 105: Uid = 1000000; break; case 106: Uid = 1000000; break; case 107: Uid = 1000000; break; case 108: Uid = 1000000; break; case 109: Uid = 1000000; break; case 110: Uid = 1000000; break; case 111: Uid = 1000000; break; case 112: Uid = 722112; break; case 113: Uid = 1000000; break; case 114: Uid = 1000000; break; case 115: Uid = 1000000; break; case 116: Uid = 1000000; break; case 117: Uid = 1000000; break; case 118: Uid = 1000000; break; case 119: Uid = 1000000; break; case 120: Uid = 1000000; break; case 121: Uid = 1000000; break; case 122: Uid = 1000000; break; case 123: Uid = 1000000; break; case 124: Uid = 1000000; break; case 125: Uid = 1000000; break; case 126: Uid = 1000000; break; case 127: Uid = 1000000; break; case 128: Uid = 1000000; break; case 129: Uid = 1000000; break; case 130: Uid = 1000000; break; case 131: Uid = 1000000; break; case 132: Uid = 1000000; break; case 133: Uid = 1000000; break; case 134: Uid = 1000000; break; case 135: Uid = 1000000; break; case 136: Uid = 1000000; break; case 137: Uid = 1000000; break; case 138: Uid = 1000000; break; case 139: Uid = 722112; break; case 140: Uid = 1000000; break; case 141: Uid = 1000000; break; case 142: Uid = 1000000; break; case 143: Uid = 1000000; break; case 144: Uid = 1000000; break; case 145: Uid = 1000000; break; case 146: Uid = 1000000; break; case 147: Uid = 1000000; break; case 148: Uid = 1000000; break; case 149: Uid = 722112; break; case 150: Uid = 1000000; break; case 151: Uid = 1000000; break; case 152: Uid = 1000000; break; case 153: Uid = 1000000; break; case 154: Uid = 1000000; break; case 155: Uid = 1000000; break; case 156: Uid = 1000000; break; case 157: Uid = 1000000; break; case 158: Uid = 1000000; break; case 159: Uid = 1000000; break; case 160: Uid = 1000000; break; case 161: Uid = 1000000; break; case 162: Uid = 722112; break; case 163: Uid = 1000000; break; case 164: Uid = 1000000; break; case 165: Uid = 1000000; break; case 166: Uid = 1000000; break; case 167: Uid = 1000000; break; case 168: Uid = 1000000; break; case 169: Uid = 1000000; break; case 170: Uid = 722112; break; case 171: Uid = 1000000; break; case 172: Uid = 1000000; break; case 173: Uid = 1000000; break; case 174: Uid = 1000000; break; case 175: Uid = 1000000; break; case 176: Uid = 1000000; break; case 177: Uid = 1000000; break; case 178: Uid = 1000000; break; case 179: Uid = 1000000; break; case 180: Uid = 1000000; break; case 181: Uid = 1000000; break; case 182: Uid = 722112; break; case 183: Uid = 1000000; break; case 184: Uid = 1000000; break; case 185: Uid = 1000000; break; case 186: Uid = 1000000; break; case 187: Uid = 1000000; break; case 188: Uid = 1000000; break; case 189: Uid = 1000000; break; case 190: Uid = 1000000; break; case 191: Uid = 1000000; break; case 192: Uid = 1000000; break; case 193: Uid = 722112; break; case 194: Uid = 1000000; break; case 195: Uid = 1000000; break; case 196: Uid = 1000000; break; case 197: Uid = 1000000; break; case 198: Uid = 1000000; break; case 199: Uid = 1000000; break; case 200: Uid = 1000000; break; } if (Uid != 0) { ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = (uint)Uid; floorItem.Item.MaximDurability = 65355; floorItem.Item.MobDropped = true; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)Uid; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } } } #endregion TC drop #region Desert drop if (Owner.MapID == 1000 && ServerBase.Kernel.PercentSuccess(200)) { uint Uid2 = 0; byte type2 = (byte)ServerBase.Kernel.Random.Next(1, 3); switch (type2) { case 1: Uid2 = 50; break; case 2: Uid2 = 100; break; } if (killer.DoubleExperienceTime > 0) { killer.ConquerPoints += Uid2; } else { uint Uid = 0; byte type = (byte)ServerBase.Kernel.Random.Next(1, 201); switch (type) { case 1: Uid = 1000000; break; case 2: Uid = 722113; break; case 3: Uid = 1000000; break; case 4: Uid = 1000000; break; case 5: Uid = 1000000; break; case 6: Uid = 1000000; break; case 7: Uid = 1000000; break; case 8: Uid = 1000000; break; case 9: Uid = 1000000; break; case 10: Uid = 1000000; break; case 11: Uid = 1000000; break; case 12: Uid = 1000000; break; case 13: Uid = 1000000; break; case 14: Uid = 722113; break; case 15: Uid = 1000000; break; case 16: Uid = 1000000; break; case 17: Uid = 1000000; break; case 18: Uid = 1000000; break; case 19: Uid = 1000000; break; case 20: Uid = 1000000; break; case 21: Uid = 1000000; break; case 22: Uid = 722113; break; case 23: Uid = 1000000; break; case 24: Uid = 1000000; break; case 25: Uid = 1000000; break; case 26: Uid = 1000000; break; case 27: Uid = 1000000; break; case 28: Uid = 1000000; break; case 29: Uid = 1000000; break; case 30: Uid = 1000000; break; case 31: Uid = 1000000; break; case 32: Uid = 1000000; break; case 33: Uid = 722113; break; case 34: Uid = 1000000; break; case 35: Uid = 1000000; break; case 36: Uid = 1000000; break; case 37: Uid = 1000000; break; case 38: Uid = 722113; break; case 39: Uid = 1000000; break; case 40: Uid = 1000000; break; case 41: Uid = 1000000; break; case 42: Uid = 1000000; break; case 43: Uid = 1000000; break; case 44: Uid = 1000000; break; case 45: Uid = 1000000; break; case 46: Uid = 1000000; break; case 47: Uid = 1000000; break; case 48: Uid = 1000000; break; case 49: Uid = 1000000; break; case 50: Uid = 1000000; break; case 51: Uid = 1000000; break; case 52: Uid = 1000000; break; case 53: Uid = 1000000; break; case 54: Uid = 1000000; break; case 55: Uid = 1000000; break; case 56: Uid = 1000000; break; case 57: Uid = 1000000; break; case 58: Uid = 1000000; break; case 59: Uid = 1000000; break; case 60: Uid = 1000000; break; case 61: Uid = 1000000; break; case 62: Uid = 1000000; break; case 63: Uid = 722113; break; case 64: Uid = 1000000; break; case 65: Uid = 1000000; break; case 66: Uid = 1000000; break; case 67: Uid = 1000000; break; case 68: Uid = 1000000; break; case 69: Uid = 1000000; break; case 70: Uid = 1000000; break; case 71: Uid = 1000000; break; case 72: Uid = 1000000; break; case 73: Uid = 1000000; break; case 74: Uid = 1000000; break; case 75: Uid = 1000000; break; case 76: Uid = 722113; break; case 77: Uid = 1000000; break; case 78: Uid = 1000000; break; case 79: Uid = 1000000; break; case 80: Uid = 1000000; break; case 81: Uid = 1000000; break; case 82: Uid = 1000000; break; case 83: Uid = 1000000; break; case 84: Uid = 1000000; break; case 85: Uid = 1000000; break; case 86: Uid = 1000000; break; case 87: Uid = 1000000; break; case 88: Uid = 1000000; break; case 89: Uid = 1000000; break; case 90: Uid = 722113; break; case 91: Uid = 1000000; break; case 92: Uid = 1000000; break; case 93: Uid = 1000000; break; case 94: Uid = 1000000; break; case 95: Uid = 1000000; break; case 96: Uid = 1000000; break; case 97: Uid = 1000000; break; case 98: Uid = 1000000; break; case 99: Uid = 1000000; break; case 100: Uid = 1000000; break; case 101: Uid = 1000000; break; case 102: Uid = 1000000; break; case 103: Uid = 1000000; break; case 104: Uid = 1000000; break; case 105: Uid = 1000000; break; case 106: Uid = 1000000; break; case 107: Uid = 1000000; break; case 108: Uid = 1000000; break; case 109: Uid = 1000000; break; case 110: Uid = 1000000; break; case 111: Uid = 1000000; break; case 112: Uid = 722113; break; case 113: Uid = 1000000; break; case 114: Uid = 1000000; break; case 115: Uid = 1000000; break; case 116: Uid = 1000000; break; case 117: Uid = 1000000; break; case 118: Uid = 1000000; break; case 119: Uid = 1000000; break; case 120: Uid = 1000000; break; case 121: Uid = 1000000; break; case 122: Uid = 1000000; break; case 123: Uid = 1000000; break; case 124: Uid = 1000000; break; case 125: Uid = 1000000; break; case 126: Uid = 1000000; break; case 127: Uid = 1000000; break; case 128: Uid = 1000000; break; case 129: Uid = 1000000; break; case 130: Uid = 1000000; break; case 131: Uid = 1000000; break; case 132: Uid = 1000000; break; case 133: Uid = 1000000; break; case 134: Uid = 1000000; break; case 135: Uid = 1000000; break; case 136: Uid = 1000000; break; case 137: Uid = 1000000; break; case 138: Uid = 1000000; break; case 139: Uid = 722113; break; case 140: Uid = 1000000; break; case 141: Uid = 1000000; break; case 142: Uid = 1000000; break; case 143: Uid = 1000000; break; case 144: Uid = 1000000; break; case 145: Uid = 1000000; break; case 146: Uid = 1000000; break; case 147: Uid = 1000000; break; case 148: Uid = 1000000; break; case 149: Uid = 722113; break; case 150: Uid = 1000000; break; case 151: Uid = 1000000; break; case 152: Uid = 1000000; break; case 153: Uid = 1000000; break; case 154: Uid = 1000000; break; case 155: Uid = 1000000; break; case 156: Uid = 1000000; break; case 157: Uid = 1000000; break; case 158: Uid = 1000000; break; case 159: Uid = 1000000; break; case 160: Uid = 1000000; break; case 161: Uid = 1000000; break; case 162: Uid = 722113; break; case 163: Uid = 1000000; break; case 164: Uid = 1000000; break; case 165: Uid = 1000000; break; case 166: Uid = 1000000; break; case 167: Uid = 1000000; break; case 168: Uid = 1000000; break; case 169: Uid = 1000000; break; case 170: Uid = 722113; break; case 171: Uid = 1000000; break; case 172: Uid = 1000000; break; case 173: Uid = 1000000; break; case 174: Uid = 1000000; break; case 175: Uid = 1000000; break; case 176: Uid = 1000000; break; case 177: Uid = 1000000; break; case 178: Uid = 1000000; break; case 179: Uid = 1000000; break; case 180: Uid = 1000000; break; case 181: Uid = 1000000; break; case 182: Uid = 722113; break; case 183: Uid = 1000000; break; case 184: Uid = 1000000; break; case 185: Uid = 1000000; break; case 186: Uid = 1000000; break; case 187: Uid = 1000000; break; case 188: Uid = 1000000; break; case 189: Uid = 1000000; break; case 190: Uid = 1000000; break; case 191: Uid = 1000000; break; case 192: Uid = 1000000; break; case 193: Uid = 722113; break; case 194: Uid = 1000000; break; case 195: Uid = 1000000; break; case 196: Uid = 1000000; break; case 197: Uid = 1000000; break; case 198: Uid = 1000000; break; case 199: Uid = 1000000; break; case 200: Uid = 1000000; break; } if (Uid != 0) { ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = (uint)Uid; floorItem.Item.MaximDurability = 65355; floorItem.Item.MobDropped = true; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)Uid; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } } } #endregion TC drop #region Bird drop if (Owner.MapID == 1015 && ServerBase.Kernel.PercentSuccess(200)) { uint Uid2 = 0; byte type2 = (byte)ServerBase.Kernel.Random.Next(1, 3); switch (type2) { case 1: Uid2 = 50; break; case 2: Uid2 = 100; break; } if (killer.DoubleExperienceTime > 0) { killer.ConquerPoints += Uid2; } else { uint Uid = 0; byte type = (byte)ServerBase.Kernel.Random.Next(1, 201); switch (type) { case 1: Uid = 1000000; break; case 2: Uid = 722114; break; case 3: Uid = 1000000; break; case 4: Uid = 1000000; break; case 5: Uid = 1000000; break; case 6: Uid = 1000000; break; case 7: Uid = 1000000; break; case 8: Uid = 1000000; break; case 9: Uid = 1000000; break; case 10: Uid = 1000000; break; case 11: Uid = 1000000; break; case 12: Uid = 1000000; break; case 13: Uid = 1000000; break; case 14: Uid = 722114; break; case 15: Uid = 1000000; break; case 16: Uid = 1000000; break; case 17: Uid = 1000000; break; case 18: Uid = 1000000; break; case 19: Uid = 1000000; break; case 20: Uid = 1000000; break; case 21: Uid = 1000000; break; case 22: Uid = 722114; break; case 23: Uid = 1000000; break; case 24: Uid = 1000000; break; case 25: Uid = 1000000; break; case 26: Uid = 1000000; break; case 27: Uid = 1000000; break; case 28: Uid = 1000000; break; case 29: Uid = 1000000; break; case 30: Uid = 1000000; break; case 31: Uid = 1000000; break; case 32: Uid = 1000000; break; case 33: Uid = 722114; break; case 34: Uid = 1000000; break; case 35: Uid = 1000000; break; case 36: Uid = 1000000; break; case 37: Uid = 1000000; break; case 38: Uid = 722114; break; case 39: Uid = 1000000; break; case 40: Uid = 1000000; break; case 41: Uid = 1000000; break; case 42: Uid = 1000000; break; case 43: Uid = 1000000; break; case 44: Uid = 1000000; break; case 45: Uid = 1000000; break; case 46: Uid = 1000000; break; case 47: Uid = 1000000; break; case 48: Uid = 1000000; break; case 49: Uid = 1000000; break; case 50: Uid = 1000000; break; case 51: Uid = 1000000; break; case 52: Uid = 1000000; break; case 53: Uid = 1000000; break; case 54: Uid = 1000000; break; case 55: Uid = 1000000; break; case 56: Uid = 1000000; break; case 57: Uid = 1000000; break; case 58: Uid = 1000000; break; case 59: Uid = 1000000; break; case 60: Uid = 1000000; break; case 61: Uid = 1000000; break; case 62: Uid = 1000000; break; case 63: Uid = 722114; break; case 64: Uid = 1000000; break; case 65: Uid = 1000000; break; case 66: Uid = 1000000; break; case 67: Uid = 1000000; break; case 68: Uid = 1000000; break; case 69: Uid = 1000000; break; case 70: Uid = 1000000; break; case 71: Uid = 1000000; break; case 72: Uid = 1000000; break; case 73: Uid = 1000000; break; case 74: Uid = 1000000; break; case 75: Uid = 1000000; break; case 76: Uid = 722114; break; case 77: Uid = 1000000; break; case 78: Uid = 1000000; break; case 79: Uid = 1000000; break; case 80: Uid = 1000000; break; case 81: Uid = 1000000; break; case 82: Uid = 1000000; break; case 83: Uid = 1000000; break; case 84: Uid = 1000000; break; case 85: Uid = 1000000; break; case 86: Uid = 1000000; break; case 87: Uid = 1000000; break; case 88: Uid = 1000000; break; case 89: Uid = 1000000; break; case 90: Uid = 722114; break; case 91: Uid = 1000000; break; case 92: Uid = 1000000; break; case 93: Uid = 1000000; break; case 94: Uid = 1000000; break; case 95: Uid = 1000000; break; case 96: Uid = 1000000; break; case 97: Uid = 1000000; break; case 98: Uid = 1000000; break; case 99: Uid = 1000000; break; case 100: Uid = 1000000; break; case 101: Uid = 1000000; break; case 102: Uid = 1000000; break; case 103: Uid = 1000000; break; case 104: Uid = 1000000; break; case 105: Uid = 1000000; break; case 106: Uid = 1000000; break; case 107: Uid = 1000000; break; case 108: Uid = 1000000; break; case 109: Uid = 1000000; break; case 110: Uid = 1000000; break; case 111: Uid = 1000000; break; case 112: Uid = 722114; break; case 113: Uid = 1000000; break; case 114: Uid = 1000000; break; case 115: Uid = 1000000; break; case 116: Uid = 1000000; break; case 117: Uid = 1000000; break; case 118: Uid = 1000000; break; case 119: Uid = 1000000; break; case 120: Uid = 1000000; break; case 121: Uid = 1000000; break; case 122: Uid = 1000000; break; case 123: Uid = 1000000; break; case 124: Uid = 1000000; break; case 125: Uid = 1000000; break; case 126: Uid = 1000000; break; case 127: Uid = 1000000; break; case 128: Uid = 1000000; break; case 129: Uid = 1000000; break; case 130: Uid = 1000000; break; case 131: Uid = 1000000; break; case 132: Uid = 1000000; break; case 133: Uid = 1000000; break; case 134: Uid = 1000000; break; case 135: Uid = 1000000; break; case 136: Uid = 1000000; break; case 137: Uid = 1000000; break; case 138: Uid = 1000000; break; case 139: Uid = 722114; break; case 140: Uid = 1000000; break; case 141: Uid = 1000000; break; case 142: Uid = 1000000; break; case 143: Uid = 1000000; break; case 144: Uid = 1000000; break; case 145: Uid = 1000000; break; case 146: Uid = 1000000; break; case 147: Uid = 1000000; break; case 148: Uid = 1000000; break; case 149: Uid = 722114; break; case 150: Uid = 1000000; break; case 151: Uid = 1000000; break; case 152: Uid = 1000000; break; case 153: Uid = 1000000; break; case 154: Uid = 1000000; break; case 155: Uid = 1000000; break; case 156: Uid = 1000000; break; case 157: Uid = 1000000; break; case 158: Uid = 1000000; break; case 159: Uid = 1000000; break; case 160: Uid = 1000000; break; case 161: Uid = 1000000; break; case 162: Uid = 722114; break; case 163: Uid = 1000000; break; case 164: Uid = 1000000; break; case 165: Uid = 1000000; break; case 166: Uid = 1000000; break; case 167: Uid = 1000000; break; case 168: Uid = 1000000; break; case 169: Uid = 1000000; break; case 170: Uid = 722114; break; case 171: Uid = 1000000; break; case 172: Uid = 1000000; break; case 173: Uid = 1000000; break; case 174: Uid = 1000000; break; case 175: Uid = 1000000; break; case 176: Uid = 1000000; break; case 177: Uid = 1000000; break; case 178: Uid = 1000000; break; case 179: Uid = 1000000; break; case 180: Uid = 1000000; break; case 181: Uid = 1000000; break; case 182: Uid = 722114; break; case 183: Uid = 1000000; break; case 184: Uid = 1000000; break; case 185: Uid = 1000000; break; case 186: Uid = 1000000; break; case 187: Uid = 1000000; break; case 188: Uid = 1000000; break; case 189: Uid = 1000000; break; case 190: Uid = 1000000; break; case 191: Uid = 1000000; break; case 192: Uid = 1000000; break; case 193: Uid = 722114; break; case 194: Uid = 1000000; break; case 195: Uid = 1000000; break; case 196: Uid = 1000000; break; case 197: Uid = 1000000; break; case 198: Uid = 1000000; break; case 199: Uid = 1000000; break; case 200: Uid = 1000000; break; } if (Uid != 0) { ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = (uint)Uid; floorItem.Item.MaximDurability = 65355; floorItem.Item.MobDropped = true; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)Uid; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } } } #endregion TC drop #endregion if (killer.Name.Contains("Guard")) { goto kimoz; } if (Owner.Name.Contains("Guard")) { return; } if (Name == "Naga") { { killer.DisKO += 1; killer.Owner.Send(new Message("Congratulations! You have got 1 Kill you have Now " + killer.DisKO + " DisKo Points", System.Drawing.Color.Azure, Message.Monster)); // return; } } if (ID == killer.kilid) { if (killer.Owner.Inventory.Contains(750000, 1)) { killer.Status4 += 1; } } if (ID == 83) { if (killer.kilid == 58) { if (killer.Owner.Inventory.Contains(750000, 1)) { killer.Status4 += 1; } } } if (ID == 8319) { if (killer.kilid == 58) { if (killer.Owner.Inventory.Contains(750000, 1)) { killer.Status4 += 1; } } } #region CPs 20 if (ServerBase.Kernel.Rate(100)) { killer.ConquerPoints += 100; killer.Owner.Send(new Network.GamePackets.Message("You have found 100 Cps ! BLackLisT ", System.Drawing.Color.Yellow, 2005)); } #endregion CPs 50 #region Error if (this.Name == "FireDevil(Error)") { uint Uid = 0; byte type = (byte)ServerBase.Kernel.Random.Next(1, 21); switch (type) { case 1: Uid = 722158; break; case 2: Uid = 722134; break; case 3: Uid = 722133; break; case 4: Uid = 722132; break; case 5: Uid = 722131; break; case 6: Uid = 722131; break; case 7: Uid = 722132; break; case 8: Uid = 722133; break; case 9: Uid = 722134; break; case 10: Uid = 722158; break; case 11: Uid = 721962; break; case 12: Uid = 722131; break; case 13: Uid = 722132; break; case 14: Uid = 722133; break; case 15: Uid = 722134; break; case 16: Uid = 722158; break; case 17: Uid = 722134; break; case 18: Uid = 722133; break; case 19: Uid = 722132; break; case 20: Uid = 722131; break; case 21: Uid = 721962; break; } killer.Owner.Inventory.Add(Uid, 0, 1); //killer.ConquerPoints += 100; //killer.SubClasses.StudyPoints += 100; ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + killer.Name + "Has Killed " + Owner.Name + "", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); } #endregion LavaBeast SwordMaster #region Error1 if (this.Name == "SkeletonA(Error)") { uint Uid = 0; byte type = (byte)ServerBase.Kernel.Random.Next(1, 21); switch (type) { case 1: Uid = 722316; break; case 2: Uid = 722316; break; case 3: Uid = 722316; break; case 4: Uid = 722316; break; case 5: Uid = 722316; break; case 6: Uid = 722316; break; case 7: Uid = 722316; break; case 8: Uid = 722316; break; case 9: Uid = 722316; break; case 10: Uid = 722316; break; case 11: Uid = 722316; break; case 12: Uid = 722316; break; case 13: Uid = 722316; break; case 14: Uid = 722317; break; case 15: Uid = 722317; break; case 16: Uid = 722317; break; case 17: Uid = 722318; break; case 18: Uid = 722318; break; case 19: Uid = 722319; break; case 20: Uid = 722319; break; case 21: Uid = 722320; break; } killer.Owner.Inventory.Add(Uid, 0, 1); //killer.ConquerPoints += 100; //killer.SubClasses.StudyPoints += 100; ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + killer.Name + "Has Killed " + Owner.Name + "", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); } #endregion LavaBeast SwordMaster if (Name == "ThrillingSpook") { { killer.ConquerPoints += Database.rates.ThrillingSpook; PhoenixProject.ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("Congratulations! " + killer.Name + " Has Killed ThrillingSpook and got " + Database.rates.ThrillingSpook + " cps!", System.Drawing.Color.IndianRed, 2600), PhoenixProject.ServerBase.Kernel.GamePool.Values); // return; } } if (Name == "LavaBeast") { { killer.SubClasses.StudyPoints += 20; killer.Owner.Send(new Message("Congratulations You have got 20 StudyPoints!", System.Drawing.Color.Red, Network.GamePackets.Message.study)); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("Congratulations! " + killer.Name + " Has Killed LavaBeast and got 20 StudyPoints!", System.Drawing.Color.White, 2600), PhoenixProject.ServerBase.Kernel.GamePool.Values); Data data = new Data(true); data.ID = Data.OpenCustom; data.UID = killer.Owner.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3179; data.wParam1 = killer.Owner.Entity.X; data.wParam2 = killer.Owner.Entity.Y; killer.Owner.Send(data); // return; } } if (Name == "Temptress") { { killer.DisKO += 1; killer.Owner.Send(new Message("Congratulations! You have got 1 Kill you have Now " + killer.DisKO + " DisKo Points", System.Drawing.Color.Azure, Message.Monster)); // return; } } if (Name == "Centicore") { { killer.DisKO += 1; killer.Owner.Send(new Message("Congratulations! You have got 1 Kill you have Now " + killer.DisKO + " DisKo Points", System.Drawing.Color.Azure, Message.Monster)); // return; } } if (Name == "DemonCave[1]") { { killer.DemonCave1 += 1; killer.Owner.Send(new Message("Congratulations! You have got 1 Kill you have Now " + killer.DemonCave1 + " Stage[1] Points", System.Drawing.Color.Azure, Message.Monster)); // return; } } if (Name == "DemonCave[2]") { { killer.DemonCave2 += 1; killer.Owner.Send(new Message("Congratulations! You have got 1 Kill you have Now " + killer.DemonCave2 + " Stage[2] Points", System.Drawing.Color.Azure, Message.Monster)); // return; } } if (Name == "DemonCave[3]") { { killer.DemonCave3 += 1; killer.Owner.Send(new Message("Congratulations! You have got 1 Kill you have Now " + killer.DemonCave3 + " Stage[3] Points", System.Drawing.Color.Azure, Message.Monster)); // return; } } if (Name == "HellTroll") { { killer.DisKO += 3; killer.Owner.Send(new Message("Congratulations! You have got 3 Kill you have Now " + killer.DisKO + " DisKo Points", System.Drawing.Color.Azure, Message.Monster)); // return; } } if (Name == "SnowBanshee") { { killer.Owner.Inventory.Add(723694, 0, 1); killer.ConquerPoints += Database.rates.SnowBanshe; killer.Owner.Send(new Message("Congratulations! " + killer.Name + " has defeated SnowBanshee in BirdIsland and got PermanentStone and " + Database.rates.SnowBanshe + " CPS!", System.Drawing.Color.Azure, Message.Monster)); // return; } } if (Name == "SwordMaster") { { uint randsouls = (uint)PhoenixProject.ServerBase.Kernel.Random.Next(1, (int)Database.DROP_SOULS.Count_souls); //Database.Monster.Souls[randsouls].item_id uint ItemID = Database.DROP_SOULS.Souls[randsouls].item_id; var infos = Database.ConquerItemInformation.BaseInformations[ItemID]; if (infos == null) return; ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = ItemID; floorItem.Item.MaximDurability = infos.Durability; floorItem.Item.Durability = (ushort)(ServerBase.Kernel.Random.Next(infos.Durability / 10)); if (!Network.PacketHandler.IsEquipment(ItemID) && infos.ConquerPointsWorth == 0) { floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = infos.StackSize; } floorItem.Item.MobDropped = true; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = ItemID; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Owner = killer.Owner; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } killer.Owner.Send(new Message("Congratulations! " + killer.Name + " has defeated SwordMaster in His/Her House and Dropped " + Database.ConquerItemInformation.BaseInformations[ItemID].Name + " !", System.Drawing.Color.Azure, Message.Monster)); // return; } } if (Name == "GoldenOctopus") { { killer.ConquerPoints += 20000; killer.Owner.Send(new Message("Congratulations! " + killer.Name + " has defeated GoldenOctopus in PirateSea Map and got 20,000 CPS!", System.Drawing.Color.Azure, Message.Monster)); /// return; } } if (Name == "TeratoDragon") { byte times = (byte)ServerBase.Kernel.Random.Next(1, 3); byte ref_times = (byte)ServerBase.Kernel.Random.Next(1, 6); for (byte i = 0; i < times; i++) { uint Uid = 0; byte type = (byte)ServerBase.Kernel.Random.Next(1, 50); switch (type) { case 1: Uid = 800320; break; case 2: Uid = 822054; break; case 3: Uid = 800110; break; case 4: Uid = 820056; break; case 5: Uid = 822056; break; case 6: Uid = 822057; break; case 7: Uid = 822053; break; case 8: Uid = 800019; break; case 9: Uid = 800050; break; case 10: Uid = 800015; break; case 11: Uid = 800090; break; case 12: Uid = 800513; break; case 13: Uid = 800017; break; case 14: Uid = 800071; break; case 15: Uid = 800016; break; case 16: Uid = 823051; break; case 17: Uid = 800130; break; case 18: Uid = 800140; break; case 19: Uid = 800141; break; case 20: Uid = 800200; break; case 21: Uid = 800310; break; case 22: Uid = 800014; break; case 23: Uid = 800214; break; case 24: Uid = 800230; break; case 25: Uid = 800414; break; case 26: Uid = 822052; break; case 27: Uid = 800420; break; case 28: Uid = 800401; break; case 29: Uid = 800512; break; case 30: Uid = 823043; break; case 31: Uid = 800514; break; case 32: Uid = 800520; break; case 33: Uid = 800521; break; case 34: Uid = 800613; break; case 35: Uid = 800614; break; case 36: Uid = 800615; break; case 37: Uid = 824001; break; case 38: Uid = 800617; break; case 39: Uid = 800720; break; case 40: Uid = 800721; break; case 41: Uid = 800070; break; case 42: Uid = 800723; break; case 43: Uid = 800724; break; case 44: Uid = 800018; break; case 45: Uid = 820001; break; case 46: Uid = 820052; break; case 47: Uid = 820053; break; case 48: Uid = 820054; break; case 49: Uid = 820055; break; case 50: Uid = 800722; break; } if (Uid != 0) { ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { killer.Owner.Inventory.Add(Uid, 0, 1); PhoenixProject.ServerBase.Kernel.SendWorldMessage(new PhoenixProject.Network.GamePackets.Message("Congratulations! " + killer.Name + " Has Defeated " + Name + " and dropped! " + Database.ConquerItemInformation.BaseInformations[Uid].Name + " and "+Database.rates.TeratoDragon+" CPS!", System.Drawing.Color.White, 2600), PhoenixProject.ServerBase.Kernel.GamePool.Values); killer.ConquerPoints += Database.rates.TeratoDragon; // return; } } } } kimoz: byte morepercent = 0; byte lessrate = 0; if (killer.VIPLevel > 0) morepercent = (byte)(killer.VIPLevel * 5); if (killer.Level <= 10 && killer.MapID == 1002) morepercent += 100; if (killer.VIPLevel != 6 && killer.Class >= 40 && killer.Class <= 45) lessrate = 3; if (killer.VIPLevel != 6 && killer.Level >= 132 && killer.ContainsFlag(Network.GamePackets.Update.Flags.ShurikenVortex)) lessrate = 3; if (ServerBase.Kernel.Rate(ServerBase.Constants.MoneyDropRate - lessrate + morepercent)) { uint amount = (uint)ServerBase.Kernel.Random.Next(1000, 5000); // amount *= ServerBase.Constants.MoneyDropMultiple; if (amount > 1000000) amount = 5000; if (amount == 0) return; /* if (killer.VIPLevel > 0) { int percent = 10; percent += killer.VIPLevel * 5 - 5; amount += (uint)(amount * percent / 100); } if (killer.VIPLevel > 4) { killer.Money += amount; goto next; }*/ uint ItemID = Network.PacketHandler.MoneyItemID(amount); ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Money; floorItem.Value = amount; floorItem.ItemID = ItemID; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } // next: if (ServerBase.Kernel.Rate(ServerBase.Constants.ConquerPointsDropRate - lessrate)) { // uint amount = (uint)ServerBase.Kernel.Random.Next((int)((Level / 4) * ServerBase.Constants.ConquerPointsDropMultiple), (int)((Level / 2) * ServerBase.Constants.ConquerPointsDropMultiple)); // if (amount == 0) // amount = 2; // if (amount > 300) // amount = 10; // amount /= 2; uint amount = (uint)Level /PhoenixProject.Database.rates.CpsMethodNum; if (amount < PhoenixProject.Database.rates.minicps) amount = PhoenixProject.Database.rates.minicps; if (amount > PhoenixProject.Database.rates.maxcps) amount = PhoenixProject.Database.rates.maxcps; // if (killer.VIPLevel > 4) // { if (killer != null && killer.Owner != null) { if (killer.Owner.Map.BaseID == 1354) { amount = PhoenixProject.Database.rates.maxcps; } } if (killer != null && killer.Owner != null) { //killer.Owner.Send(ServerBase.Constants.PickupConquerPoints(amount)); killer.ConquerPoints += (uint)amount; killer.Owner.Send(new Network.GamePackets.Message("You received " + amount + " ConquerPoints! for Kill " + Name + "", System.Drawing.Color.Red, Network.GamePackets.Message.TopLeft).ToArray()); // return; } // } #region CPBag //uint ItemID = 729911; //ushort X = Owner.X, Y = Owner.Y; //Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; //if (Map.SelectCoordonates(ref X, ref Y)) //{ // Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); // floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.ConquerPoints; // floorItem.Value = amount; // floorItem.ItemID = ItemID; // floorItem.MapID = Owner.MapID; // floorItem.MapObjType = Game.MapObjectType.Item; // floorItem.X = X; // floorItem.Y = Y; // floorItem.Type = Network.GamePackets.FloorItem.Drop; // floorItem.OnFloor = Time32.Now; // floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; // while (Map.Npcs.ContainsKey(floorItem.UID)) // floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; // Map.AddFloorItem(floorItem); // SendScreenSpawn(floorItem); //} #endregion } else if (ServerBase.Kernel.Rate(OwnItemRate + morepercent) && OwnItemID != 0) { if (killer.VIPLevel > 6) { if (killer.Owner.Inventory.Count <= 39) { killer.Owner.Inventory.Add((uint)OwnItemID, 0, 1); //return; } } var infos = Database.ConquerItemInformation.BaseInformations[(uint)OwnItemID]; ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = (uint)OwnItemID; floorItem.Item.MaximDurability = infos.Durability; if (!Network.PacketHandler.IsEquipment(OwnItemID) && infos.ConquerPointsWorth == 0) { floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = infos.StackSize; } floorItem.Item.MobDropped = true; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)OwnItemID; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Owner = killer.Owner; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } else if (ServerBase.Kernel.Rate(ServerBase.Constants.ItemDropRate + morepercent)) { int quality = 3; for (int count = 0; count < 5; count++) { int rate = int.Parse(ServerBase.Constants.ItemDropQualityRates[count]); if (ServerBase.Kernel.Rate(rate, 1000)) { quality = count + 5; break; } } int times = 50; byte lvl = Owner.Level; if (LabirinthDrop) lvl = 20; List<uint> itemdroplist = ItemDropCache[lvl]; if (Boss) itemdroplist = SoulItemCache[lvl]; retry: times--; int generateItemId = ServerBase.Kernel.Random.Next(itemdroplist.Count); uint id = itemdroplist[generateItemId]; if (!Boss) { if (Database.ConquerItemInformation.BaseInformations[id].Level > 121 && times > 0) goto retry; id = (id / 10) * 10 + (uint)quality; } if (!Database.ConquerItemInformation.BaseInformations.ContainsKey(id)) { id = itemdroplist[generateItemId]; } if (killer.VIPLevel > 6) { if (killer.Owner.Inventory.Count <= 39) { if (id % 10 > 7) { killer.Owner.Inventory.Add(id, 0, 1); return; } } } var infos = Database.ConquerItemInformation.BaseInformations[id]; ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = id; floorItem.Item.MaximDurability = infos.Durability; if (quality >= 6) floorItem.Item.Durability = (ushort)(infos.Durability - ServerBase.Kernel.Random.Next(500)); else floorItem.Item.Durability = (ushort)(ServerBase.Kernel.Random.Next(infos.Durability / 10)); if (!Network.PacketHandler.IsEquipment(id) && infos.ConquerPointsWorth == 0) { floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = infos.StackSize; } floorItem.Item.MobDropped = true; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = id; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.Owner = killer.Owner; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } else if (ServerBase.Kernel.Rate(20 + morepercent)) { if (HPPotionID == 0) return; var infos = Database.ConquerItemInformation.BaseInformations[(uint)HPPotionID]; ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = (uint)HPPotionID; floorItem.Item.MobDropped = true; floorItem.Item.MaximDurability = infos.Durability; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; if (!Network.PacketHandler.IsEquipment(HPPotionID)) { floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = infos.StackSize; } floorItem.ItemID = (uint)HPPotionID; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.Owner = killer.Owner; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } else if (ServerBase.Kernel.Rate(20 + morepercent)) { if (MPPotionID == 0) return; var infos = Database.ConquerItemInformation.BaseInformations[(uint)MPPotionID]; ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = (uint)MPPotionID; floorItem.Item.MaximDurability = infos.Durability; floorItem.Item.MobDropped = true; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; if (!Network.PacketHandler.IsEquipment(MPPotionID)) { floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = infos.StackSize; } floorItem.ItemID = (uint)MPPotionID; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.Owner = killer.Owner; floorItem.ItemColor = floorItem.Item.Color; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } else { foreach (SpecialItemDrop sitem in SpecialItemDropList) { if (sitem.Map != 0 && Owner.MapID != sitem.Map) continue; if (ServerBase.Kernel.Rate(sitem.Rate + morepercent, sitem.Discriminant)) { if (killer.VIPLevel > 6) { if (killer.Owner.Inventory.Count <= 39) { killer.Owner.Inventory.Add((uint)sitem.ItemID, 0, 1); return; } } var infos = Database.ConquerItemInformation.BaseInformations[(uint)sitem.ItemID]; ushort X = Owner.X, Y = Owner.Y; Game.Map Map = ServerBase.Kernel.Maps[Owner.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = new Network.GamePackets.ConquerItem(true); floorItem.Item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = (uint)sitem.ItemID; floorItem.Item.MaximDurability = infos.Durability; floorItem.Item.MobDropped = true; if (!Network.PacketHandler.IsEquipment(sitem.ItemID) && infos.ConquerPointsWorth == 0) { floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = infos.StackSize; } floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)sitem.ItemID; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X; floorItem.Y = Y; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.ItemColor = floorItem.Item.Color; floorItem.Owner = killer.Owner; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); break; } } } } }
static void ChangePKMode(Data generalData, Client.GameState client) { client.Entity.AttackPacket = null; client.Entity.PKMode = (Game.Enums.PKMode)(byte)generalData.dwParam; client.Send(generalData); if (client.Entity.PKMode == Game.Enums.PKMode.PK) { client.Send(new Message("Free PK mode. You can attack monster and all players.", System.Drawing.Color.Red, Message.Talk)); return; } if (client.Entity.PKMode == Game.Enums.PKMode.Capture) { client.Send(new Message("Capture PK mode. You can only attack monsters, black-name and blue-name players.", System.Drawing.Color.Red, Message.Talk)); return; } if (client.Entity.PKMode == Game.Enums.PKMode.Peace) { client.Send(new Message("Peace mode. You can only attack monsters.", System.Drawing.Color.Red, Message.Talk)); return; } if (client.Entity.PKMode == Game.Enums.PKMode.Team) { client.Send(new Message("Team PK mode. You can attack monster and all players except your teammates.", System.Drawing.Color.Red, Message.Talk)); return; } }
static void LoginMessages(Client.GameState client) { if (client.WentToComplete) return; Data datas = new Data(true); datas.UID = client.Entity.UID; datas.ID = 116; datas.dwParam = 1197; client.Send(datas); client.SocketDisposed = false; // client.Send(Unknown2078Packet.Create(0x4f999eba)); // client.TimeStamps.LoggedInTime = DateTime.Now; client.Send(new byte[] { 8, 0, 0x1f, 8, 0, 0, 0, 0, 0x54, 0x51, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72 }); client.Send(new byte[] { 0x1c, 1, 0x25, 4, 0, 0, 0x22, 0, 0x7a, 3, 0, 0, 0, 0, 0, 0, 0xb2, 2, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x8a, 2, 0, 0, 0, 0, 0, 0, 0x5b, 3, 0, 0, 0xff, 0xff, 0xff, 0xff, 90, 3, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x59, 3, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x58, 3, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x57, 3, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x56, 3, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x55, 3, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x54, 3, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x53, 3, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x52, 3, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x57, 2, 0, 0, 0, 0, 0, 0, 0x56, 2, 0, 0, 0, 0, 0, 0, 0x55, 2, 0, 0, 0, 0, 0, 0, 0x54, 2, 0, 0, 0, 0, 0, 0, 0x53, 2, 0, 0, 0, 0, 0, 0, 0x52, 2, 0, 0, 0, 0, 0, 0, 0x51, 2, 0, 0, 0, 0, 0, 0, 80, 2, 0, 0, 0, 0, 0, 0, 0x4f, 2, 0, 0, 0, 0, 0, 0, 0x4e, 2, 0, 0, 0, 0, 0, 0, 0xf3, 1, 0, 0, 0, 0, 0, 0, 0xf2, 1, 0, 0, 0, 0, 0, 0, 0xf1, 1, 0, 0, 0, 0, 0, 0, 240, 1, 0, 0, 0, 0, 0, 0, 0xef, 1, 0, 0, 0, 0, 0, 0, 0xee, 1, 0, 0, 0, 0, 0, 0, 0xed, 1, 0, 0, 0, 0, 0, 0, 0xec, 1, 0, 0, 0, 0, 0, 0, 0xeb, 1, 0, 0, 0, 0, 0, 0, 0xea, 1, 0, 0, 0, 0, 0, 0, 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x54, 0x51, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72 }); client.Send(new byte[] { 60, 0, 0x7e, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x54, 0x51, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72 }); client.Send(new byte[] { 60, 0, 0x7e, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x54, 0x51, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72 }); client.Send(new byte[] { 0x54, 0, 0x20, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x54, 0x51, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72 }); DateTime time2 = new DateTime(0x7b2, 1, 1); TimeSpan span = (TimeSpan)(client.Entity.LastLogin - time2.ToLocalTime()); uint num = (uint)span.TotalSeconds - 3600; // uint num = (uint)client.Entity.LastLogin.ToFileTime(); if (num == 0) { DateTime time3 = new DateTime(0x7b2, 1, 1); TimeSpan span3 = (TimeSpan)(DateTime.Now - time3.ToLocalTime()); num = (uint)span3.TotalSeconds - 3600; } LastLogin login = new LastLogin { TotalSeconds = num, Type = ((client.Account.IP != string.Empty) && (client.Account.IP != client.Account.OldIP)) ? PhoenixProject.Network.GamePackets.LastLogin.LastLoginTypes.DifferentCity : PhoenixProject.Network.GamePackets.LastLogin.LastLoginTypes.LastLogin, Unknown = 1 }; client.Send((byte[])login); if (client.Spells.ContainsKey(3050)) { if (client.Entity.SecondRebornClass == 15 && client.Entity.FirstRebornClass == 15) { // client.AddSpell(new Spell(true) { ID = 3050 }); } else { if (client.Entity.SecondRebornClass == 15 && client.Entity.Class >= 10 && client.Entity.Class <= 15) { // client.AddSpell(new Spell(true) { ID = 3050 }); } else { if (client.Entity.FirstRebornClass == 15 && client.Entity.Class >= 10 && client.Entity.Class <= 15) { // client.AddSpell(new Spell(true) { ID = 3050 }); } else { client.RemoveSpell(new Spell(true) { ID = 3050 }); } } } } if (client.Spells.ContainsKey(11100)) { if (client.Entity.SecondRebornClass == 75 && client.Entity.FirstRebornClass == 75) { // client.AddSpell(new Spell(true) { ID = 3050 }); } else { if (client.Entity.SecondRebornClass == 75 && client.Entity.Class >= 70 && client.Entity.Class <= 75) { // client.AddSpell(new Spell(true) { ID = 3050 }); } else { if (client.Entity.FirstRebornClass == 75 && client.Entity.Class >= 70 && client.Entity.Class <= 75) { // client.AddSpell(new Spell(true) { ID = 3050 }); } else { client.RemoveSpell(new Spell(true) { ID = 11100 }); } } } } if (client.Spells.ContainsKey(11050)) { if (client.Spells[11050].Level > 0) { client.RemoveSpell(new Spell(true) { ID = 11050 }); client.AddSpell(new Spell(true) { ID = 11050 }); } } if (client.Entity.Class >= 50 && client.Entity.Class <= 55) { if (!client.Spells.ContainsKey(11230)) { client.AddSpell(new Spell(true) { ID = 11230 }); } } else { if (client.Spells.ContainsKey(11230)) { client.RemoveSpell(new Spell(true) { ID = 11230 }); } } if (client.Entity.Class >= 142 && client.Entity.Class <= 145 && client.Entity.FirstRebornClass == 145 && client.Entity.SecondRebornClass == 145) { if (!client.Spells.ContainsKey(10310)) { client.AddSpell(new Spell(true) { ID = 10310 }); } } else { if (client.Spells.ContainsKey(10310)) { client.RemoveSpell(new Spell(true) { ID = 10310 }); } } if (client.Entity.Class >= 132 && client.Entity.Class <= 135 && client.Entity.FirstRebornClass == 135 && client.Entity.SecondRebornClass == 135) { if (!client.Spells.ContainsKey(30000)) { client.AddSpell(new Spell(true) { ID = 30000 }); } } else { if (client.Spells.ContainsKey(30000)) { client.RemoveSpell(new Spell(true) { ID = 30000 }); } } if (client.Entity.Class >= 70 && client.Entity.Class <= 75 && client.Entity.FirstRebornClass == 75 && client.Entity.SecondRebornClass == 75) { if (!client.Spells.ContainsKey(11040)) { client.AddSpell(new Spell(true) { ID = 11040 }); } } else { if (client.Spells.ContainsKey(11040)) { client.RemoveSpell(new Spell(true) { ID = 11040 }); } } if (client.Entity.Class >= 50 && client.Entity.Class <= 55 && client.Entity.FirstRebornClass <= 55 && client.Entity.FirstRebornClass >= 50 && client.Entity.SecondRebornClass <= 55 && client.Entity.SecondRebornClass >= 50) { if (!client.Spells.ContainsKey(6003)) { client.AddSpell(new Spell(true) { ID = 6003 }); } } else { if (client.Spells.ContainsKey(6003)) { client.RemoveSpell(new Spell(true) { ID = 6003 }); } } if (client.Entity.Class >= 60 && client.Entity.Class <= 65 && client.Entity.FirstRebornClass <= 65 && client.Entity.FirstRebornClass >= 60 && client.Entity.SecondRebornClass <= 65 && client.Entity.SecondRebornClass >= 60) { if (!client.Spells.ContainsKey(10405)) { client.AddSpell(new Spell(true) { ID = 10405 }); } } else { if (client.Spells.ContainsKey(10405)) { client.RemoveSpell(new Spell(true) { ID = 10405 }); } } if (client.Entity.Class >= 40 && client.Entity.Class <= 45 && client.Entity.FirstRebornClass <= 45 && client.Entity.FirstRebornClass >= 40 && client.Entity.SecondRebornClass <= 45 && client.Entity.SecondRebornClass >= 40) { if (!client.Spells.ContainsKey(10313)) { client.AddSpell(new Spell(true) { ID = 10313 }); } } else { if (client.Spells.ContainsKey(10313)) { client.RemoveSpell(new Spell(true) { ID = 10313 }); } } if (client.Entity.Class >= 20 && client.Entity.Class <= 25 && client.Entity.FirstRebornClass <= 25 && client.Entity.FirstRebornClass >= 20 && client.Entity.SecondRebornClass <= 25 && client.Entity.SecondRebornClass >= 20) { if (!client.Spells.ContainsKey(10311)) { client.AddSpell(new Spell(true) { ID = 10311 }); } } else { if (client.Spells.ContainsKey(10311)) { client.RemoveSpell(new Spell(true) { ID = 10311 }); } } if (client.Entity.Class >= 10 && client.Entity.Class <= 15 && client.Entity.FirstRebornClass <= 15 && client.Entity.FirstRebornClass >= 10 && client.Entity.SecondRebornClass <= 15 && client.Entity.SecondRebornClass >= 10) { if (!client.Spells.ContainsKey(10315)) { client.AddSpell(new Spell(true) { ID = 10315 }); } } else { if (client.Spells.ContainsKey(10315)) { client.RemoveSpell(new Spell(true) { ID = 10315 }); } } if (client.Entity.Class >= 40 && client.Entity.Class <= 45) { if (client.Spells.ContainsKey(1025)) { client.RemoveSpell(new Spell(true) { ID = 1025 });//SuperMan } } if (client.Entity.Class >= 142 && client.Entity.Class <= 145) { if (client.Spells.ContainsKey(6002)) { client.RemoveSpell(new Spell(true) { ID = 6002 });//PiosnStar } } client.WentToComplete = true; client.Entity.SendUpdates = true; foreach (Interfaces.IConquerItem item in client.Inventory.Objects) { item.Send(client); } foreach (Interfaces.IConquerItem item in client.Equipment.Objects) if (item != null) { if (Database.ConquerItemInformation.BaseInformations.ContainsKey(item.ID)) { item.Send(client); ItemUsage usage = new ItemUsage(true) { ID = ItemUsage.EquipItem }; usage.UID = item.UID; usage.dwParam = item.Position; client.Send(usage); client.LoadItemStats(client.Entity); client.CalculateStatBonus(); client.CalculateHPBonus(); } else { client.Equipment.DestroyArrow(item.Position); } } client.LoadItemStats(client.Entity); client.CalculateStatBonus(); client.CalculateHPBonus(); client.Equipment.UpdateEntityPacket(); ClientEquip equips = new ClientEquip(); equips.DoEquips(client); client.Send(equips); foreach (var Guild in ServerBase.Kernel.Guilds.Values) { Guild.SendName(client); } if (client.Entity.ClanId != 0 && client.Entity.ClanRank != 0 && client.Entity.ClanName != "") { if (client.Entity.Myclan != null) { Network.GamePackets.Clan cl = new PhoenixProject.Network.GamePackets.Clan(client, 1); client.Send(cl.ToArray()); } } ServerTime time = new ServerTime(); time.Year = (uint)DateTime.Now.Year; time.Month = (uint)DateTime.Now.Month; time.DayOfYear = (uint)DateTime.Now.DayOfYear; time.DayOfMonth = (uint)DateTime.Now.Day; time.Hour = (uint)DateTime.Now.Hour; time.Minute = (uint)DateTime.Now.Minute; time.Second = (uint)DateTime.Now.Second; client.Send(time); client.Entity.DoubleExperienceTime = (ushort)(client.Entity.DoubleExperienceTime + (1 - 1)); client.Entity.HeavenBlessing = (ushort)(client.Entity.HeavenBlessing + (1 - 1)); if (client.Mentor != null) { if (client.Mentor.IsOnline) { MentorInformation Information = new MentorInformation(true); Information.Mentor_Type = 1; Information.Mentor_ID = client.Mentor.Client.Entity.UID; Information.Apprentice_ID = client.Entity.UID; Information.Enrole_Date = client.Mentor.EnroleDate; Information.Mentor_Level = client.Mentor.Client.Entity.Level; Information.Mentor_Class = client.Mentor.Client.Entity.Class; Information.Mentor_PkPoints = client.Mentor.Client.Entity.PKPoints; Information.Mentor_Mesh = client.Mentor.Client.Entity.Mesh; Information.Mentor_Online = true; Information.Shared_Battle_Power = (uint)(((client.Mentor.Client.Entity.BattlePower - client.Mentor.Client.Entity.ExtraBattlePower) - (client.Entity.BattlePower - client.Entity.ExtraBattlePower)) / 3.3F); Information.String_Count = 3; Information.Mentor_Name = client.Mentor.Client.Entity.Name; Information.Apprentice_Name = client.Entity.Name; Information.Mentor_Spouse_Name = client.Mentor.Client.Entity.Spouse; client.ReviewMentor(); client.Send(Information); ApprenticeInformation AppInfo = new ApprenticeInformation(); AppInfo.Apprentice_ID = client.Entity.UID; AppInfo.Apprentice_Level = client.Entity.Level; AppInfo.Apprentice_Class = client.Entity.Class; AppInfo.Apprentice_PkPoints = client.Entity.PKPoints; AppInfo.Apprentice_Experience = client.AsApprentice.Actual_Experience; AppInfo.Apprentice_Composing = client.AsApprentice.Actual_Plus; AppInfo.Apprentice_Blessing = client.AsApprentice.Actual_HeavenBlessing; AppInfo.Apprentice_Name = client.Entity.Name; AppInfo.Apprentice_Online = true; AppInfo.Apprentice_Spouse_Name = client.Entity.Spouse; AppInfo.Enrole_date = client.Mentor.EnroleDate; AppInfo.Mentor_ID = client.Mentor.ID; AppInfo.Mentor_Mesh = client.Mentor.Client.Entity.Mesh; AppInfo.Mentor_Name = client.Mentor.Name; AppInfo.Type = 2; client.Mentor.Client.Send(AppInfo); } else { MentorInformation Information = new MentorInformation(true); Information.Mentor_Type = 1; Information.Mentor_ID = client.Mentor.ID; Information.Apprentice_ID = client.Entity.UID; Information.Enrole_Date = client.Mentor.EnroleDate; Information.Mentor_Online = false; Information.String_Count = 2; Information.Mentor_Name = client.Mentor.Name; Information.Apprentice_Name = client.Entity.Name; client.Send(Information); } } NobilityInfo update = new NobilityInfo(true); update.Type = NobilityInfo.Icon; update.dwParam = client.NobilityInformation.EntityUID; update.UpdateString(client.NobilityInformation); client.Send(update); client.Entity.Update(Update.Merchant, 255, false); foreach (Interfaces.IConquerItem item in client.Inventory.Objects) item.Send(client); foreach (Interfaces.IConquerItem item in client.Equipment.Objects) if (item != null) { if (Database.ConquerItemInformation.BaseInformations.ContainsKey(item.ID)) { item.Send(client); //kimoSystem.Threading.Thread.Sleep(1); // item.Send(client); } else { client.Equipment.DestroyArrow(item.Position); Console.WriteLine("Announcement: Item have been removed because of invalid info. UID: " + item.UID + ". OWNER: " + client.Entity.Name); } } client.LoadItemStats(client.Entity); client.CalculateStatBonus(); client.CalculateHPBonus(); if (!client.Equipment.Free(5)) { if (IsArrow(client.Equipment.TryGetItem(5).ID)) { if (client.Equipment.Free(4)) client.Equipment.DestroyArrow(5); else { client.Equipment.Remove(5); } } } client.GemAlgorithm(); client.CalculateStatBonus(); client.CalculateHPBonus(); client.Entity.Stamina = 100; client.Send(new Message(String.Format( "Welcome in " + PhoenixProject.Database.rates.servername + " - Legends Return Season III", client.Entity.Name, client.Entity.LastLogin.ToLongDateString().Replace('-', ' '), client.Entity.LastLogin.ToLongTimeString()), System.Drawing.Color.Red, Message.Service)); client.Entity.UpdateEffects(true); // client.Send(new Message("Welcome in "+Database.rates.servername+"", System.Drawing.Color.Red, Message.Middle)); if (client.Entity.VIPLevel > 0) { Network.GamePackets.VipStatus vip = new Network.GamePackets.VipStatus(); client.Send(vip.ToArray()); } client.Send(new MapStatus() { BaseID = (ushort)client.Map.BaseID, ID = (uint)client.Map.ID, Status = Database.MapsTable.MapInformations[client.Map.ID].Status, Weather = Database.MapsTable.MapInformations[client.Map.ID].Weather }); if (client.Entity.Hitpoints == 0) client.Entity.Hitpoints = 1; client.Entity.VIPLevel = (byte)(client.Entity.VIPLevel + 0); client.Entity.HandleTiming = true; if (client.Entity.GuildSharedBp != 0) client.Entity.Update(Network.GamePackets.Update.GuildShareBP, client.Entity.GuildSharedBp, false); if (client.Entity.ExtraBattlePower != 0) client.Entity.Update(Network.GamePackets.Update.ExtraBattlePower, client.Entity.ExtraBattlePower, false); if (client.Guild != null) client.Guild.SendAllyAndEnemy(client); if (Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID > 2) client.Send(new Network.GamePackets.Message(Game.ConquerStructures.Broadcast.CurrentBroadcast.Message, "ALLUSERS", Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityName, System.Drawing.Color.Red, Network.GamePackets.Message.BroadcastMessage)); client.Entity.Update(Network.GamePackets.Update.LuckyTimeTimer, (byte)client.BlessTime, false); if (client.Entity.HeavenBlessing != 0) client.Entity.Update(Network.GamePackets.Update.OnlineTraining, client.OnlineTrainingPoints, false); if (client.ClaimableItem.Count > 0) foreach (var item in client.ClaimableItem.Values) item.Send(client); if (client.DeatinedItem.Count > 0) foreach (var item in client.DeatinedItem.Values) item.Send(client); if (client.ItemGive == true) { client.Inventory.Add(1001010, 0, 5); if (client.Entity.Class != 70) { client.Inventory.AddandWear(132008, 0, 1, client); } else { client.Inventory.AddandWear(132008, 0, 1, client); } if (client.Entity.Class == 10 || client.Entity.Class == 20) { client.Inventory.AddandWear(410301, 0, 1, client); } if (client.Entity.Class >= 100) { client.Inventory.AddandWear(421301, 0, 1, client); } if (client.Entity.Class == 70) { client.Inventory.AddandWear(611301, 0, 1, client); } if (client.Entity.Class == 60) { client.Inventory.AddandWear(610301, 0, 1, client); } if (client.Entity.Class == 50) { client.Inventory.AddandWear(601301, 0, 1, client); } if (client.Entity.Class == 40) { client.Inventory.AddandWear(500301, 0, 1, client); } client.ItemGive = false; } client.Entity.RacePoints = client.Entity.RacePoints; send1136(client); client.Equipment.UpdateEntityPacket(); }
static void HandleBuyFromNPC(ItemUsage itemUsage, Client.GameState client) { if (client.Trade.InTrade) return; if (client.Entity.MapID == 3031) return; if (itemUsage == null) return; if (client == null) return; Interfaces.INpc npc = null; if (client.Map.Npcs.TryGetValue(itemUsage.UID, out npc) || itemUsage.UID == 2888 || itemUsage.UID == 6000) { Interfaces.IConquerItem _ExistingItem; Database.ConquerItemInformation iteminfo = new PhoenixProject.Database.ConquerItemInformation(itemUsage.dwParam, 0); if (client.Inventory.Count == 40 && !client.Inventory.Contains(iteminfo.BaseInformation.ID, iteminfo.BaseInformation.StackSize, out _ExistingItem)) return; if (itemUsage.UID != 2888 && itemUsage.UID != 6000) if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, npc.X, npc.Y) > 17) return; Database.ShopFile.Shop shop = new PhoenixProject.Database.ShopFile.Shop(); if (Database.ShopFile.Shops.TryGetValue(itemUsage.UID, out shop)) { if (shop.UID == 0) return; if (shop.UID != 6000 && shop.UID != 6001) { if (!shop.Items.Contains(itemUsage.dwParam)) { Console.WriteLine("Error! Cannot puchase item ID: " + itemUsage.dwParam + " from shop ID: " + itemUsage.UID); return; } } else { if (shop.UID == 6000) { if (!shop.HonorShopItems.ContainsKey(itemUsage.dwParam)) { return; } } else { if (shop.UID == 6001) { if (!shop.SteedShops.ContainsKey(itemUsage.dwParam)) { return; } } } } uint Amount = itemUsage.dwExtraInfo > 0 ? itemUsage.dwExtraInfo : 1; Interfaces.IConquerItem item = new ConquerItem(true); switch (shop.MoneyType) { case Database.ShopFile.MoneyType.HonorPoints: { Database.ShopFile.Shop.HonorShopItem hshopi; if (shop.HonorShopItems.TryGetValue(itemUsage.dwParam, out hshopi)) { if (client.ArenaStatistic != null) { if (client.Inventory.Count <= 39) { if (client.ArenaStatistic.CurrentHonor >= hshopi.cost) { Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true); newItem.ID = itemUsage.dwParam; Database.ConquerItemBaseInformation ibi; if (Database.ConquerItemInformation.BaseInformations.TryGetValue(newItem.ID, out ibi)) { if (ibi.Durability > 0) { newItem.Durability = ibi.Durability; newItem.MaximDurability = ibi.Durability; } } client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); client.ArenaStatistic.CurrentHonor -= hshopi.cost; client.ArenaStatistic.Send(client); } else client.Send(new Message("You do not have enough Honor Points", Color.Red, Message.TopLeft)); } else client.Send(new Message("You do not have enough space in your inventory", Color.Red, Message.TopLeft)); } } else client.Send(new Message("Can not find this item", Color.Red, Message.TopLeft)); break; } case Database.ShopFile.MoneyType.RaceShop: { Database.ShopFile.Shop.SteedShop hshopi; if (shop.SteedShops.TryGetValue(itemUsage.dwParam, out hshopi)) { if (client.Entity.RacePoints >= hshopi.cost) { if (client.Inventory.Count <= 39) { if (client.Entity.RacePoints >= hshopi.cost) { Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true); newItem.ID = itemUsage.dwParam; Database.ConquerItemBaseInformation ibi; if (Database.ConquerItemInformation.BaseInformations.TryGetValue(newItem.ID, out ibi)) { if (ibi.Durability > 0) { newItem.Durability = ibi.Durability; newItem.MaximDurability = ibi.Durability; } } client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd); Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); client.Entity.RacePoints -= hshopi.cost; } else client.Send(new Message("You do not have enough Race Points", Color.Red, Message.TopLeft)); } else client.Send(new Message("You do not have enough space in your inventory", Color.Red, Message.TopLeft)); } } else client.Send(new Message("Can not find this item", Color.Red, Message.TopLeft)); break; } case PhoenixProject.Database.ShopFile.MoneyType.Gold: { if (iteminfo.BaseInformation.GoldWorth * Amount > client.Entity.Money) return; if (client.Entity.Money - (iteminfo.BaseInformation.GoldWorth * Amount) > client.Entity.Money) return; item.ID = itemUsage.dwParam; item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability; item.Color = (PhoenixProject.Game.Enums.Color)3; uint NewAmount = itemUsage.dwExtraInfo > 0 ? itemUsage.dwExtraInfo : 1; while (NewAmount > 0) { if (client.Inventory.Contains(iteminfo.BaseInformation.ID, iteminfo.BaseInformation.StackSize, out _ExistingItem)) { if (_ExistingItem.StackSize == 0) _ExistingItem.StackSize = 1; ushort _StackCount = iteminfo.BaseInformation.StackSize; _StackCount -= (ushort)_ExistingItem.StackSize; if (_StackCount >= NewAmount) _StackCount = (ushort)NewAmount; _ExistingItem.StackSize += _StackCount; Database.ConquerItemTable.UpdateStack(_ExistingItem); _ExistingItem.Mode = Game.Enums.ItemMode.Update; _ExistingItem.Send(client); _ExistingItem.Mode = Game.Enums.ItemMode.Default; NewAmount -= _StackCount; Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); //uint _TotalItemStacks = Math.Min(1, (itemUsage.dwExtraInfo / iteminfo.BaseInformation.StackSize)); } else { if (iteminfo.BaseInformation.StackSize > 1 && itemUsage.dwExtraInfo > 1) { item = new ConquerItem(true); item.ID = itemUsage.dwParam; item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability; item.Color = (PhoenixProject.Game.Enums.Color)3; ushort _StackCount = iteminfo.BaseInformation.StackSize; if (NewAmount <= iteminfo.BaseInformation.StackSize) _StackCount = (ushort)NewAmount; item.StackSize = (ushort)_StackCount; client.Inventory.Add(item, Game.Enums.ItemUse.CreateAndAdd); Database.ConquerItemTable.UpdateStack(item); NewAmount -= _StackCount; Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } else { item = new ConquerItem(true); item.ID = itemUsage.dwParam; item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability; item.Color = (PhoenixProject.Game.Enums.Color)3; item.StackSize = 1; client.Inventory.Add(item, Game.Enums.ItemUse.CreateAndAdd); NewAmount--; Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } } } client.Entity.Money -= (iteminfo.BaseInformation.GoldWorth * Amount); //if (Amount > 1 && canMakeStack) //{ // item.StackSize = (ushort)Amount > 5 ? (ushort)5 : (ushort)Amount; // item.MaxStackSize = 5; // Amount -= (uint)item.StackSize - 1; // Database.ConquerItemTable.UpdateStack(item); //} //client.Inventory.Add(item, Game.Enums.ItemUse.CreateAndAdd); //if (client.Inventory.ContainsUID(item.UID)) // if (canMakeStack) // client.Entity.Money -= iteminfo.BaseInformation.GoldWorth * Amount; // else // client.Entity.Money -= iteminfo.BaseInformation.GoldWorth; // //Database.EntityTable.UpdateMoney(client); break; } case PhoenixProject.Database.ShopFile.MoneyType.ConquerPoints: { if (itemUsage.dwExtraInfo3 == 1) { if (iteminfo.BaseInformation.ConquerPointsWorth * Amount > client.Entity.ConquerPoints) return; if (client.Entity.ConquerPoints - (iteminfo.BaseInformation.ConquerPointsWorth * Amount) > client.Entity.ConquerPoints) return; item.ID = itemUsage.dwParam; if (item.ID % 730000 <= 12) item.Plus = (Byte)(item.ID % 730000); item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability; uint NewAmount = itemUsage.dwExtraInfo > 0 ? itemUsage.dwExtraInfo : 1; while (NewAmount > 0) { if (client.Inventory.Contains(iteminfo.BaseInformation.ID, iteminfo.BaseInformation.StackSize, out _ExistingItem)) { if (_ExistingItem.StackSize == 0) _ExistingItem.StackSize = 1; ushort _StackCount = iteminfo.BaseInformation.StackSize; _StackCount -= (ushort)_ExistingItem.StackSize; if (_StackCount >= NewAmount) _StackCount = (ushort)NewAmount; _ExistingItem.StackSize += _StackCount; Database.ConquerItemTable.UpdateStack(_ExistingItem); _ExistingItem.Mode = Game.Enums.ItemMode.Update; _ExistingItem.Send(client); _ExistingItem.Mode = Game.Enums.ItemMode.Default; NewAmount -= _StackCount; Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); //uint _TotalItemStacks = Math.Min(1, (itemUsage.dwExtraInfo / iteminfo.BaseInformation.StackSize)); } else { if (iteminfo.BaseInformation.StackSize > 1 && itemUsage.dwExtraInfo > 1) { item = new ConquerItem(true); item.ID = itemUsage.dwParam; item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability; item.Color = (PhoenixProject.Game.Enums.Color)3; ushort _StackCount = iteminfo.BaseInformation.StackSize; if (NewAmount <= iteminfo.BaseInformation.StackSize) _StackCount = (ushort)NewAmount; item.StackSize = (ushort)_StackCount; client.Inventory.Add(item, Game.Enums.ItemUse.CreateAndAdd); Database.ConquerItemTable.UpdateStack(item); NewAmount -= _StackCount; Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } else { item = new ConquerItem(true); item.ID = itemUsage.dwParam; item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability; item.Color = (PhoenixProject.Game.Enums.Color)3; item.StackSize = 1; if (item.ID == 730001) { item.Plus = 1; } if (item.ID == 730002) { item.Plus = 2; } if (item.ID == 730003) { item.Plus = 3; } if (item.ID == 730004) { item.Plus = 4; } if (item.ID == 730005) { item.Plus = 5; } if (item.ID == 730006) { item.Plus = 6; } if (item.ID == 730007) { item.Plus = 7; } if (item.ID == 730008) { item.Plus = 8; } if (item.ID == 730009) { item.Plus = 9; } client.Inventory.Add(item, Game.Enums.ItemUse.CreateAndAdd); NewAmount--; Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } } } client.Entity.ConquerPoints -= (iteminfo.BaseInformation.ConquerPointsWorth * Amount); break; } else { ushort postion = ItemPosition(itemUsage.dwParam); if (ServerBase.Constants.AllowedBound.Contains(itemUsage.dwParam) || postion == ConquerItem.LeftWeaponAccessory || postion == ConquerItem.Garment) { if (iteminfo.BaseInformation.ConquerPointsWorth * Amount > client.Entity.BConquerPoints) return; if (client.Entity.BConquerPoints - (iteminfo.BaseInformation.ConquerPointsWorth * Amount) > client.Entity.BConquerPoints) return; item.ID = itemUsage.dwParam; if (item.ID % 730000 <= 12) item.Plus = (Byte)(item.ID % 730000); item.Color = (PhoenixProject.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability; item.Bound = true; uint NewAmount = itemUsage.dwExtraInfo > 0 ? itemUsage.dwExtraInfo : 1; while (NewAmount > 0) { if (client.Inventory.Contains(iteminfo.BaseInformation.ID, iteminfo.BaseInformation.StackSize, out _ExistingItem)) { if (_ExistingItem.StackSize == 0) _ExistingItem.StackSize = 1; ushort _StackCount = iteminfo.BaseInformation.StackSize; _StackCount -= (ushort)_ExistingItem.StackSize; if (_StackCount >= NewAmount) _StackCount = (ushort)NewAmount; _ExistingItem.StackSize += _StackCount; Database.ConquerItemTable.UpdateStack(_ExistingItem); _ExistingItem.Mode = Game.Enums.ItemMode.Update; _ExistingItem.Send(client); _ExistingItem.Mode = Game.Enums.ItemMode.Default; NewAmount -= _StackCount; Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); //uint _TotalItemStacks = Math.Min(1, (itemUsage.dwExtraInfo / iteminfo.BaseInformation.StackSize)); } else { if (iteminfo.BaseInformation.StackSize > 1 && itemUsage.dwExtraInfo > 1) { item = new ConquerItem(true); item.ID = itemUsage.dwParam; item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability; item.Color = (PhoenixProject.Game.Enums.Color)3; ushort _StackCount = iteminfo.BaseInformation.StackSize; if (NewAmount <= iteminfo.BaseInformation.StackSize) _StackCount = (ushort)NewAmount; item.StackSize = (ushort)_StackCount; if (item.ID == 730001) { item.Plus = 1; } if (item.ID == 730002) { item.Plus = 2; } if (item.ID == 730003) { item.Plus = 3; } if (item.ID == 730004) { item.Plus = 4; } if (item.ID == 730005) { item.Plus = 5; } if (item.ID == 730006) { item.Plus = 6; } if (item.ID == 730007) { item.Plus = 7; } if (item.ID == 730008) { item.Plus = 8; } if (item.ID == 730009) { item.Plus = 9; } client.Inventory.Add(item, Game.Enums.ItemUse.CreateAndAdd); Database.ConquerItemTable.UpdateStack(item); NewAmount -= _StackCount; Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } else { item = new ConquerItem(true); item.ID = itemUsage.dwParam; item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability; item.Color = (PhoenixProject.Game.Enums.Color)3; item.StackSize = 1; if (item.ID == 730001) { item.Plus = 1; } if (item.ID == 730002) { item.Plus = 2; } if (item.ID == 730003) { item.Plus = 3; } if (item.ID == 730004) { item.Plus = 4; } if (item.ID == 730005) { item.Plus = 5; } if (item.ID == 730006) { item.Plus = 6; } if (item.ID == 730007) { item.Plus = 7; } if (item.ID == 730008) { item.Plus = 8; } if (item.ID == 730009) { item.Plus = 9; } client.Inventory.Add(item, Game.Enums.ItemUse.CreateAndAdd); NewAmount--; Data data = new Data(true); data.ID = GamePackets.Data.OpenCustom; data.UID = client.Entity.UID; data.TimeStamp = Time32.Now; data.dwParam = 3382; data.wParam1 = client.Entity.X; data.wParam2 = client.Entity.Y; client.Send(data); } } } client.Entity.BConquerPoints -= (iteminfo.BaseInformation.ConquerPointsWorth * Amount); itemUsage.dwParam = 1; client.Send(itemUsage); } else { itemUsage.dwParam = 0; client.Send(itemUsage); } break; } } } Amount--; } } }
static void ObserveEquipment2(Data generalData, Client.GameState client) { if (NulledClient(client)) return; Client.GameState pclient = null; if (Kernel.GamePool.TryGetValue(generalData.dwParam, out pclient)) { byte[] array = new byte[pclient.Entity.SpawnPacket.Length]; pclient.Entity.SpawnPacket.CopyTo(array, 0); array[0x6d] = 0; client.Send(array); pclient.Send(new Message(client.Entity.Name + " is observing your gear carefully.", System.Drawing.Color.Red, Message.TopLeft)); client.Send(WindowStats(pclient)); if (!pclient.AlternateEquipment) { for (Byte pos = (Byte)Positions.Head; pos <= (Byte)Positions.SteedTalisman; pos++) { Interfaces.IConquerItem i = pclient.Equipment.TryGetItem((Byte)pos); BoothItem2 view = new BoothItem2(); view.CostType = BoothItem2.CostTypes.ViewEquip; view.Identifier = pclient.Entity.UID; view.Position = (Positions)pos; if (i != null) view.ParseItem(i); client.Send(view); if (i != null) { i.SendExtras(client); } } } else { for (Byte pos = (Byte)Positions.AttackTalisman; pos <= (Byte)Positions.AltGarment; pos++) { Interfaces.IConquerItem i = pclient.Equipment.TryGetItem((Byte)pos); BoothItem2 view = new BoothItem2(); view.CostType = BoothItem2.CostTypes.ViewEquip; view.Identifier = pclient.Entity.UID; view.Position = (Positions)pos; if (i != null) view.ParseItem(i); client.Send(view); if (i != null) { i.SendExtras(client); } } } _String packet = new _String(true); packet.Type = 16; packet.UID = client.Entity.UID; packet.TextsCount = 1; packet.Texts = new List<string>() { pclient.Entity.Spouse }; client.Send(packet); packet.Type = 10; client.Send(packet); client.Send(generalData); //Console.WriteLine("k i m o" + generalData.dwParam + ""); } }
void WontAdd(PhoenixProject.Game.Enums.SkillIDs S) { Network.GamePackets.Data data = new Data(true); data.UID = _client.Entity.UID; data.dwParam = (byte)S; data.ID = 109; data.Send(_client); Interfaces.ISkill New = new Network.GamePackets.Spell(true); New.ID = (ushort)S; New.Level = 0; New.Experience = 0; New.PreviousLevel = 0; RemoveSkill.Add(New.ID, New); }
private void Execute() { #region interactions if (attack != null) { switch (attack.AttackType) { case (uint)Network.GamePackets.Attack.InteractionRequest: new InteractionRequest(attack, attacker); return; case (uint)Network.GamePackets.Attack.InteractionEffect: new InteractionEffect(attack, attacker); return; case (uint)Network.GamePackets.Attack.InteractionAccept: new InteractionAccept(attack, attacker); return; case (uint)Network.GamePackets.Attack.InteractionRefuse: new InteractionRefuse(attack, attacker); return; case (uint)Network.GamePackets.Attack.InteractionStopEffect: new InteractionStopEffect(attack, attacker); return; } } #endregion #region Monster -> Player \ Monster if (attack == null) { if (attacker.EntityFlag != EntityFlag.Monster) return; if (attacker.Companion) { if (ServerBase.Constants.PKForbiddenMaps.Contains(attacker.MapID)) return; } if (attacked.EntityFlag == EntityFlag.Player) { if (!attacked.Owner.Attackable) return; if (attacked.Dead && attacker.MonsterInfo.SpellID != 1050) return; if (attacker.MonsterInfo.SpellID == 0)// from this bracket to the next die delay replce this with urs { attack = new Attack(true); attack.Effect1 = Attack.AttackEffects1.None; uint damage = Calculate.Melee(attacker, attacked, ref attack); attack.Attacker = attacker.UID; attack.Attacked = attacked.UID; attack.AttackType = Attack.Melee; attack.Damage = damage; attack.X = attacked.X; attack.Y = attacked.Y; BlessEffect.Effect(attacked); if (attacked.EntityFlag == EntityFlag.Player) { if (attacked.Action == Enums.ConquerAction.Sit) if (attacked.Stamina > 20) attacked.Stamina -= 20; else attacked.Stamina = 0; attacked.Action = Enums.ConquerAction.None; //Console.WriteLine("ssS"); } if (attacked.Hitpoints <= damage) { attacked.Owner.SendScreen(attack, true); attacked.Die(attacker); } else { attacked.Hitpoints -= damage; attacked.Owner.SendScreen(attack, true); } } else { SpellUse suse = new SpellUse(true); attack = new Attack(true); attack.Effect1 = Attack.AttackEffects1.None; uint damage = Calculate.Magic(attacker, attacked, attacker.MonsterInfo.SpellID, 0, ref attack); suse.Effect1 = attack.Effect1; if (attacked.EntityFlag == EntityFlag.Player) { if (attacked.Action == Enums.ConquerAction.Sit) if (attacked.Stamina > 20) attacked.Stamina -= 20; else attacked.Stamina = 0; attacked.Action = Enums.ConquerAction.None; //Console.WriteLine("ssS"); } if (attacked.Hitpoints <= damage) { attacked.Die(attacker); } else { attacked.Hitpoints -= damage; } if (attacker.Companion) attacker.Owner.IncreaseExperience(Math.Min(damage, attacked.Hitpoints), true); suse.Attacker = attacker.UID; suse.SpellID = attacker.MonsterInfo.SpellID; suse.X = attacked.X; suse.Y = attacked.Y; suse.Targets.Add(attacked.UID, damage); attacked.Owner.SendScreen(suse, true); } } else { if (attacker.MonsterInfo.SpellID == 0) { attack = new Attack(true); attack.Effect1 = Attack.AttackEffects1.None; uint damage = Calculate.Melee(attacker, attacked, ref attack); attack.Attacker = attacker.UID; attack.Attacked = attacked.UID; attack.AttackType = Attack.Melee; attack.Damage = damage; attack.X = attacked.X; attack.Y = attacked.Y; attacked.MonsterInfo.SendScreen(attack); if (attacker.Companion) if (damage > attacked.Hitpoints) attacker.Owner.IncreaseExperience(Math.Min(damage, attacked.Hitpoints), true); else attacker.Owner.IncreaseExperience(damage, true); if (attacked.Hitpoints <= damage) { attacked.Die(attacker); attack = new Attack(true); attack.Attacker = attacker.UID; attack.Attacked = attacked.UID; attack.AttackType = Network.GamePackets.Attack.Kill; attack.X = attacked.X; attack.Y = attacked.Y; attacked.MonsterInfo.SendScreen(attack); } else { attacked.Hitpoints -= damage; } } else { SpellUse suse = new SpellUse(true); if (attack != null) attack.Effect1 = Attack.AttackEffects1.None; uint damage = Calculate.Magic(attacker, attacked, attacker.MonsterInfo.SpellID, 0, ref attack); if (attack != null) suse.Effect1 = attack.Effect1; suse.Attacker = attacker.UID; suse.SpellID = attacker.MonsterInfo.SpellID; suse.X = attacked.X; suse.Y = attacked.Y; suse.Targets.Add(attacked.UID, damage); attacked.MonsterInfo.SendScreen(suse); if (attacker.Companion) if (damage > attacked.Hitpoints) attacker.Owner.IncreaseExperience(Math.Min(damage, attacked.Hitpoints), true); else attacker.Owner.IncreaseExperience(damage, true); if (attacked.Hitpoints <= damage) { attacked.Die(attacker); attack = new Attack(true); attack.Attacker = attacker.UID; attack.Attacked = attacked.UID; attack.AttackType = Network.GamePackets.Attack.Kill; attack.X = attacked.X; attack.Y = attacked.Y; attacked.MonsterInfo.SendScreen(attack); } else { attacked.Hitpoints -= damage; } } } } #endregion #region Player -> Player \ Monster \ Sob Npc else { #region Merchant if (attack.AttackType == Attack.MerchantAccept || attack.AttackType == Attack.MerchantRefuse) { attacker.AttackPacket = null; return; } #endregion #region Marriage if (attack.AttackType == Attack.MarriageAccept || attack.AttackType == Attack.MarriageRequest) { if (attack.AttackType == Attack.MarriageRequest) { Client.GameState Spouse = null; uint takeout = attack.Attacked; if (takeout == attacker.UID) takeout = attack.Attacker; if (ServerBase.Kernel.GamePool.TryGetValue(takeout, out Spouse)) { if (attacker.Spouse != "None" || Spouse.Entity.Spouse != "None") { attacker.Owner.Send(new Message("You cannot marry someone that is already married with someone else!", System.Drawing.Color.Black, Message.TopLeft)); } else { uint id1 = attacker.Mesh % 10, id2 = Spouse.Entity.Mesh % 10; if (id1 <= 2 && id2 >= 3 || id1 >= 2 && id2 <= 3) { attack.X = Spouse.Entity.X; attack.Y = Spouse.Entity.Y; Spouse.Send(attack); } else { attacker.Owner.Send(new Message("You cannot marry someone of your gender!", System.Drawing.Color.Black, Message.TopLeft)); } } } } else { Client.GameState Spouse = null; if (ServerBase.Kernel.GamePool.TryGetValue(attack.Attacked, out Spouse)) { if (attacker.Spouse != "None" || Spouse.Entity.Spouse != "None") { attacker.Owner.Send(new Message("You cannot marry someone that is already married with someone else!", System.Drawing.Color.Black, Message.TopLeft)); } else { if (attacker.Mesh % 10 <= 2 && Spouse.Entity.Mesh % 10 >= 3 || attacker.Mesh % 10 >= 3 && Spouse.Entity.Mesh % 10 <= 2) { Spouse.Entity.Spouse = attacker.Name; attacker.Spouse = Spouse.Entity.Name; Message message = null; if (Spouse.Entity.Mesh % 10 >= 3) message = new Message("Joy and happiness! " + Spouse.Entity.Name + " and " + attacker.Name + " have joined together in the holy marriage. We wish them a stone house.", System.Drawing.Color.BurlyWood, Message.Center); else message = new Message("Joy and happiness! " + attacker.Name + " and " + attacker.Spouse + " have joined together in the holy marriage. We wish them a stone house.", System.Drawing.Color.BurlyWood, Message.Center); foreach (Client.GameState client in ServerBase.Kernel.GamePool.Values) { client.Send(message); } Spouse.Entity.Update(_String.Effect, "firework-2love", true); attacker.Update(_String.Effect, "firework-2love", true); } else { attacker.Owner.Send(new Message("You cannot marry someone of your gender!", System.Drawing.Color.Black, Message.TopLeft)); } } } } } #endregion #region Attacking else { attacker.Owner.Attackable = true; Entity attacked = null; SobNpcSpawn attackedsob = null; #region Checks if (attack.Attacker != attacker.UID) return; if (attacker.EntityFlag != EntityFlag.Player) return; attacker.RemoveFlag(Update.Flags.Invisibility); bool pass = false; if (attack.AttackType == Attack.Melee) { if (attacker.OnFatalStrike()) { if (attack.Attacked < 600000) { pass = true; } } } ushort decrease = 0; if (attacker.OnCyclone()) decrease = 1; if (attacker.OnSuperman()) decrease = 300; if (!pass) { int milliSeconds = 1000 - attacker.Agility - decrease; if (milliSeconds < 0 || milliSeconds > 5000) milliSeconds = 0; if (Time32.Now < attacker.AttackStamp.AddMilliseconds(milliSeconds)) return; } if (attacker.Dead) { if (attacker.AttackPacket != null) attacker.AttackPacket = null; return; } attacker.AttackStamp = Time32.Now; if (attacker.Owner.QualifierGroup != null) { if (Time32.Now < attacker.Owner.QualifierGroup.CreateTime.AddSeconds(12)) { return; } } restart: #region Extract attack information ushort SpellID = 0, X = 0, Y = 0; uint Target = 0; if (attack.AttackType == Attack.Magic) { if (!attack.Decoded) { #region GetSkillID SpellID = Convert.ToUInt16(((long)attack.ToArray()[24] & 0xFF) | (((long)attack.ToArray()[25] & 0xFF) << 8)); SpellID ^= (ushort)0x915d; SpellID ^= (ushort)attacker.UID; SpellID = (ushort)(SpellID << 0x3 | SpellID >> 0xd); SpellID -= 0xeb42; #endregion #region GetCoords X = (ushort)((attack.ToArray()[16] & 0xFF) | ((attack.ToArray()[17] & 0xFF) << 8)); X = (ushort)(X ^ (uint)(attacker.UID & 0xffff) ^ 0x2ed6); X = (ushort)(((X << 1) | ((X & 0x8000) >> 15)) & 0xffff); X = (ushort)((X | 0xffff0000) - 0xffff22ee); Y = (ushort)((attack.ToArray()[18] & 0xFF) | ((attack.ToArray()[19] & 0xFF) << 8)); Y = (ushort)(Y ^ (uint)(attacker.UID & 0xffff) ^ 0xb99b); Y = (ushort)(((Y << 5) | ((Y & 0xF800) >> 11)) & 0xffff); Y = (ushort)((Y | 0xffff0000) - 0xffff8922); #endregion #region GetTarget Target = ((uint)attack.ToArray()[12] & 0xFF) | (((uint)attack.ToArray()[13] & 0xFF) << 8) | (((uint)attack.ToArray()[14] & 0xFF) << 16) | (((uint)attack.ToArray()[15] & 0xFF) << 24); Target = ((((Target & 0xffffe000) >> 13) | ((Target & 0x1fff) << 19)) ^ 0x5F2D2463 ^ attacker.UID) - 0x746F4AE6; #endregion attack.X = X; attack.Y = Y; attack.Damage = SpellID; attack.Attacked = Target; attack.Decoded = true; } else { X = attack.X; Y = attack.Y; SpellID = (ushort)attack.Damage; Target = attack.Attacked; } } #endregion #endregion if (attacker.ContainsFlag(Update.Flags.Ride) && attacker.Owner.Equipment.TryGetItem(18) == null) { if (attack.AttackType != Attack.Magic) attacker.RemoveFlag(Update.Flags.Ride); else if (!(SpellID == 7003 || SpellID == 7002)) attacker.RemoveFlag(Update.Flags.Ride); } if (attacker.ContainsFlag(Update.Flags.CastPray)) attacker.RemoveFlag(Update.Flags.CastPray); if (attacker.ContainsFlag(Update.Flags.Praying)) attacker.RemoveFlag(Update.Flags.Praying); #region Dash if (SpellID == 1051) { if (ServerBase.Kernel.GetDistance(attack.X, attack.Y, attacker.X, attacker.Y) > 4) { attacker.Owner.Disconnect(); return; } attacker.X = attack.X; attacker.Y = attack.Y; ushort x = attacker.X, y = attacker.Y; Game.Map.UpdateCoordonatesForAngle(ref x, ref y, (Enums.ConquerAngle)Target); for (int c = 0; c < attacker.Owner.Screen.Objects.Count; c++) { if (c >= attacker.Owner.Screen.Objects.Count) break; //List<IMapObject> list = new List<IMapObject>(); IMapObject obj = attacker.Owner.Screen.Objects[c]; if (obj == null) continue; if (obj.X == x && obj.Y == y && (obj.MapObjType == MapObjectType.Monster || obj.MapObjType == MapObjectType.Player)) { Entity entity = obj as Entity; if (!entity.Dead) { Target = obj.UID; break; } } } } #endregion #region CounterKill if (attack.AttackType == Attack.CounterKillSwitch) { if (attacked != null) if (attacked.ContainsFlag(Update.Flags.Fly)) { attacker.AttackPacket = null; return; } if (attacker != null) if (attacker.ContainsFlag(Update.Flags.Fly)) { attacker.AttackPacket = null; return; } if (attacker.Owner.Spells.ContainsKey(6003)) { if (!attacker.CounterKillSwitch) { if (Time32.Now >= attacker.CounterKillStamp.AddSeconds(30)) { attacker.CounterKillStamp = Time32.Now; attacker.CounterKillSwitch = true; Attack m_attack = new Attack(true); m_attack.Attacked = attacker.UID; m_attack.Attacker = attacker.UID; m_attack.AttackType = Attack.CounterKillSwitch; m_attack.Damage = 1; m_attack.X = attacker.X; m_attack.Y = attacker.Y; m_attack.Send(attacker.Owner); } } else { attacker.CounterKillSwitch = false; Attack m_attack = new Attack(true); m_attack.Attacked = attacker.UID; m_attack.Attacker = attacker.UID; m_attack.AttackType = Attack.CounterKillSwitch; m_attack.Damage = 0; m_attack.X = attacker.X; m_attack.Y = attacker.Y; m_attack.Send(attacker.Owner); } attacker.Owner.IncreaseSpellExperience(100, 6003); attacker.AttackPacket = null; } } #endregion #region Melee else if (attack.AttackType == Attack.Melee) { if (attacker.Owner.Screen.TryGetValue(attack.Attacked, out attacked)) { if (!attacker.Owner.AlternateEquipment) { CheckForExtraWeaponPowers(attacker.Owner, attacked); } else { CheckForExtraWeaponPowers2(attacker.Owner, attacked); } if (!CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee)) return; pass = false; if (attacker.OnFatalStrike()) { if (attacked.EntityFlag == EntityFlag.Monster) { pass = true; } } ushort range = attacker.AttackRange; if (attacker.Transformed) range = (ushort)attacker.TransformationAttackRange; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= range || pass) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); attack.Damage = damage; if (attacker.OnFatalStrike()) { if (attacked.EntityFlag == EntityFlag.Monster) { if (!attacker.Owner.AlternateEquipment) { bool can = false; if (!attacker.Owner.Equipment.Free((byte)ConquerItem.RightWeapon)) if (attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.RightWeapon).ID / 1000 == 601) can = true; if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) if (attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.LeftWeapon).ID / 1000 == 601) can = true; if (!attacker.Owner.Equipment.Free((byte)ConquerItem.RightWeapon)) if (attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.RightWeapon).ID / 1000 == 511) can = true; if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) if (attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.LeftWeapon).ID / 1000 == 511) can = true; if (!can) return; ushort x = attacked.X; ushort y = attacked.Y; Map.UpdateCoordonatesForAngle(ref x, ref y, ServerBase.Kernel.GetAngle(attacked.X, attacked.Y, attacker.X, attacker.Y)); attacker.Shift(x, y); attack.X = x; attack.Y = y; attack.AttackType = Attack.FatalStrike; } else { bool can = false; if (!attacker.Owner.Equipment.Free((byte)ConquerItem.AltRightHand)) if (attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.AltRightHand).ID / 1000 == 601) can = true; if (!attacker.Owner.Equipment.Free((byte)ConquerItem.AltLeftHand)) if (attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.AltLeftHand).ID / 1000 == 601) can = true; if (!attacker.Owner.Equipment.Free((byte)ConquerItem.AltRightHand)) if (attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.AltRightHand).ID / 1000 == 511) can = true; if (!attacker.Owner.Equipment.Free((byte)ConquerItem.AltLeftHand)) if (attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.AltLeftHand).ID / 1000 == 511) can = true; if (!can) return; ushort x = attacked.X; ushort y = attacked.Y; Map.UpdateCoordonatesForAngle(ref x, ref y, ServerBase.Kernel.GetAngle(attacked.X, attacked.Y, attacker.X, attacker.Y)); attacker.Shift(x, y); attack.X = x; attack.Y = y; attack.AttackType = Attack.FatalStrike; } } } //over: if (!attacker.Owner.AlternateEquipment) { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.RightWeapon)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.RightWeapon); ushort wep1subyte = (ushort)(rightweapon.ID / 1000), wep2subyte = 0; bool wep1bs = false, wep2bs = false; /*if (wep1subyte == 421) { wep1bs = true; wep1subyte = 420; } if (wep1subyte == 511) { wep1bs = true; wep1subyte = 601; }*/ ushort wep1spellid = 0, wep2spellid = 0; if (Database.SpellTable.WeaponSpells.ContainsKey(wep1subyte)) { wep1spellid = Database.SpellTable.WeaponSpells[wep1subyte]; } /*if (wep1subyte == 601 || wep1subyte == 511) { if (Database.SpellTable.WeaponSpells.ContainsKey(11230)) { wep1spellid = 11230; } }*/ Database.SpellInformation wep1spell = null, wep2spell = null; bool doWep1Spell = false, doWep2Spell = false; if (attacker.Owner.Spells.ContainsKey(wep1spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep1spellid)) { wep1spell = Database.SpellTable.SpellInformations[wep1spellid][attacker.Owner.Spells[wep1spellid].Level]; if (wep1spell != null) { doWep1Spell = ServerBase.Kernel.Rate(wep1spell.Percent); } } if (!doWep1Spell) { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) { Interfaces.IConquerItem leftweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.LeftWeapon); wep2subyte = (ushort)(leftweapon.ID / 1000); /* if (wep2subyte == 421) { wep2bs = true; wep2subyte = 420; } if (wep2subyte == 511) { wep2bs = true; wep2subyte=601; }*/ if (wep2subyte == 900 || leftweapon.ID == 1050002) { return; } if (Database.SpellTable.WeaponSpells.ContainsKey(wep2subyte)) { wep2spellid = Database.SpellTable.WeaponSpells[wep2subyte]; } if (attacker.Owner.Spells.ContainsKey(wep2spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep2spellid)) { wep2spell = Database.SpellTable.SpellInformations[wep2spellid][attacker.Owner.Spells[wep2spellid].Level]; if (wep2spell != null) { doWep2Spell = ServerBase.Kernel.Rate(wep2spell.Percent); } } } } if (!attacker.Transformed) { if (doWep1Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attacked.X; attack.Y = attacked.Y; attack.Attacked = attacked.UID; attack.Damage = wep1spell.ID; goto restart; } if (doWep2Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attacked.X; attack.Y = attacked.Y; attack.Attacked = attacked.UID; attack.Damage = wep2spell.ID; goto restart; } if (wep1bs) wep1subyte++; if (attacker.EntityFlag == EntityFlag.Player && attacked.EntityFlag != EntityFlag.Player) if (damage > attacked.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), wep1subyte); if (wep2subyte != 0) { if (wep2bs) wep2subyte++; attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), wep2subyte); } } else { attacker.Owner.IncreaseProficiencyExperience(damage, wep1subyte); if (wep2subyte != 0) { if (wep2bs) wep2subyte++; attacker.Owner.IncreaseProficiencyExperience(damage, wep2subyte); } } } } else { if (!attacker.Transformed) { if (attacker.EntityFlag == EntityFlag.Player && attacked.EntityFlag != EntityFlag.Player) if (damage > attacked.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), 0); } else { attacker.Owner.IncreaseProficiencyExperience(damage, 0); } } } } else { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.AltRightHand)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.AltRightHand); ushort wep1subyte = (ushort)(rightweapon.ID / 1000), wep2subyte = 0; bool wep1bs = false, wep2bs = false; /* if (wep1subyte == 421) { wep1bs = true; wep1subyte = 420; } if (wep1subyte == 511) { wep1bs = true; wep1subyte = 601; }*/ ushort wep1spellid = 0, wep2spellid = 0; if (Database.SpellTable.WeaponSpells.ContainsKey(wep1subyte)) { wep1spellid = Database.SpellTable.WeaponSpells[wep1subyte]; } Database.SpellInformation wep1spell = null, wep2spell = null; bool doWep1Spell = false, doWep2Spell = false; if (attacker.Owner.Spells.ContainsKey(wep1spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep1spellid)) { wep1spell = Database.SpellTable.SpellInformations[wep1spellid][attacker.Owner.Spells[wep1spellid].Level]; doWep1Spell = ServerBase.Kernel.Rate(wep1spell.Percent); } if (!doWep1Spell) { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.AltLeftHand)) { Interfaces.IConquerItem leftweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.AltLeftHand); wep2subyte = (ushort)(leftweapon.ID / 1000); /* if (wep2subyte == 421) { wep2bs = true; wep2subyte = 420; } if (wep2subyte == 511) { wep2bs = true; wep2subyte = 601; }*/ if (wep2subyte == 900 || leftweapon.ID == 1050002) { return; } if (Database.SpellTable.WeaponSpells.ContainsKey(wep2subyte)) { wep2spellid = Database.SpellTable.WeaponSpells[wep2subyte]; } if (attacker.Owner.Spells.ContainsKey(wep2spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep2spellid)) { wep2spell = Database.SpellTable.SpellInformations[wep2spellid][attacker.Owner.Spells[wep2spellid].Level]; doWep2Spell = ServerBase.Kernel.Rate(wep2spell.Percent); } } } if (!attacker.Transformed) { if (doWep1Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attacked.X; attack.Y = attacked.Y; attack.Attacked = attacked.UID; attack.Damage = wep1spell.ID; goto restart; } if (doWep2Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attacked.X; attack.Y = attacked.Y; attack.Attacked = attacked.UID; attack.Damage = wep2spell.ID; goto restart; } if (wep1bs) wep1subyte++; if (attacker.EntityFlag == EntityFlag.Player && attacked.EntityFlag != EntityFlag.Player) if (damage > attacked.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), wep1subyte); if (wep2subyte != 0) { if (wep2bs) wep2subyte++; attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), wep2subyte); } } else { attacker.Owner.IncreaseProficiencyExperience(damage, wep1subyte); if (wep2subyte != 0) { if (wep2bs) wep2subyte++; attacker.Owner.IncreaseProficiencyExperience(damage, wep2subyte); } } } } else { if (!attacker.Transformed) { if (attacker.EntityFlag == EntityFlag.Player && attacked.EntityFlag != EntityFlag.Player) if (damage > attacked.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), 0); } else { attacker.Owner.IncreaseProficiencyExperience(damage, 0); } } } } ReceiveAttack(attacker, attacked, attack, damage, null); attack.AttackType = Attack.Melee; } else { attacker.AttackPacket = null; } } else if (attacker.Owner.Screen.TryGetSob(attack.Attacked, out attackedsob)) { // Console.WriteLine("Ss"); if (CanAttack(attacker, attackedsob, null)) { ushort range = attacker.AttackRange; if (attacker.Transformed) range = (ushort)attacker.TransformationAttackRange; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= range) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); if (!attacker.Owner.AlternateEquipment) { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.RightWeapon)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.RightWeapon); ushort wep1subyte = (ushort)(rightweapon.ID / 1000), wep2subyte = 0; bool wep1bs = false, wep2bs = false; /* if (wep1subyte == 421) { wep1bs = true; wep1subyte=420; } if (wep1subyte == 511) { wep1bs = true; wep1subyte=601; }*/ ushort wep1spellid = 0, wep2spellid = 0; if (Database.SpellTable.WeaponSpells.ContainsKey(wep1subyte)) wep1spellid = Database.SpellTable.WeaponSpells[wep1subyte]; Database.SpellInformation wep1spell = null, wep2spell = null; bool doWep1Spell = false, doWep2Spell = false; if (attacker.Owner.Spells.ContainsKey(wep1spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep1spellid)) { wep1spell = Database.SpellTable.SpellInformations[wep1spellid][attacker.Owner.Spells[wep1spellid].Level]; doWep1Spell = ServerBase.Kernel.Rate(wep1spell.Percent); } if (!doWep1Spell) { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) { Interfaces.IConquerItem leftweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.LeftWeapon); wep2subyte = (ushort)(leftweapon.ID / 1000); /* if (wep2subyte == 421) { wep2bs = true; wep2subyte = 420; } if (wep2subyte == 511) { wep2bs = true; wep2subyte = 601; }*/ if (Database.SpellTable.WeaponSpells.ContainsKey(wep2subyte)) wep2spellid = Database.SpellTable.WeaponSpells[wep2subyte]; if (attacker.Owner.Spells.ContainsKey(wep2spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep2spellid)) { wep2spell = Database.SpellTable.SpellInformations[wep2spellid][attacker.Owner.Spells[wep2spellid].Level]; doWep2Spell = ServerBase.Kernel.Rate(wep2spell.Percent); } } } if (!attacker.Transformed) { if (doWep1Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attackedsob.X; attack.Y = attackedsob.Y; attack.Attacked = attackedsob.UID; attack.Damage = wep1spell.ID; goto restart; } if (doWep2Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attackedsob.X; attack.Y = attackedsob.Y; attack.Attacked = attackedsob.UID; attack.Damage = wep2spell.ID; goto restart; } if (attacker.MapID == 1039) { /* if (wep1bs) wep1subyte++;*/ if (attacker.EntityFlag == EntityFlag.Player) if (damage > attackedsob.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attackedsob.Hitpoints), wep1subyte); if (wep2subyte != 0) { /* if (wep2bs) wep2subyte++;*/ attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attackedsob.Hitpoints), wep2subyte); } } else { attacker.Owner.IncreaseProficiencyExperience(damage, wep1subyte); if (wep2subyte != 0) { /*if (wep2bs) wep2subyte++;*/ attacker.Owner.IncreaseProficiencyExperience(damage, wep2subyte); } } } } } } else { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.AltRightHand)) { Interfaces.IConquerItem rightweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.AltRightHand); ushort wep1subyte = (ushort)(rightweapon.ID / 1000), wep2subyte = 0; bool wep1bs = false, wep2bs = false; /*if (wep1subyte == 421) { wep1bs = true; wep1subyte = 420; } if (wep1subyte == 511) { wep1bs = true; wep1subyte = 601; }*/ ushort wep1spellid = 0, wep2spellid = 0; if (Database.SpellTable.WeaponSpells.ContainsKey(wep1subyte)) wep1spellid = Database.SpellTable.WeaponSpells[wep1subyte]; Database.SpellInformation wep1spell = null, wep2spell = null; bool doWep1Spell = false, doWep2Spell = false; if (attacker.Owner.Spells.ContainsKey(wep1spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep1spellid)) { wep1spell = Database.SpellTable.SpellInformations[wep1spellid][attacker.Owner.Spells[wep1spellid].Level]; doWep1Spell = ServerBase.Kernel.Rate(wep1spell.Percent); } if (!doWep1Spell) { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.AltLeftHand)) { Interfaces.IConquerItem leftweapon = attacker.Owner.Equipment.TryGetItem((byte)ConquerItem.AltLeftHand); wep2subyte = (ushort)(leftweapon.ID / 1000); /* if (wep2subyte == 421) { wep2bs = true; wep2subyte = 420; } if (wep2subyte == 511) { wep2bs = true; wep2subyte = 601; }*/ if (Database.SpellTable.WeaponSpells.ContainsKey(wep2subyte)) wep2spellid = Database.SpellTable.WeaponSpells[wep2subyte]; if (attacker.Owner.Spells.ContainsKey(wep2spellid) && Database.SpellTable.SpellInformations.ContainsKey(wep2spellid)) { wep2spell = Database.SpellTable.SpellInformations[wep2spellid][attacker.Owner.Spells[wep2spellid].Level]; doWep2Spell = ServerBase.Kernel.Rate(wep2spell.Percent); } } } if (!attacker.Transformed) { if (doWep1Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attackedsob.X; attack.Y = attackedsob.Y; attack.Attacked = attackedsob.UID; attack.Damage = wep1spell.ID; goto restart; } if (doWep2Spell) { attack.AttackType = Attack.Magic; attack.Decoded = true; attack.X = attackedsob.X; attack.Y = attackedsob.Y; attack.Attacked = attackedsob.UID; attack.Damage = wep2spell.ID; goto restart; } if (attacker.MapID == 1039) { if (wep1bs) wep1subyte++; if (attacker.EntityFlag == EntityFlag.Player) if (damage > attackedsob.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attackedsob.Hitpoints), wep1subyte); if (wep2subyte != 0) { if (wep2bs) wep2subyte++; attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attackedsob.Hitpoints), wep2subyte); } } else { attacker.Owner.IncreaseProficiencyExperience(damage, wep1subyte); if (wep2subyte != 0) { if (wep2bs) wep2subyte++; attacker.Owner.IncreaseProficiencyExperience(damage, wep2subyte); } } } } } } attack.Damage = damage; ReceiveAttack(attacker, attackedsob, attack, damage, null); } else { attacker.AttackPacket = null; } } } else { attacker.AttackPacket = null; } } #endregion #region Ranged else if (attack.AttackType == Attack.Ranged) { if (attacker.Owner.Screen.TryGetValue(attack.Attacked, out attacked)) { if (!attacker.Owner.AlternateEquipment) { CheckForExtraWeaponPowers(attacker.Owner, attacked); } else { CheckForExtraWeaponPowers2(attacker.Owner, attacked); } if (attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon) == null) return; if (!CanAttack(attacker, attacked, null, attack.AttackType == Attack.Melee)) return; if (!attacker.Owner.AlternateEquipment) { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) { Interfaces.IConquerItem arrow = attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon); arrow.Durability -= 1; ItemUsage usage = new ItemUsage(true) { UID = arrow.UID, dwParam = arrow.Durability, ID = ItemUsage.UpdateDurability }; usage.Send(attacker.Owner); if (arrow.Durability <= 0 || arrow.Durability > 5000) { Network.PacketHandler.ReloadArrows(attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon), attacker.Owner); } } } else { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.AltLeftHand)) { Interfaces.IConquerItem arrow = attacker.Owner.Equipment.TryGetItem(ConquerItem.AltLeftHand); arrow.Durability -= 1; ItemUsage usage = new ItemUsage(true) { UID = arrow.UID, dwParam = arrow.Durability, ID = ItemUsage.UpdateDurability }; usage.Send(attacker.Owner); if (arrow.Durability <= 0 || arrow.Durability > 5000) { Network.PacketHandler.ReloadArrows(attacker.Owner.Equipment.TryGetItem(ConquerItem.AltLeftHand), attacker.Owner); } } } if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= ServerBase.Constants.pScreenDistance) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack); attack.Damage = damage; if (attacker.EntityFlag == EntityFlag.Player && attacked.EntityFlag != EntityFlag.Player) if (damage > attacked.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attacked.Hitpoints), 500); } else { attacker.Owner.IncreaseProficiencyExperience(damage, 500); } ReceiveAttack(attacker, attacked, attack, damage, null); } } else if (attacker.Owner.Screen.TryGetSob(attack.Attacked, out attackedsob)) { if (CanAttack(attacker, attackedsob, null)) { if (attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon) == null) return; if (attacker.MapID != 1039) { if (!attacker.Owner.AlternateEquipment) { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.LeftWeapon)) { Interfaces.IConquerItem arrow = attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon); arrow.Durability -= 1; ItemUsage usage = new ItemUsage(true) { UID = arrow.UID, dwParam = arrow.Durability, ID = ItemUsage.UpdateDurability }; usage.Send(attacker.Owner); if (arrow.Durability <= 0 || arrow.Durability > 5000) { Network.PacketHandler.ReloadArrows(attacker.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon), attacker.Owner); } } } else { if (!attacker.Owner.Equipment.Free((byte)ConquerItem.AltLeftHand)) { Interfaces.IConquerItem arrow = attacker.Owner.Equipment.TryGetItem(ConquerItem.AltLeftHand); arrow.Durability -= 1; ItemUsage usage = new ItemUsage(true) { UID = arrow.UID, dwParam = arrow.Durability, ID = ItemUsage.UpdateDurability }; usage.Send(attacker.Owner); if (arrow.Durability <= 0 || arrow.Durability > 5000) { Network.PacketHandler.ReloadArrows(attacker.Owner.Equipment.TryGetItem(ConquerItem.AltLeftHand), attacker.Owner); } } } } if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= ServerBase.Constants.pScreenDistance) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack); attack.Damage = damage; ReceiveAttack(attacker, attackedsob, attack, damage, null); if (damage > attackedsob.Hitpoints) { attacker.Owner.IncreaseProficiencyExperience(Math.Min(damage, attackedsob.Hitpoints), 500); } else { attacker.Owner.IncreaseProficiencyExperience(damage, 500); } } } } else { attacker.AttackPacket = null; } } #endregion #region Magic else if (attack.AttackType == Attack.Magic) { if (!attacker.Owner.AlternateEquipment) { CheckForExtraWeaponPowers(attacker.Owner, attacked); } else { CheckForExtraWeaponPowers2(attacker.Owner, attacked); } uint Experience = 100; bool shuriken = false; ushort spellID = SpellID; if (SpellID >= 3090 && SpellID <= 3306) spellID = 3090; if (spellID == 6012) shuriken = true; if (attacker == null) return; if (attacker.Owner == null) { attacker.AttackPacket = null; return; } if (attacker.Owner.Spells == null) { attacker.Owner.Spells = new SafeDictionary<ushort, PhoenixProject.Interfaces.ISkill>(10000); attacker.AttackPacket = null; return; } if (attacker.Owner.Spells[spellID] == null && spellID != 6012) { attacker.AttackPacket = null; return; } Database.SpellInformation spell = null; if (shuriken) spell = Database.SpellTable.SpellInformations[6010][0]; else { byte choselevel = 0; if (spellID == SpellID) choselevel = attacker.Owner.Spells[spellID].Level; if (Database.SpellTable.SpellInformations[SpellID] != null && !Database.SpellTable.SpellInformations[SpellID].ContainsKey(choselevel)) choselevel = (byte)(Database.SpellTable.SpellInformations[SpellID].Count - 1); spell = Database.SpellTable.SpellInformations[SpellID][choselevel]; } if (spell == null) { attacker.AttackPacket = null; return; } attacked = null; attackedsob = null; if (attacker.Owner.Screen.TryGetValue(Target, out attacked) || attacker.Owner.Screen.TryGetSob(Target, out attackedsob) || Target == attacker.UID || spell.Sort != 1) { if (Target == attacker.UID) attacked = attacker; if (attacked != null) { if (attacked.Dead && spell.Sort != Database.SpellSort.Revive && spell.ID != 10405 && spell.ID != 10425) { attacker.AttackPacket = null; return; } } if (Target >= 400000 && Target <= 600000 || Target >= 800000) { if (attacked == null && attackedsob == null) return; } else if (Target != 0 && attackedsob == null) return; if (attacked != null) { if (attacked.EntityFlag == EntityFlag.Monster) { if (spell.CanKill == 1) { if (attacked.MonsterInfo.InSight == 0) { attacked.MonsterInfo.InSight = attacker.UID; } } } } if (!attacker.Owner.Spells.ContainsKey(spellID)) { if (spellID != 6012) return; } if (spell != null) { if (!attacker.Owner.AlternateEquipment) { if (spell.OnlyWithThisWeaponSubtype != 0) { uint firstwepsubtype, secondwepsubtype; if (!attacker.Owner.Equipment.Free(4)) { firstwepsubtype = attacker.Owner.Equipment.Objects[3].ID / 1000; if (!attacker.Owner.Equipment.Free(5) && attacker.Owner.Equipment.Objects[4] != null) { secondwepsubtype = attacker.Owner.Equipment.Objects[4].ID / 1000; if (firstwepsubtype != spell.OnlyWithThisWeaponSubtype) { if (secondwepsubtype != spell.OnlyWithThisWeaponSubtype) { attacker.AttackPacket = null; return; } } } else { if (firstwepsubtype != spell.OnlyWithThisWeaponSubtype) { attacker.AttackPacket = null; return; } } } else { attacker.AttackPacket = null; return; } } else { if (spell.OnlyWithThisWeaponSubtype != 0) { uint firstwepsubtype, secondwepsubtype; if (!attacker.Owner.Equipment.Free(24)) { firstwepsubtype = attacker.Owner.Equipment.Objects[23].ID / 1000; if (!attacker.Owner.Equipment.Free(24) && attacker.Owner.Equipment.Objects[24] != null) { secondwepsubtype = attacker.Owner.Equipment.Objects[24].ID / 1000; if (firstwepsubtype != spell.OnlyWithThisWeaponSubtype) { if (secondwepsubtype != spell.OnlyWithThisWeaponSubtype) { attacker.AttackPacket = null; return; } } } else { if (firstwepsubtype != spell.OnlyWithThisWeaponSubtype) { attacker.AttackPacket = null; return; } } } else { attacker.AttackPacket = null; return; } } } } if (attacker.Owner.Account.State == PhoenixProject.Database.AccountTable.AccountState.Coder) { attacker.Owner.Send(new Message("Spell ID: " + spellID, System.Drawing.Color.CadetBlue, Message.Talk)); } switch (spellID) { #region Single magic damage spells case 1000: case 1001: case 1002: case 1150: case 1160: case 1180: case 1320: case 10310: case 11180: //case 11040: //case 10381: { if (CanUseSpell(spell, attacker.Owner)) { if (attacked != null) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } } else { attacker.AttackPacket = null; } } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); attacker.Owner.SendScreen(suse, true); } } } } else { attacker.AttackPacket = null; } break; } #endregion #region Single heal/meditation spells case 1190: case 1195: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; uint damage = spell.Power; if (spell.ID == 1190) { Experience = damage = Math.Min(damage, attacker.MaxHitpoints - attacker.Hitpoints); attacker.Hitpoints += damage; } else { Experience = damage = Math.Min(damage, (uint)(attacker.MaxMana - attacker.Mana)); attacker.Mana += (ushort)damage; } suse.Targets.Add(attacker.UID, spell.Power); attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Multi heal spells case 1005: case 1055: case 1170: case 1175: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (attackedsob != null) { if (attacker.MapID == 1038) break; if (attacker.MapID == 2071) break; if (attacker.MapID == 1509) break; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); uint damage = spell.Power; damage = Math.Min(damage, attackedsob.MaxHitpoints - attackedsob.Hitpoints); attackedsob.Hitpoints += damage; Experience += damage; suse.Targets.Add(attackedsob.UID, damage); attacker.Owner.SendScreen(suse, true); } } else { if (spell.Multi == 1) { if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) { uint damage = spell.Power; damage = Math.Min(damage, teammate.Entity.MaxHitpoints - teammate.Entity.Hitpoints); teammate.Entity.Hitpoints += damage; Experience += damage; suse.Targets.Add(teammate.Entity.UID, damage); if (spell.NextSpellID != 0) { attack.Damage = spell.NextSpellID; attacker.AttackPacket = attack; } else { attacker.AttackPacket = null; } } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); uint damage = spell.Power; damage = Math.Min(damage, attacked.MaxHitpoints - attacked.Hitpoints); attacked.Hitpoints += damage; Experience += damage; suse.Targets.Add(attacked.UID, damage); if (spell.NextSpellID != 0) { attack.Damage = spell.NextSpellID; attacker.AttackPacket = attack; } else { attacker.AttackPacket = null; } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); uint damage = spell.Power; damage = Math.Min(damage, attacked.MaxHitpoints - attacked.Hitpoints); attacked.Hitpoints += damage; Experience += damage; suse.Targets.Add(attacked.UID, damage); if (spell.NextSpellID != 0) { attack.Damage = spell.NextSpellID; attacker.AttackPacket = attack; } else { attacker.AttackPacket = null; } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } } else { attacker.AttackPacket = null; } break; } #endregion #region Revive case 1050: case 1100: { if (attackedsob != null) return; if (ServerBase.Constants.revnomap.Contains(attacker.MapID)) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; //suse.Targets.Add(attacked.UID, 0); //attacked.Action = PhoenixProject.Game.Enums.ConquerAction.None; //attacked.Owner.ReviveStamp = Time32.Now; //attacked.Owner.Attackable = false; attacked.Owner.Entity.Action = PhoenixProject.Game.Enums.ConquerAction.None; attacked.Owner.ReviveStamp = Time32.Now; attacked.Owner.Attackable = false; attacked.Owner.Entity.TransformationID = 0; attacked.Owner.Entity.RemoveFlag(Update.Flags.Dead); attacked.Owner.Entity.RemoveFlag(Update.Flags.Ghost); attacked.Owner.Entity.Hitpoints = attacked.Owner.Entity.MaxHitpoints; attacked.Ressurect(); attacked.Owner.SendScreen(suse, true); } } break; } #endregion #region Linear spells case 1045: case 1046: // case 11110: case 1260: case 11000: case 11005: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); Game.Attacking.InLineAlgorithm ila = new PhoenixProject.Game.Attacking.InLineAlgorithm(attacker.X, X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = SpellID; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; int xx = 0; int yy = 0; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ila.InLine(attacked.X, attacked.Y)) { if (attacked.X != xx && attacked.Y != yy) { if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) continue; attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); suse.Effect1 = attack.Effect1; attack.Damage = damage; xx = attacked.X; yy = attacked.Y; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ila.InLine(attackedsob.X, attackedsob.Y)) { if (!CanAttack(attacker, attackedsob, spell)) continue; attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); damage = (uint)(damage * spell.PowerPercent); attack.Damage = damage; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region BladeTempst case 11110: { bool yes = true; Game.Map Map = attacker.Owner.Map; // ushort rr = ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y); Game.Attacking.InLineAlgorithm ila = new PhoenixProject.Game.Attacking.InLineAlgorithm(attacker.X, X, attacker.Y, Y, (byte)ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y), InLineAlgorithm.Algorithm.DDA); List<InLineAlgorithm.coords>.Enumerator enumerator6; ushort x = 0; ushort y = 0; using (enumerator6 = ila.getCoords.GetEnumerator()) { while (enumerator6.MoveNext()) { if (yes) { Func<IMapObject, bool> func4 = null; InLineAlgorithm.coords coord = enumerator6.Current; if (Map.Floor[coord.X, coord.Y, Game.MapObjectType.Player, null]) { if (attacker.MapID == 1038) { if (attacker.X > 223 && attacker.Y < 185 && coord.X < 224) { // Console.WriteLine(" r " + PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh + ""); if (PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh == 271) { yes = false; } else { yes = true; x = (ushort)coord.X; y = (ushort)coord.Y; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance((ushort)coord.X, (ushort)coord.Y, attacked.X, attacked.Y) <= 1) { attacked.CanBlade = true; } } } } } else { //Console.WriteLine(" r " + PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh + ""); if (attacker.X < 170 && attacker.Y > 210 && coord.Y < 211) { if (PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh == 241) { yes = false; } } else { yes = true; x = (ushort)coord.X; y = (ushort)coord.Y; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance((ushort)coord.X, (ushort)coord.Y, attacked.X, attacked.Y) <= 1) { attacked.CanBlade = true; } } } } } } else { yes = true; x = (ushort)coord.X; y = (ushort)coord.Y; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance((ushort)coord.X, (ushort)coord.Y, attacked.X, attacked.Y) <= 1) { attacked.CanBlade = true; } } } } } else { yes = false; } } } } yes = true; X = x; Y = y; if (Map.Floor[X, Y, Game.MapObjectType.Player, null] && yes) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = SpellID; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; int xx = 0; int yy = 0; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (attacked.CanBlade) { // if (attacked.X != xx && attacked.Y != yy) // { if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) continue; attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); // uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); suse.Effect1 = attack.Effect1; attack.Damage = damage; // xx = attacked.X; // yy = attacked.Y; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); attacked.CanBlade = false; if (!attacked.Dead) { if (attacker.Owner.Spells.ContainsKey(11120)) { BlackSpot spot = new BlackSpot { Remove = 0, Identifier = attacked.UID }; attacker.Owner.Send((byte[])spot); attacked.BlackSpotTime = Time32.Now; attacked.BlackSpotTime2 = 8; attacked.BlackSpots = true; attacker.Owner.IncreaseSpellExperience(80, 11120); } } // } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ila.InLine(attackedsob.X, attackedsob.Y)) { if (!CanAttack(attacker, attackedsob, spell)) continue; attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); damage = (uint)(damage * spell.PowerPercent); attack.Damage = damage; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } attacker.X = X; attacker.Y = Y; attacker.Owner.SendScreen(attack, true); attacker.Owner.SendScreen(suse, true); attacker.Owner.Screen.Reload(attack); } } break; } #endregion #region XPSpells inofensive case 1015: case 1020: case 1025: case 1110: case 6011: case 10390: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacked.UID, 0); if (spell.ID == 6011) { attacker.FatalStrikeStamp = Time32.Now; attacker.FatalStrikeTime = 60; attacker.AddFlag(Update.Flags.FatalStrike); attacker.RemoveFlag(Update.Flags.Ride); } else { if (spell.ID == 1110 || spell.ID == 1025 || spell.ID == 10390) { if (!attacked.OnKOSpell()) attacked.KOCount = 0; attacked.KOSpell = spell.ID; if (spell.ID == 1110) { attacked.CycloneStamp = Time32.Now; attacked.CycloneTime = 20; attacked.AddFlag(Update.Flags.Cyclone); } else if (spell.ID == 10390) { attacked.OblivionStamp = Time32.Now; attacked.OblivionTime = 20; attacked.AddFlag2(Update.Flags2.Oblivion); } else { attacked.SupermanStamp = Time32.Now; attacked.SupermanTime = 20; attacked.AddFlag(Update.Flags.Superman); } } else { if (spell.ID == 1020) { attacked.ShieldTime = 0; attacked.ShieldStamp = Time32.Now; attacked.MagicShieldStamp = Time32.Now; attacked.MagicShieldTime = 0; attacked.AddFlag(Update.Flags.MagicShield); attacked.ShieldStamp = Time32.Now; attacked.ShieldIncrease = spell.PowerPercent; attacked.ShieldTime = (byte)spell.Duration; } else { attacked.AccuracyStamp = Time32.Now; attacked.StarOfAccuracyStamp = Time32.Now; attacked.StarOfAccuracyTime = 0; attacked.AccuracyTime = 0; attacked.AddFlag(Update.Flags.StarOfAccuracy); attacked.AccuracyStamp = Time32.Now; attacked.AccuracyTime = (byte)spell.Duration; } } } attacked.Owner.SendScreen(suse, true); } break; } #endregion #region Circle spells case 1010: case 1115: case 1120: case 1125: case 3090: case 5001: case 8030: case 11170: case 10315: case 11190: //case 11050: { // Console.WriteLine("xx3"); if (CanUseSpell(spell, attacker.Owner)) { //Console.WriteLine("x4"); PrepareSpell(spell, attacker.Owner); //Console.WriteLine("xx5"); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; UInt16 ox, oy; ox = attacker.X; oy = attacker.Y; if (spellID == 10315 || spellID == 11190) { /* if (attacker.MapID == 1950) { break; }*/ bool yes = true; Game.Map Map = attacker.Owner.Map; Game.Attacking.InLineAlgorithm ila = new PhoenixProject.Game.Attacking.InLineAlgorithm(attacker.X, X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA); List<InLineAlgorithm.coords>.Enumerator enumerator6; ushort x = 0; ushort y = 0; using (enumerator6 = ila.getCoords.GetEnumerator()) { while (enumerator6.MoveNext()) { if (yes) { Func<IMapObject, bool> func4 = null; InLineAlgorithm.coords coord = enumerator6.Current; if (Map.Floor[coord.X, coord.Y, Game.MapObjectType.Player, null]) { if (attacker.MapID == 1038) { if (attacker.X > 223 && attacker.Y < 185 && coord.X < 224) { // Console.WriteLine(" r " + PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh + ""); if (PhoenixProject.Game.ConquerStructures.Society.GuildWar.RightGate.Mesh == 271) { yes = false; } else { yes = true; x = (ushort)coord.X; y = (ushort)coord.Y; } } else { //Console.WriteLine(" r " + PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh + ""); if (attacker.X < 170 && attacker.Y > 210 && coord.Y < 211) { if (PhoenixProject.Game.ConquerStructures.Society.GuildWar.LeftGate.Mesh == 241) { yes = false; } } else { yes = true; x = (ushort)coord.X; y = (ushort)coord.Y; } } } else { yes = true; x = (ushort)coord.X; y = (ushort)coord.Y; } } else { yes = false; } } } } yes = true; X = x; Y = y; Attack npacket = new Attack(true); npacket.Attacker = attacker.UID; npacket.AttackType = 53; npacket.X = X; npacket.Y = Y; Writer.WriteUInt16(spell.ID, 24, npacket.ToArray()); Writer.WriteByte(spell.Level, 26, npacket.ToArray()); attacker.Owner.SendScreen(npacket, true); attacker.X = X; attacker.Y = Y; attacker.SendSpawn(attacker.Owner); attacker.Owner.Screen.Reload(npacket); } List<IMapObject> objects = new List<IMapObject>(); if (attacker.Owner.Screen.Objects.Count() > 0) objects = GetObjects(ox, oy, attacker.Owner); if (objects != null) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { if (spellID == 10315 || spellID == 11190) { foreach (IMapObject objs in objects.ToArray()) { if (objs == null) continue; if (objs.MapObjType == MapObjectType.Monster || objs.MapObjType == MapObjectType.Player) { attacked = objs as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); suse.Effect1 = attack.Effect1; if (spell.Power > 0) { attack.Effect1 = Attack.AttackEffects1.None; damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); //damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell, ref attack); suse.Effect1 = attack.Effect1; } if (spell.ID == 8030) { attack.Effect1 = Attack.AttackEffects1.None; damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack); } ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (objs.MapObjType == MapObjectType.SobNpc) { attackedsob = objs as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); if (spell.Power > 0) { damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); // damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell, ref attack); } attack.Effect1 = Attack.AttackEffects1.None; if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } } else { foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); suse.Effect1 = attack.Effect1; if (spell.Power > 0) { attack.Effect1 = Attack.AttackEffects1.None; damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell, ref attack); suse.Effect1 = attack.Effect1; } attack.Effect1 = Attack.AttackEffects1.None; if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack); if (spell.ID == 1115) damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell, ref attack); attack.Effect1 = Attack.AttackEffects1.None; if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } } } else { attacker.AttackPacket = null; } } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Buffers case 1075: case 1085: case 1090: case 1095: case 3080: case 10405://this is not what I edited yesterday... case 30000: case 11160: case 11200: { if (attackedsob != null) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attackedsob.UID, 0); attacker.Owner.SendScreen(suse, true); } } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacked.UID, 0); if (spell.ID == 1075 || spell.ID == 1085) { if (spell.ID == 1075) { attacked.AddFlag(Update.Flags.Invisibility); attacked.InvisibilityStamp = Time32.Now; attacked.InvisibilityTime = (byte)spell.Duration; if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.Send(ServerBase.Constants.Invisibility((int)spell.Duration)); } else { attacked.AccuracyStamp = Time32.Now; attacked.StarOfAccuracyStamp = Time32.Now; attacked.StarOfAccuracyTime = 0; attacked.AccuracyTime = 0; attacked.AddFlag(Update.Flags.StarOfAccuracy); attacked.StarOfAccuracyStamp = Time32.Now; attacked.StarOfAccuracyTime = (byte)spell.Duration; if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.Send(ServerBase.Constants.Accuracy((int)spell.Duration)); } } else { if (spell.ID == 1090) { attacked.ShieldTime = 0; attacked.ShieldStamp = Time32.Now; attacked.MagicShieldStamp = Time32.Now; attacked.MagicShieldTime = 0; attacked.AddFlag(Update.Flags.MagicShield); attacked.MagicShieldStamp = Time32.Now; attacked.MagicShieldIncrease = spell.PowerPercent; attacked.MagicShieldTime = (byte)spell.Duration; if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.Send(ServerBase.Constants.Shield(spell.PowerPercent, (int)spell.Duration)); } else if (spell.ID == 1095) { attacked.AddFlag(Update.Flags.Stigma); attacked.StigmaStamp = Time32.Now; attacked.StigmaIncrease = spell.PowerPercent; attacked.StigmaTime = (byte)spell.Duration; if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.Send(ServerBase.Constants.Stigma(spell.PowerPercent, (int)spell.Duration)); } else if (spell.ID == 11200) { if (attacker.ContainsFlag(Update.Flags.Ride)) { attacker.RemoveFlag(Update.Flags.Ride); } attacker.AddFlag3(Update.Flags3.MagicDefender); attacker.MagicDefenderStamp = Time32.Now; attacker.MagicDefenderIncrease = spell.PowerPercent; attacker.MagicDefenderTime = (byte)spell.Duration; if (attacker.EntityFlag == EntityFlag.Player) { attacker.Owner.SendScreen(suse, true); SyncPacket packet = new SyncPacket { Identifier = attacker.UID, Count = 2, Type = PhoenixProject.Network.GamePackets.SyncPacket.SyncType.StatusFlag, StatusFlag1 = (ulong)attacker.StatusFlag, StatusFlag2 = (ulong)attacker.StatusFlag2, Unknown1 = 0x31, StatusFlagOffset = 0x80, Time = (uint)spell.Duration, Value = 10, Level = spell.Level }; attacker.Owner.Send((byte[])packet); } break; } else if (spell.ID == 11160) { if (attacker.DefensiveStanceTime != 0) { attacker.DefensiveStanceTime = 0; attacker.DefensiveStanceIncrease = 0; attacker.RemoveFlag2(Network.GamePackets.Update.Flags2.WarriorWalk); } else { if (attacker.ContainsFlag(Update.Flags.Ride)) { attacker.RemoveFlag(Update.Flags.Ride); } attacker.AddFlag2(Update.Flags2.WarriorWalk); attacker.DefensiveStanceStamp = Time32.Now; attacker.DefensiveStanceIncrease = spell.PowerPercent; attacker.DefensiveStanceTime = (byte)spell.Duration; if (attacker.EntityFlag == EntityFlag.Player) { attacker.Owner.Send(ServerBase.Constants.DefensiveStance(spell.Percent, (int)spell.Duration)); attacker.Owner.SendScreen(suse, true); } } break; } else if (spell.ID == 30000) { if (attacked.ContainsFlag2(Update.Flags2.AzureShield)) { return; } //attack.AttackType = Attack.kimo2; attacked.ShieldTime = 0; attacked.ShieldStamp = Time32.Now; attacked.MagicShieldStamp = Time32.Now; attacked.MagicShieldTime = 0; //Console.WriteLine("The Dodge is :" + attacked.Dodge.ToString()); attacked.AddFlag2(Update.Flags2.AzureShield); attacked.MagicShieldStamp = Time32.Now; attacked.AzureDamage = 12000; //Console.WriteLine("AzureShiled granted " + 12000 + " The Dodge is :" + attacked.Dodge.ToString()); attacked.MagicShieldIncrease = spell.PowerPercent; attacked.MagicShieldTime = 60; if (attacked.EntityFlag == EntityFlag.Player) { attacked.Owner.Send(ServerBase.Constants.AzureShield(12000, 30)); SyncPacket packet4 = new SyncPacket { Identifier = attacked.UID, Count = 2, Type = PhoenixProject.Network.GamePackets.SyncPacket.SyncType.StatusFlag, StatusFlag1 = (ulong)attacked.StatusFlag, StatusFlag2 = (ulong)attacked.StatusFlag2, Unknown1 = 0x31, StatusFlagOffset = 0x5d, Time = (uint)60, Value = (uint)attacked.AzureDamage, Level = spell.Level }; attacked.Owner.Send((byte[])packet4); } } if (spell.ID == 10405 && attacked.Dead) { if ((attacked.BattlePower - attacker.BattlePower) >= 10) return; attacked.AddFlag(Update.Flags.Dead);//Flag them as dead... should not be needed. This is no movement attacked.ShackleStamp = Time32.Now;//Set stamp so source can remove the flag after X seconds attacked.ShackleTime = (short)(30 + 15 * spell.Level);//double checking here. Could be db has this wrong. if (attacked.EntityFlag == EntityFlag.Player) { attacked.Owner.Send(ServerBase.Constants.Shackled(attacked.ShackleTime)); attacked.AddFlag2(Update.Flags2.SoulShackle);//Give them shackeld effect SyncPacket packet3 = new SyncPacket { Identifier = attacked.UID, Count = 2, Type = PhoenixProject.Network.GamePackets.SyncPacket.SyncType.StatusFlag, StatusFlag1 = (ulong)attacked.StatusFlag, StatusFlag2 = (ulong)attacked.StatusFlag2, Unknown1 = 0x36, StatusFlagOffset = 0x6f, Time = (uint)spell.Duration, Value = 10, Level = spell.Level }; attacked.Owner.Send((byte[])packet3); } } } attacker.Owner.IncreaseSpellExperience(Experience, spellID); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } } } break; } #endregion #region Percent case 3050: // case 11230: { //Console.WriteLine("1"); if (CanUseSpell(spell, attacker.Owner)) { if (attackedsob != null) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Percent(attackedsob, spell.PowerPercent); attackedsob.Hitpoints -= damage; suse.Targets.Add(attackedsob.UID, damage); attacker.Owner.SendScreen(suse, true); } } } else { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Percent(attacked, spell.PowerPercent); if (attacker.Owner.QualifierGroup != null) attacker.Owner.QualifierGroup.UpdateDamage(attacker.Owner, damage); attacked.Hitpoints -= damage; suse.Targets.Add(attacked.UID, damage); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } } } } break; } #endregion #region ExtraXP case 1040: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (teammate.Entity.UID != attacker.UID) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) { teammate.XPCount += 20; Update update = new Update(true); update.UID = teammate.Entity.UID; update.Append(Update.XPCircle, teammate.XPCount); update.Send(teammate); suse.Targets.Add(teammate.Entity.UID, 20); if (spell.NextSpellID != 0) { attack.Damage = spell.NextSpellID; attacker.AttackPacket = attack; } else { attacker.AttackPacket = null; } } } } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } break; } #endregion #region WeaponSpells #region Circle case 5010: case 7020: //case 11110: //case 10490: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; if (suse.SpellID != 10415) { suse.X = X; suse.Y = Y; } else { suse.X = 6; } if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1) { foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (attacked.ContainsFlag(Update.Flags.Fly)) return; if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); //attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); //suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); // attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); damage = (uint)(damage * spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Single target case 10490: case 11140: //case 11230: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1) { if (attackedsob != null) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); suse.MakeConst(); for (uint c = 0; c < 3; c++) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); if (damage > attackedsob.Hitpoints) damage = attackedsob.Hitpoints; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID + c, damage); } } } else { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); suse.MakeConst(); for (uint c = 0; c < 3; c++) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); if (damage > attacked.Hitpoints) damage = attacked.Hitpoints; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID + c, damage); } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } case 1290: case 5030: case 5040: case 7000: case 7010: case 7030: case 7040: case 11230: //case 10381: //case 10490: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1) { if (attackedsob != null) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); damage = (uint)(damage * spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } else { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } attacker.AttackPacket = null; } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } attacker.AttackPacket = null; break; } #endregion #region Sector case 1250: case 5050: case 5020: case 1300: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; Sector sector = new Sector(attacker.X, attacker.Y, X, Y); sector.Arrange(spell.Sector, spell.Range); if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance + 1) { foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (sector.Inside(attacked.X, attacked.Y)) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (sector.Inside(attackedsob.X, attackedsob.Y)) { if (CanAttack(attacker, attackedsob, spell)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); damage = (uint)(damage * spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } #endregion #endregion #region Fly case 8002: case 8003: { if (CanUseSpell(spell, attacker.Owner)) { if (attacker.MapID == 1950) return; PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacked.FlyStamp = Time32.Now; attacked.FlyTime = (byte)spell.Duration; suse.Targets.Add(attacker.UID, attacker.FlyTime); attacker.AddFlag(Update.Flags.Fly); attacker.RemoveFlag(Update.Flags.Ride); attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Pirate Spells #region Xp Skills case 10309: //Cannon Barrage { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (!attacker.ContainsFlag2(Update.Flags2.ChainBoltActive)) { //attacker.RemoveFlag(Update.Flags.XPList); attacker.ChainBoltStamp = Time32.Now; attacker.ChainBoltTime = 30; attacker.AddFlag2(Update.Flags2.ChainBoltActive); } if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell, ref attack); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); //attacked.AddFlag(Update.Effects.CannonBarrage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell, ref attack); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); //attacked.AddFlag(Update.Effects.CannonBarrage); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } case 11050: //Cannon Barrage { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (!attacker.ContainsFlag2(Update.Flags2.CannonBraga)) { // attacker.RemoveFlag(Update.Flags.XPList); attacker.CannonBarageStamp = Time32.Now; attacker.Cannonbarage = 30; attacker.AddFlag2(Update.Flags2.CannonBraga); } if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= 10) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 10) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell, ref attack); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); //attacked.AddFlag(Update.Effects.CannonBarrage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= 10) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell, ref attack); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); //attacked.AddFlag(Update.Effects.CannonBarrage); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } case 11060: // BlackPearl Rage { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (!attacker.ContainsFlag2(Update.Flags2.BlackBread)) { //attacker.RemoveFlag(Update.Flags.XPList); attacker.BlackBeardStamp = Time32.Now; attacker.Blackbeard = 30; attacker.AddFlag2(Update.Flags2.BlackBread); } if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell, ref attack); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attacked, ref attack); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell, ref attack); if (spell.ID == 8030) damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Auto On Skills case 11130: //Adrenaline Rush //case 11130: //BlackSpot { spell.RemoveCooldown(0x2b16); if (CanUseSpell(spell, attacker.Owner)) { PhoenixProject.Network.GamePackets.Quest.Target target5 = new PhoenixProject.Network.GamePackets.Quest.Target { Obj = attacker, Damage = 0x2b16, DamageType = HitType.NoDamage, Hit = true }; if (spell.CoolDown > 0) { spell.AddCooldown(spell.ID, (int)spell.CoolDown); } } break; } #endregion // Doesnt Work // Doest Work #region Linear Skills /* case 11110: //Blade Tempest { //if (Time32.Now < attacker.WhilrwindKick.AddMilliseconds(1500)) // return; //attacker.WhilrwindKick = Time32.Now; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= 5) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; Game.Map Map = ServerBase.Kernel.Maps[attacker.MapID]; if (Map.SelectCoordonates(ref X, ref Y)) { //attacker.X = X; // attacker.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= 5) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(X, Y, attacked.X, attacked.Y) <= 1) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Ranged)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } } break; }*/ #endregion #region Single damage Skill case 11120: { if (attacked != null) { if (attacked.EntityFlag == EntityFlag.Player || attacked.EntityFlag == EntityFlag.Monster) { if (!attacked.Dead) { BlackSpot spot = new BlackSpot { Remove = 0, Identifier = attacked.UID }; attacker.Owner.Send((byte[])spot); attacked.BlackSpotTime = Time32.Now; attacked.BlackSpotTime2 = 12; attacked.BlackSpots = true; attacker.Owner.IncreaseSpellExperience(80, 11120); } } } break; } case 11030: // Eagle Eye if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Effect1 = 0; bool kimo = false; //suse.Targets.Add(attacker.UID, spell.Power); if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance) { if (attackedsob != null) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); damage = (uint)(damage * spell.PowerPercent * 30); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } else { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { kimo = attacked.BlackSpots; PrepareSpell(spell, attacker.Owner); uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } if (attacker.Owner.Spells.ContainsKey(11130)) { if (kimo) { suse.SpellID = 11060; attacker.Owner.SendScreen(suse, true); suse.Attacker = attacker.UID; suse.SpellID = 11130; suse.SpellLevel = attacker.Owner.Spells[11130].Level; suse.X = attacker.X; suse.Y = attacker.X; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); suse.Targets.Add(attacked.UID, damage); attacker.Owner.SendScreen(suse, true); attacker.Owner.IncreaseSpellExperience(80, 11130); break; } } if (attacker.Owner.Spells.ContainsKey(11130)) { if (ServerBase.Kernel.Rate(5)) { ////spell.Duration = 0; attacker.Update(_String.Effect, "RapidReplace", true); suse.SpellID = 11060; attacker.Owner.SendScreen(suse, true); } else { //// spell.Duration = 0; //attacker.Update(_String.Effect, "RapidReplace", true); attacker.Owner.SendScreen(suse, true); } } else { // spell.Duration = 0; // attacker.Update(_String.Effect, "RapidReplace", true); attacker.Owner.SendScreen(suse, true); } } break; #endregion #region Region Damage Skills case 11100: //kracken revenge { //Console.WriteLine("0"); if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; //Console.WriteLine("1"); int counts = 0; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= 5) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { // Console.WriteLine("2"); if (counts < 5) { //Console.WriteLine("3"); //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; //Console.WriteLine("4"); if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 5) { // Console.WriteLine("5"); if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { if (attacked.EntityFlag == EntityFlag.Monster) { BlackSpot spot = new BlackSpot { Remove = 0, Identifier = attacked.UID }; attacker.Owner.Send((byte[])spot); attacked.BlackSpotTime = Time32.Now; attacked.BlackSpotTime2 = (byte)spell.Duration; attacked.BlackSpots = true; counts += 1; } else { if (!ServerBase.Constants.BlackSpotNo.Contains(attacker.MapID)) { BlackSpot spot = new BlackSpot { Remove = 0, Identifier = attacked.UID }; attacker.Owner.Send((byte[])spot); attacked.BlackSpotTime = Time32.Now; attacked.BlackSpotTime2 = (byte)spell.Duration; attacked.BlackSpots = true; counts += 1; } } } } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); attacker.Owner.IncreaseSpellExperience(80, spellID); } break; } case 11040: // Scurvey Bomb { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Range) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count(); c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count()) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell, ref attack); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); attacker.Owner.SendScreen(suse, true); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); if (spell.Power > 0) damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell, ref attack); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); attacker.Owner.SendScreen(suse, true); } } } } } else { attacker.AttackPacket = null; } } break; } case 11070: // Gale Bomb { if (Time32.Now >= attacker.MagikAttackTimeAtaque.AddMilliseconds(200)) { attacker.MagikAttackTimeAtaque = Time32.Now; if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = attack.X; suse.Y = attack.Y; attack.AttackType = 0x1b; byte MaxDistance = (byte)spell.UnknownPush; int counts = 0; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 3) { foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (counts < 3) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(X, Y, attacked.X, attacked.Y) <= 5) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { if (Misc.Distance(_obj.X, _obj.Y, (ushort)attack.X, (ushort)attack.Y) < (int)MaxDistance) { var direction = ServerBase.Kernel.GetAngle(attacker.X, attacker.Y, attacked.X, attacked.Y); attack = new Attack(true); byte angle = (byte)(attack.Attacked % 8); attack.Effect1 = Attack.AttackEffects1.None; uint damage = Calculate.Melee(attacker, attacked, ref attack); attack.AttackType = 0x1b; attack.X = attacker.X; attack.Y = attacker.Y; attack.PushBack = angle; attack.Attacker = attacker.UID; attack.Attacked = attacked.UID; attack.Damage = damage; // attack.ToArray()[27] = (byte)direction; // attacked.Move(direction); // attacker.Move(direction); ReceiveAttack(attacker, attacked, attack, damage, spell); counts++; // attacker.Owner.SendScreen(attack, true); attacker.Owner.SendScreen(suse, true); //attacker.X = attacker.X; } else break; } else { suse.Targets.Add(attacked.UID, 0); suse.Targets[attacked.UID].Hit = false; } } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= 5) { if (CanAttack(attacker, attackedsob, spell)) { if (ServerBase.Kernel.Rate(100)) { if (CanAttack(attacker, attackedsob, spell)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); ReceiveAttack(attacker, attackedsob, attack, damage, spell); counts++; } } else { suse.Targets.Add(attacked.UID, 0); suse.Targets[attacked.UID].Hit = false; } } } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } } break; } #endregion #endregion #region Ninja Spells case 6010://Vortex { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacker.AddFlag(Update.Flags.ShurikenVortex); attacker.RemoveFlag(Update.Flags.Ride); attacker.ShurikenVortexStamp = Time32.Now; attacker.ShurikenVortexTime = 20; attacker.Owner.SendScreen(suse, true); attacker.VortexPacket = new Attack(true); attacker.VortexPacket.Decoded = true; attacker.VortexPacket.Damage = 6012; attacker.VortexPacket.AttackType = Attack.Magic; attacker.VortexPacket.Attacker = attacker.UID; } break; } case 6012://VortexRespone { if (!attacker.ContainsFlag(Update.Flags.ShurikenVortex)) { attacker.AttackPacket = null; break; } SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = attacker.X; suse.Y = attacker.Y; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= spell.Range) { if (CanAttack(attacker, attackedsob, spell)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } attacker.Owner.SendScreen(suse, true); break; } case 6001: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance) { foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(X, Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { int potDifference = attacker.BattlePower - attacked.BattlePower; int rate = spell.Percent + potDifference - 20; if (ServerBase.Kernel.Rate(rate)) { attacked.ToxicFogStamp = Time32.Now; attacked.ToxicFogLeft = 20; attacked.ToxicFogPercent = spell.PowerPercent; suse.Targets.Add(attacked.UID, 1); } if (attacker.BattlePower - attacked.BattlePower > 0) { attacked.ToxicFogStamp = Time32.Now; attacked.ToxicFogLeft = 20; attacked.ToxicFogPercent = spell.PowerPercent; suse.Targets.Add(attacked.UID, 1); } else { suse.Targets.Add(attacked.UID, 0); suse.Targets[attacked.UID].Hit = false; } } } } else { if (_obj.MapObjType == MapObjectType.Monster) { attacked = _obj as Entity; if (!ServerBase.Constants.NoFog.Contains(attacked.Name)) { if (ServerBase.Kernel.GetDistance(X, Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { int potDifference = attacker.BattlePower - attacked.BattlePower; int rate = spell.Percent + potDifference - 20; if (ServerBase.Kernel.Rate(rate)) { attacked.ToxicFogStamp = Time32.Now; attacked.ToxicFogLeft = 20; attacked.ToxicFogPercent = spell.PowerPercent; suse.Targets.Add(attacked.UID, 1); } if (attacker.BattlePower - attacked.BattlePower > 0) { attacked.ToxicFogStamp = Time32.Now; attacked.ToxicFogLeft = 20; attacked.ToxicFogPercent = spell.PowerPercent; suse.Targets.Add(attacked.UID, 1); } else { suse.Targets.Add(attacked.UID, 0); suse.Targets[attacked.UID].Hit = false; } } } } } } } } else { attacker.AttackPacket = null; } attacker.Owner.IncreaseSpellExperience(80, spellID); attacker.Owner.SendScreen(suse, true); } break; } case 6000: case 10381: { if (CanUseSpell(spell, attacker.Owner)) { ushort Xx, Yx; if (attacked != null) { Xx = attacked.X; Yx = attacked.Y; } else { Xx = attackedsob.X; Yx = attackedsob.Y; } if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, Xx, Yx) <= spell.Range) { if (attackedsob == null) if (attacked.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) return; //if (attacked.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) // return; if (attacker.ContainsFlag(Network.GamePackets.Update.Flags.Fly)) return; PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; bool send = false; if (attackedsob == null) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); send = true; } } else { if (CanAttack(attacker, attackedsob, spell)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack); damage = (uint)(damage * spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Effect1 = attack.Effect1; suse.Targets.Add(attackedsob.UID, damage); send = true; } } if (send) attacker.Owner.SendScreen(suse, true); } else { attacker.AttackPacket = null; } } break; } case 6002: { if (attackedsob != null) return; if (attacked.EntityFlag == EntityFlag.Monster) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); int potDifference = attacker.BattlePower - attacked.BattlePower; int rate = spell.Percent + potDifference; SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attacked, spell, false)) { suse.Targets.Add(attacked.UID, 0); if (ServerBase.Kernel.Rate(rate)) { attacked.NoDrugsStamp = Time32.Now; attacked.NoDrugsTime = (short)spell.Duration; if (attacked.EntityFlag == EntityFlag.Player) { attacker.Owner.IncreaseSpellExperience(80, spellID); attacked.Owner.Send(ServerBase.Constants.NoDrugs((int)spell.Duration)); } } else { suse.Targets[attacked.UID].Hit = false; } attacked.Owner.SendScreen(suse, true); } } } break; } case 6004: { if (attackedsob != null) return; if (attacked.EntityFlag == EntityFlag.Monster) return; if (!attacked.ContainsFlag(Update.Flags.Fly)) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); int potDifference = attacker.BattlePower - attacked.BattlePower; int rate = spell.Percent + potDifference; SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (CanAttack(attacker, attacked, spell, false)) { uint dmg = Calculate.Percent(attacked, 0.1F); suse.Targets.Add(attacked.UID, dmg); if (ServerBase.Kernel.Rate(rate)) { attacked.Hitpoints -= dmg; attacked.RemoveFlag(Update.Flags.Fly); } else { suse.Targets[attacked.UID].Hit = false; } attacked.Owner.SendScreen(suse, true); } } } break; } #endregion #region Riding case 7001: { if (attacker.ContainsFlag2(Update.Flags2.WarriorWalk)) return; if (attacker.ContainsFlag(Update.Flags.ShurikenVortex)) return; if (ServerBase.Constants.steedguard.Contains(attacker.MapID)) return; if (!attacker.Owner.Equipment.Free(12)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (attacker.ContainsFlag(Update.Flags.Ride)) { attacker.RemoveFlag(Update.Flags.Ride); } else { if (attacker.Owner.Equipment.TryGetItem((byte)12).Plus < attacker.MapRegion.Lineage) break; if (attacker.Stamina >= 100 && (attacker.Owner.QualifierGroup == null || attacker.Owner.QualifierGroup != null && !attacker.Owner.QualifierGroup.Inside)) { attacker.AddFlag(Update.Flags.Ride); attacker.Stamina -= 100; attacker.Vigor = (ushort)attacker.MaxVigor; Network.GamePackets.Vigor vigor = new Network.GamePackets.Vigor(true); vigor.VigorValue = attacker.Owner.Entity.MaxVigor; vigor.Send(attacker.Owner); } } suse.Targets.Add(attacker.UID, 0); attacker.Owner.SendScreen(suse, true); } break; } case 7002: {//Spook if (attacked.ContainsFlag(Update.Flags.Ride) && attacker.ContainsFlag(Update.Flags.Ride)) { Interfaces.IConquerItem attackedSteed = null, attackerSteed = null; if ((attackedSteed = attacked.Owner.Equipment.TryGetItem(ConquerItem.Steed)) != null) { if ((attackerSteed = attacker.Owner.Equipment.TryGetItem(ConquerItem.Steed)) != null) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacked.UID, 0); if (attackedSteed.Plus < attackerSteed.Plus) attacked.RemoveFlag(Update.Flags.Ride); else if (attackedSteed.Plus == attackerSteed.Plus && attackedSteed.PlusProgress <= attackerSteed.PlusProgress) attacked.RemoveFlag(Update.Flags.Ride); else suse.Targets[attacked.UID].Hit = false; attacker.Owner.SendScreen(suse, true); } } } break; } case 7003: {//WarCry SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; Interfaces.IConquerItem attackedSteed = null, attackerSteed = null; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Player && _obj.UID != attacker.UID) { attacked = _obj as Entity; if ((attackedSteed = attacked.Owner.Equipment.TryGetItem(ConquerItem.Steed)) != null) { if ((attackerSteed = attacker.Owner.Equipment.TryGetItem(ConquerItem.Steed)) != null) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= attackedSteed.Plus) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { suse.Targets.Add(attacked.UID, 0); if (attackedSteed.Plus < attackerSteed.Plus) attacked.RemoveFlag(Update.Flags.Ride); else if (attackedSteed.Plus == attackerSteed.Plus && attackedSteed.PlusProgress <= attackerSteed.PlusProgress) attacked.RemoveFlag(Update.Flags.Ride); else suse.Targets[attacked.UID].Hit = false; } } } } } } attacker.Owner.SendScreen(suse, true); break; } #endregion #region Dash case 1051: { if (attacked != null) { if (!attacked.Dead) { var direction = ServerBase.Kernel.GetAngle(attacker.X, attacker.Y, attacked.X, attacked.Y); if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { attack = new Attack(true); attack.Effect1 = Attack.AttackEffects1.None; uint damage = Calculate.Melee(attacker, attacked, ref attack); attack.AttackType = Attack.Dash; attack.X = attacked.X; attack.Y = attacked.Y; attack.Attacker = attacker.UID; attack.Attacked = attacked.UID; attack.Damage = damage; attack.ToArray()[27] = (byte)direction; attacked.Move(direction); attacker.Move(direction); ReceiveAttack(attacker, attacked, attack, damage, spell); attacker.Owner.SendScreen(attack, true); } } } break; } #endregion #region RapidFire case 8000: { if (attackedsob != null) { if (CanUseSpell(spell, attacker.Owner)) { if (CanAttack(attacker, attackedsob, spell)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = attackedsob.X; suse.Y = attackedsob.Y; attack.Effect1 = Attack.AttackEffects1.None; uint damage = Calculate.Ranged(attacker, attackedsob, ref attack); suse.Effect1 = attack.Effect1; damage = (uint)(damage * spell.PowerPercent); suse.Targets.Add(attackedsob.UID, damage); ReceiveAttack(attacker, attackedsob, attack, damage, spell); attacker.Owner.SendScreen(suse, true); } } } else { if (!attacked.Dead) { if (CanUseSpell(spell, attacker.Owner)) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = attacked.X; suse.Y = attacked.Y; attack.Effect1 = Attack.AttackEffects1.None; uint damage = Calculate.Ranged(attacker, attacked, ref attack); damage = (uint)(damage * spell.PowerPercent); suse.Targets.Add(attacked.UID, damage); ReceiveAttack(attacker, attacked, attack, damage, spell); attacker.Owner.SendScreen(suse, true); } } } } break; } #endregion #region FireOfHell case 1165: case 7014: case 7012: case 9971: case 7017: case 7015: case 7013: case 10360: case 9966: case 30010: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; Sector sector = new Sector(attacker.X, attacker.Y, X, Y); sector.Arrange(spell.Sector, spell.Distance); foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (sector.Inside(attacked.X, attacked.Y)) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Magic(attacker, attacked, spell, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (sector.Inside(attackedsob.X, attackedsob.Y)) { if (CanAttack(attacker, attackedsob, spell)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Magic(attacker, attackedsob, spell, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Scatter case 8001: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (attacker.xx == attacker.X && attacker.yy == attacker.Y) { attacker.scatter += 1; if (attacker.scatter > 30) { attacker.Owner.Disconnect(); } } else { attacker.xx = attacker.X; attacker.yy = attacker.Y; attacker.scatter = 0; } Sector sector = new Sector(attacker.X, attacker.Y, X, Y); sector.Arrange(spell.Sector, spell.Distance); foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (sector.Inside(attacked.X, attacked.Y)) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, spell, ref attack); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (sector.Inside(attackedsob.X, attackedsob.Y)) { if (CanAttack(attacker, attackedsob, spell)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack); suse.Effect1 = attack.Effect1; if (damage == 0) damage = 1; damage = Game.Attacking.Calculate.Percent((int)damage, spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Intensify case 9000: { attacker.IntensifyStamp = Time32.Now; attacker.OnIntensify = true; SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacker.UID, 0); suse.Send(attacker.Owner); break; } #endregion #region StarArrow case 10313: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; Sector sector = new Sector(attacker.X, attacker.Y, X, Y); sector.Arrange(spell.Sector, spell.Distance); foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (sector.Inside(attacked.X, attacked.Y)) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, spell, ref attack); ReceiveAttack(attacker, attacked, attack, damage, spell); suse.Targets.Add(attacked.UID, damage); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as SobNpcSpawn; if (sector.Inside(attackedsob.X, attackedsob.Y)) { if (CanAttack(attacker, attackedsob, spell)) { attack.Effect1 = Attack.AttackEffects1.None; uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack); suse.Effect1 = attack.Effect1; if (damage == 0) damage = 1; damage = Game.Attacking.Calculate.Percent((int)damage, spell.PowerPercent); ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.Targets.Add(attackedsob.UID, damage); } } } } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region Trasnformations case 1270: case 1280: case 1350: case 1360: case 3321: { if (CanUseSpell(spell, attacker.Owner)) { if (attacker.MapID == 1036) return; bool wasTransformated = attacker.Transformed; PrepareSpell(spell, attacker.Owner); #region Atributes switch (spell.ID) { case 1350: switch (spell.Level) { case 0: { attacker.TransformationMaxAttack = 182; attacker.TransformationMinAttack = 122; attacker.TransformationDefence = 1300; attacker.TransformationMagicDefence = 94; attacker.TransformationDodge = 35; attacker.TransformationTime = 39; attacker.TransformationID = 207; break; } case 1: { attacker.TransformationMaxAttack = 200; attacker.TransformationMinAttack = 134; attacker.TransformationDefence = 1400; attacker.TransformationMagicDefence = 96; attacker.TransformationDodge = 40; attacker.TransformationTime = 49; attacker.TransformationID = 207; break; } case 2: { attacker.TransformationMaxAttack = 240; attacker.TransformationMinAttack = 160; attacker.TransformationDefence = 1500; attacker.TransformationMagicDefence = 97; attacker.TransformationDodge = 45; attacker.TransformationTime = 59; attacker.TransformationID = 207; break; } case 3: { attacker.TransformationMaxAttack = 258; attacker.TransformationMinAttack = 172; attacker.TransformationDefence = 1600; attacker.TransformationMagicDefence = 98; attacker.TransformationDodge = 50; attacker.TransformationTime = 69; attacker.TransformationID = 267; break; } case 4: { attacker.TransformationMaxAttack = 300; attacker.TransformationMinAttack = 200; attacker.TransformationDefence = 1900; attacker.TransformationMagicDefence = 99; attacker.TransformationDodge = 55; attacker.TransformationTime = 79; attacker.TransformationID = 267; break; } } break; case 1270: switch (spell.Level) { case 0: { attacker.TransformationMaxAttack = 282; attacker.TransformationMinAttack = 179; attacker.TransformationDefence = 73; attacker.TransformationMagicDefence = 34; attacker.TransformationDodge = 9; attacker.TransformationTime = 34; attacker.TransformationID = 214; break; } case 1: { attacker.TransformationMaxAttack = 395; attacker.TransformationMinAttack = 245; attacker.TransformationDefence = 126; attacker.TransformationMagicDefence = 45; attacker.TransformationDodge = 12; attacker.TransformationTime = 39; attacker.TransformationID = 214; break; } case 2: { attacker.TransformationMaxAttack = 616; attacker.TransformationMinAttack = 367; attacker.TransformationDefence = 180; attacker.TransformationMagicDefence = 53; attacker.TransformationDodge = 15; attacker.TransformationTime = 44; attacker.TransformationID = 214; break; } case 3: { attacker.TransformationMaxAttack = 724; attacker.TransformationMinAttack = 429; attacker.TransformationDefence = 247; attacker.TransformationMagicDefence = 53; attacker.TransformationDodge = 15; attacker.TransformationTime = 49; attacker.TransformationID = 214; break; } case 4: { attacker.TransformationMaxAttack = 1231; attacker.TransformationMinAttack = 704; attacker.TransformationDefence = 499; attacker.TransformationMagicDefence = 50; attacker.TransformationDodge = 20; attacker.TransformationTime = 54; attacker.TransformationID = 274; break; } case 5: { attacker.TransformationMaxAttack = 1573; attacker.TransformationMinAttack = 941; attacker.TransformationDefence = 601; attacker.TransformationMagicDefence = 53; attacker.TransformationDodge = 25; attacker.TransformationTime = 59; attacker.TransformationID = 274; break; } case 6: { attacker.TransformationMaxAttack = 1991; attacker.TransformationMinAttack = 1107; attacker.TransformationDefence = 1029; attacker.TransformationMagicDefence = 55; attacker.TransformationDodge = 30; attacker.TransformationTime = 64; attacker.TransformationID = 274; break; } case 7: { attacker.TransformationMaxAttack = 2226; attacker.TransformationMinAttack = 1235; attacker.TransformationDefence = 1029; attacker.TransformationMagicDefence = 55; attacker.TransformationDodge = 35; attacker.TransformationTime = 69; attacker.TransformationID = 274; break; } } break; case 1360: switch (spell.Level) { case 0: { attacker.TransformationMaxAttack = 1215; attacker.TransformationMinAttack = 610; attacker.TransformationDefence = 100; attacker.TransformationMagicDefence = 96; attacker.TransformationDodge = 30; attacker.TransformationTime = 59; attacker.TransformationID = 217; break; } case 1: { attacker.TransformationMaxAttack = 1310; attacker.TransformationMinAttack = 650; attacker.TransformationDefence = 400; attacker.TransformationMagicDefence = 97; attacker.TransformationDodge = 30; attacker.TransformationTime = 79; attacker.TransformationID = 217; break; } case 2: { attacker.TransformationMaxAttack = 1420; attacker.TransformationMinAttack = 710; attacker.TransformationDefence = 650; attacker.TransformationMagicDefence = 98; attacker.TransformationDodge = 30; attacker.TransformationTime = 89; attacker.TransformationID = 217; break; } case 3: { attacker.TransformationMaxAttack = 1555; attacker.TransformationMinAttack = 780; attacker.TransformationDefence = 720; attacker.TransformationMagicDefence = 98; attacker.TransformationDodge = 30; attacker.TransformationTime = 99; attacker.TransformationID = 277; break; } case 4: { attacker.TransformationMaxAttack = 1660; attacker.TransformationMinAttack = 840; attacker.TransformationDefence = 1200; attacker.TransformationMagicDefence = 99; attacker.TransformationDodge = 30; attacker.TransformationTime = 109; attacker.TransformationID = 277; break; } } break; case 1280: switch (spell.Level) { case 0: { attacker.TransformationMaxAttack = 930; attacker.TransformationMinAttack = 656; attacker.TransformationDefence = 290; attacker.TransformationMagicDefence = 45; attacker.TransformationDodge = 40; attacker.TransformationTime = 29; attacker.TransformationID = 213; break; } case 1: { attacker.TransformationMaxAttack = 1062; attacker.TransformationMinAttack = 750; attacker.TransformationDefence = 320; attacker.TransformationMagicDefence = 46; attacker.TransformationDodge = 40; attacker.TransformationTime = 34; attacker.TransformationID = 213; break; } case 2: { attacker.TransformationMaxAttack = 1292; attacker.TransformationMinAttack = 910; attacker.TransformationDefence = 510; attacker.TransformationMagicDefence = 50; attacker.TransformationDodge = 40; attacker.TransformationTime = 39; attacker.TransformationID = 213; break; } case 3: { attacker.TransformationMaxAttack = 1428; attacker.TransformationMinAttack = 1000; attacker.TransformationDefence = 600; attacker.TransformationMagicDefence = 53; attacker.TransformationDodge = 40; attacker.TransformationTime = 44; attacker.TransformationID = 213; break; } case 4: { attacker.TransformationMaxAttack = 1570; attacker.TransformationMinAttack = 1100; attacker.TransformationDefence = 700; attacker.TransformationMagicDefence = 55; attacker.TransformationDodge = 40; attacker.TransformationTime = 49; attacker.TransformationID = 213; break; } case 5: { attacker.TransformationMaxAttack = 1700; attacker.TransformationMinAttack = 1200; attacker.TransformationDefence = 880; attacker.TransformationMagicDefence = 57; attacker.TransformationDodge = 40; attacker.TransformationTime = 54; attacker.TransformationID = 273; break; } case 6: { attacker.TransformationMaxAttack = 1900; attacker.TransformationMinAttack = 1300; attacker.TransformationDefence = 1540; attacker.TransformationMagicDefence = 59; attacker.TransformationDodge = 40; attacker.TransformationTime = 59; attacker.TransformationID = 273; break; } case 7: { attacker.TransformationMaxAttack = 2100; attacker.TransformationMinAttack = 1500; attacker.TransformationDefence = 1880; attacker.TransformationMagicDefence = 61; attacker.TransformationDodge = 40; attacker.TransformationTime = 59; attacker.TransformationID = 273; break; } case 8: { attacker.TransformationMaxAttack = 2300; attacker.TransformationMinAttack = 1600; attacker.TransformationDefence = 1970; attacker.TransformationMagicDefence = 63; attacker.TransformationDodge = 40; attacker.TransformationTime = 59; attacker.TransformationID = 273; break; } } break; case 3321: { attacker.TransformationMaxAttack = 2000000; attacker.TransformationMinAttack = 2000000; attacker.TransformationDefence = 65355; attacker.TransformationMagicDefence = 65355; attacker.TransformationDodge = 35; attacker.TransformationTime = 65355; attacker.TransformationID = 223; break; } } #endregion SpellUse spellUse = new SpellUse(true); spellUse.Attacker = attacker.UID; spellUse.SpellID = spell.ID; spellUse.SpellLevel = spell.Level; spellUse.X = X; spellUse.Y = Y; spellUse.Targets.Add(attacker.UID, (uint)0); attacker.Owner.SendScreen(spellUse, true); attacker.TransformationStamp = Time32.Now; attacker.TransformationMaxHP = 3000; if (spell.ID == 1270) attacker.TransformationMaxHP = 50000; attacker.TransformationAttackRange = 3; if (spell.ID == 1360) attacker.TransformationAttackRange = 10; if (!wasTransformated) { double maxHP = attacker.MaxHitpoints; double HP = attacker.Hitpoints; double point = HP / maxHP; attacker.Hitpoints = (uint)(attacker.TransformationMaxHP * point); } attacker.Update(Update.MaxHitpoints, attacker.TransformationMaxHP, false); } break; } #endregion #region Bless case 9876: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); attacker.AddFlag(Update.Flags.CastPray); SpellUse spellUse = new SpellUse(true); spellUse.Attacker = attacker.UID; spellUse.SpellID = spell.ID; spellUse.SpellLevel = spell.Level; spellUse.X = X; spellUse.Y = Y; spellUse.Targets.Add(attacker.UID, 0); attacker.Owner.SendScreen(spellUse, true); } break; } #endregion #region Companions case 4000: case 4010: case 4020: case 4050: case 4060: case 4070: { if (CanUseSpell(spell, attacker.Owner)) { if (ServerBase.Constants.steedguard.Contains(attacker.MapID)) return; if (attacker.Owner.Map.BaseID == 700) return; if (attacker.Owner.Companion != null) { if (attacker.Owner.Companion.MonsterInfo != null) { attacker.Owner.Map.RemoveEntity(attacker.Owner.Companion); Data data = new Data(true); data.UID = attacker.Owner.Companion.UID; data.ID = Data.RemoveEntity; attacker.Owner.Companion.MonsterInfo.SendScreen(data); attacker.Owner.Companion = null; } } PrepareSpell(spell, attacker.Owner); SpellUse spellUse = new SpellUse(true); spellUse.Attacker = attacker.UID; spellUse.SpellID = spell.ID; spellUse.SpellLevel = spell.Level; spellUse.X = X; spellUse.Y = Y; spellUse.Targets.Add(attacker.UID, 0); attacker.Owner.SendScreen(spellUse, true); attacker.Owner.Companion = new Entity(EntityFlag.Monster, true); attacker.Owner.Companion.MonsterInfo = new PhoenixProject.Database.MonsterInformation(); Database.MonsterInformation mt = Database.MonsterInformation.MonsterInfos[spell.Power]; attacker.Owner.Companion.Owner = attacker.Owner; attacker.Owner.Companion.MapObjType = MapObjectType.Monster; attacker.Owner.Companion.MonsterInfo = mt.Copy(); attacker.Owner.Companion.MonsterInfo.Owner = attacker.Owner.Companion; attacker.Owner.Companion.Name = mt.Name; attacker.Owner.Companion.MinAttack = mt.MinAttack; attacker.Owner.Companion.MaxAttack = attacker.Owner.Companion.MagicAttack = mt.MaxAttack; attacker.Owner.Companion.Hitpoints = attacker.Owner.Companion.MaxHitpoints = mt.Hitpoints; attacker.Owner.Companion.Body = mt.Mesh; attacker.Owner.Companion.Level = mt.Level; //10000181 - 1000006 attacker.Owner.Companion.UID = (uint)ServerBase.Kernel.Random.Next(900300, 970350); attacker.Owner.Companion.MapID = attacker.Owner.Map.ID; attacker.Owner.Companion.SendUpdates = true; attacker.Owner.Companion.X = attacker.X; attacker.Owner.Companion.Y = attacker.Y; attacker.Owner.Map.AddEntity(attacker.Owner.Companion); attacker.Owner.SendScreenSpawn(attacker.Owner.Companion, true); } break; } #endregion #region MonkSpells //Compassion case 10395: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); if (attacker.Owner.Team != null) { foreach (Client.GameState c in attacker.Owner.Team.Teammates) { if (c.Entity.MapID == attacker.MapID) { short distance = Kernel.GetDistance(c.Entity.X, c.Entity.Y, attacker.X, attacker.Y); if (distance < ServerBase.Constants.pScreenDistance) { if (c.Entity.UID != attacker.UID) { if (!c.AlternateEquipment) { c.LoadItemStats(c.Entity); } else { c.LoadItemStats2(c.Entity); } c.Entity.AuraStamp = Time32.Now; c.Entity.AuraTime = 20; // attacked.MaxAttack += 1000; c.Entity.CriticalStrike += 10; //Console.WriteLine("sk" + attacked.CriticalStrike + ""); c.Entity.RemoveFlag2(Update.Flags2.FendAura); c.Entity.RemoveFlag2(Update.Flags2.MetalAura); c.Entity.RemoveFlag2(Update.Flags2.WoodAura); c.Entity.RemoveFlag2(Update.Flags2.WaterAura); c.Entity.RemoveFlag2(Update.Flags2.EarthAura); c.Entity.RemoveFlag2(Update.Flags2.FireAura); c.Entity.AddFlag2(Update.Flags2.TyrantAura); //Update ud = new Update(true); //ud.Aura(attacked, attacked.CriticalStrike, spell.Level, (byte)spell.Duration); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data2 = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura, Identifier = c.Entity.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; c.Entity.Owner.Send((byte[])data2); } } } } } if (!attacked.Owner.AlternateEquipment) { attacked.Owner.LoadItemStats(attacked.Owner.Entity); } else { attacked.Owner.LoadItemStats2(attacked.Owner.Entity); } SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacker.Owner.SendScreen(suse, true); attacked.AuraStamp = Time32.Now; attacked.AuraTime = 20; // attacked.MaxAttack += 1000; attacked.CriticalStrike += 10; //Console.WriteLine("sk" + attacked.CriticalStrike + ""); attacked.RemoveFlag2(Update.Flags2.FendAura); attacked.RemoveFlag2(Update.Flags2.MetalAura); attacked.RemoveFlag2(Update.Flags2.WoodAura); attacked.RemoveFlag2(Update.Flags2.WaterAura); attacked.RemoveFlag2(Update.Flags2.EarthAura); attacked.RemoveFlag2(Update.Flags2.FireAura); attacked.AddFlag2(Update.Flags2.TyrantAura); //Update ud = new Update(true); //ud.Aura(attacked, attacked.CriticalStrike, spell.Level, (byte)spell.Duration); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura2, Identifier = attacker.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; attacker.Owner.Send((byte[])data); } break; } case 10410: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); if (attacker.Owner.Team != null) { foreach (Client.GameState c in attacker.Owner.Team.Teammates) { if (c.Entity.MapID == attacker.MapID) { short distance = Kernel.GetDistance(c.Entity.X, c.Entity.Y, attacker.X, attacker.Y); if (distance < ServerBase.Constants.pScreenDistance) { if (c.Entity.UID != attacker.UID) { if (!c.AlternateEquipment) { c.LoadItemStats(c.Entity); } else { c.LoadItemStats2(c.Entity); } c.Entity.AuraStamp = Time32.Now; c.Entity.AuraTime = 20; c.Entity.SkillCStrike += 10; c.Entity.CriticalStrike += 10; // attacked.MaxAttack += 100; c.Entity.RemoveFlag2(Update.Flags2.TyrantAura); c.Entity.RemoveFlag2(Update.Flags2.MetalAura); c.Entity.RemoveFlag2(Update.Flags2.WoodAura); c.Entity.RemoveFlag2(Update.Flags2.WaterAura); c.Entity.RemoveFlag2(Update.Flags2.EarthAura); c.Entity.RemoveFlag2(Update.Flags2.FireAura); c.Entity.AddFlag2(Update.Flags2.FendAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data2 = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura2, Identifier = c.Entity.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; c.Entity.Owner.Send((byte[])data2); } } } } } if (!attacked.Owner.AlternateEquipment) { attacked.Owner.LoadItemStats(attacked.Owner.Entity); } else { attacked.Owner.LoadItemStats2(attacked.Owner.Entity); } SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacker.Owner.SendScreen(suse, true); attacked.AuraStamp = Time32.Now; attacked.AuraTime = 20; attacked.SkillCStrike += 10; attacked.CriticalStrike += 10; // attacked.MaxAttack += 100; attacked.RemoveFlag2(Update.Flags2.TyrantAura); attacked.RemoveFlag2(Update.Flags2.MetalAura); attacked.RemoveFlag2(Update.Flags2.WoodAura); attacked.RemoveFlag2(Update.Flags2.WaterAura); attacked.RemoveFlag2(Update.Flags2.EarthAura); attacked.RemoveFlag2(Update.Flags2.FireAura); attacked.AddFlag2(Update.Flags2.FendAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura, Identifier = attacker.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; attacker.Owner.Send((byte[])data); //Update ud = new Update(true); //ud.Aura(attacked, attacked.SkillCStrike, spell.Level, (byte)spell.Duration); } break; } case 10420: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); if (attacker.Owner.Team != null) { foreach (Client.GameState c in attacker.Owner.Team.Teammates) { if (c.Entity.MapID == attacker.MapID) { short distance = Kernel.GetDistance(c.Entity.X, c.Entity.Y, attacker.X, attacker.Y); if (distance < ServerBase.Constants.pScreenDistance) { if (c.Entity.UID != attacker.UID) { if (!c.AlternateEquipment) { c.LoadItemStats(c.Entity); } else { c.LoadItemStats2(c.Entity); } c.Entity.AuraStamp = Time32.Now; c.Entity.AuraTime = 20; c.Entity.MetalResistance += 30; c.Entity.RemoveFlag2(Update.Flags2.TyrantAura); c.Entity.RemoveFlag2(Update.Flags2.FendAura); c.Entity.RemoveFlag2(Update.Flags2.WoodAura); c.Entity.RemoveFlag2(Update.Flags2.WaterAura); c.Entity.RemoveFlag2(Update.Flags2.EarthAura); c.Entity.RemoveFlag2(Update.Flags2.FireAura); c.Entity.AddFlag2(Update.Flags2.MetalAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data2 = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura2, Identifier = c.Entity.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; c.Entity.Owner.Send((byte[])data2); } } } } } if (!attacked.Owner.AlternateEquipment) { attacked.Owner.LoadItemStats(attacked.Owner.Entity); } else { attacked.Owner.LoadItemStats2(attacked.Owner.Entity); } SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacker.Owner.SendScreen(suse, true); attacked.AuraStamp = Time32.Now; attacked.AuraTime = 20; attacked.MetalResistance += 30; attacked.RemoveFlag2(Update.Flags2.TyrantAura); attacked.RemoveFlag2(Update.Flags2.FendAura); attacked.RemoveFlag2(Update.Flags2.WoodAura); attacked.RemoveFlag2(Update.Flags2.WaterAura); attacked.RemoveFlag2(Update.Flags2.EarthAura); attacked.RemoveFlag2(Update.Flags2.FireAura); attacked.AddFlag2(Update.Flags2.MetalAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura, Identifier = attacker.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; attacker.Owner.Send((byte[])data); } //Update ud = new Update(true); //ud.Aura(attacked, attacked.MetalResistance, spell.Level, (byte)spell.Duration); break; } case 10421: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); if (attacker.Owner.Team != null) { foreach (Client.GameState c in attacker.Owner.Team.Teammates) { if (c.Entity.MapID == attacker.MapID) { short distance = Kernel.GetDistance(c.Entity.X, c.Entity.Y, attacker.X, attacker.Y); if (distance < ServerBase.Constants.pScreenDistance) { if (c.Entity.UID != attacker.UID) { if (!c.AlternateEquipment) { c.LoadItemStats(c.Entity); } else { c.LoadItemStats2(c.Entity); } c.Entity.AuraStamp = Time32.Now; c.Entity.AuraTime = 20; c.Entity.WoodResistance += 30; c.Entity.RemoveFlag2(Update.Flags2.TyrantAura); c.Entity.RemoveFlag2(Update.Flags2.FendAura); c.Entity.RemoveFlag2(Update.Flags2.MetalAura); c.Entity.RemoveFlag2(Update.Flags2.WaterAura); c.Entity.RemoveFlag2(Update.Flags2.EarthAura); c.Entity.RemoveFlag2(Update.Flags2.FireAura); c.Entity.AddFlag2(Update.Flags2.WoodAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data2 = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura2, Identifier = c.Entity.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; c.Entity.Owner.Send((byte[])data2); } } } } } if (!attacked.Owner.AlternateEquipment) { attacked.Owner.LoadItemStats(attacked.Owner.Entity); } else { attacked.Owner.LoadItemStats2(attacked.Owner.Entity); } SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacker.Owner.SendScreen(suse, true); attacked.AuraStamp = Time32.Now; attacked.AuraTime = 20; attacked.WoodResistance += 30; attacked.RemoveFlag2(Update.Flags2.TyrantAura); attacked.RemoveFlag2(Update.Flags2.FendAura); attacked.RemoveFlag2(Update.Flags2.MetalAura); attacked.RemoveFlag2(Update.Flags2.WaterAura); attacked.RemoveFlag2(Update.Flags2.EarthAura); attacked.RemoveFlag2(Update.Flags2.FireAura); attacked.AddFlag2(Update.Flags2.WoodAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura, Identifier = attacker.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; attacker.Owner.Send((byte[])data); //Update ud = new Update(true); } //ud.Aura(attacked, attacked.WoodResistance, spell.Level, (byte)spell.Duration); break; } case 10422: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); if (attacker.Owner.Team != null) { foreach (Client.GameState c in attacker.Owner.Team.Teammates) { if (c.Entity.MapID == attacker.MapID) { short distance = Kernel.GetDistance(c.Entity.X, c.Entity.Y, attacker.X, attacker.Y); if (distance < ServerBase.Constants.pScreenDistance) { if (c.Entity.UID != attacker.UID) { if (!c.AlternateEquipment) { c.LoadItemStats(c.Entity); } else { c.LoadItemStats2(c.Entity); } c.Entity.AuraStamp = Time32.Now; c.Entity.AuraTime = 20; c.Entity.WaterResistance += 30; c.Entity.RemoveFlag2(Update.Flags2.TyrantAura); c.Entity.RemoveFlag2(Update.Flags2.FendAura); c.Entity.RemoveFlag2(Update.Flags2.MetalAura); c.Entity.RemoveFlag2(Update.Flags2.WoodAura); c.Entity.RemoveFlag2(Update.Flags2.EarthAura); c.Entity.RemoveFlag2(Update.Flags2.FireAura); c.Entity.AddFlag2(Update.Flags2.WaterAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data2 = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura2, Identifier = c.Entity.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; c.Entity.Owner.Send((byte[])data2); } } } } } if (!attacked.Owner.AlternateEquipment) { attacked.Owner.LoadItemStats(attacked.Owner.Entity); } else { attacked.Owner.LoadItemStats2(attacked.Owner.Entity); } SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacker.Owner.SendScreen(suse, true); attacked.AuraStamp = Time32.Now; attacked.AuraTime = 20; attacked.WaterResistance += 30; attacked.RemoveFlag2(Update.Flags2.TyrantAura); attacked.RemoveFlag2(Update.Flags2.FendAura); attacked.RemoveFlag2(Update.Flags2.MetalAura); attacked.RemoveFlag2(Update.Flags2.WoodAura); attacked.RemoveFlag2(Update.Flags2.EarthAura); attacked.RemoveFlag2(Update.Flags2.FireAura); attacked.AddFlag2(Update.Flags2.WaterAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura, Identifier = attacker.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; attacker.Owner.Send((byte[])data); //Update ud = new Update(true); } //ud.Aura(attacked, attacked.WaterResistance, spell.Level, (byte)spell.Duration); break; } case 10424: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); if (attacker.Owner.Team != null) { foreach (Client.GameState c in attacker.Owner.Team.Teammates) { if (c.Entity.MapID == attacker.MapID) { short distance = Kernel.GetDistance(c.Entity.X, c.Entity.Y, attacker.X, attacker.Y); if (distance < ServerBase.Constants.pScreenDistance) { if (c.Entity.UID != attacker.UID) { if (!c.AlternateEquipment) { c.LoadItemStats(c.Entity); } else { c.LoadItemStats2(c.Entity); } c.Entity.AuraStamp = Time32.Now; c.Entity.AuraTime = 20; c.Entity.EarthResistance += 30; c.Entity.RemoveFlag2(Update.Flags2.TyrantAura); c.Entity.RemoveFlag2(Update.Flags2.FendAura); c.Entity.RemoveFlag2(Update.Flags2.MetalAura); c.Entity.RemoveFlag2(Update.Flags2.WoodAura); c.Entity.RemoveFlag2(Update.Flags2.WaterAura); c.Entity.RemoveFlag2(Update.Flags2.FireAura); c.Entity.AddFlag2(Update.Flags2.EarthAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data2 = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura, Identifier = c.Entity.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; c.Entity.Owner.Send((byte[])data2); } } } } } if (!attacked.Owner.AlternateEquipment) { attacked.Owner.LoadItemStats(attacked.Owner.Entity); } else { attacked.Owner.LoadItemStats2(attacked.Owner.Entity); } SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacker.Owner.SendScreen(suse, true); attacked.AuraStamp = Time32.Now; attacked.AuraTime = 20; attacked.EarthResistance += 30; attacked.RemoveFlag2(Update.Flags2.TyrantAura); attacked.RemoveFlag2(Update.Flags2.FendAura); attacked.RemoveFlag2(Update.Flags2.MetalAura); attacked.RemoveFlag2(Update.Flags2.WoodAura); attacked.RemoveFlag2(Update.Flags2.WaterAura); attacked.RemoveFlag2(Update.Flags2.FireAura); attacked.AddFlag2(Update.Flags2.EarthAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura2, Identifier = attacker.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; attacker.Owner.Send((byte[])data); //Update ud = new Update(true); } ///ud.Aura(attacked, attacked.EarthResistance, spell.Level, (byte)spell.Duration); break; } case 10423: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); if (attacker.Owner.Team != null) { foreach (Client.GameState c in attacker.Owner.Team.Teammates) { if (c.Entity.MapID == attacker.MapID) { short distance = Kernel.GetDistance(c.Entity.X, c.Entity.Y, attacker.X, attacker.Y); if (distance < ServerBase.Constants.pScreenDistance) { if (c.Entity.UID != attacker.UID) { if (!c.AlternateEquipment) { c.LoadItemStats(c.Entity); } else { c.LoadItemStats2(c.Entity); } c.Entity.AuraStamp = Time32.Now; c.Entity.AuraTime = 20; c.Entity.FireResistance += 30; c.Entity.RemoveFlag2(Update.Flags2.TyrantAura); c.Entity.RemoveFlag2(Update.Flags2.FendAura); c.Entity.RemoveFlag2(Update.Flags2.MetalAura); c.Entity.RemoveFlag2(Update.Flags2.WoodAura); c.Entity.RemoveFlag2(Update.Flags2.WaterAura); c.Entity.RemoveFlag2(Update.Flags2.EarthAura); c.Entity.AddFlag2(Update.Flags2.FireAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura2 = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data2 = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura2, Identifier = c.Entity.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; c.Entity.Owner.Send((byte[])data2); } } } } } if (!attacked.Owner.AlternateEquipment) { attacked.Owner.LoadItemStats(attacked.Owner.Entity); } else { attacked.Owner.LoadItemStats2(attacked.Owner.Entity); } SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; attacker.Owner.SendScreen(suse, true); attacked.AuraStamp = Time32.Now; attacked.AuraTime = 20; attacked.FireResistance += 30; attacked.RemoveFlag2(Update.Flags2.TyrantAura); attacked.RemoveFlag2(Update.Flags2.FendAura); attacked.RemoveFlag2(Update.Flags2.MetalAura); attacked.RemoveFlag2(Update.Flags2.WoodAura); attacked.RemoveFlag2(Update.Flags2.WaterAura); attacked.RemoveFlag2(Update.Flags2.EarthAura); attacked.AddFlag2(Update.Flags2.FireAura); PhoenixProject.Network.GamePackets.StatusIconData.AuraType tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; switch (spell.ID) { case 0x28b4: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MetalAura; break; case 0x28b5: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WoodAura; break; case 0x28b6: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.WaterAura; break; case 0x28b7: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FireAura; break; case 0x28b8: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.EarthAura; break; case 0x2bc0: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.MagicDefender; break; case 0x289b: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.TyrantAura; break; case 0x28aa: tyrantAura = PhoenixProject.Network.GamePackets.StatusIconData.AuraType.FendAura; break; } StatusIconData data = new StatusIconData { AuraLevel = spell.Level, AuraPower = spell.Power, AuraType2 = tyrantAura, Identifier = attacker.UID, Type = PhoenixProject.Network.GamePackets.StatusIconData.AuraDataTypes.Add }; attacker.Owner.Send((byte[])data); } // Update ud = new Update(true); // ud.Aura(attacked, attacked.FireResistance, spell.Level, (byte)spell.Duration); break; } case 10430: { if (CanUseSpell(spell, attacker.Owner)) { SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (attacker.Owner.Team != null) { PrepareSpell(spell, attacker.Owner); foreach (Client.GameState teammate in attacker.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, teammate.Entity.X, teammate.Entity.Y) <= spell.Distance) { attacker.RemoveFlag(Update.Flags.Poisoned); suse.Targets.Add(teammate.Entity.UID, 1); } } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { if (attacked == null) return; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Distance) { PrepareSpell(spell, attacker.Owner); attacker.RemoveFlag(Update.Flags.Poisoned); suse.Targets.Add(attacked.UID, 1); if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } else { attacker.AttackPacket = null; } } } attacker.AttackPacket = null; break; } //Serenity case 10400: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); if (attacker == null) return; SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = SpellID; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacker.UID, 1); attacker.ToxicFogLeft = 0; attacker.NoDrugsTime = 0; attacker.RemoveFlag2(Update.Flags2.SoulShackle); SyncPacket packet3 = new SyncPacket { Identifier = attacked.UID, Count = 2, Type = PhoenixProject.Network.GamePackets.SyncPacket.SyncType.StatusFlag, StatusFlag1 = (ulong)attacked.StatusFlag, StatusFlag2 = (ulong)attacked.StatusFlag2, Unknown1 = 0x36, StatusFlagOffset = 0x6f, Time = 0, Value = 0, Level = spell.Level }; attacked.Owner.Send((byte[])packet3); attacker.Owner.SendScreen(suse, true); } attacker.AttackPacket = null; break; } //Tranquility case 10425: { if (attacked == null) return; if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); if (attacked == null) return; SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = SpellID; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; suse.Targets.Add(attacked.UID, 1); attacked.ToxicFogLeft = 0; attacked.ShackleTime = 0; attacked.NoDrugsTime = 0; attacked.RemoveFlag2(Update.Flags2.SoulShackle); if (attacked.EntityFlag == EntityFlag.Player) { SyncPacket packet3 = new SyncPacket { Identifier = attacked.UID, Count = 2, Type = PhoenixProject.Network.GamePackets.SyncPacket.SyncType.StatusFlag, StatusFlag1 = (ulong)attacked.StatusFlag, StatusFlag2 = (ulong)attacked.StatusFlag2, Unknown1 = 0x36, StatusFlagOffset = 0x6f, Time = 0, Value = 0, Level = spell.Level }; attacked.Owner.Send((byte[])packet3); } if (attacked.EntityFlag == EntityFlag.Player) attacked.Owner.SendScreen(suse, true); else attacked.MonsterInfo.SendScreen(suse); } attacker.AttackPacket = null; break; } //WhirlwindKick case 10415: { if (Time32.Now < attacker.WhilrwindKick.AddMilliseconds(1200)) { attacker.AttackPacket = null; return; } attacker.WhilrwindKick = Time32.Now; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= 3) { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); SpellUse suse = new SpellUse(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = 0; suse.X = (ushort)ServerBase.Kernel.Random.Next(3, 10); suse.Y = 0; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= 3) { for (int c = 0; c < attacker.Owner.Screen.Objects.Count; c++) { //For a multi threaded application, while we go through the collection //the collection might change. We will make sure that we wont go off //the limits with a check. if (c >= attacker.Owner.Screen.Objects.Count) break; Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c]; if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player) { attacked = _obj as Entity; if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range) { if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Ranged)) { uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell, ref attack); suse.Effect1 = attack.Effect1; ReceiveAttack(attacker, attacked, attack, damage, spell); attacked.Stunned = true; attacked.StunStamp = Time32.Now; suse.Targets.Add(attacked.UID, damage); } } } } attacker.AttackPacket = null; } else { attacker.AttackPacket = null; return; } attacker.Owner.SendScreen(suse, true); suse.Targets = new SafeDictionary<uint, SpellUse.DamageClass>(); attacker.AttackPacket = null; return; } attacker.AttackPacket = null; } attacker.AttackPacket = null; return; } #endregion default: if (attacker.Owner.Account.State == PhoenixProject.Database.AccountTable.AccountState.ProjectManager) attacker.Owner.Send(new Message("Unknown spell id: " + spell.ID, System.Drawing.Color.CadetBlue, Message.Talk)); break; } if (spell.CanKill == 0) { attacker.Owner.IncreaseSpellExperience(80, spellID); } // attacker.Owner.IncreaseSpellExperience(Experience, spellID);//kimo if (attacker.MapID == 1039) { if (spell.ID == 7001 || spell.ID == 9876) { attacker.AttackPacket = null; return; } if (attacker.AttackPacket != null) { attack.Damage = spell.ID; attacker.AttackPacket = attack; if (Database.SpellTable.WeaponSpells.ContainsValue(spell.ID)) { if (attacker.AttackPacket == null) { attack.AttackType = Attack.Melee; attacker.AttackPacket = attack; } else { attacker.AttackPacket.AttackType = Attack.Melee; } } } } else { if (spell.NextSpellID != 0) { if (spell.NextSpellID >= 1000 && spell.NextSpellID <= 1002) if (Target >= 1000000) { attacker.AttackPacket = null; return; } attack.Damage = spell.NextSpellID; attacker.AttackPacket = attack; } else { if (!Database.SpellTable.WeaponSpells.ContainsValue(spell.ID) || spell.ID == 9876) attacker.AttackPacket = null; else { if (attacker.AttackPacket == null) { attack.AttackType = Attack.Melee; attacker.AttackPacket = attack; } else { attacker.AttackPacket.AttackType = Attack.Melee; } } } } } else { attacker.AttackPacket = null; } } #endregion } #endregion } #endregion } }