منتدي اكواد

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

Users 2019-07-01 08:56 PM

NPC Bank cps
 
كود PHP:

#region Bank cps
                            
case 12317:
                                {
                                    switch (
npcRequest.OptionID)
                                    {
                                        case 
0:
                                            {

                                                
dialog.Text("Hello friend. I can help you To Save " client.Entity.BankCps " Cps here .");
                                                
dialog.Option("I Want Save ConquerPoints "1);
                                                
dialog.Option("I Want Withdraw ConquerPoints "4);
                                                
dialog.Option("No thank you."255);
                                                break;
                                            }

                                        
#region addcps
                                        
case 1:
                                            {
                                                
dialog.Input(" You Want Save ConquerPoints "310);

                                                break;
                                            }

                                        case 
2:
                                            {
                                                if (
client.Entity.ConquerPoints >= client.NpcCpsInput && client.NpcCpsInput != 0)
                                                {
                                                    
client.Entity.BankCps += client.NpcCpsInput;
                                                    
client.Entity.ConquerPoints -= client.NpcCpsInput;
                                                    
client.NpcCpsInput 0;
                                                }
                                                break;
                                            }
                                        case 
3:
                                            {
                                                
uint input;
                                                if (
uint.TryParse(npcRequest.Inputout input))
                                                {
                                                    if (
input && input 2000000000)
                                                    {
                                                        
dialog.Text("Hello friend You Saved" client.Entity.BankCps " ConquerPoints Here");
                                                        
dialog.Text(" I Want Save Cps.");
                                                        
dialog.Input("I need It :"19);
                                                        
dialog.Option("No thank you."255);
                                                        return;
                                                    }
                                                    if (
client.Entity.ConquerPoints >= input)
                                                    {
                                                        
client.NpcCpsInput input;
                                                        
dialog.Text("Are you sure you want to Save " input " ConquerPoints");
                                                        
dialog.Option("Yes"2);
                                                        
dialog.Option("No thank you."255);
                                                    }

                                                }
                                                else
                                                {
                                                    
dialog.Text("You Must save 1:2000000000 ConquerPoints");
                                                    
dialog.Input("Insert amount:"19);
                                                    
dialog.Option("No thank you."255);
                                                }
                                                break;
                                            }
                                        
#endregion
                                        #region withdraw cps

                                        
case 4:
                                            {
                                                
dialog.Input(" You Want withdraw ConquerPoints "510);

                                                break;
                                            }
                                        case 
6:
                                            {
                                                if (
client.Entity.BankCps >= client.NpcCpsInput && client.NpcCpsInput != 0)
                                                {
                                                    
client.Entity.BankCps -= client.NpcCpsInput;
                                                    
client.Entity.ConquerPoints += client.NpcCpsInput;
                                                    
client.NpcCpsInput 0;
                                                }
                                                break;
                                            }
                                        case 
5:
                                            {
                                                
uint input;
                                                if (
uint.TryParse(npcRequest.Inputout input))
                                                {
                                                    if (
input && input 2000000000)
                                                    {
                                                        
dialog.Text("Hello friend you Want withdraw cps you give" client.Entity.BankCps " Cps here .");
                                                        
dialog.Text("you shore need add cps..");
                                                        
dialog.Input("I need It :"19);
                                                        
dialog.Option("No thank you."255);
                                                        return;
                                                    }
                                                    if (
client.Entity.BankCps >= input)
                                                    {
                                                        
client.NpcCpsInput input;
                                                        
dialog.Text("Are you sure you want to withdraw " input " CPs? .");
                                                        
dialog.Option("Yes"6);
                                                        
dialog.Option("No thank you."255);
                                                    }

                                                }
                                                else
                                                {
                                                    
dialog.Text("You Must in cps cps.");
                                                    
dialog.Input("Insert amount:"49);
                                                    
dialog.Option("No thank you."255);
                                                }
                                                break;
                                            }
                                        
#endregion
                                    
}
                                }
                                break;
                            
#endregion 


محمد ياسر 2019-07-01 08:59 PM

رد: NPC Bank cps
 
الله ينور

MohamedModyAdel 2019-07-03 01:54 PM

رد: NPC Bank cps
 
جميل

Tefa 2019-07-04 09:56 PM

رد: NPC Bank cps
 
