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));

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