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.

Posted

it would be better to create a method in l2pcinstance and then call it @enterworld.

 

but anyway,thanks.

  • 1 month later...
Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock