[HELP] Problem making new methods

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Locked
User avatar
DreamStage
Posts: 222
Joined: Mon Oct 11, 2010 2:38 am
Location: Portugal

[HELP] Problem making new methods

Post 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!
Ignorance comes when you dont want to know the truth about facts.
User avatar
tukune
Posts: 533
Joined: Sun Mar 29, 2009 2:35 pm
Location: Japan

Re: [HELP] Problem making new methods

Post by tukune »

User avatar
DreamStage
Posts: 222
Joined: Mon Oct 11, 2010 2:38 am
Location: Portugal

Re: [HELP] Problem making new methods

Post by DreamStage »

already had my problem solved thx
Ignorance comes when you dont want to know the truth about facts.
User avatar
SolidSnake
Posts: 865
Joined: Wed Jan 20, 2010 6:54 pm
Location: Italy

Re: [HELP] Problem making new methods

Post by SolidSnake »

Problem solved here viewtopic.php?f=46&t=23093

This topic can be closed.
Image
Locked