Register for your free account! | Forgot your password?

You last visited: Today at 15:25

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

Advertisement



[Assistance] coding

Discussion on [Assistance] coding within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Jay10291's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 143
Received Thanks: 155
[Assistance] coding

from 12tails 5361 source

if (client.Inventory.Contains(700011, 15))
{
client.Inventory.Remove(700011, 15);
Checks and takes 15 "700011"(ndragongem) from inventory ...now how can I add 1 "700012"(rdragongem) to the inventory?
I just want the line of code to add **** cause idk it, and theres no good reference in the source.
Jay10291 is offline  
Old 06/24/2011, 20:45   #2
 
elite*gold: 0
Join Date: May 2011
Posts: 168
Received Thanks: 33
Have you even tried searching the source? Look in the UseItems and find DBScroll, there should be an example to add item in there.
zTek is offline  
Thanks
1 User
Old 06/24/2011, 20:46   #3
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
Gee I dunno.

If remove is
Code:
client.Inventory.Remove
Try
Code:
client.Inventory.Add
_DreadNought_ is offline  
Old 06/27/2011, 05:27   #4
 
Jay10291's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 143
Received Thanks: 155
@dreadnought
Gee I dunno.
Maybe I already tried that

@zTek
At first I simply added
Quote:
client.Inventory.Add(700012, 1);
under
Quote:
client.Inventory.Remove(700011, 15);
That was a no brainer but surprisingly it didnt work and the error was no help. But all I needed to do to get it to work was add in "0" for some reason.
Quote:
client.Inventory.Add(700012, 0, 1);
What does the 0 represent? :S
Jay10291 is offline  
Old 06/27/2011, 09:26   #5
 
elite*gold: 80
Join Date: Sep 2007
Posts: 642
Received Thanks: 168
Right click on "add" and click on "Go To Definition." That will be a lot of help for you im sure.
Santa is offline  
Old 06/27/2011, 09:51   #6
 
Jay10291's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 143
Received Thanks: 155
@StarBucks
Yeah it was, appreciate it.

@angelius
And yeah, I did try that.. I just didnt know I was missing a value.
Jay10291 is offline  
Reply




All times are GMT +1. The time now is 15:26.


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