Свернуть ↑
#NpcId:[x,y,z] #name RADAR={ # Talking Island 30006:[-84108,244604,-3729]
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onAdvEvent (self,event,npc,player) :
htmltext = event
st = player.getQuestState(qn)
if not st: return
if event.isdigit() :
htmltext = None
npcId = int(event)
if npcId in RADAR.keys() :
x, y, z = RADAR[npcId]
st.addRadar(x, y, z)
htmltext = "MoveToLoc.htm"
st.exitQuest(1)
return htmltext
def onTalk (Self,npc,player):
npcId = npc.getNpcId()
if npcId in NPC :
htmltext = str(npcId) + ".htm"
return htmltext
QUEST = Quest(-1,qn,"custom")
for i in NPC:
QUEST.addStartNpc(i)
QUEST.addTalkId(i)