Page 1 of 1

HERO ANNOUNCE LOGIN

Posted: Sat Aug 20, 2011 7:53 am
by professional
Hi
how i can make a Hero announec login for is pm all (Hero: $player has been logged in."); ???

Plz help me i very need help thx and sory for new tapic and my bad English ^^ Thx

Re: HERO ANNOUNCE LOGIN

Posted: Sat Aug 20, 2011 8:50 am
by SolidSnake

Code: Select all

Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java===================================================================--- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revisione 4788)+++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (copia locale)@@ -183,6 +183,8 @@            if (Config.GM_GIVE_SPECIAL_SKILLS)                GMSkillTable.getInstance().addSkills(activeChar);        }+       else if (activeChar.isHero())+           Announcements.getInstance().announceToAll("Hero: " + activeChar.getName() + " has been logged in.");                // Set dead status if applies        if (activeChar.getCurrentHp() < 0.5)
P.S. (for professional) Test it with a normal char (not GM).
P.S. (for moderators) This topic should be moved in "Custom Features Requests" section.

Re: HERO ANNOUNCE LOGIN

Posted: Sat Aug 20, 2011 10:18 am
by professional
i cannot see

Re: HERO ANNOUNCE LOGIN

Posted: Sat Aug 20, 2011 10:30 am
by SolidSnake
You don't see the message, but other people yes, because is showed when you aren't in game yet. If you want to receive the announcement you too, here the code:

Code: Select all

Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java===================================================================--- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revisione 4788)+++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (copia locale)@@ -402,6 +402,9 @@                sendPacket(new NpcHtmlMessage(1, serverNews));        }        +       if (activeChar.isHero() && !activeChar.isGM())+           Announcements.getInstance().announceToAll("Hero: " + activeChar.getName() + " has been logged in.");+               if (Config.PETITIONING_ALLOWED)            PetitionManager.getInstance().checkPetitionMessages(activeChar);

Re: HERO ANNOUNCE LOGIN

Posted: Sat Aug 20, 2011 10:36 am
by Starter
SolidSnake wrote:You don't see the message, but other people yes, because is showed when you aren't in game yet. If you want to receive the announcement you too, here the code:

Code: Select all

Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java===================================================================--- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revisione 4788)+++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (copia locale)@@ -402,6 +402,9 @@                sendPacket(new NpcHtmlMessage(1, serverNews));        }        +       if (activeChar.isHero() && !activeChar.isGM())+           Announcements.getInstance().announceToAll("Hero: " + activeChar.getName() + " has been logged in.");+               if (Config.PETITIONING_ALLOWED)            PetitionManager.getInstance().checkPetitionMessages(activeChar);
What would be the sense in seeing an announcement that you just logged in? And besides that he demanded something different. :P

Re: PVP announec

Posted: Sat Aug 20, 2011 10:38 am
by professional
HI HI HI i work thx very much i love you SolidSnake .

brother i have a new problem how i can set a announce for show all player . this player killing 5 or 10 killing or 15 killing meassge you can help me brother ? is for PVP And sory for my bad English

Re: HERO ANNOUNCE LOGIN

Posted: Sat Aug 20, 2011 12:40 pm
by SolidSnake
Change the messages as you wish :wink:

Code: Select all

Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java===================================================================--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java    (revisione 4788)+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java    (copia locale)@@ -757,6 +757,8 @@    private int _fishy = 0;    private int _fishz = 0;    +   private int consecutiveKillCount = 0;+       private int[] _transformAllowedSkills = {};    private ScheduledFuture<?> _taskRentPet;    private ScheduledFuture<?> _taskWater;@@ -5318,6 +5320,8 @@                stopFakeDeath(true);        }        +       consecutiveKillCount = 0;+               if (killer != null)        {            L2PcInstance pk = killer.getActingPlayer();@@ -5672,6 +5676,14 @@            // Add karma to attacker and increase its PK counter            setPvpKills(getPvpKills() + 1);            +           consecutiveKillCount++;+           if (consecutiveKillCount == 5)+               Announcements.getInstance().announceToAll(getName() + "got 5 consecutive pvp kills!");+           else if (consecutiveKillCount == 10)+               Announcements.getInstance().announceToAll(getName() + "got 10 consecutive pvp kills!");+           else if (consecutiveKillCount == 15)+               Announcements.getInstance().announceToAll(getName() + "got 15 consecutive pvp kills!");+                       // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter            sendPacket(new UserInfo(this));            sendPacket(new ExBrExtraUserInfo(this));
P.S. Don't send me useless PM, I know if you write something here..

Re: HERO ANNOUNCE LOGIN

Posted: Sat Aug 20, 2011 3:18 pm
by professional
i go for check .

Re: HERO ANNOUNCE LOGIN

Posted: Sat Aug 20, 2011 4:23 pm
by horato
gameserver/config/L2jmods.properties and search for "Pvp/pk Announce"

Re: HERO ANNOUNCE LOGIN

Posted: Sat Aug 20, 2011 4:24 pm
by SolidSnake
Check if this config, AnnouncePkPvP, is set on "True" in config/l2jmods.properties.

Re: HERO ANNOUNCE LOGIN

Posted: Sat Aug 20, 2011 6:56 pm
by professional
Yes thx my freind :oops:

Re: HERO ANNOUNCE LOGIN

Posted: Mon Aug 22, 2011 4:25 pm
by horato

Re: HERO ANNOUNCE LOGIN

Posted: Sat Aug 27, 2011 11:23 pm
by FFs
Thanx a lot, i was looking for that!