Jump to content
  • 0

[HELP]EVENT Bloodshedparty GIVE ITEMS ALL PLAYERS IN PT


Question

Posted

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • UPDATE M63 Introduced the first major Party Logic system: Bots can join and operate under a real-player party leader. Party members: follow the real player, assist the leader in combat, coordinate around the party leader, support party combat instead of behaving purely as independent farmers. Added initial party formation/follow behavior. Added party-aware PvP assisting.   Expanded Party Support / Party Combat behavior: Improved party coordination across different bot classes. Added broader healer/support participation. Expanded combat equipment/ammunition support, including all six arrow grades. Party members became more coordinated in PvP and group combat. Added improved bot reaction to resurrection situations. Added compatible resurrection-answer handling. Refined party formation behavior. Party combat became more persistent when members were attacked. Party members maintain combat participation more reliably instead of immediately dropping engagement.     Major Party Logic expansion:   Changed party travel formation Added temporary main assister leadership: if the real-player leader dies, a random living damage dealer becomes combat leader, other bots assist that damage dealer, if the assister dies, another DD can take over. Added special Bishop/Cardinal real-player leader logic: bots continue following the real player, a damage-dealer bot becomes the party’s combat assister. Added 5-second idle Party Logic: if the real-player leader stops moving/actively controlling combat for 5 seconds, bots can resume autonomous farming around the leader. Temporary main assisters use the bot’s already configured PvP mode instead of a separate Party Logic PvP system. Existing modes remain authoritative: Idle AttackFlagged AttackEveryone Temporary main assister can independently acquire PvP targets according to its configured mode. Other party bots assist that selected combat leader. Made Party Logic target acquisition party-location aware. While operating in a party, autonomous PvE/PvP searches can be centered around the real player’s current location rather than only the bot’s original farming position. Existing bot farmRadius remains the effective acquisition radius. This allows parties to travel away from their original farming areas while continuing to operate dynamically.     Expanded Bishop/Cardinal Party Logic behavior:   Bishop/Cardinal parties now use the same 5-second activity/idle model as normal real-player-led parties. While the Bishop/Cardinal leader is moving or active: bots prioritize staying with the real player, maintain the ~70–100 unit random formation. After the Bishop/Cardinal remains idle for 5 seconds: party bots may return to autonomous farming around the leader. When the Bishop/Cardinal starts moving again: party members transition back to following the leader. PvP remains independent of the PvE idle condition: valid PvP targets can still trigger combat according to each bot’s configured PvP mode.     Optional Hero System: Added a new hero_enabled option for Autobots. Bot creation gained Hero appearance: No / Yes. Existing bots default to hero_enabled = 0. Bots with hero_enabled = 1 spawn with native Lucera Hero status/aura/appearance through Player.setHero(true). Hero weapons configured through the existing Autobots item system can be equipped normally. This is intentionally visual/status Hero only: no Hero skill injection, no automatic native Hero skills, no changes to combat AI or targeting. Hero state can also be changed directly in the database and takes effect after respawning the bot.     DOWNLOAD
    • Throw a free cloudflare SSL cert in there. 😄
    • Nextarget was a LT international clan in Dawn and  Evoke and other servers, playing most in Interlude, so dunno if you try use this name to atrack the players or smth.
    • Server Specs ChapterInterlude Classic EXP / SP Ratex50 Adena Ratex30 Drop Ratex20 Spoil Ratex15 Max Level78 Website https://l2nextarget.com/ Start On Today At 22:00
    • Since last forums fail, I decided to introduce a little website over PTS server holder - just to make basic informations more reachable. You can discover it over http://anothercrappyinterludeserver.com/   Discord channels ACCESS TO SOURCES and SERVER INSTALLATION were also reworked to be easier to handle.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..