Jump to content

Recommended Posts

Posted

Γεια σας παιδια , εφτιαξα ενα Custom Mod στο οποιο οταν ενας παιχτης ειναι Hero.Τοτες θα του βγαλει ενα μυνημα π.χ Welcome Hero.

 

Δεν ειμαι σιγουρος στο οτι αν εχετε ενεργοποιημενο το Related Welcome Message αν βγαλει καμοια επιπλοκη...Οποιος το τεσταρει ας μου πει.....

 

### Eclipse Workspace Patch 1.0
#P L2J_Server_BETA
Index: dist/game/config/L2JMods.properties
===================================================================
--- dist/game/config/L2JMods.properties    (revision 5717)
+++ dist/game/config/L2JMods.properties    (working copy)
@@ -479,4 +479,17 @@

# Enables .changepassword voiced command which allows the players to change their account's password ingame.
# Default: False
-AllowChangePassword = False
\ No newline at end of file
+AllowChangePassword = False
+
+#----------------------------------------------------------------------------
+#Welcome Hero Message            
+#----------------------------------------------------------------------------
+
+#This Config Enable the 'Welcome Hero Message'
+#Default: False
+MessageHeroEnable = False
+#This Config edit the Message for Welcome Hero.
+MessageHeroText = Welcome Hero.
+#This Config set time hero.
+#Default: 10
+ScreenWelcomeMessageTimeHero = 10
\ No newline at end of file
Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java    (revision 5717)
+++ java/com/l2jserver/Config.java    (working copy)
@@ -777,7 +777,9 @@
     public static int L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP;
     public static Map<Integer, Integer> L2JMOD_DUALBOX_CHECK_WHITELIST;
     public static boolean L2JMOD_ALLOW_CHANGE_PASSWORD;
-    
+    public static boolean WELCOME_MESSAGE_HERO_ENABLE;
+    public static String WELCOME_MESSAGE_HERO_TEXT;
+    public static int WELCOME_MESSAGE_TIME_HERO;
     // --------------------------------------------------
     // NPC Settings
     // --------------------------------------------------
@@ -2683,6 +2685,9 @@
                 }
             }
             L2JMOD_ALLOW_CHANGE_PASSWORD = Boolean.parseBoolean(L2JModSettings.getProperty("AllowChangePassword", "False"));
+            WELCOME_MESSAGE_HERO_ENABLE = Boolean.parseBoolean(L2JModSettings.getProperty("MessageHeroEnable", "False"));
+            WELCOME_MESSAGE_HERO_TEXT = (L2JModSettings.getProperty("MessageHeroText", ""));
+            WELCOME_MESSAGE_TIME_HERO = Integer.parseInt(L2JModSettings.getProperty("ScreenWelcomeMessageTimeHero", "10")) * 1000;
             
             // Load PvP L2Properties file (if exists)
             final File pvp = new File(PVP_CONFIG_FILE);
Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java    (revision 5717)
+++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java    (working copy)
@@ -575,6 +575,11 @@
         
         TvTEvent.onLogin(activeChar);
         
+        if (activeChar.isHero() && Config.WELCOME_MESSAGE_HERO_ENABLE)
+        {
+            activeChar.sendPacket(new ExShowScreenMessage(Config.WELCOME_MESSAGE_HERO_TEXT, Config.WELCOME_MESSAGE_TIME_HERO));
+        }
+        
         if (Config.WELCOME_MESSAGE_ENABLED)
         {
             activeChar.sendPacket(new ExShowScreenMessage(Config.WELCOME_MESSAGE_TEXT, Config.WELCOME_MESSAGE_TIME));

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...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..