Dulens. Posted July 4, 2012 Posted July 4, 2012 Hello! I created one more code, with the help of AbsolutePower for some things. It's hero and donator announce when login with config option. ### Eclipse Workspace Patch 1.0 #P L2jFrozen_Gs Index: head-src/com/l2jfrozen/Config.java =================================================================== --- head-src/com/l2jfrozen/Config.java (revision 946) +++ head-src/com/l2jfrozen/Config.java (working copy) @@ -2378,6 +2378,9 @@ public static String FARM2_CUSTOM_MESSAGE; public static String PVP1_CUSTOM_MESSAGE; public static String PVP2_CUSTOM_MESSAGE; + + public static boolean ANNOUNCE_HERO_LOGIN; + public static boolean ANNOUNCE_DONATOR_LOGIN; //============================================================ public static void loadL2JFrozenConfig() @@ -2497,6 +2500,9 @@ FARM2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm2CustomMeesage", "You have been teleported to Farm Zone 2!"); PVP1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP1CustomMeesage", "You have been teleported to PvP Zone 1!"); PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!"); + + ANNOUNCE_HERO_LOGIN = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AnnounceHeroLogin", "False")); + ANNOUNCE_DONATOR_LOGIN = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AnnounceDonatorLogin", "False")); } catch(Exception e) { Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 946) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -170,6 +170,18 @@ } EnterGM(activeChar); + + + if (Config.ANNOUNCE_HERO_LOGIN && activeChar.isHero()) + { + Announcements.getInstance().announceToAll("Hero: " + activeChar.getName() + " is now online!"); + } + + if (Config.ANNOUNCE_DONATOR_LOGIN && activeChar.isDonator()) + { + Announcements.getInstance().announceToAll("Donator: " + activeChar.getName() + " is now online!"); + } + Quest.playerEnter(activeChar); activeChar.sendPacket(new QuestList()); Coded on L2jFrozen, enjoy! Quote
AbsolutePower Posted July 4, 2012 Posted July 4, 2012 Hello! I created one more code, with the help of AbsolutePower for some things. It's hero and donator announce when login with config option. ### Eclipse Workspace Patch 1.0 #P L2jFrozen_Gs Index: head-src/com/l2jfrozen/Config.java =================================================================== --- head-src/com/l2jfrozen/Config.java (revision 946) +++ head-src/com/l2jfrozen/Config.java (working copy) @@ -2378,6 +2378,9 @@ public static String FARM2_CUSTOM_MESSAGE; public static String PVP1_CUSTOM_MESSAGE; public static String PVP2_CUSTOM_MESSAGE; + + public static boolean ANNOUNCE_HERO_LOGIN; + public static boolean ANNOUNCE_DONATOR_LOGIN; //============================================================ public static void loadL2JFrozenConfig() @@ -2497,6 +2500,9 @@ FARM2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm2CustomMeesage", "You have been teleported to Farm Zone 2!"); PVP1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP1CustomMeesage", "You have been teleported to PvP Zone 1!"); PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!"); + + ANNOUNCE_HERO_LOGIN = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AnnounceHeroLogin", "False")); + ANNOUNCE_DONATOR_LOGIN = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AnnounceDonatorLogin", "False")); } catch(Exception e) { Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 946) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -170,6 +170,18 @@ } EnterGM(activeChar); + + + if (Config.ANNOUNCE_HERO_LOGIN && activeChar.isHero()) + { + Announcements.getInstance().announceToAll("Hero: " + activeChar.getName() + " is now online!"); + } + + if (Config.ANNOUNCE_DONATOR_LOGIN && activeChar.isDonator()) + { + Announcements.getInstance().announceToAll("Donator: " + activeChar.getName() + " is now online!"); + } + Quest.playerEnter(activeChar); activeChar.sendPacket(new QuestList()); Coded on L2jFrozen, enjoy! nice crystalia... it's already shared but who cares... you trying and that's good! Quote
Dulens. Posted July 4, 2012 Author Posted July 4, 2012 It's already shared only hero, but I shared donator's too for more easy. Thanks! Quote
DescJa Posted July 4, 2012 Posted July 4, 2012 It's already shared only hero, but I shared donator's too for more easy. Thanks! All that you share its already shared... stop it for you -.-" Make Another Not Shared codes.. GL. Quote
Fanky Posted July 4, 2012 Posted July 4, 2012 it would be better to create a method in l2pcinstance and then call it @enterworld. but anyway,thanks. Quote
GsL Posted August 6, 2012 Posted August 6, 2012 Crystalia is your 1st code?? GL xd give us!!! more can we Request some codes?? xd Quote
Dulens. Posted August 6, 2012 Author Posted August 6, 2012 Crystalia is your 1st code?? GL xd give us!!! more can we Request some codes?? xd Yes, I'm learning. If you have any easy request I can do it, just pm me. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.