HELLO, I wanted to know how to put reward for all players who are in a party, as below so that's the reward for the player who has the last hit on Monster.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
hello everyone !
I need help with a l2script Rev H5-Salvation/Classic build. I compiled the project, installed everything but I can't log in to the server, it won't log me in. I tried a thousand ways without good results. I leave you the error when logging in either with the H5-Salvation Client.
ERROR ---> WARN: IPBANMANAGER ---> IP !!!!
I'm waiting for help! Thank you!
Hello !
I have a problem when connecting to the pack with the Salvation client, it blocks my IP, I see that the account is created in the database but it remains logged in.
Any idea what it could be? ALso with H5 CLient !
Thank you !
Question
heliocs
HELLO, I wanted to know how to put reward for all players who are in a party, as below so that's the reward for the player who has the last hit on Monster.
# ================================================================
# EDITED AND RECONFIGURED BY LOL
# ================================================================
#Instance Event by Bloodshed Party
from br.xtreme.gameserver.instancemanager import InstanceManager
from br.xtreme.gameserver.model import L2ItemInstance
from br.xtreme.gameserver.model.actor import L2Summon
from br.xtreme.gameserver.model.entity import Instance
from br.xtreme.gameserver.model.itemcontainer import PcInventory
from br.xtreme.gameserver.model.quest import State
from br.xtreme.gameserver.model.quest import QuestState
from br.xtreme.gameserver.model.quest.jython import QuestJython as JQuest
from br.xtreme.gameserver.network.serverpackets import CreatureSay
from br.xtreme.gameserver.network.clientpackets import Say2;
from br.xtreme.gameserver.network.serverpackets import SystemMessage;
from br.xtreme.gameserver.network.serverpackets import InventoryUpdate
from br.xtreme.gameserver.network.serverpackets import MagicSkillUse
from br.xtreme.gameserver.network.serverpackets import SystemMessage
from br.xtreme.gameserver.network.serverpackets import ExShowScreenMessage
from br.xtreme.gameserver.network.serverpackets import Earthquake
from br.xtreme.gameserver.network import SystemMessageId
from br.xtreme.gameserver.util import Util
from br.xtreme.util import Rnd
from br.xtreme.gameserver import Announcements
qn = "Bloodshedparty"
print "-----------------------------------"
print "Bloodshedparty - EVENTO "
print "-----------------------------------"
#Items
E_APIGA = 9143
ADENA = 9143
STONE = 9143
STONE82 = 10486
STONE84 = 14169
SCROLL = 9143
SCROLLB = 6577
GOLDDRAGON = 3481
#NPCs
ROSE = 2009001
CHEST = 2010010
#FIRST CHAMBER MOBS
GUARD = 2010001
KEYKEEPER = 2010013
PROTECTOR = 2010005
BELETH = 2010007
BAYLOR = 2010008
TIAT = 2010009
#Doors
DOOR = 20240001
class PyObject:
pass
def openDoor(doorId,instanceId):
for door in InstanceManager.getInstance().getInstance(instanceId).getDoors():
if door.getDoorId() == doorId:
door.openMe()
def closeDoor(doorId,instanceId):
for door in InstanceManager.getInstance().getInstance(instanceId).getDoors():
if door.getDoorId() == doorId:
door.closeMe()
def checkConditions(player, new):
party = player.getParty()
if not party:
player.sendPacket(ExShowScreenMessage("Voce nao esta em party e nao pode entrar.", 8000))
return False
if party and party.getMemberCount() < 6:
player.sendPacket(ExShowScreenMessage("Voce precisa de no minimo 6 pessoas na party para poder entrar.", 8000))
return False
for partyMember in party.getPartyMembers().toArray():
if partyMember.getLevel() < 78:
player.sendPacket(SystemMessage.sendString(partyMember.getName()+"s o Level minimo para entrar e 83."))
return False
if not Util.checkIfInRange(1000, player, partyMember, True) and new:
player.sendPacket(SystemMessage.sendString(partyMember.getName()+" Voce esta muito longe do seu lider. Chegue mais perto."))
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)
return
def enterInstance(self,player,template,teleto):
instanceId = 0
party = player.getParty()
if party :
for partyMember in party.getPartyMembers().toArray():
st = partyMember.getQuestState(qn)
if not st : st = self.newQuestState(partyMember)
if partyMember.getInstanceId()!=0:
instanceId = partyMember.getInstanceId()
else :
if player.getInstanceId()!=0:
instanceId = player.getInstanceId()
if instanceId != 0:
if not checkConditions(player,False):
return 0
foundworld = False
for worldid in self.world_ids:
if worldid == instanceId:
foundworld = True
if not foundworld:
player.sendPacket(SystemMessage.sendString("Você entrou uma outra zona, portanto, você não pode entrar nesta"))
return 0
teleto.instanceId = instanceId
teleportplayer(self,player,teleto)
return instanceId
else:
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 "Instance: Started " + template + " Instance: " +str(instanceId) + " created by " + str(player.getName())
teleto.instanceId = instanceId
for partyMember in party.getPartyMembers().toArray():
teleportplayer(self,partyMember,teleto)
return instanceId
return instanceId
def exitInstance(player,tele):
party = player.getParty()
if party :
for partyMember in party.getPartyMembers().toArray():
partyMember.setInstanceId(0)
partyMember.teleToLocation(tele.x, tele.y, tele.z)
pet = partyMember.getPet()
if pet != None :
pet.setInstanceId(0)
pet.teleToLocation(tele.x, tele.y, tele.z)
else :
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)
InstanceManager.getInstance().destroyInstance(player.getInstanceId())
class Bloodshedparty(JQuest):
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.worlds = {}
self.world_ids = []
def onTalk (self,npc,player):
st = player.getQuestState(qn)
npcId = npc.getNpcId()
if npcId == ROSE :
tele = PyObject()
tele.x = 16345
tele.y = 209051
tele.z = -9357
enterInstance(self, player, "Bloodshedparty.xml", tele)
st.playSound("ItemSound.quest_middle")
elif npcId == CHEST :
npc.decayMe()
tele = PyObject()
tele.x = 82200
tele.y = 148347
tele.z = -3467
party = player.getParty()
if party :
for partyMember in party.getPartyMembers().toArray():
exitInstance(partyMember,tele)
else:
exitInstance(player,tele)
st.giveItems(STONE,1)
if Rnd.get(100) < 1 :
st.giveItems(SCROLL,1)
st.playSound("ItemSound.quest_finish")
player.sendPacket(ExShowScreenMessage("Este mundo foi destruído: Concluído", 8000))
player.sendPacket(ExShowScreenMessage("Baylor: Você tolos, Nós nos encontraremos em breve em seu mundo ..... Aha ha ha", 15000))
return
def onKill(self,npc,player,isPet):
st = player.getQuestState(qn)
npcId = npc.getNpcId()
if npcId == GUARD :
if npc.getInstanceId() in self.worlds:
world = self.worlds[npc.getInstanceId()]
player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Mestre, perdoa-me! eu Falhei"))
#newNpc = self.addSpawn(int npcId,x,y,z,heading,randomOffset,despawnDelay,isSummonSpawn,instanceId)
newNpc = self.addSpawn(PROTECTOR,16658,211498,-9357,0,False,0,False,npc.instanceId)
player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Seus tolos,Seu fim esta aqui"))
player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Ooo...e um bom dia para morrer"))
openDoor(DOOR,npc.instanceId)
elif npcId == PROTECTOR :
if npc.getInstanceId() in self.worlds:
world = self.worlds[npc.getInstanceId()]
player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Mestre, perdoa-me!!"))
player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Eu falhei, me de outra chance para te proteger."))
player.sendPacket(ExShowScreenMessage("Tolos, aqui está o seu fim!!", 8000))
#newNpc = self.addSpawn(int npcId,x,y,z,heading,randomOffset,despawnDelay,isSummonSpawn,instanceId)
newNpc = self.addSpawn(BELETH,16344,213091,-9356,0,False,0,False,npc.instanceId)
player.sendPacket(Earthquake(16344,213091,-9356,20,5))
elif npcId == BELETH :
if npc.getInstanceId() in self.worlds:
world = self.worlds[npc.getInstanceId()]
player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "OMG Meu Mundo....."))
player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Baylor ME Ajuda!!"))
st.giveItems(STONE,1)
player.sendPacket(ExShowScreenMessage("Baylor:Meu Irmão , eu vou vingar você!", 12000))
#newNpc = self.addSpawn(int npcId,x,y,z,heading,randomOffset,despawnDelay,isSummonSpawn,instanceId)
newNpc = self.addSpawn(BAYLOR,16344,213091,-9356,0,False,0,False,npc.instanceId)
player.sendPacket(Earthquake(16344,213091,-9356,20,5))
elif npcId == BAYLOR :
if npc.getInstanceId() in self.worlds:
world = self.worlds[npc.getInstanceId()]
player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Minha morte nao e nada, O fim de Vocês esta proximo"))
player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Seus TOLOS ....Aha ha ha ha"))
st.giveItems(E_APIGA,1)
player.sendPacket(ExShowScreenMessage("..............MATE TODOS!..............", 8000))
#newNpc = self.addSpawn(int npcId,x,y,z,heading,randomOffset,despawnDelay,isSummonSpawn,instanceId)
newNpc = self.addSpawn(TIAT,16344,213091,-9356,0,False,0,False,npc.instanceId)
player.sendPacket(Earthquake(16344,213091,-9356,80,5))
elif npcId == TIAT :
if npc.getInstanceId() in self.worlds:
world = self.worlds[npc.getInstanceId()]
player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Ugh.... DERROTADOOO.. COMOO!?"))
player.sendPacket(ExShowScreenMessage("Parabens! Voce Derrotou Demonic Lord.", 12000))
st.playSound("ItemSound.quest_finish")
st.giveItems(E_APIGA,1)
#newNpc = self.addSpawn(int npcId,x,y,z,heading,randomOffset,despawnDelay,isSummonSpawn,instanceId)
newNpc = self.addSpawn(CHEST,16225,213040,-9357,0,False,0,False,npc.instanceId)
return
QUEST = Bloodshedparty(-1, qn, "Bloodshedparty")
QUEST.addStartNpc(ROSE)
QUEST.addTalkId(ROSE)
QUEST.addTalkId(CHEST)
QUEST.addKillId(GUARD)
QUEST.addKillId(PROTECTOR)
QUEST.addKillId(BELETH)
QUEST.addKillId(BAYLOR)
QUEST.addKillId(TIAT)
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.