Yra padaryta,kad adenas ir lvl reikia. To character lvl 76 adenu pilna ir vistiek nereaguoja buffer. Cia jo kodas:
import sys
from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from com.l2jfrozen.gameserver.datatables import SkillTable
from com.l2jfrozen.util.database import L2DatabaseFactory
from com.l2jfrozen.gameserver.model.quest import State
from com.l2jfrozen.gameserver.model.quest import QuestState
from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest
qn = "9999_NPCBuffer"
NPC=[40005]
ADENA_ID=57
QuestId = 9999
QuestName = "NPCBuffer"
QuestDesc = "custom"
InitialHtml = "1.htm"
print "importing custom: 9999: NPCBuffer"
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent(self,event,st):
htmltext = event
count=st.getQuestItemsCount(ADENA_ID)
if count < 0 or st.getPlayer().getLevel() < 1 :
htmltext = "<html><head><body>You dont have enough Adena,<br> or your level is too low. You must be 40 or higher.</body></html>"
else:
st.takeItems(ADENA_ID,0)
st.getPlayer().setTarget(st.getPlayer())
if event == "2":
st.takeItems(ADENA_ID,0)
st.getPlayer().stopAllEffects()
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4348,6).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4354,4).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1087,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1032,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1397,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4700,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4703,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
return "1.htm"
st.setState(State.COMPLETED)
if event == "3":
st.takeItems(ADENA_ID,0)
st.getPlayer().stopAllEffects()
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4353,6).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4348,6).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4356,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1303,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1087,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1397,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4351,6).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1044,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4699,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4702,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4703,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
return "1.htm"
st.setState(State.COMPLETED)
if event == "4":
st.takeItems(ADENA_ID,0)
st.getPlayer().stopAllEffects()
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4348,6).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4354,4).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1087,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1032,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1397,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4700,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4703,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
return "1.htm"
st.setState(State.COMPLETED)
if event == "5":
st.takeItems(ADENA_ID,0)
st.getPlayer().stopAllEffects()
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4348,6).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1087,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1032,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1397,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4700,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(4703,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
return "1.htm"
st.setState(State.COMPLETED)
if event == "6":
st.takeItems(ADENA_ID,0)
st.getPlayer().restoreHPMP()
return "1.htm"
st.setState(State.COMPLETED)
def onTalk (self,npc,player):
st = player.getQuestState(qn)
htmltext = "<html><head><body>I have nothing to say to you</body></html>"
return "1.htm"
QUEST = Quest(9999,qn,"Custom")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)