HERO ANNOUNCE LOGIN

Have you created a useful tool? or Do you want to get help building one? This is the right place!
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
professional
Posts: 58
Joined: Sun Jul 17, 2011 5:03 pm

HERO ANNOUNCE LOGIN

Post 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
User avatar
SolidSnake
Posts: 865
Joined: Wed Jan 20, 2010 6:54 pm
Location: Italy

Re: HERO ANNOUNCE LOGIN

Post 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.
Image
professional
Posts: 58
Joined: Sun Jul 17, 2011 5:03 pm

Re: HERO ANNOUNCE LOGIN

Post by professional »

i cannot see
Last edited by professional on Sat Aug 20, 2011 10:40 am, edited 1 time in total.
User avatar
SolidSnake
Posts: 865
Joined: Wed Jan 20, 2010 6:54 pm
Location: Italy

Re: HERO ANNOUNCE LOGIN

Post 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);
Image
Starter
Posts: 484
Joined: Sat Jan 23, 2010 4:42 pm

Re: HERO ANNOUNCE LOGIN

Post 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
I have promises to keep and miles to go before I sleep.
professional
Posts: 58
Joined: Sun Jul 17, 2011 5:03 pm

Re: PVP announec

Post 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
Last edited by professional on Sun Aug 21, 2011 7:32 am, edited 1 time in total.
User avatar
SolidSnake
Posts: 865
Joined: Wed Jan 20, 2010 6:54 pm
Location: Italy

Re: HERO ANNOUNCE LOGIN

Post 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..
Image
professional
Posts: 58
Joined: Sun Jul 17, 2011 5:03 pm

Re: HERO ANNOUNCE LOGIN

Post by professional »

i go for check .
Last edited by professional on Tue Aug 23, 2011 10:05 am, edited 1 time in total.
horato
Posts: 90
Joined: Sun Aug 31, 2008 1:45 am

Re: HERO ANNOUNCE LOGIN

Post by horato »

gameserver/config/L2jmods.properties and search for "Pvp/pk Announce"
User avatar
SolidSnake
Posts: 865
Joined: Wed Jan 20, 2010 6:54 pm
Location: Italy

Re: HERO ANNOUNCE LOGIN

Post by SolidSnake »

Check if this config, AnnouncePkPvP, is set on "True" in config/l2jmods.properties.
Image
professional
Posts: 58
Joined: Sun Jul 17, 2011 5:03 pm

Re: HERO ANNOUNCE LOGIN

Post by professional »

Yes thx my freind :oops:
horato
Posts: 90
Joined: Sun Aug 31, 2008 1:45 am

Re: HERO ANNOUNCE LOGIN

Post by horato »

FFs
Posts: 23
Joined: Mon Jun 13, 2011 11:32 am

Re: HERO ANNOUNCE LOGIN

Post by FFs »

Thanx a lot, i was looking for that!
Post Reply