Class State
Class Quest (net.sf.l2j.gameserver.model.quest.State) mat be imported in quest scripts as
from net.sf.l2j.gameserver.model.quest import State
And has following members to be used from Jython quest scripts:
State(String name, Quest quest) - constructor.
- name - uniquely identifies the state within it's quest, also is used as default HTML dialog shown for this state talking with NPCs
- quest - the quest this State belongs to
String getName() - returns name of the state, call it as State.getName(self) or self.getName(), where self is an instance of State.
int addKillId(int npcId) - subscribe this state to receive onKill calls from java when an NPC with this ID was killed by the player, call it as State.addKillId(self, N) or self.addKillId(N), where self is an instance of State and N is a number (ID of the NPC in datapack). Note: this method is called after NPC have dropped quest items.
int addTalkId(int npcId) - subscribe this state to receive onTalk calls from java when the player talks with an NPC with this ID, call it as State.addTalkId(self, N) or self.addTalkId(N), where self is an instance of State and N is a number (ID of the NPC in datapack).
void addQuestDrop(int npcId, int itemId, int chance) - request drops from monsters in this state. The highest chance (100% drop) is 1,000,000.
