Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Custom Vip for Day

Iniciado por Swarlog, Ago 19, 2022, 12:36 AM

Tema anterior - Siguiente tema

Swarlog

Index: Config/functions/l2jdemonniac.properties
===================================================================
--- config/main/altgame.properties (revision 1710)
+++ config/main/altgame.properties (working copy)
@@ -298,6 +298,11 @@
 # if True Player Vip gain Xp*VipMulXp and Sp*VipMulSp
 # Note only works if player not in party
 AllowVipMulXpSp = True
 VipMulXp = 2
 VipMulSp = 2
 VipMulSp = 2
+
+# ---------------------------------------------- #
+#              Custom Day for Vip                #
+# ---------------------------------------------- #
+# Allow custom Day's Vip
+# Default: False
+AllowCustomStartVip = False
+# Custom Start Days for Vip
+# Default: 1
+CustomStartDays = 1
+
 # ----------------
 # Section: Summons
 # ----------------
Index: head-src/com/l2jdemonniac/Config.java
===================================================================
--- head-src/com/l2jdemonniac/Config.java (revision 1710)
+++ head-src/com/l2jdemonniac/Config.java (working copy)
@@ -1878,6 +1878,10 @@
  // ---------- Summons ---------------------------------------
  public static float ALT_GAME_SUMMON_PENALTY_RATE; // Alternative game summon penalty
+
+ /** System Day Create char Vip  */
+ public static boolean ALLOW_CUSTOM_CHAR_VIP;
+ public static int CUSTOM_DAY_VIP;
+
  //********************************************************************************************
  public static void loadAltConfig()
  {
@@ -1926,6 +1930,10 @@
 
  // ----------- Summmons --------------
  ALT_GAME_SUMMON_PENALTY_RATE = Float.parseFloat(altSettings.getProperty("AltSummonPenaltyRate", "1."));
+
+ /** System Custom Vip Day Mod By allanalcantara */
+ ALLOW_CUSTOM_CHAR_VIP = Boolean.parseBoolean(l2jdemonniacSettings.getProperty("AllowCustomStartVip", "false"));
+ CUSTOM_DAY_VIP = Integer.parseInt(l2jdemonniacSettings.getProperty("CustomStartDays", "1"));
+
  }
  catch (Exception e)
  {
Index: head-src/com/l2jdemonniac/gameserver/network/clientpackets/CharacterCreate.java
===================================================================
--- head-src/com/l2jdemonniac/gameserver/network/clientpackets/CharacterCreate.java (revision 1710)
+++ head-src/com/l2jdemonniac/gameserver/network/clientpackets/CharacterCreate.java (working copy)
@@ -210,6 +225,11 @@
 
  newChar.addAdena("Init", Config.STARTING_ADENA, null, false);
}
-
+
+ /**
+ * @author allanalcantara <L2jDemonniac Dev>
+ * @version Kinho! <help assistence>
+ * Contato: a.alcantaraa@hotmail.com
+ * Mod Exclusivo Acesse: www.allanalcantara.com.br
+ */
+
+ if (Config.ALLOW_CUSTOM_CHAR_VIP)
+ {
+ // activeChar.getStat().add(setvip.getName.Config.CUSTOM_DAY_VIP);
+ // activeChar.getStat().add(setVipEndTime.getName.Config.CUSTOM_DAY_VIP);
+
+ newChar.setVip(true);
+ newChar.setVipEndTime(Config.CUSTOM_DAY_VIP);
+
+ }
+
Index: head-src/com/l2jdemonniac/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- head-src/com/l2jdemonniac/gameserver/network/clientpackets/EnterWorld.java (revision 1710)
+++ head-src/com/l2jdemonniac/gameserver/network/clientpackets/EnterWorld.java (working copy)
@@ -684,6 +688,11 @@

activeChar.getAppearance().setTitleColor(Config.CLAN_LEADER_COLOR);
}
}
-
-
- if(Config.ALLOW_AIO_NCOLOR && activeChar.isAio())
+
+ if(activeChar.isVip())
+        {
+           activeChar.getAppearance().setNameColor(Config.VIP_NCOLOR);
+           activeChar.getAppearance().setTitleColor(Config.VIP_TCOLOR);
+ {
+ activeChar.sendMessage("Vip period end of is " + (int)_daysleft + " days.");
+ }
+        }
+
+ if(Config.ALLOW_AIO_NCOLOR && activeChar.isAio())
/**