Jump to content
  • 0

[HELP]Announce RB kill


Question

Posted

[L2jFrozen]

i want server to announce the killer of raidboss when raidboss dies i made that

Announcements.getInstance().announceToAll(super.getName()+ " has been killed from" + activeChar.getName());

but it doesn't work , and if possible to make it announce the clan name of the player .

9 answers to this question

Recommended Posts

  • 0
Posted

[L2jFrozen]

i want server to announce the killer of raidboss when raidboss dies i made that

Announcements.getInstance().announceToAll(super.getName()+ " has been killed from" + activeChar.getName());

but it doesn't work , and if possible to make it announce the clan name of the player .

where did you exactly put it ? it depends

  • 0
Posted

after

SystemMessage msg = new SystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL);

added

 

	         ExRedSky packet = new ExRedSky(10);
         Earthquake eq = new Earthquake(player.getX(), player.getY(), player.getZ(), 14, 3);
         Broadcast.toAllOnlinePlayers(packet);
         Broadcast.toAllOnlinePlayers(eq);
		Announcements.getInstance().announceToAll(super.getName()+ " has been killed from" + activeChar.getName());

RedSky and eq works fine just the announcement

  • 0
Posted

and is the red sky appearing? Code seems fine but i dont know about the place since u have pasted just few lines, if u wanna add clan in there do this:

String clan = "";
if(activeChar.getClan() != null)
clan = " from "+activeChar.getClan().getName()+" Clan";
Announcements.getInstance().announceToAll(getName()+ " has been killed by " + activeChar.getName()+clan);

  • 0
Posted

 Announcements.getInstance().announceToAll(getName()+ " has been killed by " + killer); 

finally it's killer and not activeChar now what can I add the clan?

 

I tried that

 killer.getClan 

but

getClan

doesnt exist in l2Character and ideas?

 

this

 Announcements.getInstance().announceToAll(getName()+ " has been killed by " + killer "from clan: " clan.getName);

doesn't work pops error in eclipse

  • 0
Posted

just parse killer into L2PcInstance and take getClan() from there.

 

About that error, ofc it gives error, read it and fix the line.

  • 0
Posted

Announcements.getInstance().announceToAll(getName()+ " has been defeated by " + killer + " from clan " + killer.getClan() + ".");

works , but when someone doesn't have a clan how can i make it check player if he is in a clan?

 

example of announcement when player got no clan

SHV8z.png

Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock