Jump to content
  • 0

ItemId Method


exity

Question

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

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...