Jump to content
  • 0

ItemId Method


Question

Posted

Hey, i need some help, im forbidden some items in some zones i created the thing is i need help to call the item id

 

I have this but doesnt work

 

if(character.getItemId() == 52 &&  getTownId() == 4)

{

character.teleToLocation(82616, 148546, -3469);

return;

}

 

that "getItemId()" doesnt work.

 

thx in advance

1 answer to this question

Recommended Posts

  • 0
Posted

getItemId() refers to a L2ItemInstance. You make check on a "character" object which is at least a L2Character, if not a L2PcInstance.

 

As you show near nothing, I can't help more. But probably the place you try to make that code is wrong. You have to retrieve the item instance, and basically it is the goal of an itemhandler.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..