Помогите пожалуйста.Сборка l2j-server Грация финал.Запускал авто апдейт клиента.Так же менял файлы пайлаки такие как в папке Quvest и файл 73-77.ру с другого сервера.Но ошибка не была устранена.Проблема в том что когда нпс меня телепортирует в пайлаку 73-77.Там есть нпс которые должен выдавать компьё.Но с ним поговорить нельзя а только убить можно.
Прошу помочь мне если кто сможет!!!!
Файл 73-77.py
Прошу помочь мне если кто сможет!!!!
Файл 73-77.py
import sys
from java.lang import System
from net.sf.l2j.gameserver.instancemanager import InstanceManager
from net.sf.l2j.gameserver.model.entity import Instance
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
from net.sf.l2j.gameserver.network import SystemMessageId
from net.sf.l2j.gameserver.network.serverpackets import SystemMessage
# NPCs
VSWARRIOR = [18636, 18642]
VSCOMMAO = [18646, 18654]
VSGMAG = [18649, 18650]
VSHGAPG = [18655, 18657]
LATANA = 18660
qn = "Pailaka73_77"
class PyObject:
pass
def checkConditions(player, new):
party = player.getParty()
if party:
player.sendPacket(SystemMessage.sendString("You are currently in a party, so you cannot enter."))
return False
return True
def teleportplayer(self, player, teleto):
player.setInstanceId(teleto.instanceId)
player.teleToLocation(teleto.x, teleto.y, teleto.z)
pet = player.getPet()
if pet != None :
pet.setInstanceId(teleto.instanceId)
pet.teleToLocation(teleto.x, teleto.y, teleto.z)
def enterInstance(self, player, template, teleto):
instanceId = 0
playerName = player.getName()
if not checkConditions(player, True):
return 0
instanceId = InstanceManager.getInstance().createDynamicInstance(template)
if not instanceId in self.world_ids:
world = PyObject()
world.rewarded = []
world.instanceId = instanceId
self.worlds[instanceId] = world
self.world_ids.append(instanceId)
print "Pailaka 73-77: started " + template + " Instance: " + str(instanceId) + " created by player: " + str(player.getName())
# teleports player
teleto.instanceId = instanceId
teleportplayer(self, player, teleto)
playerName = player.getName()
currentTime = System.currentTimeMillis()
instanceOver = 5400000 + currentTime
self.PailakaInstances[playerName] = {}
self.PailakaInstances[playerName]['instance'] = instanceId
self.PailakaInstances[playerName]['timeStamp'] = instanceOver
self.PailakaInstances[playerName]['stage'] = 1
return instanceId
def exitInstance(player, tele):
player.setInstanceId(0)
player.teleToLocation(tele.x, tele.y, tele.z)
pet = player.getPet()
if pet != None :
pet.setInstanceId(0)
pet.teleToLocation(tele.x, tele.y, tele.z)
class Pailaka3(JQuest):
def __init__(self, id, name, descr):
JQuest.__init__(self, id, name, descr)
self.worlds = {}
self.world_ids = []
self.PailakaInstances = {}
def onTalk (self, npc, player):
npcId = npc.getNpcId()
if npcId == 32499:
tele = PyObject()
tele.x = 125757
tele.y = -40928
tele.z = -3736
playerName = player.getName()
if playerName in self.PailakaInstances:
playerInstance = self.PailakaInstances[playerName]['instance']
if InstanceManager.getInstance().getInstance(playerInstance):
currentTime = System.currentTimeMillis()
if self.PailakaInstances[playerName]['timeStamp'] > currentTime:
player.setInstanceId(playerInstance)
player.teleToLocation(tele.x, tele.y, tele.z)
htmltext = "<html><body>Ketra Orc Shaman:<br>Remember to seek out a Ketra Orc in that world. There must be one there who will aid you in your quest!</body></html>"
return htmltext
else:
enterInstance(self, player, "Pailaka73_77.xml", tele)
else:
enterInstance(self, player, "Pailaka73_77.xml", tele)
if not playerName in self.PailakaInstances:
enterInstance(self, player, "Pailaka73_77.xml", tele)
return
def onAggroRangeEnter(self, npc, player, isPet):
npcId = npc.getNpcId()
playerName = player.getName()
if npcId in VSCOMMAO:
if self.PailakaInstances[playerName]['stage'] < 2:
player.teleToLocation(122789, -45692, -3036)
elif npcId in VSGMAG:
if self.PailakaInstances[playerName]['stage'] == 1:
player.teleToLocation(122789, -45692, -3036)
elif self.PailakaInstances[playerName]['stage'] == 2:
player.teleToLocation(116948, -46445, -2673)
elif npcId in VSHGAPG:
if self.PailakaInstances[playerName]['stage'] == 1:
player.teleToLocation(122789, -45692, -3036)
elif self.PailakaInstances[playerName]['stage'] == 2:
player.teleToLocation(116948, -46445, -2673)
elif self.PailakaInstances[playerName]['stage'] == 3:
player.teleToLocation(112445, -44118, -2700)
return
def onAttack(self, npc, player, damage, isPet, skill):
npcId = npc.getNpcId()
playerName = player.getName()
if npcId == LATANA:
if self.PailakaInstances[playerName]['stage'] == 1:
player.teleToLocation(122789, -45692, -3036)
elif self.PailakaInstances[playerName]['stage'] == 2:
player.teleToLocation(116948, -46445, -2673)
elif self.PailakaInstances[playerName]['stage'] == 3:
player.teleToLocation(112445, -44118, -2700)
elif self.PailakaInstances[playerName]['stage'] == 4:
player.teleToLocation(109947, -41433, -2311)
return
def onKill(self, npc, player, isPet):
npcId = npc.getNpcId()
playerName = player.getName()
if npcId in VSWARRIOR:
if self.PailakaInstances[playerName]['stage'] == 1:
self.PailakaInstances[playerName]['stage'] = 2
elif npcId in VSCOMMAO:
if self.PailakaInstances[playerName]['stage'] == 2:
self.PailakaInstances[playerName]['stage'] = 3
elif npcId in VSGMAG:
if self.PailakaInstances[playerName]['stage'] == 3:
self.PailakaInstances[playerName]['stage'] = 4
elif npcId in VSHGAPG:
if self.PailakaInstances[playerName]['stage'] == 4:
self.PailakaInstances[playerName]['stage'] = 5
return
QUEST = Pailaka3(-1, qn, "instances")
QUEST.addStartNpc(32499)
QUEST.addTalkId(32499)
QUEST.addAttackId(LATANA)
for i in VSWARRIOR:
QUEST.addKillId(i)
QUEST.addAggroRangeEnterId(i)
for i in VSCOMMAO:
QUEST.addKillId(i)
QUEST.addAggroRangeEnterId(i)
for i in VSGMAG:
QUEST.addKillId(i)
QUEST.addAggroRangeEnterId(i)
for i in VSHGAPG:
QUEST.addKillId(i)
QUEST.addAggroRangeEnterId(i)