public static void Load() { if (ServerBase.Kernel.Maps.ContainsKey(1002)) { uint ItemID = 720159; #region CPBag INpc npc = new Network.GamePackets.NpcSpawn(); npc.UID = 1305; npc.Mesh = 13050; npc.Type = Enums.NpcType.Talker; npc.X = (ushort)(X-1); npc.Y = (ushort)(Y-1); npc.MapID = 1002; //ServerBase.Kernel.Maps[1002].AddNpc(npc); // Program.KimoTime16 = Time32.Now; Game.Map Map = ServerBase.Kernel.Maps[1002]; 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 = Database.rates.PartyDrop; floorItem.ItemID = ItemID; floorItem.MapID = 1002; 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); foreach (Client.GameState C in ServerBase.Kernel.GamePool.Values) { if (C.Entity.MapID == 1002) { C.SendScreenSpawn(floorItem, true); npc.SendSpawn(C); //C.Entity.Update(PhoenixProject.Network.GamePackets._String.Effect, "wsmhcxq_att", true); } } } // Network.GamePackets.NpcInitial2.DeleteNPC2(1305); #endregion //Load2(); } }
public void DropRandomStuff(string KillerName) { if (Money > 100) { int amount = (int)(Money / 2); amount = ServerBase.Kernel.Random.Next(amount); if (ServerBase.Kernel.Rate(40)) { uint ItemID = Network.PacketHandler.MoneyItemID((uint)amount); ushort x = X, y = Y; Game.Map Map = ServerBase.Kernel.Maps[MapID]; if (Map.SelectCoordonates(ref x, ref y)) { Money -= (uint)amount; Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Money; floorItem.Value = (uint)amount; floorItem.ItemID = ItemID; floorItem.MapID = 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); Owner.SendScreenSpawn(floorItem, true); } } } if (Owner.Inventory.Count > 0) { uint count = (uint)(Owner.Inventory.Count / 4); for (int c = 0; c < count; c++) { int pos = ServerBase.Kernel.Random.Next(Owner.Inventory.Objects.Length); if (Owner.Inventory.Count > Owner.Inventory.Objects.Length) Owner.Inventory.Update(); if (Owner.Inventory.Objects[pos] != null) { if (Owner.Inventory.Objects[pos].ID == 720828 || Owner.Inventory.Objects[pos].ID == 2100075 || Owner.Inventory.Objects[pos].ID == 2100065 || Owner.Inventory.Objects[pos].ID == 2100055) continue; if (Owner.Inventory.Objects[pos].Lock == 0 || PKPoints > 99) { if (!Owner.Inventory.Objects[pos].Bound) { if (!Owner.Inventory.Objects[pos].Suspicious) { var Item = Owner.Inventory.Objects[pos]; var infos = Database.ConquerItemInformation.BaseInformations[(uint)Item.ID]; ushort x = X, y = Y; Game.Map Map = ServerBase.Kernel.Maps[MapID]; if (Map.SelectCoordonates(ref x, ref y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); ushort stack = Item.StackSize; Item.StackSize = 0; Owner.Inventory.Remove(Item, Game.Enums.ItemUse.Remove); Item.StackSize = stack; floorItem.Item = Item; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)Item.ID; floorItem.MapID = MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = x; floorItem.Y = y; if (PKPoints < 100) floorItem.Type = Network.GamePackets.FloorItem.Drop; else floorItem.Type = Network.GamePackets.FloorItem.DropDetain; 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; if (PKPoints < 100) Map.AddFloorItem(floorItem); Owner.SendScreenSpawn(floorItem, true); if (Item.Lock != 0) { Item.Lock = 0; Database.DetainedItemTable.DetainItem(Item, Owner, Killer.Owner); } } } } } } } } if (PKPoints > 29 && Killer != null && Killer.Owner != null) { //if (KillerName == "Guard1" || KillerName == "TeratoDragon" || KillerName == "SnowBanshee" || KillerName == "SwordMaster") // return; foreach (var Item in Owner.Equipment.Objects) { if (Item != null) { if (ServerBase.Kernel.Rate(35 + (int)(PKPoints > 99 ? 75 : 0))) { ushort x = X, y = Y; Game.Map Map = ServerBase.Kernel.Maps[MapID]; if (Map.SelectCoordonates(ref x, ref y)) { Owner.Equipment.RemoveToGround(Item.Position); var infos = Database.ConquerItemInformation.BaseInformations[(uint)Item.ID]; Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = Item; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)Item.ID; floorItem.MapID = MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = x; floorItem.Y = y; floorItem.Type = Network.GamePackets.FloorItem.DropDetain; 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; Owner.SendScreenSpawn(floorItem, true); Database.DetainedItemTable.DetainItem(Item, Owner, Killer.Owner); break; } } } } } if (PKPoints > 99) { if (KillerName != "") ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(Name + " has been captured by " + KillerName + " and sent in jail! The world is now safer!", System.Drawing.Color.Red, Message.Talk), ServerBase.Kernel.GamePool.Values); else ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(Name + " has been captured and sent in jail! The world is now safer!", System.Drawing.Color.Red, Message.Talk), ServerBase.Kernel.GamePool.Values); Teleport(6000, 30, 76); } }
public void Drop(Game.Entity killer) { if (Owner.Name.Contains("Guard") || killer.Name.Contains("Guard1")) return; #region CleansingDevil if (Name == "CleansingDevil" && killer.MapID == 1116) { Random R = new Random(); int Nr = R.Next(1, 10); if (Nr == 1) killer.Owner.Inventory.Add(184355, 0, 1); if (Nr == 2) killer.Owner.Inventory.Add(560339, 0, 1); if (Nr == 3) killer.Owner.Inventory.Add(183365, 0, 1); if (Nr == 4) killer.Owner.Inventory.Add(183335, 0, 1); if (Nr == 5) killer.Owner.Inventory.Add(184345, 0, 1); if (Nr == 6) killer.Owner.Inventory.Add(184365, 0, 1); if (Nr == 7) killer.Owner.Inventory.Add(184385, 0, 1); if (Nr == 8) killer.Owner.Inventory.Add(183395, 0, 1); if (Nr == 9) killer.Owner.Inventory.Add(183385, 0, 1); if (Nr == 10) killer.Owner.Inventory.Add(722057, 0, 1); killer.Teleport(1002, 400, 400); Time32 Now = Time32.Now; foreach (Client.GameState Chaar in ServerBase.Kernel.GamePool.Values) { if (Chaar != null) { if (Chaar.Entity.MapID == 1116) { Chaar.Entity.Teleport(1002, 400, 400); } } } } #endregion #region Sizer if (Name == "Sizer" && killer.MapID == 3030) { Random R = new Random(); int Nr = R.Next(1, 21); if (Nr == 1) killer.Owner.Inventory.Add35(184355, 12, 1); if (Nr == 2) killer.Owner.Inventory.Add35(560339, 12, 1); if (Nr == 3) killer.Owner.Inventory.Add35(183365, 12, 1); if (Nr == 4) killer.Owner.Inventory.Add35(183335, 12, 1); if (Nr == 5) killer.Owner.Inventory.Add35(184345, 12, 1); if (Nr == 6) killer.Owner.Inventory.Add35(184365, 12, 1); if (Nr == 7) killer.Owner.Inventory.Add35(184385, 12, 1); if (Nr == 8) killer.Owner.Inventory.Add35(183395, 12, 1); if (Nr == 9) killer.Owner.Inventory.Add35(183385, 12, 1); if (Nr == 10) killer.Owner.Inventory.Add35(192300, 12, 1); if (Nr == 11) killer.Owner.Inventory.Add35(184335, 12, 1); if (Nr == 12) killer.Owner.Inventory.Add35(187355, 12, 1); if (Nr == 13) killer.Owner.Inventory.Add35(193300, 12, 1); if (Nr == 14) killer.Owner.Inventory.Add35(194300, 12, 1); if (Nr == 15) killer.Owner.Inventory.Add35(420339, 12, 1); if (Nr == 16) killer.Owner.Inventory.Add35(480339, 12, 1); if (Nr == 17) killer.Owner.Inventory.Add35(410339, 12, 1); if (Nr == 18) killer.Owner.Inventory.Add35(500329, 12, 1); if (Nr == 19) killer.Owner.Inventory.Add35(421339, 12, 1); if (Nr == 20) killer.Owner.Inventory.Add35(561339, 12, 1); if (Nr == 21) killer.Owner.Inventory.Add(722057, 0, 1); } #endregion #region Peter if (Name == "Peter" && killer.MapID == 3030) { Random R = new Random(); int Nr = R.Next(1, 21); if (Nr == 1) killer.Owner.Inventory.Add35(184355, 12, 1); if (Nr == 2) killer.Owner.Inventory.Add35(560339, 12, 1); if (Nr == 3) killer.Owner.Inventory.Add35(183365, 12, 1); if (Nr == 4) killer.Owner.Inventory.Add35(183335, 12, 1); if (Nr == 5) killer.Owner.Inventory.Add35(184345, 12, 1); if (Nr == 6) killer.Owner.Inventory.Add35(184365, 12, 1); if (Nr == 7) killer.Owner.Inventory.Add35(184385, 12, 1); if (Nr == 8) killer.Owner.Inventory.Add35(183395, 12, 1); if (Nr == 9) killer.Owner.Inventory.Add35(183385, 12, 1); if (Nr == 10) killer.Owner.Inventory.Add35(192300, 12, 1); if (Nr == 11) killer.Owner.Inventory.Add35(184335, 12, 1); if (Nr == 12) killer.Owner.Inventory.Add35(187355, 12, 1); if (Nr == 13) killer.Owner.Inventory.Add35(193300, 12, 1); if (Nr == 14) killer.Owner.Inventory.Add35(194300, 12, 1); if (Nr == 15) killer.Owner.Inventory.Add35(420339, 12, 1); if (Nr == 16) killer.Owner.Inventory.Add35(480339, 12, 1); if (Nr == 17) killer.Owner.Inventory.Add35(410339, 12, 1); if (Nr == 18) killer.Owner.Inventory.Add35(500329, 12, 1); if (Nr == 19) killer.Owner.Inventory.Add35(421339, 12, 1); if (Nr == 20) killer.Owner.Inventory.Add35(561339, 12, 1); if (Nr == 21) killer.Owner.Inventory.Add(722057, 0, 1); } #endregion #region DragonSon 1 if (Name == "DragonSon1") { if (killer.Name.Contains("Guard")) { return; } killer.Teleport(1596, 130, 130); Conquer_Online_Server.Network.PacketHandler.WorldMessage("" + killer.Name + " Has Killed First DragonSon And Will Make DragonMon Angry !"); Time32 Now = Time32.Now; foreach (Client.GameState Chaar in ServerBase.Kernel.GamePool.Values) { if (Chaar != null) { if (Chaar.Entity.MapID == 1595) { Chaar.Entity.Teleport(1596, 130, 130); } } } } #endregion #region DragonSon 2 if (Name == "DragonSon2") { if (killer.Name.Contains("Guard")) { return; } killer.Teleport(1597, 130, 130); Conquer_Online_Server.Network.PacketHandler.WorldMessage("" + killer.Name + " Has Killed 2nd DragonSon And Will Make DragonMon Angry !"); Time32 Now = Time32.Now; foreach (Client.GameState Chaar in ServerBase.Kernel.GamePool.Values) { if (Chaar != null) { if (Chaar.Entity.MapID == 1596) { Chaar.Entity.Teleport(1597, 130, 130); } } } } #endregion #region DragonSon 3 if (Name == "DragonSon3") { if (killer.Name.Contains("Guard")) { return; } killer.Teleport(1598, 130, 130); Conquer_Online_Server.Network.PacketHandler.WorldMessage("" + killer.Name + " Has Killed 3rd DragonSon And Will Make DragonMon Angry !"); Time32 Now = Time32.Now; foreach (Client.GameState Chaar in ServerBase.Kernel.GamePool.Values) { if (Chaar != null) { if (Chaar.Entity.MapID == 1597) { Chaar.Entity.Teleport(1598, 130, 130); } } } } #endregion #region DragonSon 4 if (Name == "DragonSon4") { if (killer.Name.Contains("Guard")) { return; } killer.Teleport(1599, 130, 130); Conquer_Online_Server.Network.PacketHandler.WorldMessage("" + killer.Name + " Has Killed 4th DragonSon And Make DragonMon Angry !"); Time32 Now = Time32.Now; foreach (Client.GameState Chaar in ServerBase.Kernel.GamePool.Values) { if (Chaar != null) { if (Chaar.Entity.MapID == 1598) { Chaar.Entity.Teleport(1599, 130, 130); } } } } #endregion #region DragonMom if (Name == "TeratoDragon" && killer.MapID == 1599) { killer.ConquerPoints += 5000; killer.Teleport(1002, 400, 400); Conquer_Online_Server.Network.PacketHandler.WorldMessage("" + killer.Name + " Has Killed The DragonMon And Won 5K CPs :D !"); Time32 Now = Time32.Now; foreach (Client.GameState Chaar in ServerBase.Kernel.GamePool.Values) { if (Chaar != null) { if (Chaar.Entity.MapID == 1599) { Chaar.Entity.Teleport(1002, 400, 400); } } } } #endregion #region DiabloRojoL117 Cps Drop if (Name == "DiabloRojoL117") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 15; killer.SubClasses.StudyPoints += 50; killer.Owner.Send(new Network.GamePackets.Message("15 Cps", System.Drawing.Color.Blue, 2005)); } #endregion #region Pheasant Cps Drop if (Name == "Faisan") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 3; killer.SubClasses.StudyPoints += 2; killer.Owner.Send(new Network.GamePackets.Message("3 Cps", System.Drawing.Color.Blue, 2005)); } #endregion #region Birdman Cps Drop if (Name == "HombrePajaro") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 17; killer.SubClasses.StudyPoints += 5; killer.Owner.Send(new Network.GamePackets.Message(" 17 cps", System.Drawing.Color.Blue, 2005)); } #endregion #region HawKing Cps Drop if (Name == "JefeDeAguila") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 15; killer.SubClasses.StudyPoints += 5; killer.Owner.Send(new Network.GamePackets.Message("15 cps ", System.Drawing.Color.Blue, 2005)); } #endregion #region Birdman Cps Drop if (Name == "cuatrero") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 17; killer.SubClasses.StudyPoints += 10; killer.Owner.Send(new Network.GamePackets.Message(" 17 cps", System.Drawing.Color.Blue, 2005)); } #endregion #region BanditL97 Cps Drop if (Name == "BandidoLv97") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 16; killer.SubClasses.StudyPoints += 10; killer.Owner.Send(new Network.GamePackets.Message(" 16 cps", System.Drawing.Color.Blue, 2005)); } #endregion #region Murcielago Cps Drop if (Name == "Murcielago") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 15; killer.SubClasses.StudyPoints += 10; killer.Owner.Send(new Network.GamePackets.Message(" 15 cps", System.Drawing.Color.Blue, 2005)); } #endregion #region Vampiro Cps Drop if (Name == "Vampiro") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 15; killer.SubClasses.StudyPoints += 10; killer.Owner.Send(new Network.GamePackets.Message(" 18 cps", System.Drawing.Color.Blue, 2005)); } #endregion #region BuhoVampiro Cps Drop if (Name == "BuhoVampiro") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 15; killer.SubClasses.StudyPoints += 10; killer.Owner.Send(new Network.GamePackets.Message(" 15 cps", System.Drawing.Color.Blue, 2005)); } #endregion #region ToroMonstruoso Cps Drop if (Name == "ToroMonstruoso") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 13; killer.SubClasses.StudyPoints += 10; killer.Owner.Send(new Network.GamePackets.Message(" 13 cps", System.Drawing.Color.Blue, 2005)); } #endregion #region MonstrToroLv113 Cps Drop if (Name == "MonstrToroLv113") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 15; killer.SubClasses.StudyPoints += 10; killer.Owner.Send(new Network.GamePackets.Message(" 30 cps", System.Drawing.Color.Blue, 2005)); } #endregion #region Macaco Cps Drop if (Name == "Macaco") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 12; killer.SubClasses.StudyPoints += 10; killer.Owner.Send(new Network.GamePackets.Message(" 30 cps", System.Drawing.Color.Blue, 2005)); } #endregion #region MonoGigante Cps Drop if (Name == "MonoGigante") { if (killer.Name.Contains("Guard")) { return; } killer.ConquerPoints += 9; killer.SubClasses.StudyPoints += 10; killer.Owner.Send(new Network.GamePackets.Message(" 9 cps", System.Drawing.Color.Blue, 2005)); } #endregion #region TeratoDragon Cps Drop if (Name == "TeratoDragon") { killer.ConquerPoints += 3000; killer.SubClasses.StudyPoints += 1000; Conquer_Online_Server.Network.PacketHandler.WorldMessage("Congratulations! " + killer.Name + "! killed TeratoDragon and Got 3000 CPS and 1000 StudyPoint."); } if (Name == "KingMonster") { Program.Kingmonster = true; } if (Name == "princesMonster") { Program.Princesmonster = true; } if (Name == "DukeMonster") { Program.Dukemonster = true; } #endregion #region SnowBanshee Cps Drop if (Name == "SnowBanshee") { killer.ConquerPoints += 3000; killer.SubClasses.StudyPoints += 1000; Conquer_Online_Server.Network.PacketHandler.WorldMessage("Congratulations! " + killer.Name + "! killed SnowBanshee and got 3000 CPS and 1000 StudyPoint."); } #endregion #region DragonSoul Drops 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, 22); switch (type) { case 1: Uid = 800000; break; case 2: Uid = 800017; break; case 3: Uid = 800110; break; case 4: Uid = 800320; break; case 5: Uid = 800421; break; case 6: Uid = 800513; break; case 7: Uid = 800616; break; case 8: Uid = 800722; break; case 9: Uid = 820056; break; case 10: Uid = 820057; break; case 11: Uid = 822053; break; case 12: Uid = 822055; break; case 13: Uid = 823055; break; case 14: Uid = 823056; break; case 15: Uid = 820071; break; case 16: Uid = 821031; break; case 17: Uid = 821032; break; case 18: Uid = 823055; break; case 19: Uid = 823056; break; case 20: Uid = 823057; break; case 21: Uid = 824017; 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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = Uid; floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535; floorItem.Item.MobDropped = true; floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = 65535; floorItem.Item.UID = Network.GamePackets.ConquerItem.ItemUID.Next; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = 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); } } } } if (Name == "LavaBeast") { 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, 22); switch (type) { case 1: Uid = 800000; break; case 2: Uid = 800017; break; case 3: Uid = 800110; break; case 4: Uid = 800320; break; case 5: Uid = 800421; break; case 6: Uid = 800513; break; case 7: Uid = 800616; break; case 8: Uid = 800722; break; case 9: Uid = 820056; break; case 10: Uid = 820057; break; case 11: Uid = 822053; break; case 12: Uid = 822055; break; case 13: Uid = 823055; break; case 14: Uid = 823056; break; case 15: Uid = 820071; break; case 16: Uid = 821031; break; case 17: Uid = 821032; break; case 18: Uid = 823055; break; case 19: Uid = 823056; break; case 20: Uid = 823057; break; case 21: Uid = 824017; 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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = Uid; floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535; floorItem.Item.MobDropped = true; floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = 65535; floorItem.Item.UID = Network.GamePackets.ConquerItem.ItemUID.Next; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = 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); } } } } if (Name == "SnowBanshee") { 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, 22); switch (type) { case 1: Uid = 800000; break; case 2: Uid = 800017; break; case 3: Uid = 800110; break; case 4: Uid = 800320; break; case 5: Uid = 800421; break; case 6: Uid = 800513; break; case 7: Uid = 800616; break; case 8: Uid = 800722; break; case 9: Uid = 820056; break; case 10: Uid = 820057; break; case 11: Uid = 822053; break; case 12: Uid = 822055; break; case 13: Uid = 823055; break; case 14: Uid = 823056; break; case 15: Uid = 820071; break; case 16: Uid = 821031; break; case 17: Uid = 821032; break; case 18: Uid = 823055; break; case 19: Uid = 823056; break; case 20: Uid = 823057; break; case 21: Uid = 824017; 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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = Uid; floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535; floorItem.Item.MobDropped = true; floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = 65535; floorItem.Item.UID = Network.GamePackets.ConquerItem.ItemUID.Next; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = 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); } } } } if (Name == "ThrillingSpook") { 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, 22); switch (type) { case 1: Uid = 800000; break; case 2: Uid = 800014; break; case 3: Uid = 800015; break; case 4: Uid = 800016; break; case 5: Uid = 800017; break; case 6: Uid = 800110; break; case 7: Uid = 800214; break; case 8: Uid = 800320; break; case 9: Uid = 800415; break; case 10: Uid = 800512; break; case 11: Uid = 800513; break; case 12: Uid = 800613; break; case 13: Uid = 800616; break; case 14: Uid = 800720; break; case 15: Uid = 800722; break; case 16: Uid = 820056; break; case 17: Uid = 820057; break; case 18: Uid = 822053; break; case 19: Uid = 822055; break; case 20: Uid = 823052; break; case 21: Uid = 823053; break; case 22: Uid = 823054; 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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = Uid; floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535; floorItem.Item.MobDropped = true; floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = 65535; floorItem.Item.UID = Network.GamePackets.ConquerItem.ItemUID.Next; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = 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); } } } } if (Name == "SwordMaster") { 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, 22); switch (type) { case 1: Uid = 800019; break; case 2: Uid = 800050; break; case 3: Uid = 800070; break; case 4: Uid = 800071; break; case 5: Uid = 800140; break; case 6: Uid = 800141; break; case 7: Uid = 800200; break; case 8: Uid = 800230; break; case 9: Uid = 800414; break; case 10: Uid = 800520; break; case 11: Uid = 800521; break; case 12: Uid = 800615; break; case 13: Uid = 800617; break; case 14: Uid = 800723; break; case 15: Uid = 800724; break; case 16: Uid = 820052; break; case 17: Uid = 820053; break; case 18: Uid = 822056; break; case 19: Uid = 822057; break; case 20: Uid = 823041; break; case 21: Uid = 823043; break; case 22: Uid = 823045; 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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = Uid; floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535; floorItem.Item.MobDropped = true; floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = 65535; floorItem.Item.UID = Network.GamePackets.ConquerItem.ItemUID.Next; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = 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); } } } } if (Name == "FlyingRooster") { 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, 45); switch (type) { case 1: Uid = 800001; break; case 2: Uid = 800002; break; case 3: Uid = 800003; break; case 4: Uid = 800004; break; case 5: Uid = 800005; break; case 6: Uid = 800201; break; case 7: Uid = 800202; break; case 8: Uid = 800203; break; case 9: Uid = 800402; break; case 10: Uid = 800403; break; case 11: Uid = 800501; break; case 12: Uid = 800502; break; case 13: Uid = 800503; break; case 14: Uid = 800601; break; case 15: Uid = 800602; break; case 16: Uid = 800603; break; case 17: Uid = 800701; break; case 18: Uid = 800702; break; case 19: Uid = 800703; break; case 20: Uid = 820002; break; case 21: Uid = 820003; break; case 22: Uid = 820012; break; case 23: Uid = 820022; break; case 24: Uid = 820023; break; case 25: Uid = 820032; break; case 26: Uid = 820033; break; case 27: Uid = 820042; break; case 28: Uid = 820043; break; case 29: Uid = 821002; break; case 30: Uid = 821003; break; case 31: Uid = 821004; break; case 32: Uid = 821015; break; case 33: Uid = 821016; break; case 34: Uid = 821025; break; case 35: Uid = 821026; break; case 36: Uid = 822012; break; case 37: Uid = 822013; break; case 38: Uid = 822022; break; case 39: Uid = 822032; break; case 40: Uid = 822042; break; case 41: Uid = 823001; break; case 42: Uid = 823002; break; case 43: Uid = 823015; break; case 44: Uid = 823028; break; case 45: Uid = 824002; 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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = Uid; floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535; floorItem.Item.MobDropped = true; floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = 65535; floorItem.Item.UID = Network.GamePackets.ConquerItem.ItemUID.Next; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = 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); } } } } if (Name == "GreenDevil") { 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, 36); switch (type) { case 1: Uid = 800010; break; case 2: Uid = 800011; break; case 3: Uid = 800012; break; case 4: Uid = 800013; break; case 5: Uid = 800210; break; case 6: Uid = 800211; break; case 7: Uid = 800212; break; case 8: Uid = 800213; break; case 9: Uid = 800310; break; case 10: Uid = 800018; break; case 11: Uid = 800090; break; case 12: Uid = 800130; break; case 13: Uid = 800401; break; case 14: Uid = 800413; break; case 15: Uid = 800420; break; case 16: Uid = 800514; break; case 17: Uid = 800614; break; case 18: Uid = 820001; break; case 19: Uid = 820054; break; case 20: Uid = 820055; break; case 21: Uid = 821014; break; case 22: Uid = 821026; break; case 23: Uid = 822001; break; case 24: Uid = 822052; break; case 25: Uid = 822054; break; case 26: Uid = 823040; break; case 27: Uid = 823042; break; case 28: Uid = 823044; break; case 29: Uid = 823046; break; case 30: Uid = 823047; break; case 31: Uid = 823048; break; case 32: Uid = 823049; break; case 33: Uid = 823050; break; case 34: Uid = 823051; break; case 35: Uid = 824001; break; case 36: Uid = 824014; 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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = Uid; floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535; floorItem.Item.MobDropped = true; floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = 65535; floorItem.Item.UID = Network.GamePackets.ConquerItem.ItemUID.Next; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = 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); } } } } if (Name == "BullDevil") { 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, 36); switch (type) { case 1: Uid = 800010; break; case 2: Uid = 800011; break; case 3: Uid = 800012; break; case 4: Uid = 800013; break; case 5: Uid = 800210; break; case 6: Uid = 800211; break; case 7: Uid = 800212; break; case 8: Uid = 800213; break; case 9: Uid = 800310; break; case 10: Uid = 800018; break; case 11: Uid = 800090; break; case 12: Uid = 800130; break; case 13: Uid = 800401; break; case 14: Uid = 800413; break; case 15: Uid = 800420; break; case 16: Uid = 800514; break; case 17: Uid = 800614; break; case 18: Uid = 820001; break; case 19: Uid = 820054; break; case 20: Uid = 820055; break; case 21: Uid = 821014; break; case 22: Uid = 821026; break; case 23: Uid = 822001; break; case 24: Uid = 822052; break; case 25: Uid = 822054; break; case 26: Uid = 823040; break; case 27: Uid = 823042; break; case 28: Uid = 823044; break; case 29: Uid = 823046; break; case 30: Uid = 823047; break; case 31: Uid = 823048; break; case 32: Uid = 823049; break; case 33: Uid = 823050; break; case 34: Uid = 823051; break; case 35: Uid = 824001; break; case 36: Uid = 824014; 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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = Uid; floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535; floorItem.Item.MobDropped = true; floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = 65535; floorItem.Item.UID = Network.GamePackets.ConquerItem.ItemUID.Next; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = 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); } } } } if (Name == "BloodyKing") { 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, 36); switch (type) { case 1: Uid = 800010; break; case 2: Uid = 800011; break; case 3: Uid = 800012; break; case 4: Uid = 800013; break; case 5: Uid = 800210; break; case 6: Uid = 800211; break; case 7: Uid = 800212; break; case 8: Uid = 800213; break; case 9: Uid = 800310; break; case 10: Uid = 800018; break; case 11: Uid = 800090; break; case 12: Uid = 800130; break; case 13: Uid = 800401; break; case 14: Uid = 800413; break; case 15: Uid = 800420; break; case 16: Uid = 800514; break; case 17: Uid = 800614; break; case 18: Uid = 820001; break; case 19: Uid = 820054; break; case 20: Uid = 820055; break; case 21: Uid = 821014; break; case 22: Uid = 821026; break; case 23: Uid = 822001; break; case 24: Uid = 822052; break; case 25: Uid = 822054; break; case 26: Uid = 823040; break; case 27: Uid = 823042; break; case 28: Uid = 823044; break; case 29: Uid = 823046; break; case 30: Uid = 823047; break; case 31: Uid = 823048; break; case 32: Uid = 823049; break; case 33: Uid = 823050; break; case 34: Uid = 823051; break; case 35: Uid = 824001; break; case 36: Uid = 824014; 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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = Uid; floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535; floorItem.Item.MobDropped = true; floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = 65535; floorItem.Item.UID = Network.GamePackets.ConquerItem.ItemUID.Next; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = 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); } } } } if (Name == "BirdKing") { 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, 36); switch (type) { case 1: Uid = 800010; break; case 2: Uid = 800011; break; case 3: Uid = 800012; break; case 4: Uid = 800013; break; case 5: Uid = 800210; break; case 6: Uid = 800211; break; case 7: Uid = 800212; break; case 8: Uid = 800213; break; case 9: Uid = 800310; break; case 10: Uid = 800018; break; case 11: Uid = 800090; break; case 12: Uid = 800130; break; case 13: Uid = 800401; break; case 14: Uid = 800413; break; case 15: Uid = 800420; break; case 16: Uid = 800514; break; case 17: Uid = 800614; break; case 18: Uid = 820001; break; case 19: Uid = 820054; break; case 20: Uid = 820055; break; case 21: Uid = 821014; break; case 22: Uid = 821026; break; case 23: Uid = 822001; break; case 24: Uid = 822052; break; case 25: Uid = 822054; break; case 26: Uid = 823040; break; case 27: Uid = 823042; break; case 28: Uid = 823044; break; case 29: Uid = 823046; break; case 30: Uid = 823047; break; case 31: Uid = 823048; break; case 32: Uid = 823049; break; case 33: Uid = 823050; break; case 34: Uid = 823051; break; case 35: Uid = 824001; break; case 36: Uid = 824014; 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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = Uid; floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535; floorItem.Item.MobDropped = true; floorItem.Item.StackSize = 1; floorItem.Item.MaxStackSize = 65535; floorItem.Item.UID = Network.GamePackets.ConquerItem.ItemUID.Next; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = 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 #region RespawnTime if (Name == "TeratoDragon") { RespawnTime += 15; } #endregion #region RespawnTime if (Name == "SnowBanshee") { RespawnTime += 30; } #endregion #region RespawnTime if (Name == "LavaBeast") { RespawnTime += 15; } #endregion #region RespawnTime if (Name == "ThrillingSpook") { RespawnTime += 15; } #endregion #region RespawnTime if (Name == "SwordMaster") { RespawnTime += 30; } #endregion if (Name == "LavaBeast") goto Jump4; if (Name == "TeratoDragon" || Name == "SnowBanshee" || Name == "ThrillingSpook") goto Jump; if (this.Name == "Demon") { goto Jump5; } if (this.Name == "AncientDemon") { goto Jump6; } if (this.Name == "FloodDemon") { goto Jump7; } if (this.Name == "HeavenDemon") { goto Jump8; } if (this.Name == "ChaosDemon") { goto Jump9; } Jump: #region TeratoDragon SnowBanshee ThrillingSpook if (this.Name == "TeratoDragon" || this.Name == "SnowBanshee" || this.Name == "ThrillingSpook") { uint Uid = 0; byte type = (byte)ServerBase.Kernel.Random.Next(1, 50); switch (type) { case 1: Uid = 800000; break; case 2: Uid = 822054; break; case 3: Uid = 822053; break; case 4: Uid = 822055; break; case 5: Uid = 822056; break; case 6: Uid = 822057; break; case 7: Uid = 800014; break; case 8: Uid = 800019; break; case 9: Uid = 800050; break; case 10: Uid = 800015; break; case 11: Uid = 800090; break; case 12: Uid = 800110; break; case 13: Uid = 800070; break; case 14: Uid = 800071; break; case 15: Uid = 800016; break; case 16: Uid = 800017; 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 = 800320; break; case 23: Uid = 800214; break; case 24: Uid = 800230; break; case 25: Uid = 800414; break; case 26: Uid = 800415; break; case 27: Uid = 800420; break; case 28: Uid = 800401; break; case 29: Uid = 800512; break; case 30: Uid = 800513; 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 = 800616; break; case 38: Uid = 800617; break; case 39: Uid = 800720; break; case 40: Uid = 800721; break; case 41: Uid = 800722; 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 = 820057; break; } killer.Owner.Inventory.Add(Uid, 0, 1); killer.SubClasses.StudyPoints += 200; } #endregion Jump4: #region LavaBeast SwordMaster if (this.Name == "LavaBeast" || this.Name == "SwordMaster") { uint Uid = 0; byte type = (byte)ServerBase.Kernel.Random.Next(1, 21); switch (type) { case 1: Uid = 822052; break; case 2: Uid = 822053; break; case 3: Uid = 822054; break; case 4: Uid = 822055; break; case 5: Uid = 800413; break; case 6: Uid = 800414; break; case 7: Uid = 800014; break; case 8: Uid = 800015; break; case 9: Uid = 800016; break; case 10: Uid = 800512; break; case 11: Uid = 800613; break; case 12: Uid = 800415; break; case 13: Uid = 800420; break; case 14: Uid = 800513; break; case 15: Uid = 800017; break; case 16: Uid = 820052; break; case 17: Uid = 820053; break; case 18: Uid = 820054; break; case 19: Uid = 820055; break; case 20: Uid = 820056; break; case 21: Uid = 820057; 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 + " And Take 100 CPs!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); } #endregion Jump5: { #region Demon if (this.Name == "Demon") { Random R1 = new Random(); int Nr2 = R1.Next(1, 6); if (Nr2 == 1 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(70, 85))) { killer.Owner.Inventory.Add(720657, 0, 1); } if (Nr2 == 2 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(45, 60))) { killer.Owner.Inventory.Add(720656, 0, 1); } if (Nr2 == 3 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(20, 40))) { killer.Owner.Inventory.Add(720655, 0, 1); } if (Nr2 == 4 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(1, 3))) { killer.Owner.Inventory.Add(720654, 0, 1); } if (Nr2 == 5 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(80, 100))) { killer.Owner.Inventory.Add(720668, 0, 1); } } #endregion } Jump6: { #region AncientDemon if (this.Name == "AncientDemon") { Random R1 = new Random(); int Nr2 = R1.Next(1, 7); if (Nr2 == 1 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(70, 85))) { killer.Owner.Inventory.Add(720658, 0, 1); } if (Nr2 == 2 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(45, 60))) { killer.Owner.Inventory.Add(720659, 0, 1); } if (Nr2 == 3 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(20, 40))) { killer.Owner.Inventory.Add(720660, 0, 1); } if (Nr2 == 4 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(3, 5))) { killer.Owner.Inventory.Add(720661, 0, 1); } if (Nr2 == 5 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(1, 2))) { killer.Owner.Inventory.Add(720662, 0, 1); } if (Nr2 == 6 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(80, 100))) { killer.Owner.Inventory.Add(720669, 0, 1); } } #endregion } Jump7: { #region FloodDemon if (this.Name == "FloodDemon") { Random R1 = new Random(); int Nr2 = R1.Next(1, 7); if (Nr2 == 1 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(70, 85))) { killer.Owner.Inventory.Add(720663, 0, 1); } if (Nr2 == 2 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(45, 60))) { killer.Owner.Inventory.Add(720664, 0, 1); } if (Nr2 == 3 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(20, 40))) { killer.Owner.Inventory.Add(720665, 0, 1); } if (Nr2 == 4 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(3, 5))) { killer.Owner.Inventory.Add(720666, 0, 1); } if (Nr2 == 5 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(1, 2))) { killer.Owner.Inventory.Add(720667, 0, 1); } if (Nr2 == 6 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(80, 100))) { killer.Owner.Inventory.Add(720670, 0, 1); } } #endregion } Jump8: { #region HeavenDemon if (this.Name == "HeavenDemon") { Random R1 = new Random(); int Nr2 = R1.Next(1, 7); if (Nr2 == 1 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(70, 85))) { killer.Owner.Inventory.Add(720675, 0, 1); } if (Nr2 == 2 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(45, 60))) { killer.Owner.Inventory.Add(720676, 0, 1); } if (Nr2 == 3 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(20, 40))) { killer.Owner.Inventory.Add(720677, 0, 1); } if (Nr2 == 4 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(3, 5))) { killer.Owner.Inventory.Add(720678, 0, 1); } if (Nr2 == 5 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(1, 2))) { killer.Owner.Inventory.Add(720679, 0, 1); } if (Nr2 == 6 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(80, 100))) { killer.Owner.Inventory.Add(720680, 0, 1); } } #endregion } Jump9: { #region ChaosDemon if (this.Name == "ChaosDemon") { Random R1 = new Random(); int Nr2 = R1.Next(1, 7); if (Nr2 == 1 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(70, 85))) { killer.Owner.Inventory.Add(720681, 0, 1); } if (Nr2 == 2 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(45, 60))) { killer.Owner.Inventory.Add(720682, 0, 1); } if (Nr2 == 3 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(20, 40))) { killer.Owner.Inventory.Add(720683, 0, 1); } if (Nr2 == 4 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(3, 5))) { killer.Owner.Inventory.Add(720684, 0, 1); } if (Nr2 == 5 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(1, 2))) { killer.Owner.Inventory.Add(720685, 0, 1); } if (Nr2 == 6 && ServerBase.Kernel.ChanceSuccess(ServerBase.Kernel.Random.Next(80, 100))) { killer.Owner.Inventory.Add(720686, 0, 1); } } #endregion } if (killer.MapID == 1013) { if (ServerBase.Kernel.Rate(10)) { var infos = Database.ConquerItemInformation.BaseInformations[723903]; 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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8); floorItem.Item.ID = (uint)723903; floorItem.Item.MaximDurability = infos.Durability; floorItem.Item.MobDropped = true; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)723903; 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); } } } if (ServerBase.Kernel.Rate(40)) { uint amount = (uint)ServerBase.Kernel.Random.Next(500, 1000); amount *= ServerBase.Constants.MoneyDropMultiple; 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); } } #region CPs /* if (Name == "Pheasant" && ServerBase.Kernel.Rate(30)) { killer.ConquerPoints += 10; killer.Owner.Send(new Network.GamePackets.Message("You have found 10 Cps!", System.Drawing.Color.Yellow, 2005)); } else if (ServerBase.Kernel.Rate(12)) { killer.ConquerPoints += 50; killer.Owner.Send(new Network.GamePackets.Message("You have found 50 Cps!", System.Drawing.Color.Yellow, 2005)); } else if (ServerBase.Kernel.Rate(30)) { uint amount = 20; killer.ConquerPoints += 20; killer.Owner.Send(new Network.GamePackets.Message("The monster has runned out and let " + amount + " cps.", System.Drawing.Color.Yellow, 2005)); } else if (Name == "Pheasant" && ServerBase.Kernel.Rate(0.001)) { Random R = new Random(); int Nr = R.Next(1, 5); if (Nr == 1) { killer.ConquerPoints += 1000; ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + killer.Name + " Has Killed " + Owner.Name + " and found Lv4 (Magic Cps) 1000 cps in hunting monster!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); //killer.Owner.Send(new Network.GamePackets.Message("You have found (Magic Cps) 5000!", System.Drawing.Color.Yellow, 2005)); } if (Nr == 2) { killer.ConquerPoints += 800; ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + killer.Name + " Has Killed " + Owner.Name + " and found Lv3 (Magic Cps) 800 cps in hunting monster!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); //killer.Owner.Send(new Network.GamePackets.Message("You have found (Magic Cps) 5000!", System.Drawing.Color.Yellow, 2005)); } if (Nr == 3) { killer.ConquerPoints += 500; ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + killer.Name + " Has Killed " + Owner.Name + " and found Lv2 (Magic Cps) 800 cps in hunting monster!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); //killer.Owner.Send(new Network.GamePackets.Message("You have found (Magic Cps) 5000!", System.Drawing.Color.Yellow, 2005)); } if (Nr == 4) { killer.ConquerPoints += 100; ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + killer.Name + " Has Killed " + Owner.Name + " and found Lv1 (Magic Cps) 100 cps in hunting monster!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); //killer.Owner.Send(new Network.GamePackets.Message("You have found (Magic Cps) 5000!", System.Drawing.Color.Yellow, 2005)); } } */ #endregion /* ushort X2 = Owner.X, Y2 = Owner.Y; Game.Map Map2 = ServerBase.Kernel.Maps[Owner.MapID]; if (ServerBase.Kernel.Rate(8)) { if (Map2.SelectCoordonates(ref X2, ref Y2)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.ConquerPoints; floorItem.Value = 1000; floorItem.ItemID = 720694; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X2; floorItem.Y = Y2; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map2.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map2.AddFloorItem(floorItem); SendScreenSpawn(floorItem); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + killer.Name + "Has Killed " + Owner.Name + "and found 4000 cps in hunting monster!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); } } else if (ServerBase.Kernel.Rate(3)) { if (Map2.SelectCoordonates(ref X2, ref Y2)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.ConquerPoints; floorItem.Value = 13500; floorItem.ItemID = 720678; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X2; floorItem.Y = Y2; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map2.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map2.AddFloorItem(floorItem); SendScreenSpawn(floorItem); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + killer.Name + "Has Killed " + Owner.Name + "and found 13500 cps in hunting monster!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); } } else if (ServerBase.Kernel.Rate(0.01)) { if (Map2.SelectCoordonates(ref X2, ref Y2)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.ConquerPoints; floorItem.Value = 27000; floorItem.ItemID = 720684; floorItem.MapID = Owner.MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = X2; floorItem.Y = Y2; floorItem.Type = Network.GamePackets.FloorItem.Drop; floorItem.OnFloor = Time32.Now; floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map2.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map2.AddFloorItem(floorItem); SendScreenSpawn(floorItem); ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(" " + killer.Name + "Has Killed " + Owner.Name + "and found 27000 cps in hunting monster!", System.Drawing.Color.Yellow, 2011), ServerBase.Kernel.GamePool.Values); } } */ byte morepercent = 0; byte morepercent2 = NewMethod(); if (SuperBoss) morepercent2 = 30; 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((int)MinMoneyDropAmount, (int)MaxMoneyDropAmount); amount *= ServerBase.Constants.MoneyDropMultiple; if (amount > 300000) amount = 10; 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; return; } 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); } } 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 / 8; if (amount < 1) amount = 1; // if (killer.VIPLevel > 4) // { // } #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 } if (ServerBase.Kernel.Rate(OwnItemRate + morepercent) && OwnItemID != 0) { if (killer.VIPLevel > 4) { 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 = (Conquer_Online_Server.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.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); } } //if (ServerBase.Kernel.Rate(ServerBase.Constants.ItemDropRate + morepercent + morepercent2)) //{ // if (Name == "TeratoDragon" || Name == "ThrillingSpook" || Name == "SwordMaster" || Name == "SnowBanshee") // { // return; // } // 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 || SuperBoss) // 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 > 4) // { // 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 = (Conquer_Online_Server.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.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); // } //} //if (ServerBase.Kernel.Rate(1 + 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 = (Conquer_Online_Server.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.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); // } //} //if (ServerBase.Kernel.Rate(1 + 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 = (Conquer_Online_Server.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.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); // } //} foreach (SpecialItemDrop sitem in SpecialItemDropList) { if (sitem.Map != 0) if (Owner.MapID != sitem.Map) continue; if (ServerBase.Kernel.Rate(sitem.Rate + morepercent, sitem.Discriminant)) { if (killer.VIPLevel > 4) { if (killer.Owner.Inventory.Count <= 39) { killer.Owner.Inventory.Add((uint)sitem.ItemID, 0, 1); continue; } } 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 = (Conquer_Online_Server.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.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); SendScreenSpawn(floorItem); } } } }
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; } }
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; } } } } }
public void _timerCallBack6(object obj, System.Timers.ElapsedEventArgs arg) { try { Time32 Now = Time32.Now; if (this == null || Owner == null || Owner.Account == 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) { /* MapStatus mbox = new MapStatus(); mbox.BaseID = (ushort)Owner.Map.BaseID; // mbox.ID = Owner.Map.ID; Owner.Send(mbox);*/ if (DateTime.Now.Minute == 42 && DateTime.Now.Second == 58) { if (Database.rates.Weather == 1) { 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); } } if (DateTime.Now.Minute == 57 && DateTime.Now.Second == 58) { if (Database.rates.Weather == 1) { 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); } } if (DateTime.Now.Minute == 12 && DateTime.Now.Second == 58) { if (Database.rates.Weather == 1) { 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); } } if (DateTime.Now.Minute == 27 && DateTime.Now.Second == 58) { if (Database.rates.Weather == 1) { 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); } } if (MapID == 1036) { if (ServerBase.Kernel.GetDistance(X, Y, 184, 205) < 17 && !Owner.Effect) { Owner.Effect = true; if (MapID == 1036) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); // floorItem.MapObjType = Game.MapObjectType.Item; floorItem.ItemID = 812;//794 floorItem.MapID = 1036; floorItem.X = 184; floorItem.Y = 205; floorItem.Type = Network.GamePackets.FloorItem.Effect; Owner.Send(floorItem); } } else { if (ServerBase.Kernel.GetDistance(X, Y, 184, 205) > 17) { Owner.Effect = false; } } } else { if (MapID == 1002) { if (ServerBase.Kernel.GetDistance(X,Y, 438, 377) < 17 && !Owner.Effect) { Owner.Effect = true; if (MapID == 1002) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); // floorItem.MapObjType = Game.MapObjectType.Item; floorItem.ItemID = 23;//746 floorItem.MapID = 1002; floorItem.X = 438; floorItem.Y = 377; floorItem.Type = 10; Owner.Send(floorItem); floorItem.ItemID = 31;//794 floorItem.MapID = 1002; floorItem.X = 438; floorItem.Y = 377; floorItem.Type = 10; Owner.Send(floorItem); } } else { if (ServerBase.Kernel.GetDistance(X, Y, 438, 377) > 17) { Owner.Effect = false; } } if (ServerBase.Kernel.GetDistance(X, Y, 436, 444) < 17 && !Owner.Effect3) { Owner.Effect3 = true; if (MapID == 1002) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); // floorItem.MapObjType = Game.MapObjectType.Item; floorItem.ItemID = 765;//794 floorItem.MapID = 1002; floorItem.X = 436; floorItem.Y = 444; floorItem.Type = Network.GamePackets.FloorItem.Effect; Owner.Send(floorItem); } } else { if (ServerBase.Kernel.GetDistance(X, Y, 436, 444) > 17) { Owner.Effect3 = false; } } } else { if (MapID == 1005) { if (ServerBase.Kernel.GetDistance(X, Y, 42, 48) < 17 && !Owner.Effect2) { Owner.Effect2 = true; if (MapID == 1005) {//1005 42 50 790 Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); // floorItem.MapObjType = Game.MapObjectType.Item; floorItem.ItemID = 797;//794 floorItem.MapID = 1005; floorItem.X = 42; floorItem.Y = 48; floorItem.Type = Network.GamePackets.FloorItem.Effect; Owner.Send(floorItem); // floorItem.MapObjType = Game.MapObjectType.Item; floorItem.ItemID = 731;//794 floorItem.MapID = 1005; floorItem.X = 42; floorItem.Y = 51; floorItem.Type = Network.GamePackets.FloorItem.Effect; Owner.Send(floorItem); } } else { if (ServerBase.Kernel.GetDistance(X, Y, 42, 48) > 17) { Owner.Effect2 = false; } } } } } // Console.WriteLine(" " + UID + " "); #region Auto attack if (Owner.Entity.AttackPacket != null || Owner.Entity.VortexAttackStamp != null) { try { if (Owner.Entity.ContainsFlag(Network.GamePackets.Update.Flags.ShurikenVortex)) { if (Owner.Entity.VortexPacket != null && Owner.Entity.VortexPacket.ToArray() != null) { if (Time32.Now > Owner.Entity.VortexAttackStamp.AddMilliseconds(1400)) { Owner.Entity.VortexAttackStamp = Time32.Now; new Game.Attacking.Handle(Owner.Entity.VortexPacket, Owner.Entity, null); } } } else { Owner.Entity.VortexPacket = null; var AttackPacket = Owner.Entity.AttackPacket; if (AttackPacket != null && AttackPacket.ToArray() != null) { uint AttackType = AttackPacket.AttackType; if (AttackType == Network.GamePackets.Attack.Magic || AttackType == Network.GamePackets.Attack.Melee || AttackType == Network.GamePackets.Attack.Ranged) { if (AttackType == Network.GamePackets.Attack.Magic) { if (Time32.Now > Owner.Entity.AttackStamp.AddSeconds(1)) { new Game.Attacking.Handle(AttackPacket, Owner.Entity, null); } } else { int decrease = -300; if (Owner.Entity.OnCyclone()) decrease = 700; if (Owner.Entity.OnSuperman()) decrease = 200; if (Time32.Now > Owner.Entity.AttackStamp.AddMilliseconds((1000 - Owner.Entity.Agility - decrease) * (int)(AttackType == Network.GamePackets.Attack.Ranged ? 1 : 1))) { new Game.Attacking.Handle(AttackPacket, Owner.Entity, null); } } } } } } catch (Exception e) { Program.SaveException(e); AttackPacket = null; VortexPacket = null; } } #endregion } } //AutoAttack(); } catch { } { } }
public void DropRandomStuff(Entity KillerName) { #region DropMoney if (Money > 100) { int amount = (int)(Money / 2); amount = ServerBase.Kernel.Random.Next(amount); if (ServerBase.Kernel.Rate(40)) { uint ItemID = Network.PacketHandler.MoneyItemID((uint)amount); ushort x = X, y = Y; Game.Map Map = ServerBase.Kernel.Maps[MapID]; if (Map.SelectCoordonates(ref x, ref y)) { Money -= (uint)amount; Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Money; floorItem.Value = (uint)amount; floorItem.ItemID = ItemID; floorItem.MapID = 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); Owner.SendScreenSpawn(floorItem, true); } } } #endregion #region DropItems if (Owner != null) { Owner.Inventory.Update(); if (Owner.Inventory.Count > 0) { uint count = (uint)(Owner.Inventory.Count / 4); //int startfrom = (byte)ServerBase.Kernel.Random.Next((int)Owner.Inventory.Objects.Length); for (int c = 0; c < count; c++) { int startfrom = (byte)ServerBase.Kernel.Random.Next((int)Owner.Inventory.Objects.Length); if (Owner.Inventory.Count < startfrom) { Owner.Inventory.Update(); //return; } if (Owner.Inventory.Objects[startfrom] != null) { if (PKPoints > 0) { if (Owner.Inventory.Objects[startfrom].Lock == 0) { if (Owner.Inventory.Objects[startfrom].UnlockEnd < DateTime.Now) { if (!Owner.Inventory.Objects[startfrom].Bound && !Owner.Inventory.Objects[startfrom].Inscribed) { if (!Owner.Inventory.Objects[startfrom].Suspicious && Owner.Inventory.Objects[startfrom].Lock != 1) { if (!ServerBase.Constants.NoDrop.Contains((Owner.Inventory.Objects[startfrom].ID))) { var Item = Owner.Inventory.Objects[startfrom]; Item.Lock = 0; var infos = Database.ConquerItemInformation.BaseInformations[(uint)Item.ID]; ushort x = X, y = Y; Game.Map Map = ServerBase.Kernel.Maps[MapID]; if (Map.SelectCoordonates(ref x, ref y)) { Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); Owner.Inventory.Remove(Item, Enums.ItemUse.Remove); floorItem.Item = Item; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)Item.ID; floorItem.MapID = 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); Owner.SendScreenSpawn(floorItem, true); Owner.Inventory.Update(); } } } } } } } } } } } #endregion #region DropDetain items if (PKPoints > 29 && Killer != null && Killer.Owner != null) { int itemcount = 0; foreach (var Item in Owner.Equipment.Objects) { if (Item != null && itemcount == 0) { if (Item.Position != 9 && Item.Position != 12) { if (!Item.ID.ToString().StartsWith("105")) { if (ServerBase.Kernel.Rate(35 + (int)(PKPoints > 99 ? 75 : 0))) { ushort x = X, y = Y; Game.Map Map = ServerBase.Kernel.Maps[MapID]; if (Map.SelectCoordonates(ref x, ref y)) { Owner.Equipment.RemoveToGround(Item.Position); var infos = Database.ConquerItemInformation.BaseInformations[(uint)Item.ID]; Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); floorItem.Item = Item; floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item; floorItem.ItemID = (uint)Item.ID; floorItem.MapID = MapID; floorItem.MapObjType = Game.MapObjectType.Item; floorItem.X = x; floorItem.Y = y; floorItem.Type = Network.GamePackets.FloorItem.DropDetain; 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; Owner.SendScreenSpawn(floorItem, true); Database.DetainedItemTable.DetainItem(Item, Owner, Killer.Owner); itemcount++; //return; } } } } } } } #endregion if (PKPoints > 99) { if (KillerName.EntityFlag == EntityFlag.Player) { ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(Name + " has been captured by " + KillerName.Name + " and sent in jail! The world is now safer!", System.Drawing.Color.Red, Message.Talk), ServerBase.Kernel.GamePool.Values); Teleport(6000, 30, 76); } else { ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(Name + " has been captured and sent in jail by A Monster ["+KillerName.Name+"]! Funny!", System.Drawing.Color.Red, Message.Talk), ServerBase.Kernel.GamePool.Values); Teleport(6000, 30, 76); } } }
//just replace this whole void for die delay public void Die(Entity killer) { if (Time32.Now > DeathStamp) { if (AuraTime != 0) { AuraTime = 0; RemoveFlag2(Network.GamePackets.Update.Flags2.TyrantAura); RemoveFlag2(Network.GamePackets.Update.Flags2.FendAura); RemoveFlag2(Network.GamePackets.Update.Flags2.MetalAura); RemoveFlag2(Network.GamePackets.Update.Flags2.WoodAura); RemoveFlag2(Network.GamePackets.Update.Flags2.WaterAura); RemoveFlag2(Network.GamePackets.Update.Flags2.EarthAura); RemoveFlag2(Network.GamePackets.Update.Flags2.FireAura); if (!Owner.AlternateEquipment) { Owner.LoadItemStats(this); } else { Owner.LoadItemStats2(this); } } if (killer.EntityFlag == EntityFlag.Player) { BlackSpot spot = new BlackSpot { Remove = 1, Identifier = UID }; killer.Owner.Send((byte[])spot); BlackSpots = false; BlackSpotTime2 = 0; BlackSpotCheck = 0; } if (killer.EntityFlag == Game.EntityFlag.Player) { if (EntityFlag == Game.EntityFlag.Player) { /* Game.PkExpeliate pk = new Game.PkExpeliate(); pk.UID = killer.UID; pk.Name = Name; pk.KilledAt = "KimoConquer"; pk.LostExp = 0; pk.Times = 0; pk.Potency = (uint)BattlePower; pk.Level = Level; PkExpelTable.PkExploitAdd(killer.Owner, UID, pk);*/ } } if (killer.MapID == 3031) { if (this.ConquerPoints >= 20000) { uint ItemID = 729911; this.ConquerPoints -= 20000; ushort X = this.X, Y = this.Y; Game.Map Map = ServerBase.Kernel.Maps[this.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 = 20000; floorItem.ItemID = ItemID; floorItem.MapID = this.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.UID = Network.GamePackets.FloorItem.FloorUID.Next; while (Map.Npcs.ContainsKey(floorItem.UID)) floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next; Map.AddFloorItem(floorItem); this.Owner.SendScreenSpawn(floorItem, true); } } else { this.Teleport(1002, 428, 378); ServerBase.Kernel.SendWorldMessage(new Message("Ops! " + this.Name + " has losed all his/her cps in the LordsWar and teleported back to TwinCity.", System.Drawing.Color.White, Message.TopLeft), ServerBase.Kernel.GamePool.Values); } } if (killer.MapID == 7777) { if (killer.MapID == 7777) { killer.Owner.elitepoints += 1; if (killer.Owner.elitepoints >= 20) { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratulations, You Have Now " + killer.Owner.elitepoints + " ElitePk Points you can claim your prize now!"); npc.OptionID = 255; killer.Owner.Send(npc.ToArray()); } else { Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You Have Now " + killer.Owner.elitepoints + " ElitePk Points Congratz you still need " + (20 - killer.Owner.elitepoints) + " more!"); npc.OptionID = 255; killer.Owner.Send(npc.ToArray()); } } } if (EntityFlag == EntityFlag.Player) Owner.XPCount = 0; Killer = killer; Hitpoints = 0; DeathStamp = Time32.Now; //DieString(); ToxicFogLeft = 0; if (Companion) { AddFlag(Network.GamePackets.Update.Flags.Ghost | Network.GamePackets.Update.Flags.Dead | Network.GamePackets.Update.Flags.FadeAway); Network.GamePackets.Attack zattack = new Network.GamePackets.Attack(true); zattack.Attacked = UID; zattack.AttackType = Network.GamePackets.Attack.Kill; zattack.X = X; zattack.Y = Y; MonsterInfo.SendScreen(zattack); Owner.Map.RemoveEntity(this); Owner.Companion = null; } if (EntityFlag == EntityFlag.Player) { if (killer.EntityFlag == EntityFlag.Player) { #region Cheack Pk Map if (Owner.Entity.MapID == 2555 || Owner.Entity.MapID == 5530 || Owner.Entity.MapID == 5531 || Owner.Entity.MapID == 5532 || Owner.Entity.MapID == 1452 || Owner.Entity.MapID == 5560 || Owner.Entity.MapID == 5570 || Owner.Entity.MapID == 5580) { Owner.Entity.Teleport(1002, 438, 382); // Console.WriteLine("Done"); } #endregion Cheack Pk Map if (ServerBase.Constants.PKFreeMaps.Contains(killer.MapID)) goto Over; if (ServerBase.Constants.Damage1Map.Contains(killer.MapID)) goto Over; if (killer.Owner.Map.BaseID == 700) goto Over; if (!ContainsFlag(Network.GamePackets.Update.Flags.FlashingName) && !ContainsFlag(Network.GamePackets.Update.Flags.BlackName)) { killer.AddFlag(Network.GamePackets.Update.Flags.FlashingName); killer.FlashingNameStamp = Time32.Now; killer.FlashingNameTime = 60; if (killer.GuildID != 0) { if (killer.Owner.Guild.Enemy.ContainsKey(GuildID)) { killer.PKPoints += 3; } else { if (!killer.Owner.Enemy.ContainsKey(UID)) killer.PKPoints += 10; else killer.PKPoints += 5; } } else { if (!killer.Owner.Enemy.ContainsKey(UID)) killer.PKPoints += 10; else killer.PKPoints += 5; } if (!this.Owner.Enemy.ContainsKey(killer.UID)) { Network.PacketHandler.AddEnemy(this.Owner, killer.Owner); } } } } if (killer.EntityFlag == EntityFlag.Monster) { DropRandomStuff(Killer); } else { DropRandomStuff(Killer); } RemoveFlag(Network.GamePackets.Update.Flags.FlashingName); Over: Network.GamePackets.Attack attack = new Attack(true); attack.Attacker = killer.UID; attack.Attacked = UID; attack.AttackType = Network.GamePackets.Attack.Kill; attack.X = X; attack.Y = Y; if (EntityFlag == EntityFlag.Player) { AddFlag(Network.GamePackets.Update.Flags.Dead); RemoveFlag(Network.GamePackets.Update.Flags.Fly); RemoveFlag(Network.GamePackets.Update.Flags.Ride); RemoveFlag(Network.GamePackets.Update.Flags.Cyclone); RemoveFlag(Network.GamePackets.Update.Flags.Superman); RemoveFlag(Network.GamePackets.Update.Flags.FatalStrike); RemoveFlag(Network.GamePackets.Update.Flags.FlashingName); RemoveFlag(Network.GamePackets.Update.Flags.ShurikenVortex); RemoveFlag2(Network.GamePackets.Update.Flags2.Oblivion); // if (Body % 10 < 3) // TransformationID = 99; //else // TransformationID = 98; Owner.SendScreen(attack, true); 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); if (Owner.QualifierGroup != null) { Owner.QualifierGroup.End(Owner); } } else { if (!Companion) { try { if (MonsterInfo != null) if (killer != null) MonsterInfo.Drop(killer); } catch { } } ServerBase.Kernel.Maps[MapID].Floor[X, Y, MapObjType, this] = true; if (killer.EntityFlag == EntityFlag.Player) { killer.Owner.IncreaseExperience(MaxHitpoints, true); if (killer.Owner.Team != null) { foreach (Client.GameState teammate in killer.Owner.Team.Teammates) { if (ServerBase.Kernel.GetDistance(killer.X, killer.Y, teammate.Entity.X, teammate.Entity.Y) <= ServerBase.Constants.pScreenDistance) { if (killer.UID != teammate.Entity.UID) { uint extraExperience = MaxHitpoints / 2; if (killer.Spouse == teammate.Entity.Name) extraExperience = MaxHitpoints * 2; byte TLevelN = teammate.Entity.Level; if (killer.Owner.Team.CanGetNoobExperience(teammate)) { if (teammate.Entity.Level < 137) { extraExperience *= 2; teammate.IncreaseExperience(extraExperience, false); teammate.Send(ServerBase.Constants.NoobTeamExperience(extraExperience)); } } else { if (teammate.Entity.Level < 137) { teammate.IncreaseExperience(extraExperience, false); teammate.Send(ServerBase.Constants.TeamExperience(extraExperience)); } } byte TLevelNn = teammate.Entity.Level; byte newLevel = (byte)(TLevelNn - TLevelN); if (newLevel != 0) { if (TLevelN < 70) { for (int i = TLevelN; i < TLevelNn; i++) { teammate.Team.Teammates[0].VirtuePoints += (uint)(i * 3.83F); teammate.Team.SendMessage(new Message("The leader, " + teammate.Team.Teammates[0].Entity.Name + ", has gained " + (uint)(i * 7.7F) + " virtue points for power leveling the rookies.", System.Drawing.Color.Red, Message.Team)); } } } } } } } if (killer.Level < 137) { uint extraExp = MaxHitpoints; extraExp *= ServerBase.Constants.ExtraExperienceRate; extraExp += extraExp * killer.Gems[3] / 100; extraExp += (uint)(extraExp * ((float)killer.BattlePower / 100)); if (killer.DoubleExperienceTime > 0) extraExp *= 2; if (killer.HeavenBlessing > 0) extraExp += (uint)(extraExp * 20 / 100); if (killer.Reborn >= 2) extraExp /= 3; killer.Owner.Send(ServerBase.Constants.ExtraExperience(extraExp)); } killer.Owner.XPCount++; if (killer.OnKOSpell()) killer.KOSpellTime++; } } } }