Jump to content

Recommended Posts

Posted

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!

Posted

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!
Posted

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.

  • 1 month later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...