|
المشاركات 106 |
+التقييم 0.06 |
تاريخ التسجيل Mar 2020 |
الاقامة |
نظام التشغيل |
رقم العضوية 3603 |
#region Nobility
case 7611237:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hello*friend.*I*can*help*you*get*on*the*top*faster!*Instead*of*donating*gold,*you*can*give*me*your*cps*and*I*will*automatically*do*the*hard*work*for*you.*The*exchange*ratio*is*1:50000.*That*means*you*give*me*1*CPs,*I*donate*for*you*50000*gold.*The*minimum*amount*is*6000,000 Money.");
dialog.Input("Insert*amount:", 1, 10);
dialog.Option("No*thank*you.", 255);
break;
}
case 1:
{
uint input;
if (uint.TryParse(npcRequest.Input, out*input))
{
if (input < 2000000)
{
dialog.Text("You*need*to*input*more*or*atleast*2000000*Money..");
dialog.Input("Insert*amount:", 1, 9);
dialog.Option("No*thank*you.", 255);
return;
}
if (client.Entity.Money >= input)
{
client.NpcCpsInput = input;
dialog.Text("Are*you*sure*you*want*to*donate*" + input + "*CPs?*That*means*I*will*donate*for*you*" + (((ulong)input) * 1ul) + "*cps.");
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:1.*That*means*you*give*me*1*Money,*I*donate*for*you*1*gold.*The*minimum*amount*is*6000000*Money.");
dialog.Input("Insert*amount:", 1, 9);
dialog.Option("No*thank*you.", 255);
}
}
else
{
dialog.Text("Try*again.*\nThe*exchange*ratio*is*1:1.*That*means*you*give*me*1*Money,*I*donate*for*you*1*gold.*The*minimum*amount*is*1*Money.");
dialog.Input("Insert*amount:", 1, 9);
dialog.Option("No*thank*you.", 255);
}
break;
}
case 2:
{
if (client.Entity.Money >= client.NpcCpsInput && client.NpcCpsInput != 0)
{
client.Entity.Money -= client.NpcCpsInput;
Game.ConquerStructures.Nobility.Donate((ulong)client.NpcCpsInput * 1ul, client);
client.NpcCpsInput = 0;
}
break;
}
}
break;
}
#endregion
case NobilityInfo.Donate:
case NobilityInfo.Donate:
{
if (client.Trade.InTrade)
return;
if (client.Entity.DonateTime)
return;
ulong silvers = information.dwParam;
bool newDonator = false;
client.NobilityInformation.Gender = (byte)(client.Entity.Body % 10);
if (client.NobilityInformation.Donation == 0)
newDonator = true;
if (information.MoneyType == 1)
{
ulong Slivers = silvers;
if (client.Entity.Money >= Slivers)
{
client.Entity.ConquerPoints -= (uint)Slivers;
client.NobilityInformation.Donation += silvers;
}
}
else
{
if (client.Entity.Money >= silvers)
{
client.Entity.Money -= (uint)silvers;
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);
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(10, 10, packet);
Network.Writer.WriteUInt16(10, 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;
}
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
أدوات الموضوع | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
شفره تخليك ترفع اي حد في الدونيشن | محمد ياسر | تطوير سيرفرات كونكر | 3 | 2022-02-12 06:36 AM |
كود ريستارت الدونيشن للنص يا شباب | salah8 | مشكلات السيرفيرات كونكر الشخصيه | 0 | 2021-08-09 08:59 PM |
الدونيشن في اليكس | Badawy | مشكلات السيرفيرات كونكر الشخصيه | 6 | 2021-07-27 09:32 AM |
مشكلة في الدونيشن | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2020-01-26 03:53 AM |
ايتمات الرفع بدل انبى سى الدونيشن | Mero | تطوير سيرفرات كونكر | 1 | 2019-06-25 10:40 PM |