• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Checking Equipped Item ID

Junior Spellweaver
Joined
Dec 21, 2013
Messages
140
Reaction score
3
Greetings ~ The only function remotely close to equipped item IDs is during character creation:
Code:
MapleInventory equip=newchar.getInventory(MapleInventoryType.EQUIPPED);        
Equip eq_top = new Equip(top, (byte) -5);        
equip.addFromDB(eq_top);        
Equip eq_bottom = new Equip(bottom, (byte) -6);        
equip.addFromDB(eq_bottom.copy());        
Equip eq_shoes = new Equip(shoes, (byte) -7);        
equip.addFromDB(eq_shoes.copy());        
Equip eq_weapon = new Equip(weapon, (byte) -11);        
equip.addFromDB(eq_weapon.copy());

I can find the positions of the items I want, but the only problem is I don't know if I even can/how I can check the item ID of a specific position. I haven't been able to find anything that checks item position ID. Is checking the item ID of a specific position even possible and if it is, how can I do this? Thanks in advance!
 
Junior Spellweaver
Joined
Apr 30, 2012
Messages
100
Reaction score
41
Greetings ~ The only function remotely close to equipped item IDs is during character creation:
Code:
MapleInventory equip=newchar.getInventory(MapleInventoryType.EQUIPPED);        
Equip eq_top = new Equip(top, (byte) -5);        
equip.addFromDB(eq_top);        
Equip eq_bottom = new Equip(bottom, (byte) -6);        
equip.addFromDB(eq_bottom.copy());        
Equip eq_shoes = new Equip(shoes, (byte) -7);        
equip.addFromDB(eq_shoes.copy());        
Equip eq_weapon = new Equip(weapon, (byte) -11);        
equip.addFromDB(eq_weapon.copy());

I can find the positions of the items I want, but the only problem is I don't know if I even can/how I can check the item ID of a specific position. I haven't been able to find anything that checks item position ID. Is checking the item ID of a specific position even possible and if it is, how can I do this? Thanks in advance!

You want the itemid of an item at a specific position? That would be this method.
public Item getItem(byte slot) {
return inventory.get(slot);
}
equip is the MapleInventory object, which stores the items the character has equipped.
In the case above, it would be like so:
equip.getItem(position).getItemId();
 
Upvote 0
Back
Top