Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Color Manager(проблема с импортом)
#1
Ребят, помогите настроить импорты...
вот ошибка:
Error on: D:\server\data\scripts\quests\q1000_ColorManager\_ _init__.py.error.log
Line: -1 - Column: -1

Traceback (innermost last):
File "__init__.py", line 92, in ?
TypeError: net.sf.l2j.gameserver.model.quest.State(): expected 0 args; got 2

вот сам инит:
import sys
from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance
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
#
#========================================
# DO NOT TOUCH THIS
#========================================
QuestId = 1000
QuestName = "ColorManager"
QuestDesc = "quests"
qn = "q"+str(QuestId)+"_"+str(QuestName)
#========================================
StartNpc = 50001
ItemId = 4037
ItemQty = 100
MinLevel = 1
MaxLevel = 80
#========================================
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

def onAdvEvent(Self,event,npc,player):
text = "noaction.htm"
st = player.getQuestState(qn)
if not st : return text
if (player.getLevel() < MinLevel) or (player.getLevel() > MaxLevel) : return "charlevel.htm"
if st.getQuestItemsCount(ItemId) < ItemQty : return "nomoney.htm"
nameColor = hex(player.getAppearance().getNameColor())
titleColor = hex(player.getAppearance().getTitleColor())
st.set("nameColor",str(nameColor))
st.set("titleColor",str(titleColor))
if event == "N_Blue" :
nameColor = "FF0000"
elif event == "N_Red" :
nameColor = "0000FF"
elif event == "N_Cyan" :
nameColor = "FFFF00"
elif event == "N_Green" :
nameColor = "00FF00"
elif event == "N_Magenta" :
nameColor = "FF00FF"
elif event == "N_Yellow" :
nameColor = "00FFFF"
elif event == "N_Gray" :
nameColor = "808080"
elif event == "N_White" :
nameColor = "FFFFFF"
elif event == "T_Blue" :
titleColor = "FF0000"
elif event == "T_Red" :
titleColor = "0000FF"
elif event == "T_Cyan" :
titleColor = "FFFF00"
elif event == "T_Green" :
titleColor = "00FF00"
elif event == "T_Magenta" :
titleColor = "FF00FF"
elif event == "T_Yellow" :
titleColor = "00FFFF"
elif event == "T_Gray" :
titleColor = "808080"
elif event == "T_White" :
titleColor = "FFFFFF"
nameColor = int(nameColor,16)
titleColor = int(titleColor,16)
player.getAppearance().setNameColor(nameColor)
player.getAppearance().setTitleColor(titleColor)
st.takeItems(ItemId,ItemQty)
player.broadcastUserInfo()
player.store()
text = "done.htm"
return text

def onTalk (Self,npc,player):
st = player.getQuestState(qn)
if not st :
return "Quest is not started!"
st.setState(STARTED)
return "1.htm"

def onFirstTalk (Self,npc,player):
st = getQuestState(qn)
if not st : return "Invalid quest state"

QUEST = Quest(QuestId,qn,QuestDesc)
CREATED = State('Start',QUEST)
STARTED = State('Started',QUEST)
COMPLETED = State('Completed',QUEST)

QUEST.setInitialState(CREATED)

QUEST.addStartNpc(StartNpc)
QUEST.addTalkId(StartNpc)

print "Loaded: "+qn
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Lineage 2 PTS 287 Protocol Проблема PSIFAK 1 1,381 01-25-2023, 04:08 AM
Последний пост: Phantom-Dev
  Myext64HF проблема с сетью MystX 3 1,680 11-08-2022, 04:33 AM
Последний пост: Phantom-Dev
  Проблема с rguard\ftguard iDarkEmpire 13 5,868 07-22-2020, 11:31 PM
Последний пост: CTAJIIH
  Проблема с количеством ХП AerisRD 0 1,149 05-19-2020, 08:20 PM
Последний пост: AerisRD
  Проблема с запуском HF5 Shady 6 1,916 04-20-2020, 12:09 PM
Последний пост: Rork
  Проблема с откатами банок Amidamaru 14 3,204 04-04-2020, 05:52 PM
Последний пост: Blackone
  L2 PTS Проблема Reika 3 1,576 02-26-2020, 04:43 PM
Последний пост: Reika
  Проблемы с импортом в квестах на сборке Open-Team devset 2 2,742 02-02-2020, 06:26 PM
Последний пост: Bonabo
  Проблема с купле-продажей на всех сборках Mor9k400 0 1,108 08-25-2018, 08:10 PM
Последний пост: Mor9k400
  Проблема с входом Windows 10 Alekseu28 1 1,545 03-13-2018, 09:34 AM
Последний пост: malum

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)