المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : مشكلة بخصوص الدونيشن


Abod ayman
2020-04-12, 03:32 AM
السلام عليكم
دلوقتي انا عندي الدونيشن ب سي بي اس وشغال تمام من الانبسي وكنت عايز اخليه بالفضة ممكن حل .. انا دورت في المنتدى كله كتير الموضوع ده والله ياريت لو حد عنده حل يفيدني

Hassan Emprator
2020-04-12, 06:04 AM
عايز يعني يرفع من الانبي سي فضه ولو يرفع من البتاعه نفسها فضه ؟

ElSaher
2020-04-12, 06:29 AM
بدل الnpc دا بلي عندك ودا كدا هيخلي يرف بي فلوس من npc


#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*c ps*and*I*will*automatically*do*the*hard*work*for*y ou.*The*exchange*ratio*is*1:50000.*That*means*you* give*me*1*CPs,*I*donate*for*you*50000*gold.*The*mi nimum*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*exc hange*ratio*is*1:1.*That*means*you*give*me*1*Money ,*I*donate*for*you*1*gold.*The*minimum*amount*is*6 000000*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)clie nt.NpcCpsInput * 1ul, client);
client.NpcCpsInput = 0;
}
break;
}
}
break;
}
#endregion

Hassan Emprator
2020-04-12, 06:48 AM
محمد ادالك الانبي سي ودا لو عايز ترفع من الدونيشن نفسه

هتبحث عن
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(c lient.NobilityInformation);
}
catch
{
Database.NobilityTable.UpdateNobilityInformation(c lient.NobilityInformation);
}
}
else
{
Database.NobilityTable.UpdateNobilityInformation(c lient.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;
}
}
}