Mr. Co
2019-07-23, 04:18 AM
عفواً لايمكن عرض الروابط في الإرشيف
موضوعنا اليوم عن اضافة توب القاتل الفريد او UniqueKiller
اول حاجه هنضيف ده في Npc.cs
#region Arena By.Medoz
case 54288:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hey there " + client.Entity.Name + " Would you like to join TopUniqueKiller War?.");
dialog.Option("Yes Please", 1);
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
case 1:
{
DateTime Now64 = DateTime.Now;
if (Now64.Minute >= 00 && Now64.Minute <= 30)
if (client.Entity.ConquerPoints >= 1000000)
{
client.Entity.ConquerPoints -= 1000000;
client.Entity.RemoveFlag(MsgUpdate.Flags.Ride);
Random R = new Random();
int Nr = R.Next(1, 2);
if (Nr == 1) client.Entity.Teleport(10428, 54, 59);
if (Nr == 2) client.Entity.Teleport(10428, 54, 59);
client.Entity.PKMode = Game.Enums.PKMode.PK;
MsgActionProto Action = new MsgActionProto();
Action.ID = MsgActionEmulator.ChangePKMode;
Action.UID = client.Entity.UID;
Action.dwParam2 = (uint)client.Entity.PKMode;
Action.TimeStamp = (uint)Time32.Now.GetHashCode();
client.Send(MsgActionEmulator.SendPacket(Action));
}
else
{
dialog.Text("Arena By.Medoz Started Every Day at 00:00 And Ends at 00:10 Be And 1.000.000M Cps Careful To SignUp.")
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
break;
}
}
break;
}
#endregion
بعد كده هندخل علي النافي كات
npc
و نضيف ده
54288 Arena By.Medoz 2 26396 1002 383 320 0 0
بعدها هنبحث عن Void die(
و جواه هنضيف الكود ده
#region Unique Killer
if (EntityFlag == EntityFlag.Entity && killer.EntityFlag == EntityFlag.Entity)
{
if (killer.MapID == 10428)
{
if (this.ConquerPoints >= 1000000)
{
this.ConquerPoints -= 1000000;
this.Teleport(1002, 390, 320);
COServer.Network.PacketHandler.WorldMessage("Ops " + this.Name + " HaS Killd By " + killer.Name + " AnD LosT 1.000.000 Cps Arena By Medoz!!.");
}
else
{
this.Teleport(1002, 428, 378);
COServer.Network.PacketHandler.WorldMessage("Ops! " + this.Name + " Has FuCkeD AnD losed all His/Her Cps in The Arena Medoz and Go back to TwinCity.");
}
}
if (killer.MapID == 10428)
{
if (killer.MapID == 10428)
{
killer.ConquerPoints += 1000000;
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratulations, You HaVe GaineD 1.000.000 Cps FoR Kill One PlaYeR!");
npc.OptionID = 255;
killer.Owner.Send(npc.ToArray());
}
}
if (killer.MapID == 50001)
{
if (killer.MapID == 50001)
{
killer.Owner.uniquepoints += 1;
if (killer.Owner.uniquepoints >= 20)
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratulations, You Have Now " + killer.Owner.uniquepoints + "You Can Claim Prize From UniqueWinner");
npc.OptionID = 255;
killer.Owner.Send(npc.ToArray());
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You Have Now " + killer.Owner.uniquepoints + " Points Congratz you still need " + (20 - killer.Owner.uniquepoints) + " more!");
npc.OptionID = 255;
killer.Owner.Send(npc.ToArray());
}
}
}
#endregion
موضوعنا اليوم عن اضافة توب القاتل الفريد او UniqueKiller
اول حاجه هنضيف ده في Npc.cs
#region Arena By.Medoz
case 54288:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hey there " + client.Entity.Name + " Would you like to join TopUniqueKiller War?.");
dialog.Option("Yes Please", 1);
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
case 1:
{
DateTime Now64 = DateTime.Now;
if (Now64.Minute >= 00 && Now64.Minute <= 30)
if (client.Entity.ConquerPoints >= 1000000)
{
client.Entity.ConquerPoints -= 1000000;
client.Entity.RemoveFlag(MsgUpdate.Flags.Ride);
Random R = new Random();
int Nr = R.Next(1, 2);
if (Nr == 1) client.Entity.Teleport(10428, 54, 59);
if (Nr == 2) client.Entity.Teleport(10428, 54, 59);
client.Entity.PKMode = Game.Enums.PKMode.PK;
MsgActionProto Action = new MsgActionProto();
Action.ID = MsgActionEmulator.ChangePKMode;
Action.UID = client.Entity.UID;
Action.dwParam2 = (uint)client.Entity.PKMode;
Action.TimeStamp = (uint)Time32.Now.GetHashCode();
client.Send(MsgActionEmulator.SendPacket(Action));
}
else
{
dialog.Text("Arena By.Medoz Started Every Day at 00:00 And Ends at 00:10 Be And 1.000.000M Cps Careful To SignUp.")
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
break;
}
}
break;
}
#endregion
بعد كده هندخل علي النافي كات
npc
و نضيف ده
54288 Arena By.Medoz 2 26396 1002 383 320 0 0
بعدها هنبحث عن Void die(
و جواه هنضيف الكود ده
#region Unique Killer
if (EntityFlag == EntityFlag.Entity && killer.EntityFlag == EntityFlag.Entity)
{
if (killer.MapID == 10428)
{
if (this.ConquerPoints >= 1000000)
{
this.ConquerPoints -= 1000000;
this.Teleport(1002, 390, 320);
COServer.Network.PacketHandler.WorldMessage("Ops " + this.Name + " HaS Killd By " + killer.Name + " AnD LosT 1.000.000 Cps Arena By Medoz!!.");
}
else
{
this.Teleport(1002, 428, 378);
COServer.Network.PacketHandler.WorldMessage("Ops! " + this.Name + " Has FuCkeD AnD losed all His/Her Cps in The Arena Medoz and Go back to TwinCity.");
}
}
if (killer.MapID == 10428)
{
if (killer.MapID == 10428)
{
killer.ConquerPoints += 1000000;
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratulations, You HaVe GaineD 1.000.000 Cps FoR Kill One PlaYeR!");
npc.OptionID = 255;
killer.Owner.Send(npc.ToArray());
}
}
if (killer.MapID == 50001)
{
if (killer.MapID == 50001)
{
killer.Owner.uniquepoints += 1;
if (killer.Owner.uniquepoints >= 20)
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratulations, You Have Now " + killer.Owner.uniquepoints + "You Can Claim Prize From UniqueWinner");
npc.OptionID = 255;
killer.Owner.Send(npc.ToArray());
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You Have Now " + killer.Owner.uniquepoints + " Points Congratz you still need " + (20 - killer.Owner.uniquepoints) + " more!");
npc.OptionID = 255;
killer.Owner.Send(npc.ToArray());
}
}
}
#endregion