скрипт вроде нашол
но он был под фрозен
переделал под eon
и вот что вышло
Сам скрипт
Скрытый текстimport sysfrom net.sf.l2j.gameserver.datatables import SkillTable
from net.sf.l2j.gameserver.model.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model import L2Augmentation
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
from net.sf.l2j.util import Rnd
from net.sf.l2j import L2DatabaseFactory
from net.sf.l2j.gameserver.templates import L2EtcItemType
from net.sf.l2j.gameserver.templates import L2WeaponType
from net.sf.l2j.gameserver.templates import L2Item
from net.sf.l2j.gameserver.network.serverpackets import InventoryUpdate
from java.lang import System
#
#@author KFan
#ICQ: 604883692
#Skype: Kotyara20141
#
NPC_ID = 51809
ITEM_ID = 57
#ITEM_COUNT = 0
#Do not need a subject
ITEM_COUNT = 1
#A player can learn just one skill? 1 = true 0 = false
ONLY_ONE = 0
qn = "9994_skill_trader"
print "9994_skill_trader Loading Started"
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onTalk (self,npc,player):
st = player.getQuestState(qn)
htmltext = "<html><head><body>I have nothing to say you</body></html>"
npcId = npc.getNpcId()
if not st : return
cond = st.getInt("cond")
onlyone = st.getInt("onlyone")
if ONLY_ONE :
if onlyone > 0 :
return "fail.htm"
if cond >= 0 :
st.set("cond", "1")
st.setState(STARTED)
htmltext = "start.htm"
return htmltext
def onEvent (self,event,st) :
htmltext = event
cond = st.getInt("cond")
if event == "buy" :
htmltext = "buy.htm"
elif event.startswith('buy_') :
if st.getQuestItemsCount(ITEM_ID) <= ITEM_COUNT :
return "n-money.htm"
buy_skill = str(event.replace("buy_", ""))
buy_skill_splite = buy_skill.split('_')
st.takeItems(ITEM_ID, ITEM_COUNT)
st.getPlayer().addSkill(SkillTable.getInstance().getInfo(int(buy_skill_splite[0]
), int(buy_skill_splite[1])))
if ONLY_ONE :
st.set("onlyone", "1")
st.set("cond", "0")
st.setState(COMPLETED)
htmltext = "buy.htm"
return htmltext
QUEST = Quest( -1, qn, "custom")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(NPC_ID)
QUEST.addTalkId(NPC_ID)
Ошибка
Traceback (innermost last):
File "__init__.py", line 79, in ?
TypeError: net.sf.l2j.gameserver.model.quest.State(): expected 0 args; got 2