Register for your free account! | Forgot your password?

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

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

Advertisement



Checking for Bound Items in Inventory

Discussion on Checking for Bound Items in Inventory within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2006
Posts: 41
Received Thanks: 2
Checking for Bound Items in Inventory

Im trying to get it so when you talk to an npc they can tell if an item in your inventory is bound or not, and if it is to not give reward but i cant seem to get it working, Can someone take a look at what i have done so far and explain where im going wrong pls or a better way of doin it if there is, Thanks.

Code:
                                        case 1:
                                            {
                                                Interfaces.IConquerItem item = new ConquerItem(true);
                                                item.ID = 1058011;
                                                if (client.Inventory.TryGetItem(item.UID, out item))
                                                {
                                                  if (item.Bound == false)
                                                   {
                                                    client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
                                                    client.Entity.BoundCps += 100;
                                                   }
                                                else
                                                {
                                                    dialog.Text("Your item is bound.");
                                                    dialog.Send();
                                                    break;
                                                   }
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have the item");
                                                    dialog.Send();
                                                    break;
                                                }
                                                break;
                                            }
hacksaw is offline  
Old 06/16/2013, 00:30   #2
 
diedwarrior's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 611
Received Thanks: 195
TryGetItem or w/e method in impulse base
diedwarrior is offline  
Old 06/16/2013, 00:35   #3
 
elite*gold: 0
Join Date: Feb 2006
Posts: 41
Received Thanks: 2
Yeah thats what im currently using, But i cant seem to get it to pick up the item id which i refrence just before it & just comes back as you dont have the item.
hacksaw is offline  
Old 06/16/2013, 00:56   #4
 
LordGragen.'s Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 67
its look fine to me but let me check my old source on trinity

#edit why not just use this?


Code:
  case 1:if {
(client.Inventory.Contains(ItemId, 1))
                                                {
                                                  if (item.Bound == false)
                                                   {
                                                    client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
                                                    client.Entity.BoundCps += 100;
                                                   }
                                                else
                                                {
                                                    dialog.Text("Your item is bound.");
                                                    dialog.Send();
                                                    break;
                                                   }
                                                }
                                                else
                                                {
                                                    dialog.Text("You do not have the item");
                                                    dialog.Send();
                                                    break;
                                                }
                                                break;
                                            }
LordGragen. is offline  
Old 06/16/2013, 02:45   #5
 
elite*gold: 0
Join Date: Feb 2006
Posts: 41
Received Thanks: 2
Hmmm just having a test but looks like you cant do the Bound Item check using that way.
hacksaw is offline  
Old 06/16/2013, 02:49   #6
 
LordGragen.'s Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 67
you trying like this right?
(client.Inventory.Contains(1058011, 1))

and oh btw i think this is testing if there is only 1 in inventory, idk if you have more then one it will work but test.
LordGragen. is offline  
Old 06/16/2013, 13:51   #7
 
elite*gold: 0
Join Date: Feb 2006
Posts: 41
Received Thanks: 2
Yeah thats the normal way its handled when talking to an NPC & asking them to check if the player has an item in his bag but the problem is you cant seem to do a check on wether the item is bound or not.
hacksaw is offline  
Reply


Similar Threads Similar Threads
How to trade bound items?
03/10/2011 - Battle of the Immortals - 0 Replies
I saw a lot of ppl trading "not able to trade" items even sell them in stand. How do they do that, other say that they sell salary gems.how. thx for any help.
Bound items like Free items on Multi client
12/14/2010 - CO2 Programming - 9 Replies
Can someone please make Bound items able to be use to make sockets on talismans like _fobos_ did with the Free items, i been trying but still not suceed
bound items
06/23/2010 - Conquer Online 2 - 2 Replies
can bound items be unbound on the latest patch?
S> Eagle srv Ninja 126lvl for Lion,sup bound items,not bound sup fan 1soc +6 -1dmg..
05/04/2010 - Conquer Online 2 Trading - 1 Replies
Hi! S> In Eagle server Ninja 126level,super bound items,not bound super fan 1socket SGG +6 -1dmg... For Lion server some items or DBS or money or CPS... Offer here I sell cheap. I GIVE FULL INFO with email.
Checking Items ID
02/15/2009 - EO PServer Hosting - 10 Replies
How do u check the id of a item so a PM can spawn one? example: /awarditem 111000 =BlueCresetHelmet when im done with my list im gonna release it so everyone can use it =]



All times are GMT +2. The time now is 14:19.


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.