Register for your free account! | Forgot your password?

You last visited: Today at 09:33

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Npc VipSeller

Discussion on Npc VipSeller within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Closed Thread
 
Old   #1
 
l~MaGiC~l's Avatar
 
elite*gold: 0
Join Date: Jun 2013
Posts: 1
Received Thanks: 1
Cool Npc VipSeller

Hey all

My name is MrMagic

(Npc) Vip.seller

open Npcs.cs

and add This

Code:
                #region Vip Seller
                case 9295:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    if (client.Entity.VIPLevel == 6)
                                    {
                                        dialog.Text("your Are already VIP 6.");
                                        dialog.Option("I see.", 255);
                                        dialog.Avatar(116);
                                        dialog.Send();
                                        break;
                                    }
                                    dialog.Text("Hay i will upgrade your VIP for cps");
                                    dialog.Option("[VIP 1] 20k cps.", 1);
                                    dialog.Option("[VIP 2] 20k cps.", 2);
                                    dialog.Option("[VIP 3] 15k cps.", 3);
                                    dialog.Option("[VIP 4] 30k cps.", 4);
                                    dialog.Option("[VIP 5] 15k cps.", 5);
                                    dialog.Option("[VIP 6] 20k cps.", 6);
                                    dialog.Option("Just passing by.", 255);
                                    dialog.Avatar(116);
                                    dialog.Send();
                                    break;

                                }
                            case 1:
                                {
                                    if (client.Entity.VIPLevel == 0 && client.Entity.VIPLevel < 1)
                                    {
                                        if (client.Entity.ConquerPoints >= 20000)
                                        {
                                            client.Entity.ConquerPoints -= 20000;
                                            client.Entity.VIPLevel = 1;

                                        }

                                        else
                                        {
                                            dialog.Text("Please take 20k cps.");
                                            dialog.Option("I see.", 255);
                                            dialog.Avatar(116);
                                            dialog.Send();
                                        }

                                    }
                                    else
                                    {
                                        dialog.Text("Sorry Can't upgrade any more.");
                                        dialog.Option("I see.", 255);
                                        dialog.Avatar(116);
                                        dialog.Send();
                                    }

                                    break;
                                }
                            case 2:
                                {
                                    if (client.Entity.VIPLevel == 1)
                                    {
                                        if (client.Entity.ConquerPoints >= 20000)
                                        {
                                            client.Entity.ConquerPoints -= 20000;
                                            client.Entity.VIPLevel = 2;
                                        }

                                        else
                                        {
                                            dialog.Text("Please take 20k cps.");
                                            dialog.Option("I see.", 255);
                                            dialog.Avatar(116);
                                            dialog.Send();
                                        }


                                    }
                                    else
                                    {
                                        dialog.Text("Sorry Can't upgrade any more.");
                                        dialog.Option("I see.", 255);
                                        dialog.Avatar(116);
                                        dialog.Send();
                                    }
                                    break;
                                }
                            case 3:
                                {
                                    if (client.Entity.VIPLevel == 2)
                                    {
                                        if (client.Entity.ConquerPoints >= 15000)
                                        {
                                            client.Entity.ConquerPoints -= 15000;
                                            client.Entity.VIPLevel = 3;
                                        }

                                        else
                                        {
                                            dialog.Text("Please take 15k cps.");
                                            dialog.Option("I see.", 255);
                                            dialog.Avatar(116);
                                            dialog.Send();
                                        }


                                    }
                                    else
                                    {
                                        dialog.Text("Sorry Can't upgrade any more.");
                                        dialog.Option("I see.", 255);
                                        dialog.Avatar(116);
                                        dialog.Send();
                                    }
                                    break;
                                }
                            case 4:
                                {
                                    if (client.Entity.VIPLevel == 3)
                                    {
                                        if (client.Entity.ConquerPoints >= 30000)
                                        {
                                            client.Entity.ConquerPoints -= 30000;
                                            client.Entity.VIPLevel = 4;
                                        }

                                        else
                                        {
                                            dialog.Text("Please take 150k cps.");
                                            dialog.Option("I see.", 255);
                                            dialog.Avatar(116);
                                            dialog.Send();
                                        }

                                    }
                                    else
                                    {
                                        dialog.Text("Sorry Can't upgrade any more.");
                                        dialog.Option("I see.", 255);
                                        dialog.Avatar(116);
                                        dialog.Send();
                                    }
                                    break;
                                }
                            case 5:
                                {
                                    if (client.Entity.VIPLevel == 4)
                                    {
                                        if (client.Entity.ConquerPoints >= 15000)
                                        {
                                            client.Entity.ConquerPoints -= 15000;
                                            client.Entity.VIPLevel = 5;
                                        }

                                        else
                                        {
                                            dialog.Text("Please take 15k cps.");
                                            dialog.Option("I see.", 255);
                                            dialog.Avatar(116);
                                            dialog.Send();

                                        }

                                    }
                                    else
                                    {
                                        dialog.Text("Sorry Can't upgrade any more.");
                                        dialog.Option("I see.", 255);
                                        dialog.Avatar(116);
                                        dialog.Send();
                                    }
                                    break;
                                }
                            case 6:
                                {
                                    if (client.Entity.VIPLevel == 5)
                                    {
                                        if (client.Entity.ConquerPoints >= 20000)
                                        {
                                            client.Entity.ConquerPoints -= 20000;
                                            client.Entity.VIPLevel = 6;
                                        }

                                        else
                                        {
                                            dialog.Text("Please take 20k cps.");
                                            dialog.Option("I see.", 255);
                                            dialog.Avatar(116);
                                            dialog.Send();

                                        }

                                    }
                                    else
                                    {
                                        dialog.Text("Sorry Can't upgrade any more.");
                                        dialog.Option("I see.", 255);
                                        dialog.Avatar(116);
                                        dialog.Send();
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
add this in data base on Navi cut id 9295
type 2
bye bye all
l~MaGiC~l is offline  
Thanks
1 User
Old 06/07/2013, 10:14   #2
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 327
i thought of optimizing this and here what i came up with
Code:
                #region Vip Seller
                case 9295:
                    {
                       if (npcRequest.OptionID == 0)
                        {
                                    if (client.Entity.VIPLevel == 6)
                                    {
                                        dialog.Text("your vip level is already 6.");
                                        dialog.Option("I see.", 255);
                                        dialog.Avatar(116);
                                        dialog.Send();
                                        break;
                                    }
                                    dialog.Text("I can help you to upgrade your vip level");
                                    dialog.Option("[VIP 1] 10k cps.", 1);
                                    dialog.Option("[VIP 2] 20k cps.", 2);
                                    dialog.Option("[VIP 3] 30k cps.", 3);
                                    dialog.Option("[VIP 4] 40k cps.", 4);
                                    dialog.Option("[VIP 5] 50k cps.", 5);
                                    dialog.Option("[VIP 6] 60k cps.", 6);
                                    dialog.Option("Just passing by.", 255);
                                    dialog.Avatar(116);
                                    dialog.Send();
                                    break;
                      }
                    else if (npcRequest.OptionID != 255)
                      {
                                    if(client.Entity.VIPLevel == (npcRequest.OptionID -1))
                                    {
                                        if (client.Entity.ConquerPoints >= (npcRequest.OptionID * 10000))
                                        {
                                            client.Entity.ConquerPoints -= (npcRequest.OptionID * 10000);
                                            client.Entity.VIPLevel = npcRequest.OptionID;
                                        }
                                        else
                                        {
                                            dialog.Text("You don't have " + (npcRequest.OptionID * 10000));
                                            dialog.Option("I see.", 255);
                                            dialog.Avatar(116);
                                            dialog.Send();
                                        }
                                   }
                                  else
                                   {
                                        dialog.Text("Sorry Can't upgrade your vip level to level" + npcRequest.OptionID + "unless you're vip level is " + (npcRequest.OptionID - 1) );
                                        dialog.Option("I see.", 255);
                                        dialog.Avatar(116);
                                        dialog.Send();
                                   }
                       }
                    }
                #endregion
go for it is offline  
Thanks
1 User
Closed Thread




All times are GMT +2. The time now is 09:33.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.