حصريا ان بي سي الرفع في الدونشن

السلام عليكم
ده ان بي سي بيرفعك في الدونيشن علي طول,
نخش في الاضافه يامعلم
ادخل علي ملف


الرمز:
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);
        } 

Share on Google Plus

حول اسمي عمرو بحب اكتب قصص رعب بس بطلتها وبكتب قصص دينية واتعلمت فترة في مجال هكر الفيس بوك ووصلت لمرحله رائعة فيه ولاكن بطلته وعموما انا بحب الاكتشاف وعدم التقليد احب التميز في العمل وذالك ماساحاول جاهد

عن الكاتب "انا عمرو الشهرة الخطير احب التدوين وكل ماهو خاص بذالك.
    Blogger Comment

0 التعليقات:

إرسال تعليق

عمرو الخطير. يتم التشغيل بواسطة Blogger.