Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 01:24

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

Advertisement



[Help]CoEmu 5095 source InventoryContains

Discussion on [Help]CoEmu 5095 source InventoryContains within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2008
Posts: 132
Received Thanks: 64
[Help]CoEmu 5095 source InventoryContains

hi
someone know how to use this in coEmu source:

Code:
if (MyChar.InventoryContains(721259, 1))
or how to add something that i can check if the char haa one wanted item?
koio is offline  
Old 05/28/2009, 22:41   #2
 
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
May this:
Code:
if(CSocket.Client.Inventory.ContainsKey(UID HERE))
{
//Code here...
}
YukiXian is offline  
Old 05/28/2009, 22:57   #3
 
$HaDoW's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 285
Received Thanks: 78
and what for remove and add item ?
$HaDoW is offline  
Old 05/29/2009, 06:25   #4
 
elite*gold: 0
Join Date: Sep 2008
Posts: 132
Received Thanks: 64
Quote:
Originally Posted by YukiXian View Post
May this:
Code:
if(CSocket.Client.Inventory.ContainsKey(UID HERE))
{
//Code here...
}
but at UID i can use only the item UID not the item ID or?
and i need to check it item id
koio is offline  
Old 05/29/2009, 13:43   #5
 
elite*gold: 0
Join Date: Jun 2007
Posts: 323
Received Thanks: 30
Quote:
Originally Posted by koio View Post
but at UID i can use only the item UID not the item ID or?
and i need to check it item id
I think you can use the ID.
Zanzibar is offline  
Old 05/29/2009, 14:57   #6
 
$HaDoW's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 285
Received Thanks: 78
I did it
heres an exmp only thing I need to know where the hell do I get the UID of the item !
Code:
else if (LinkBack == 3)
                        {
                            if(CSocket.Client.Inventory.ContainsKey(720028))
                            {
                                CSocket.Client.Inventory.Remove(720028);
                                CPs (+500, CSocket);
                            }
                            else
                            {
                                Text("How dare you try to rip me off! Get lost, Or get my DBScroll!", CSocket);
                                Link("I'm sorry, I didn't realize.", 255, CSocket);
                                End(CSocket);
                            }
                        }
$HaDoW is offline  
Old 05/29/2009, 15:22   #7
 
elite*gold: 0
Join Date: Sep 2008
Posts: 132
Received Thanks: 64
then i try it it didnīt work for me with the item id
Code:
              else if (LinkBack == 2)
                        {
                            if (CSocket.Client.Inventory.ContainsKey(1088000))
                            {
                                
                                CPs(+5000, CSocket);
                            }
                            else
                            {
                                Text("You don't have a dragon ball!", CSocket);
                                Link("I'm sorry, I didn't realize.", 255, CSocket);
                                End(CSocket);
                            }
                        }
with the uid it works but not every itemid have the same uid
koio is offline  
Old 05/29/2009, 15:48   #8
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
You need to iterate through the whole dictionary:

Code:
foreach (KeyValuePair<int, Struct.ItemInfo> pair in Inventory)
{
    if (pair.Value.ItemID == [param_name_for_item_id]) return true;
}
return false;
nTL3fTy is offline  
Old 05/29/2009, 16:26   #9
 
$HaDoW's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 285
Received Thanks: 78
nTL3fTy wtf do you mean ? xD more info what to do where !
$HaDoW is offline  
Reply

« GooD NeWs | help »

Similar Threads Similar Threads
[Release] Elite-CoEmu 5095 Source
09/27/2013 - CO2 PServer Guides & Releases - 126 Replies
Ok ive decided to release my older modified coemu source because ive remade it and fixed almost everything in it. Here is some info about this source: GuildWars = Finished. Talis up scores threw hole gw and the guild with the most at the end wins. DisCity = Done. Nobility = Done. Added a GUI instead of Console. MultiThreaded to add stability. Fixed password on First Log, it now reads pw set from register script. Added Config file to load settings db / ip / ports / number of noble...
[Release] Coemu 5095 source full ninja
02/04/2013 - CO2 PServer Guides & Releases - 58 Replies
# close thread to much flamers
Do not log on[Source CoEmu 5095]
08/01/2009 - Conquer Online 2 - 1 Replies
Hello XD When I want to log in to your server to prevent the loading bar "Logging into account server" http://img142.imageshack.us/img142/8942/asdxse.th .jpg
[Important] for source CoEmu V2 5095
07/29/2009 - CO2 Private Server - 8 Replies
hey guys its my first time to try to run CoEmu source i followed the guide and its fixed line 30 but while im trying to log in game its giving me this error if u guys got info dont be like some of pplz dont accept to give other the info :rtfm: and its a simple problme as i think O.o http://img190.imageshack.us/img190/7370/ddddddddd dddd.png
[Help]CoEmu 5095 source
05/28/2009 - CO2 Private Server - 5 Replies
is that CoEmu 5095 source worked for anyone? and i need a video guide how to run that source fine thanks^^



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


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.