All pastes #559732 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-11 21:31 UTC
rendered paste body
Index: C:/Documents and Settings/Administrador/Mis documentos/WORKSPACE/L2_GameServer_It/java/config/other.properties
===================================================================
--- C:/Documents and Settings/Administrador/Mis documentos/WORKSPACE/L2_GameServer_It/java/config/other.properties	(revision 907)
+++ C:/Documents and Settings/Administrador/Mis documentos/WORKSPACE/L2_GameServer_It/java/config/other.properties	(working copy)
@@ -158,3 +158,13 @@
 JailIsPvp = True
 # Disable all chat in jail (except normal one)
 JailDisableChat = True
+
+#---------------------------------------------
+# Greet configuration
+#---------------------------------------------
+# Greet on Enter World?
+GreetOn = True
+# Tell Everybody that char logged?
+GreetGlobal = True
+# What should we say "Message  + name" 
+Greeting = Welcome the the server
\ No newline at end of file
Index: C:/Documents and Settings/Administrador/Mis documentos/WORKSPACE/L2_GameServer_It/java/net/sf/l2j/Config.java
===================================================================
--- C:/Documents and Settings/Administrador/Mis documentos/WORKSPACE/L2_GameServer_It/java/net/sf/l2j/Config.java	(revision 907)
+++ C:/Documents and Settings/Administrador/Mis documentos/WORKSPACE/L2_GameServer_It/java/net/sf/l2j/Config.java	(working copy)
@@ -507,6 +507,13 @@
     public static boolean JAIL_IS_PVP;
     public static boolean JAIL_DISABLE_CHAT;
     
+    /** Greeting config **/
+    public static boolean GREETING_ON;
+    public static boolean GREETING_GLOBAL;
+    public static String GREETING;
+    
+    
+    
 
     /** Enumeration describing values for Allowing the use of L2Walker client */
     public static enum L2WalkerAllowed
@@ -1473,6 +1480,10 @@
                 
                 JAIL_IS_PVP       = Boolean.valueOf(otherSettings.getProperty("JailIsPvp", "True"));
                 JAIL_DISABLE_CHAT = Boolean.valueOf(otherSettings.getProperty("JailDisableChat", "True"));
+                
+                GREETING_ON = Boolean.valueOf(otherSettings.getProperty("GreetOn", "False"));
+                GREETING_GLOBAL = Boolean.valueOf(otherSettings.getProperty("GreetGlobal", "False"));
+                GREETING    = String.valueOf(otherSettings.getProperty("Greeting", "Hi "));
 	        }
 	        catch (Exception e)
 	        {
Index: C:/Documents and Settings/Administrador/Mis documentos/WORKSPACE/L2_GameServer_It/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java
===================================================================
--- C:/Documents and Settings/Administrador/Mis documentos/WORKSPACE/L2_GameServer_It/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(revision 907)
+++ C:/Documents and Settings/Administrador/Mis documentos/WORKSPACE/L2_GameServer_It/java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(working copy)
@@ -46,6 +46,7 @@
 import net.sf.l2j.gameserver.model.entity.TvTEvent;
 import net.sf.l2j.gameserver.model.quest.Quest;
 import net.sf.l2j.gameserver.model.L2ItemInstance;
+import net.sf.l2j.gameserver.serverpackets.CreatureSay;
 import net.sf.l2j.gameserver.serverpackets.Die;
 import net.sf.l2j.gameserver.serverpackets.EtcStatusUpdate;
 import net.sf.l2j.gameserver.serverpackets.ExStorageMaxCount;
@@ -224,6 +225,18 @@
         SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar);
         Announcements.getInstance().showAnnouncements(activeChar);
 
+        
+        // Custom Greet to char
+       if(Config.GREETING_ON){
+    	   CreatureSay cs = new CreatureSay(0, Say2.ANNOUNCEMENT, activeChar.getName(), Config.GREETING + " " +activeChar.getName() );
+    	   activeChar.sendPacket(cs);
+       }
+		
+       if(Config.GREETING_GLOBAL){
+       //Announce that you logged
+    	   Announcements.getInstance().announceToAll("A new player has joined the server "+ activeChar.getName());
+       }
+		
 		Quest.playerEnter(activeChar);
 		activeChar.sendPacket(new QuestList());