Page 1 of 1

[HELP] Problem making new methods

Posted: Sat Aug 06, 2011 8:55 am
by DreamStage
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 4422:
L2JDP Revision 7669:

Hello L2J Community.

I would like to ask if anyone knows how to build new methods at L2jserver files (classes for example).
Because im trying to use the method i used at QuestState:

Code: Select all

    public boolean isbookEquipped()    {        if (getItemEquipped(1023) >= 1)        {            return true;        }        return _ringcheck;    } 
To check if player has the item, but at other classes i cant invoke it... I dont know how.
I wanted to do something like
If (player.isbookEquipped() == true)
But i just dont know how :(
I wanted to use the code at other class and for checking if player was using that item.
Because if i try to put player.isbookEquipped, ofc the method is not at player, because i used the method "getItemEquipped" at QuestState.java file. And if i do the same at L2PcInstance ", using this method " isbookEquipped", he says its not there. I need to know how to invoke other classes even BOOLEAN ones.

If anyone could help me out, it could be very helpfull and i will be apreciated.

PS: And yes, i imported all classes i needed!

Re: [HELP] Problem making new methods

Posted: Sun Aug 07, 2011 6:21 am
by tukune

Re: [HELP] Problem making new methods

Posted: Sun Aug 07, 2011 8:04 am
by DreamStage
already had my problem solved thx

Re: [HELP] Problem making new methods

Posted: Sun Aug 07, 2011 9:35 am
by SolidSnake
Problem solved here viewtopic.php?f=46&t=23093

This topic can be closed.