Тетенька попросту пишет ноквест. Либо вешает нафик клиента =(
import sys
from net.sf.l2j.gameserver.model.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
ADENA_ID = 57
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent (self,event,st) :
htmltext = event
if event == "3333" :
if st.getQuestItemsCount(ADENA_ID)>= 1000000 : # Проверка на количество аден
#human warrior
if st.getPlayer().getClassId().getId() == 0x02 : # Проверка на класс
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000) # Стоимость профы
st.player.setClassId(88) # На какую менять
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x03 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(89)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x05 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(90)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x06 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(91)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x08 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(93)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x09 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(92)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x09 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(92)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
#human mage
elif st.getPlayer().getClassId().getId() == 0x12 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(94)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x13 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(95)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x14 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(96)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x16 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(97)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x17 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(98)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
#elf warrior
elif st.getPlayer().getClassId().getId() == 0x20 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(99)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x21 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(100)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
#elf scout
elif st.getPlayer().getClassId().getId() == 0x23 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(101)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x24 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(102)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
#elf mage
elif st.getPlayer().getClassId().getId() == 0x27 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(103)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x28 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(104)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x30 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(105)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
#DE warrior
elif st.getPlayer().getClassId().getId() == 0x33 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(106)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x34 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(107)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
#DE assasin
elif st.getPlayer().getClassId().getId() == 0x36 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(108)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x37 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(109)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
#de mage
elif st.getPlayer().getClassId().getId() == 0x40 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(110)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x41 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(111)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x43 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(112)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
#orc fighter
elif st.getPlayer().getClassId().getId() == 0x46 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(113)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x48 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(114)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
#orc mage
elif st.getPlayer().getClassId().getId() == 0x51 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(115)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x52 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(116)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
#dwarf
elif st.getPlayer().getClassId().getId() == 0x55 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(117)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
elif st.getPlayer().getClassId().getId() == 0x57 :
htmltext = "12260-03.htm"
st.takeItems(ADENA_ID,1000000)
st.player.setClassId(118)
st.player.broadcastUserInfo()
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
st.set("onlyone","1")
else:
htmltext = "<html><head><body>You no able to change you class</body></html>"
st.exitQuest(1)
else:
htmltext = "<html><head><body>Not enough adena</body></html>"
st.exitQuest(1)
return htmltext
def onTalk (Self,npc,st) :
npcId = npc.getNpcId()
htmltext = "<html><head><body>I have nothing to say you</body></html>"
id = st.getState()
if id == CREATED :
st.set("onlyone","0") # Если хотим чтоб больше одного раза не брали
if npcId == 12260 and int(st.get("onlyone"))==0 :
if st.getPlayer().getLevel()>=76 : # проверка на лвл
htmltext = "12260-01.htm"
st.setState(STARTED)
else:
htmltext = "12260-02.htm" # диалог о том что еще мал лвл
st.exitQuest(1)
elif npcId == 12260 and int(st.get("onlyone"))==1 :
htmltext = "<html><head><body>You have changed third profesion already.</body></html>"
return htmltext
QUEST = Quest(3333,"3333_profa","custom")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(12260)
STARTED.addTalkId(12260)
print "importing custom data: 3333_profa"