منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   تطوير سيرفرات كونكر (https://code.vpscairo.com/forumdisplay.php?f=11)
-   -   npc Nobility (https://code.vpscairo.com/showthread.php?t=29)

محمد ياسر 2019-04-18 10:53 AM

npc Nobility
 
انبي سي التبرع بالسي بي اس

ضيف الاكواد في

npc.cs

كود PHP:

#region Nobility
                
case 1509:
                    {
                        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 100,000 CPs.");
                                    
dialog.Input("Insert amount:"110);
                                    
dialog.Option("No thank you."255);
                                    break;
                                }
                            case 
1:
                                {
                                    
uint input;
                                    if (
uint.TryParse(npcRequest.Inputout input))
                                    {
                                        if (
input 1000)
                                        {
                                            
dialog.Text("You need to input more or atleast 1,000 CPs..");
                                            
dialog.Input("Insert amount:"19);
                                            
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) * 1000ul) + " 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:1000. That means you give me 1 CPs, I donate for you 1000 gold. The minimum amount is 1,000 CPs.");
                                            
dialog.Input("Insert amount:"19);
                                            
dialog.Option("No thank you."255);
                                        }
                                    }
                                    else
                                    {
                                        
dialog.Text("Try again. \nThe exchange ratio is 1:1000. That means you give me 1 CPs, I donate for you 50000 gold. The minimum amount is 1,000 CPs.");
                                        
dialog.Input("Insert amount:"19);
                                        
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 1000ulclienttrue);
                                        
client.NpcCpsInput 0;
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                
#endregion 


MohamedModyAdel 2019-06-25 10:46 PM

رد: npc Nobility
 
جميل


الساعة الآن 12:16 AM

مرحبا بكم في منتدي اكواد لتطوير الالعاب