|
المشاركات 539 |
+التقييم 0.27 |
تاريخ التسجيل May 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 188 |
#region PerfectionL
case 3523:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hello Pro I Am Here To PerfectionLevel Blur-Online.");
dialog.Option("Add Perfectionlevel All Items", 5);
dialog.Send();
break;
}
case 5:
{
ConquerItem item1;
ConquerItem item2;
ConquerItem item3;
ConquerItem item4;
ConquerItem item5;
ConquerItem item6;
ConquerItem item7;
ConquerItem item8;
ConquerItem item9;
ConquerItem item10;
ConquerItem item11;
ConquerItem item12;
item1 = client.Equipment.TryGetItem(ConquerItem.Necklace);
item2 = client.Equipment.TryGetItem(ConquerItem.Armor);
item3 = client.Equipment.TryGetItem(ConquerItem.Ring);
item4 = client.Equipment.TryGetItem(ConquerItem.Boots);
item5 = client.Equipment.TryGetItem(ConquerItem.Head);
item6 = client.Equipment.TryGetItem(ConquerItem.Tower);
item7 = client.Equipment.TryGetItem(ConquerItem.Fan);
item8 = client.Equipment.TryGetItem(ConquerItem.SteedCrop);
item9 = client.Equipment.TryGetItem(ConquerItem.Steed);
item10 = client.Equipment.TryGetItem(ConquerItem.RightWeapon);
item11 = client.Equipment.TryGetItem(ConquerItem.LeftWeapon);
item12 = client.Equipment.TryGetItem(ConquerItem.Wing);
{
{
if (client.Player.ConquerPoints >= 1)
{
client.Player.ConquerPoints -= 1;
}
else
{
dialog.Text("Please come back to me with 1 Conquer Points.");
dialog.Option("Ahh sorry.", 255);
dialog.Send();
}
if ((item1 = client.Equipment.TryGetItem(ConquerItem.Necklace)) != null)
{
item1.Stars = 54;
item1.PerfectionProgress = 0;
item1.Owner = client.Player.Name;
item1.OwnerUID = client.Player.UID;
item1.Mode = Game.Enums.ItemMode.Update;
item1.Send(client);
Database.ConquerItemTable.UpdatePerfection(item1);
}
else
{
return;
}
if ((item2 = client.Equipment.TryGetItem(ConquerItem.Armor)) != null)
{
item2.Stars = 54;
item2.PerfectionProgress = 0;
item2.Owner = client.Player.Name;
item2.OwnerUID = client.Player.UID;
item2.Mode = Game.Enums.ItemMode.Update;
item2.Send(client);
Database.ConquerItemTable.UpdatePerfection(item2);
}
else
{
return;
}
if ((item3 = client.Equipment.TryGetItem(ConquerItem.Ring)) != null)
{
item3.Stars = 54;
item3.PerfectionProgress = 0;
item3.Owner = client.Player.Name;
item3.OwnerUID = client.Player.UID;
item3.Mode = Game.Enums.ItemMode.Update;
item3.Send(client);
Database.ConquerItemTable.UpdatePerfection(item3);
}
else
{
return;
}
if ((item4 = client.Equipment.TryGetItem(ConquerItem.Boots)) != null)
{
item4.Stars = 54;
item4.PerfectionProgress = 0;
item4.Owner = client.Player.Name;
item4.OwnerUID = client.Player.UID;
item4.Mode = Game.Enums.ItemMode.Update;
item4.Send(client);
Database.ConquerItemTable.UpdatePerfection(item4);
}
else
{
return;
}
if ((item5 = client.Equipment.TryGetItem(ConquerItem.Head)) != null)
{
item5.Stars = 54;
item5.PerfectionProgress = 0;
item5.Owner = client.Player.Name;
item5.OwnerUID = client.Player.UID;
item5.Mode = Game.Enums.ItemMode.Update;
item5.Send(client);
Database.ConquerItemTable.UpdatePerfection(item5);
}
else
{
return;
}
if ((item6 = client.Equipment.TryGetItem(ConquerItem.Tower)) != null)
{
item6.Stars = 54;
item6.PerfectionProgress = 0;
item6.Owner = client.Player.Name;
item6.OwnerUID = client.Player.UID;
item6.Mode = Game.Enums.ItemMode.Update;
item6.Send(client);
Database.ConquerItemTable.UpdatePerfection(item6);
}
else
{
return;
}
if ((item7 = client.Equipment.TryGetItem(ConquerItem.Fan)) != null)
{
item7.Stars = 54;
item7.PerfectionProgress = 0;
item7.Owner = client.Player.Name;
item7.OwnerUID = client.Player.UID;
item7.Mode = Game.Enums.ItemMode.Update;
item7.Send(client);
Database.ConquerItemTable.UpdatePerfection(item7);
}
else
{
return;
}
if ((item8 = client.Equipment.TryGetItem(ConquerItem.SteedCrop)) != null)
{
item8.Stars = 54;
item8.PerfectionProgress = 0;
item8.Owner = client.Player.Name;
item8.OwnerUID = client.Player.UID;
item8.Mode = Game.Enums.ItemMode.Update;
item8.Send(client);
Database.ConquerItemTable.UpdatePerfection(item8);
}
else
{
return;
}
if ((item9 = client.Equipment.TryGetItem(ConquerItem.Steed)) != null)
{
item9.Stars = 54;
item9.PerfectionProgress = 0;
item9.Owner = client.Player.Name;
item9.OwnerUID = client.Player.UID;
item9.Mode = Game.Enums.ItemMode.Update;
item9.Send(client);
Database.ConquerItemTable.UpdatePerfection(item9);
}
else
{
return;
}
if ((item10 = client.Equipment.TryGetItem(ConquerItem.RightWeapon)) != null)
{
item10.Stars = 54;
item10.PerfectionProgress = 0;
item10.Owner = client.Player.Name;
item10.OwnerUID = client.Player.UID;
item10.Mode = Game.Enums.ItemMode.Update;
item10.Send(client);
Database.ConquerItemTable.UpdatePerfection(item10);
}
else
{
return;
}
if ((item11 = client.Equipment.TryGetItem(ConquerItem.LeftWeapon)) != null)
{
item11.Stars = 54;
item11.PerfectionProgress = 0;
item11.Owner = client.Player.Name;
item11.OwnerUID = client.Player.UID;
item11.Mode = Game.Enums.ItemMode.Update;
item11.Send(client);
Database.ConquerItemTable.UpdatePerfection(item11);
}
else
{
return;
}
if ((item12 = client.Equipment.TryGetItem(ConquerItem.Wing)) != null)
{
item12.Stars = 54;
item12.PerfectionProgress = 0;
item12.Owner = client.Player.Name;
item12.OwnerUID = client.Player.UID;
item12.Mode = Game.Enums.ItemMode.Update;
item12.Send(client);
Database.ConquerItemTable.UpdatePerfection(item12);
}
else
{
return;
}
client.Player.Update(_String.Effect, "dakaishengzhi", true);
}
}
break;
}
}
break;
}
#endregion
#region PerfectionL
case 3523:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hello Pro I Am Here To PerfectionLevel Blur-Online.");
dialog.Option("Add Perfectionlevel All Items", 5);
dialog.Send();
break;
}
case 5:
{
ConquerItem item1;
ConquerItem item2;
ConquerItem item3;
ConquerItem item4;
ConquerItem item5;
ConquerItem item6;
ConquerItem item7;
ConquerItem item8;
ConquerItem item9;
ConquerItem item10;
ConquerItem item11;
ConquerItem item12;
item1 = client.Equipment.TryGetItem(ConquerItem.Necklace);
item2 = client.Equipment.TryGetItem(ConquerItem.Armor);
item3 = client.Equipment.TryGetItem(ConquerItem.Ring);
item4 = client.Equipment.TryGetItem(ConquerItem.Boots);
item5 = client.Equipment.TryGetItem(ConquerItem.Head);
item6 = client.Equipment.TryGetItem(ConquerItem.Tower);
item7 = client.Equipment.TryGetItem(ConquerItem.Fan);
item8 = client.Equipment.TryGetItem(ConquerItem.SteedCrop);
item9 = client.Equipment.TryGetItem(ConquerItem.Steed);
item10 = client.Equipment.TryGetItem(ConquerItem.RightWeapon);
item11 = client.Equipment.TryGetItem(ConquerItem.LeftWeapon);
item12 = client.Equipment.TryGetItem(ConquerItem.Wing);
{
{
if (client.Entity.ConquerPoints >= 1)
{
client.Entity.ConquerPoints -= 1;
}
else
{
dialog.Text("Please come back to me with 1 Conquer Points.");
dialog.Option("Ahh sorry.", 255);
dialog.Send();
}
if ((item1 = client.Equipment.TryGetItem(ConquerItem.Necklace)) != null)
{
item1.Stars = 54;
item1.PerfectionProgress = 0;
item1.Owner = client.Entity.Name;
item1.OwnerUID = client.Entity.UID;
item1.Mode = Game.Enums.ItemMode.Update;
item1.Send(client);
Database.ConquerItemTable.UpdatePerfection(item1);
}
else
{
return;
}
if ((item2 = client.Equipment.TryGetItem(ConquerItem.Armor)) != null)
{
item2.Stars = 54;
item2.PerfectionProgress = 0;
item2.Owner = client.Entity.Name;
item2.OwnerUID = client.Entity.UID;
item2.Mode = Game.Enums.ItemMode.Update;
item2.Send(client);
Database.ConquerItemTable.UpdatePerfection(item2);
}
else
{
return;
}
if ((item3 = client.Equipment.TryGetItem(ConquerItem.Ring)) != null)
{
item3.Stars = 54;
item3.PerfectionProgress = 0;
item3.Owner = client.Entity.Name;
item3.OwnerUID = client.Entity.UID;
item3.Mode = Game.Enums.ItemMode.Update;
item3.Send(client);
Database.ConquerItemTable.UpdatePerfection(item3);
}
else
{
return;
}
if ((item4 = client.Equipment.TryGetItem(ConquerItem.Boots)) != null)
{
item4.Stars = 54;
item4.PerfectionProgress = 0;
item4.Owner = client.Entity.Name;
item4.OwnerUID = client.Entity.UID;
item4.Mode = Game.Enums.ItemMode.Update;
item4.Send(client);
Database.ConquerItemTable.UpdatePerfection(item4);
}
else
{
return;
}
if ((item5 = client.Equipment.TryGetItem(ConquerItem.Head)) != null)
{
item5.Stars = 54;
item5.PerfectionProgress = 0;
item5.Owner = client.Entity.Name;
item5.OwnerUID = client.Entity.UID;
item5.Mode = Game.Enums.ItemMode.Update;
item5.Send(client);
Database.ConquerItemTable.UpdatePerfection(item5);
}
else
{
return;
}
if ((item6 = client.Equipment.TryGetItem(ConquerItem.Tower)) != null)
{
item6.Stars = 54;
item6.PerfectionProgress = 0;
item6.Owner = client.Entity.Name;
item6.OwnerUID = client.Entity.UID;
item6.Mode = Game.Enums.ItemMode.Update;
item6.Send(client);
Database.ConquerItemTable.UpdatePerfection(item6);
}
else
{
return;
}
if ((item7 = client.Equipment.TryGetItem(ConquerItem.Fan)) != null)
{
item7.Stars = 54;
item7.PerfectionProgress = 0;
item7.Owner = client.Entity.Name;
item7.OwnerUID = client.Entity.UID;
item7.Mode = Game.Enums.ItemMode.Update;
item7.Send(client);
Database.ConquerItemTable.UpdatePerfection(item7);
}
else
{
return;
}
if ((item8 = client.Equipment.TryGetItem(ConquerItem.SteedCrop)) != null)
{
item8.Stars = 54;
item8.PerfectionProgress = 0;
item8.Owner = client.Entity.Name;
item8.OwnerUID = client.Entity.UID;
item8.Mode = Game.Enums.ItemMode.Update;
item8.Send(client);
Database.ConquerItemTable.UpdatePerfection(item8);
}
else
{
return;
}
if ((item9 = client.Equipment.TryGetItem(ConquerItem.Steed)) != null)
{
item9.Stars = 54;
item9.PerfectionProgress = 0;
item9.Owner = client.Entity.Name;
item9.OwnerUID = client.Entity.UID;
item9.Mode = Game.Enums.ItemMode.Update;
item9.Send(client);
Database.ConquerItemTable.UpdatePerfection(item9);
}
else
{
return;
}
if ((item10 = client.Equipment.TryGetItem(ConquerItem.RightWeapon)) != null)
{
item10.Stars = 54;
item10.PerfectionProgress = 0;
item10.Owner = client.Entity.Name;
item10.OwnerUID = client.Entity.UID;
item10.Mode = Game.Enums.ItemMode.Update;
item10.Send(client);
Database.ConquerItemTable.UpdatePerfection(item10);
}
else
{
return;
}
if ((item11 = client.Equipment.TryGetItem(ConquerItem.LeftWeapon)) != null)
{
item11.Stars = 54;
item11.PerfectionProgress = 0;
item11.Owner = client.Entity.Name;
item11.OwnerUID = client.Entity.UID;
item11.Mode = Game.Enums.ItemMode.Update;
item11.Send(client);
Database.ConquerItemTable.UpdatePerfection(item11);
}
else
{
return;
}
if ((item12 = client.Equipment.TryGetItem(ConquerItem.Wing)) != null)
{
item12.Stars = 54;
item12.PerfectionProgress = 0;
item12.Owner = client.Entity.Name;
item12.OwnerUID = client.Entity.UID;
item12.Mode = Game.Enums.ItemMode.Update;
item12.Send(client);
Database.ConquerItemTable.UpdatePerfection(item12);
}
else
{
return;
}
client.Entity.Update(_String.Effect, "dakaishengzhi", true);
}
}
break;
}
}
break;
}
#endregion
using System;
using System.Linq;
using System.Collections.Generic;
using Mr_Panda.Network.GamePackets;
using System.IO;
namespace Mr_Panda.Game.ConquerStructures
{
public class Nobility : Mr_Panda.Network.Writer
{
public static ulong MaxDonation = 0;
public static ulong MaxDonation1 = 0;
public static ulong MaxDonation2 = 0;
public static SafeDictionary<uint, NobilityInformation> Board = new SafeDictionary<uint, NobilityInformation>(10000);
public static List<NobilityInformation> BoardList = new List<NobilityInformation>(10000);
public static void Handle(NobilityInfo information, Client.GameState client)
{
if (information.Type == NobilityInfo.Donate)
return;
switch (information.Type)
{
case NobilityInfo.Donate:
{
if (client.Trade.InTrade)
return;
if (client.Player.DonateTime)
return;
ulong silvers = information.dwParam;
bool newDonator = false;
client.NobilityInformation.Gender = (byte)(client.Player.Body % 10);
if (client.NobilityInformation.Donation == 0)
newDonator = true;
if (information.MoneyType == 1)
{
ulong cps = silvers / 50000;
if (client.Player.ConquerPoints >= 10000)
{
client.Player.ConquerPoints -= 10000;
client.NobilityInformation.Donation += silvers;
}
}
else
{
if (client.Player.Money >= silvers)
{
client.Player.Money -= (uint)silvers;
client.NobilityInformation.Donation += silvers;
}
}
if (!Board.ContainsKey(client.Player.UID) && client.NobilityInformation.Donation == silvers && newDonator)
{
Board.Add(client.Player.UID, client.NobilityInformation);
try
{
Database.NobilityTable.InsertNobilityInformation(client.NobilityInformation);
}
catch
{
Database.NobilityTable.UpdateNobilityInformation(client.NobilityInformation);
}
}
else
{
Database.NobilityTable.UpdateNobilityInformation(client.NobilityInformation);
}
Sort(client.Player.UID);
break;
}
case NobilityInfo.List:
{
byte[] packet = new byte[600 + 8];
Network.Writer.WriteUInt16(600, 0, packet);
Network.Writer.WriteUInt16(2064, 2, packet);
Network.Writer.WriteUInt16(2, 4, packet);
Network.Writer.WriteUInt16(5, 10, packet);
Network.Writer.WriteUInt16(20, 12, packet);
int offset = 120;
for (int i = (int)(information.wParam1 * 10); i < information.wParam1 * 10 + 10 && i < BoardList.Count; i++)
{
var nob = BoardList[i];
Network.Writer.WriteUInt32(nob.EntityUID, offset, packet);
offset += 4;
if (Kernel.GamePool.ContainsKey(nob.EntityUID))
{
Network.Writer.WriteUInt32(1, offset, packet);
offset += 4;
Network.Writer.WriteUInt32(nob.Mesh, offset, packet);
offset += 4;
}
else
{
offset += 8;
}
Network.Writer.WriteString(nob.Name, offset, packet);
offset += 20;
Network.Writer.WriteUInt64(nob.Donation, offset, packet);
offset += 8;
Network.Writer.WriteUInt32((uint)nob.Rank, offset, packet);
offset += 4;
Network.Writer.WriteUInt32((uint)i, offset, packet);
offset += 4;
}
client.Send(packet);
break;
}
}
}
public static void Donate(ulong silvers, Client.GameState client, bool Npc = false)
{
if (Npc == false)
return;
bool newDonator = false;
client.NobilityInformation.Gender = (byte)(client.Player.Body % 10);
if (client.NobilityInformation.Donation == 0)
newDonator = true;
client.NobilityInformation.Donation += silvers;
if (!Board.ContainsKey(client.Player.UID) && client.NobilityInformation.Donation == silvers && newDonator)
{
Board.Add(client.Player.UID, client.NobilityInformation);
try
{
Database.NobilityTable.InsertNobilityInformation(client.NobilityInformation);
}
catch
{
Database.NobilityTable.UpdateNobilityInformation(client.NobilityInformation);
}
}
else
{
Database.NobilityTable.UpdateNobilityInformation(client.NobilityInformation);
}
Sort(client.Player.UID);
}
public static void Sort(uint updateUID)
{
SafeDictionary<uint, NobilityInformation> sortedBoard = new SafeDictionary<uint, NobilityInformation>();
int Place = 0;
foreach (NobilityInformation entry in Board.Values.OrderByDescending((p) => p.Donation))
{
Client.GameState client = null;
try
{
int previousPlace = entry.Position;
entry.Position = Place;
NobilityRank Rank = NobilityRank.Serf;
if (Place >= 10000)
{
if (entry.Donation >= 200000)
{
Rank = NobilityRank.Earl;
}
else if (entry.Donation >= 100000)
{
Rank = NobilityRank.Baron;
}
else if (entry.Donation >= 300000)
{
Rank = NobilityRank.Knight;
}
}
else
{
if (Place < 99999999)
{
Rank = NobilityRank.King;
if (Place < (99999999))
{
MaxDonation = entry.Donation;
}
}
else if (Place < 20)
{
Rank = NobilityRank.Prince;
if (Place < 20)
{
MaxDonation1 = entry.Donation;
}
}
else
{
if (Place < 9999)
{
}
Rank = NobilityRank.Duke;
if (Place < (9999))
{
MaxDonation2 = entry.Donation;
}
}
}
var oldRank = entry.Rank;
entry.Rank = Rank;
if (Kernel.GamePool.TryGetValue(entry.EntityUID, out client))
{
bool updateTheClient = false;
if (oldRank != Rank)
{
updateTheClient = true;
if (Rank == NobilityRank.Baron)
{
Kernel.SendWorldMessage(new Message(" Congratulation " + client.Player.Name + " has the Baron In Pharaohs-Eu ", System.Drawing.Color.White, Message.TopLeft), Program.Values);
}
if (Rank == NobilityRank.Earl)
{
Kernel.SendWorldMessage(new Message(" Congratulation " + client.Player.Name + " has the Earl In Pharaohs-Eu ", System.Drawing.Color.White, Message.TopLeft), Program.Values);
}
if (Rank == NobilityRank.Duke)
{
Kernel.SendWorldMessage(new Message(" Congratulation " + client.Player.Name + " has the Duke In Pharaohs-Eu ", System.Drawing.Color.White, Message.Center), Program.Values);
}
if (Rank == NobilityRank.Prince)
{
Kernel.SendWorldMessage(new Message(" Congratulation " + client.Player.Name + " has the Prince In Pharaohs-Eu ", System.Drawing.Color.White, Message.Center), Program.Values);
}
if (Rank == NobilityRank.King)
{
Kernel.SendWorldMessage(new Message(" Congratulation " + client.Player.Name + " has become the new King/Queen In Pharaohs-Eu ", System.Drawing.Color.White, Message.Center), Program.Values);
}
if (Rank == NobilityRank.Knight)
{
Kernel.SendWorldMessage(new Message(" Congratulation " + client.Player.Name + " has become a Knight By In Pharaohs-Eu ", System.Drawing.Color.White, Message.TopLeft), Program.Values);
}
}
else
{
if (previousPlace != Place)
{
updateTheClient = true;
}
}
if (updateTheClient || client.Player.UID == updateUID)
{
NobilityInfo update = new NobilityInfo(true);
update.Type = NobilityInfo.Icon;
update.dwParam = entry.EntityUID;
update.UpdateString(entry);
client.SendScreen(update, true);
client.Player.NobilityRank = entry.Rank;
}
}
sortedBoard.Add(entry.EntityUID, entry);
Place++;
}
catch { }
}
Board = sortedBoard;
lock (BoardList)
BoardList = Board.Values.ToList();
}
}
public class NobilityInformation
{
public string Name;
public uint EntityUID;
public uint Mesh;
public ulong Donation;
public byte Gender;
public int Position;
public NobilityRank Rank;
public bool king;
public DateTime KingDays;
}
public enum NobilityRank : byte
{
Serf = 0,
Knight = 1,
Baron = 3,
Earl = 5,
Duke = 7,
Prince = 9,
King = 12
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
لو تكرمتم اى شخص عندى ف الجيم بيفتح الرانك الاكونت يهنج | megokarika | مشكلات السيرفيرات كونكر الشخصيه | 6 | 2020-02-20 02:58 PM |
مشكلة غريبه جدآ الاسطفا بتظهر من غير ال hp وي الدمج 7 الحل ايه يا رجاله | ahmedfathy | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-11-30 03:51 PM |
حل يا رجاله | abdo01120248447 | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2019-10-24 11:47 AM |
حل مشكلة بسرعه يا رجاله | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2019-09-16 09:35 AM |
حل مشكلة الرانك | osama | مشكلات السيرفيرات كونكر الشخصيه | 19 | 2019-07-21 01:41 PM |