السلام عليكم
ده ان بي سي بيرفعك في الدونيشن علي طول,
نخش في الاضافه يامعلم
ادخل علي ملف
حط ده في اي مكان في الاخر كده
ادخل علي ملف
حط الكود ده
ادخل علي المسار ده
ضيف الكود ده
ده ان بي سي بيرفعك في الدونيشن علي طول,
نخش في الاضافه يامعلم
ادخل علي ملف
الكود:
Npcs
حط ده في اي مكان في الاخر كده
الكود:
[b][color=Red][size=24] uint input;
if (uint.TryParse(npcRequest.Input, out input))
{
if (input < 3000000)
{
dialog.Text("You need to input more or atleast 3,000,000 CPs");
dialog.Input("Insert amount:", 1, 9);
dialog.Option("No thank you.", 255);
return;
}
if (client.Entity.ConquerPoints >= input)
{
client.NpcCpsInput = input;
dialog.Text("Are you sure you want to donate " + input + " CPs? That means I will donate for you " + (((ulong)input) * 50000ul) + " gold.");
dialog.Option("Yes", 2);
dialog.Option("No thank you.", 255);
}
else
{
dialog.Text("You don't have that much CPs. Try again. \nThe exchange ratio is 1:50000. That means you give me 1 CPs, I donate for you 50000 gold. The minimum amount is 6,000,000 CPs.");
dialog.Input("Insert amount:", 1, 9);
dialog.Option("No thank you.", 255);
}
}
else
{
dialog.Text("Try again. \nThe exchange ratio is 1:50000. That means you give me 1 CPs, I donate for you 50000 gold. The minimum amount is 6,000,000 CPs.");
dialog.Input("Insert amount:", 1, 9);
dialog.Option("No thank you.", 255);
}
break;
}
case 2:
{
if (client.Entity.ConquerPoints >= client.NpcCpsInput && client.NpcCpsInput != 0)
{
client.Entity.ConquerPoints -= client.NpcCpsInput;
Game.ConquerStructures.Nobility.Donate((ulong)client.NpcCpsInput * 50000ul, client);
client.NpcCpsInput = 0;
}
break;
}
}
break;
}
#endregion [/size][/color][/b]
ادخل علي ملف
الكود:
GameClient
حط الكود ده
الكود:
public uint NpcCpsInput;
ادخل علي المسار ده
الكود:
Game.ConquerStructures.Nobility
ضيف الكود ده
الكود:
public static void Donate(ulong silvers, Client.GameClient client)
{
bool newDonator = false;
client.NobilityInformation.Gender = (byte)(client.Entity.Body % 10);
if (client.NobilityInformation.Donation == 0)
newDonator = true;
client.NobilityInformation.Donation += silvers;
if (!Board.ContainsKey(client.Entity.UID) && client.NobilityInformation.Donation == silvers && newDonator)
{
Board.Add(client.Entity.UID, client.NobilityInformation);
try
{
Database.NobilityTable.InsertNobilityInformation(client.NobilityInformation);
}
catch
{
Database.NobilityTable.UpdateNobilityInformation(client.NobilityInformation);
}
}
else
{
Database.NobilityTable.UpdateNobilityInformation(client.NobilityInformation);
}
Sort(client.Entity.UID);
}