Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use
viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
eriko
Posts: 4 Joined: Thu Sep 25, 2008 7:53 pm
Post
by eriko » Fri Jul 03, 2009 6:02 pm
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision
Number :3259
L2JDP Revision
Number :
I'm sorry for asking about this, i know about other post, but i don't really understand how it works
for example i found this example:
Code: Select all
Broadcast.toAllOnlinePlayers(SystemMessage.sendString("Message"));
OR
Examples (not completed):
Code: Select all
activeChar.sendPacket(new CreatureSay (...));activeChar.sendPacket(new ExShowScreenMessage (...));
if someone can show me a simple example pls of how to use this on object from L2PcInstance !
dip_bow
Posts: 48 Joined: Wed Feb 18, 2009 11:58 am
Location: Spain
Post
by dip_bow » Fri Jul 03, 2009 8:41 pm
Not if I understand your question very well, but try to answer
For example:
Code: Select all
if (targetPlayer.isCursedWeaponEquipped()) // Target is a CursedWeapon Holder { increasePvpKills(); Broadcast.toAllOnlinePlayers(SystemMessage.sendString("The owner of the demonic sword has died")); }
This code send a message to all players, This message is seen where you see
damage.
eriko
Posts: 4 Joined: Thu Sep 25, 2008 7:53 pm
Post
by eriko » Sun Jul 05, 2009 2:54 am
I try to use:
Code: Select all
Broadcast.toAllOnlinePlayers(new ExShowScreenMessage("Message", 500));
but the message display for a few seconds
the full code
Code: Select all
public void captureSone(L2PcInstance player, L2NpcInstance npc, L2Skill skill){ if(player.getFaction() == 0 && player.getTargetId() == npc.getObjectId()){ if(skill.getId() == 246){ if(player.getFaction() != npc.getFaction()){ npc.updateFaction(player.getFaction()); Broadcast.announceToOnlinePlayers(player.getName()+" HAS CAPTURED "+npc.getName()+" !!"); Broadcast.toAllOnlinePlayers(new ExShowScreenMessage(player.getName()+" HAS CAPTURED "+npc.getName()+" !!", 500)); this.addReward(player); System.gc(); } }else{ double hpc = player.getCurrentHp(); double hpm = player.getMaxHp(); double php = (hpc/hpm)*100; if(php > 5){ double hp = (hpc*0.17); player.reduceCurrentHp(hp,player,false, false, null); player.broadcastUserInfo(); }else{ player.doDie(player); player.broadcastUserInfo(); } } } }
dip_bow
Posts: 48 Joined: Wed Feb 18, 2009 11:58 am
Location: Spain
Post
by dip_bow » Mon Jul 06, 2009 6:42 pm
eriko wrote: I try to use:
Code: Select all
Broadcast.toAllOnlinePlayers(new ExShowScreenMessage("Message", 500));
but the message display for a few seconds
If you want it longer, you must increase the number 500, 500 means the time which will be