Jump to content

Recommended Posts

Posted

Hello everyone, this is my first post so I'll post an area exclusively, made ​​by me.

 

the time was in need of a mod different from others, it would be great for my server ...

 

so I ended up creating a mod, so 100% working, and I am using in my project ..

thanks! : D

come on the code. : D

 

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 " + _daysleft + " days.");
+				}
+        }
+
+		if(Config.ALLOW_AIO_NCOLOR && activeChar.isAio())
/**

 

 

crédits: allanalcantara

 

- TESTED ON - Interlude!

100% working, no bug, no error!

 

Tanks...

and do not forget to thank's

 

 

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