اضافة بنك لل سي بي اس
ادخل علي Entitytable.cs
و اعمل سيرش علي
client.Player.Jail = reader.ReadUInt16("Jail");
تحتها ضيف
client.Player.BankCps = reader.ReadUInt32("BankCps");
بعدها سيرش علي
.Set("Jail", e.Jail)
تحته ضيف
.Set("BankCps", e.BankCps)
بعدها اعمل سيرش علي
public static void UpdateLocation(Client.GameState client)
و فوقه ضيف
public static void UpdateBankCps(Client.GameState client)
{
UpdateData(client, "BankCps", client.Player.BankCps);
}
بعدها ادخل علي Entity.cs
و اعمل سيرش علي public uint Jail;
و تحته ضيف public uint BankCps;
اخر حاجه خالص افتح النافي كات و كلك يمين علي entities و اختار Draw table و انزل تحت خالص و اعمل خانه جديده اكتب فيها BankCps و قيمه بتاعتها Bigint و بس كده مبروك عليك بنك السي بي اس
و اخر حاجه الانبي سي
كود:

#region Bank cps
                            case 12317:
                                {
                                    switch (npcRequest.OptionID)
                                    {
                                        case 0:
                                            {

                                                dialog.Text("Hello friend. I can help you To Save " + client.Entity.BankCps + " Cps here .");
                                                dialog.Option("I Want Save ConquerPoints ", 1);
                                                dialog.Option("I Want Withdraw ConquerPoints ", 4);
                                                dialog.Option("No thank you.", 255);
                                                break;
                                            }

                                        #region addcps
                                        case 1:
                                            {
                                                dialog.Input(" You Want Save ConquerPoints ", 3, 10);

                                                break;
                                            }

                                        case 2:
                                            {
                                                if (client.Entity.ConquerPoints >= client.NpcCpsInput && client.NpcCpsInput != 0)
                                                {
                                                    client.Entity.BankCps += client.NpcCpsInput;
                                                    client.Entity.ConquerPoints -= client.NpcCpsInput;
                                                    client.NpcCpsInput = 0;
                                                }
                                                break;
                                            }
                                        case 3:
                                            {
                                                uint input;
                                                if (uint.TryParse(npcRequest.Input, out input))
                                                {
                                                    if (input < 0 && input > 2000000000)
                                                    {
                                                        dialog.Text("Hello friend You Saved" + client.Entity.BankCps + " ConquerPoints Here");
                                                        dialog.Text(" I Want Save Cps.");
                                                        dialog.Input("I need It :", 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 Save " + input + " ConquerPoints");
                                                        dialog.Option("Yes", 2);
                                                        dialog.Option("No thank you.", 255);
                                                    }

                                                }
                                                else
                                                {
                                                    dialog.Text("You Must save 1:2000000000 ConquerPoints");
                                                    dialog.Input("Insert amount:", 1, 9);
                                                    dialog.Option("No thank you.", 255);
                                                }
                                                break;
                                            }
                                        #endregion
                                        #region withdraw cps

                                        case 4:
                                            {
                                                dialog.Input(" You Want withdraw ConquerPoints ", 5, 10);

                                                break;
                                            }
                                        case 6:
                                            {
                                                if (client.Entity.BankCps >= client.NpcCpsInput && client.NpcCpsInput != 0)
                                                {
                                                    client.Entity.BankCps -= client.NpcCpsInput;
                                                    client.Entity.ConquerPoints += client.NpcCpsInput;
                                                    client.NpcCpsInput = 0;
                                                }
                                                break;
                                            }
                                        case 5:
                                            {
                                                uint input;
                                                if (uint.TryParse(npcRequest.Input, out input))
                                                {
                                                    if (input < 0 && input > 2000000000)
                                                    {
                                                        dialog.Text("Hello friend you Want withdraw cps you give" + client.Entity.BankCps + " Cps here .");
                                                        dialog.Text("you shore need add cps..");
                                                        dialog.Input("I need It :", 1, 9);
                                                        dialog.Option("No thank you.", 255);
                                                        return;
                                                    }
                                                    if (client.Entity.BankCps >= input)
                                                    {
                                                        client.NpcCpsInput = input;
                                                        dialog.Text("Are you sure you want to withdraw " + input + " CPs? .");
                                                        dialog.Option("Yes", 6);
                                                        dialog.Option("No thank you.", 255);
                                                    }

                                                }
                                                else
                                                {
                                                    dialog.Text("You Must in cps cps.");
                                                    dialog.Input("Insert amount:", 4, 9);
                                                    dialog.Option("No thank you.", 255);
                                                }
                                                break;
                                            }
                                        #endregion
                                    }
                                }
                                break;
                            #endregion



الساعة الآن 09:50 PM

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