محمد ياسر
2019-04-25, 11:29 AM
السلام عليكم ورحمة الله وبركاته
نظام الي ابجريد الجي ام يرمي هدايه في وقت معين وده يكون فيه سي بي او اي حاجه انت عايزه
اظن الفكره وصلت
يلا نبداء
في فلدر Game
اعمل كلاس باسم
Carnaval.cs
ضيف فيه ده
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SeseProject.Network.GamePackets;
using SeseProject.Interfaces;
namespace SeseProject.Game
{
class Carnaval
{
public static ushort X = 311, Y = 287;
public static ushort X1 = 322, Y1 = 286;
public static ushort X2 = 321, Y2 = 278;
public static ushort X3 = 322, Y3 = 264;
public static ushort X4 = 311, Y4 = 266;
public static ushort X5 = 299, Y5 = 266;
public static ushort X6 = 298, Y6 = 277;
public static ushort X7 = 299, Y7 = 287;
public static void Load()
{
if (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;
//Kernel.Maps[1002].AddNpc(npc);
// Program.shekoTime16 = Time32.Now;
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
//C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
//Load2();
}
}
public static void Load2()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X1, Y = Y1;
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;
// Kernel.Maps[1002].AddNpc(npc);
// Program.shekoTime16 = Time32.Now;
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
}
}
}
public static void Load3()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X2, Y = Y2;
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;
// Kernel.Maps[1002].AddNpc(npc);
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
//Load4();
}
}
}
public static void Load4()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X3, Y = Y3;
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;
//Kernel.Maps[1002].AddNpc(npc);
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
Load5();
}
}
}
public static void Load5()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X4, Y = Y4;
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;
//Kernel.Maps[1002].AddNpc(npc);*
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
// Load6();
}
}
}
public static void Load6()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X5, Y = Y5;
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;
//Kernel.Maps[1002].AddNpc(npc);
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
//Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
//Load7();
}
}
}
public static void Load7()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X6, Y = Y6;
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;
// Kernel.Maps[1002].AddNpc(npc);
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
}
#endregion
}
// Load8();
}//443 377
public static void Load8()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X7, Y = Y7;
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;
//Kernel.Maps[1002].AddNpc(npc);
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
// Load9();
}
}
}
public static void Load9()
{
if (Kernel.Maps.ContainsKey(1002))
{
ushort X = 900, Y = 900;
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;
foreach (Client.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Kernel.Maps[1002].AddNpc(npc);
}
}
}
}
في world
ابحث عن
#region Weekly PK
في ملف world.cs
واقفلو ضيف تحتيه
#region Carnaval
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
{
if (Program.Carnaval == 0)
{
Game.Carnaval.Load();
Program.Carnaval = 1;
}
}
if (DateTime.Now.Minute == 59 && DateTime.Now.Second == 00)
{
if (Program.Carnaval == 1)
{
Program.Carnaval = 0;
}
Kernel.SendWorldMessage(new Message("TQEnvoy will apear in TwinCity after 1 Minute and DropParty will Start Hurry go to TC to Get some Gifts.", System.Drawing.Color.Black, Message.Center), Program.GamePool);
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 03)
{
Game.Carnaval.Load2();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 06)
{
Game.Carnaval.Load3();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 09)
{
Game.Carnaval.Load4();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 12)
{
Game.Carnaval.Load5();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 15)
{
Game.Carnaval.Load6();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 18)
{
Game.Carnaval.Load7();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 21)
{
Game.Carnaval.Load8();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 24)
{
Game.Carnaval.Load9();
Kernel.SendWorldMessage(new Message("TQEnvoy Drop Event ended come back next hour , it apear every hour at xx:00 goodluck.", System.Drawing.Color.Black, Message.Center), Program.GamePool);
}
if (DateTime.Now.Hour == 12 && DateTime.Now.Minute == 00 && DateTime.Now.Second == 40)
{
if (Program.Carnaval2 == 1)
{
//
Program.Carnaval2 = 0;
}
}
if (DateTime.Now.Hour == 12 && DateTime.Now.Minute == 00 && DateTime.Now.Second == 45)
{
if (Program.Carnaval2 == 0)
{
Program.Carnaval2 = 1;
}
}
if (DateTime.Now.Hour == 23 && DateTime.Now.Minute == 59 && DateTime.Now.Second == 40)
{
if (Program.Carnaval3 == 1)
{
Program.Carnaval3 = 0;
}
}
if (DateTime.Now.Hour == 23 && DateTime.Now.Minute == 59 && DateTime.Now.Second == 45)
{
if (Program.Carnaval3 == 0)
{
Program.Carnaval3 = 1;
}
}
#endregion
ضيف دول في Program.cs
public static byte Carnaval = 0;
public static byte Carnaval2 = 0;
public static byte Carnaval3 = 0;
في باكت هاندل ابحث عن
#region One Armed Bandit (1351 + 1352)
ضيف تحتيه ديه
#region Carnaval
case 3:
{
Game.Carnaval.Load();
break;
}
#endregion
ضيف الكود ده في
في Constants.cs
public const int Carnaval = 2000000; // CPs
ده قيمه السي بي الي في الشطنه
نظام الي ابجريد الجي ام يرمي هدايه في وقت معين وده يكون فيه سي بي او اي حاجه انت عايزه
اظن الفكره وصلت
يلا نبداء
في فلدر Game
اعمل كلاس باسم
Carnaval.cs
ضيف فيه ده
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SeseProject.Network.GamePackets;
using SeseProject.Interfaces;
namespace SeseProject.Game
{
class Carnaval
{
public static ushort X = 311, Y = 287;
public static ushort X1 = 322, Y1 = 286;
public static ushort X2 = 321, Y2 = 278;
public static ushort X3 = 322, Y3 = 264;
public static ushort X4 = 311, Y4 = 266;
public static ushort X5 = 299, Y5 = 266;
public static ushort X6 = 298, Y6 = 277;
public static ushort X7 = 299, Y7 = 287;
public static void Load()
{
if (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;
//Kernel.Maps[1002].AddNpc(npc);
// Program.shekoTime16 = Time32.Now;
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
//C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
//Load2();
}
}
public static void Load2()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X1, Y = Y1;
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;
// Kernel.Maps[1002].AddNpc(npc);
// Program.shekoTime16 = Time32.Now;
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
}
}
}
public static void Load3()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X2, Y = Y2;
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;
// Kernel.Maps[1002].AddNpc(npc);
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
//Load4();
}
}
}
public static void Load4()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X3, Y = Y3;
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;
//Kernel.Maps[1002].AddNpc(npc);
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
Load5();
}
}
}
public static void Load5()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X4, Y = Y4;
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;
//Kernel.Maps[1002].AddNpc(npc);*
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
// Load6();
}
}
}
public static void Load6()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X5, Y = Y5;
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;
//Kernel.Maps[1002].AddNpc(npc);
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
//Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
//Load7();
}
}
}
public static void Load7()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X6, Y = Y6;
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;
// Kernel.Maps[1002].AddNpc(npc);
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
}
#endregion
}
// Load8();
}//443 377
public static void Load8()
{
if (Kernel.Maps.ContainsKey(1002))
{
#region CPBag
uint ItemID = 720159;
ushort X = X7, Y = Y7;
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;
//Kernel.Maps[1002].AddNpc(npc);
Game.Map Map = 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.Conqu erPoints;
floorItem.Value = 50000;
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.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
C.SendScreenSpawn(floorItem, true);
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Network.GamePackets.NpcInitial2.DeleteNPC2(1305);
#endregion
// Load9();
}
}
}
public static void Load9()
{
if (Kernel.Maps.ContainsKey(1002))
{
ushort X = 900, Y = 900;
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;
foreach (Client.GameClient C in Kernel.GamePool.Values)
{
if (C.Entity.MapID == 1002)
{
npc.SendSpawn(C);
// C.Entity.Update(SeseProject.Network.GamePackets._S tring.Effect, "wsmhcxq_att", true);
}
}
// Kernel.Maps[1002].AddNpc(npc);
}
}
}
}
في world
ابحث عن
#region Weekly PK
في ملف world.cs
واقفلو ضيف تحتيه
#region Carnaval
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
{
if (Program.Carnaval == 0)
{
Game.Carnaval.Load();
Program.Carnaval = 1;
}
}
if (DateTime.Now.Minute == 59 && DateTime.Now.Second == 00)
{
if (Program.Carnaval == 1)
{
Program.Carnaval = 0;
}
Kernel.SendWorldMessage(new Message("TQEnvoy will apear in TwinCity after 1 Minute and DropParty will Start Hurry go to TC to Get some Gifts.", System.Drawing.Color.Black, Message.Center), Program.GamePool);
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 03)
{
Game.Carnaval.Load2();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 06)
{
Game.Carnaval.Load3();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 09)
{
Game.Carnaval.Load4();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 12)
{
Game.Carnaval.Load5();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 15)
{
Game.Carnaval.Load6();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 18)
{
Game.Carnaval.Load7();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 21)
{
Game.Carnaval.Load8();
}
if (DateTime.Now.Minute == 00 && DateTime.Now.Second == 24)
{
Game.Carnaval.Load9();
Kernel.SendWorldMessage(new Message("TQEnvoy Drop Event ended come back next hour , it apear every hour at xx:00 goodluck.", System.Drawing.Color.Black, Message.Center), Program.GamePool);
}
if (DateTime.Now.Hour == 12 && DateTime.Now.Minute == 00 && DateTime.Now.Second == 40)
{
if (Program.Carnaval2 == 1)
{
//
Program.Carnaval2 = 0;
}
}
if (DateTime.Now.Hour == 12 && DateTime.Now.Minute == 00 && DateTime.Now.Second == 45)
{
if (Program.Carnaval2 == 0)
{
Program.Carnaval2 = 1;
}
}
if (DateTime.Now.Hour == 23 && DateTime.Now.Minute == 59 && DateTime.Now.Second == 40)
{
if (Program.Carnaval3 == 1)
{
Program.Carnaval3 = 0;
}
}
if (DateTime.Now.Hour == 23 && DateTime.Now.Minute == 59 && DateTime.Now.Second == 45)
{
if (Program.Carnaval3 == 0)
{
Program.Carnaval3 = 1;
}
}
#endregion
ضيف دول في Program.cs
public static byte Carnaval = 0;
public static byte Carnaval2 = 0;
public static byte Carnaval3 = 0;
في باكت هاندل ابحث عن
#region One Armed Bandit (1351 + 1352)
ضيف تحتيه ديه
#region Carnaval
case 3:
{
Game.Carnaval.Load();
break;
}
#endregion
ضيف الكود ده في
في Constants.cs
public const int Carnaval = 2000000; // CPs
ده قيمه السي بي الي في الشطنه