Register for your free account! | Forgot your password?

You last visited: Today at 01:48

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

Advertisement



New Modified CPAdmin

Discussion on New Modified CPAdmin within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2008
Posts: 13
Received Thanks: 20
New Modified CPAdmin

Hi I kind of modified the code for CPAdmin so instead of selling one db for 215 cps you can sell all of then in your inventory in one shot and same thing with the DBScroll. This is my first time playing around with the C# so please do not flame me. And i tested this code and it works perfect in my client 5165.
Press the thanks button if you like it
Code:
#region CPAdmin
                            case XXXXX: <<< Make the case whatever you want and add the NPC
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Hello, I can trade you 215 CPs for a DragonBall and 2150 CPs for a DBScroll and silvers to cps 10k silver for 10 cps."));
                                        GC.AddSend(Packets.NPCLink("Here, take all my DragonBall!", 1));
                                        GC.AddSend(Packets.NPCLink("Here, take all my DBScroll!", 2));
                                        GC.AddSend(Packets.NPCLink("All Silvers", 3));                                        
                                        GC.AddSend(Packets.NPCLink("I'm too poor...", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        while (true)
                                        {
                                            if (GC.MyChar.InventoryContains(1088000, 1))
                                            {
                                                Game.Item DB = null;
                                                foreach (Game.Item I in GC.MyChar.Inventory)
                                                    if (I.ID == 1088000)
                                                    { DB = I; break; }
                                                if (DB != null)
                                                {
                                                    GC.MyChar.CPs += 215;
                                                    GC.MyChar.RemoveItem(DB);
                                                }
                                            }
                                            else break;
                                        }
                                    }
                                    if (Control == 2)
                                    {
                                        while (true)
                                        {
                                            if (GC.MyChar.InventoryContains(720028, 1))
                                            {
                                                Game.Item DB = null;
                                                foreach (Game.Item I in GC.MyChar.Inventory)
                                                    if (I.ID == 720028)
                                                    { DB = I; break; }
                                                if (DB != null)
                                                {
                                                    GC.MyChar.CPs += 2150;
                                                    GC.MyChar.RemoveItem(DB);
                                                }

                                            }
                                            else break;


                                        }
                                    }
                                    
                                    if (Control == 3)
                                    {
                                        if (GC.MyChar.Silvers >= 10000)
                                        {
                                            while (GC.MyChar.Silvers >= 10000)
                                            {
                                                GC.MyChar.CPs += 10;
                                                GC.MyChar.Silvers -= 10000;
                                            }
                                        }
                                    }
                                    
                                    break;
                                }
                            #endregion
So this is my code if you like it press thanks
patelkarn is offline  
Thanks
8 Users
Old 04/09/2010, 05:41   #2
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Code:
while (true)
?
Arcо is offline  
Old 04/09/2010, 14:28   #3
 
elite*gold: 0
Join Date: Jun 2008
Posts: 13
Received Thanks: 20
Quote:
Originally Posted by .Arco View Post
Code:
while (true)
?
Why what is wrong with that I use that so I can repeat the loop until there are no dragon ***** left in the inventory
patelkarn is offline  
Old 04/09/2010, 19:34   #4
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Oh!
I get what this is doing now.
You're selling all the dragonballs in the inventory.
Gotcha.
Arcо is offline  
Old 04/09/2010, 21:49   #5
 
elite*gold: 0
Join Date: Jun 2008
Posts: 13
Received Thanks: 20
yes that what it does i made it because lots of people have high rate for dbs it annoying to keep on clicking the guy to sell one db at a time. so i decided to made it if someone wat to use it.


press thanks if you like it
patelkarn is offline  
Old 05/03/2010, 03:50   #6
 
arab4life's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 430
Received Thanks: 286
Good Job.
arab4life is offline  
Thanks
1 User
Old 05/03/2010, 04:29   #7
 
©Hyperlink's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 109
Received Thanks: 55
Quote:
Originally Posted by patelkarn View Post
yes that what it does i made it because lots of people have high rate for dbs it annoying to keep on clicking the guy to sell one db at a time. so i decided to made it if someone wat to use it.


press thanks if you like it
i think the millionair thing is there for that reason, but i like this idea better
©Hyperlink is offline  
Old 05/03/2010, 05:59   #8
 
punkie..'s Avatar
 
elite*gold: 0
Join Date: Sep 2005
Posts: 16
Received Thanks: 23
Quote:
Originally Posted by ©Hyperlink View Post
i think the millionair thing is there for that reason, but i like this idea better
Well, if you read what he wrote it works also for all the DB Scrolls you've got.
So Millionair dude means nothing here :]

Good work.
punkie.. is offline  
Old 05/03/2010, 06:07   #9
 
TheGuyWithTheCodes's Avatar
 
elite*gold: 0
Join Date: May 2010
Posts: 122
Received Thanks: 24
why didnt you just make it checks how many dbs they have.
and then give hte amount thats needed.
much more simply, but goodwork
TheGuyWithTheCodes is offline  
Old 09/15/2010, 14:57   #10
 
salem rey's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 275
Received Thanks: 43
Arco got silent, hehehe Just joking peace arco..
salem rey is offline  
Reply


Similar Threads Similar Threads
CPAdmin Issues.
02/02/2010 - CO2 Private Server - 4 Replies
Hey guys, I have recently got my server online again, and have had some issues with coding in NPC's. I can get them physically there, but then no dialog appears at all. Here is my cq_action for CPAdmin, could anyone please tell me if anything is incorrect? Cheers
[Request] CPAdmin
03/16/2009 - Conquer Online 2 - 2 Replies
Yes, ninja, before u ask, i already search a lot but nothing works. sorry for disturbing u guys, but i have some problem here, i need a npc to change money or dbs for cps. but my server comes without this npc, could someone show me exactly how i need to do, to this npc exange gold or dbs for cps in the middle of tc? Thanks guys, I'm waiting for a resolution. thanks again.
CPAdmin!!
02/21/2009 - CO2 Private Server - 2 Replies
Tq Binarys !!! i haven't CPAdmin or npc for trading Money for cps?? can anyone learn me how to add npcs in Tq binarys?
[help] problem CpAdmin
10/17/2008 - CO2 Private Server - 6 Replies
How does that change can CpAdmin 1 Dbs to 256 cps or 10 dbs to 2,560 cps ???????????? Thank you
CPAdmin...
06/08/2008 - Conquer Online 2 - 2 Replies
//



All times are GMT +1. The time now is 01:52.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.