Jump to content

Recommended Posts

Posted
## Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/Config.java
===================================================================
--- head-src/com/l2jfrozen/Config.java	(revision 939)
+++ head-src/com/l2jfrozen/Config.java	(working copy)
@@ -2121,8 +2121,11 @@
 	public static String PM_TEXT1;
 	public static String PM_TEXT2;
 	public static boolean NEW_PLAYER_EFFECT;
-	
+	public static boolean NEW_PLAYER_BUFFS;
+	public static Map<Integer, Integer> FIGHTER_BUFF_LIST;
+	public static Map<Integer, Integer> MAGE_BUFF_LIST;
 
+
 	//============================================================
 	public static void loadFrozenConfig()
 	{
@@ -2143,7 +2146,59 @@
 			PM_TEXT1  = frozenSettings.getProperty("PMText1", "Have Fun and Nice Stay on");
 			PM_TEXT2  = frozenSettings.getProperty("PMText2", "Vote for us every 24h");
 			NEW_PLAYER_EFFECT = Boolean.parseBoolean(frozenSettings.getProperty("NewPlayerEffect", "True"));
+			NEW_PLAYER_BUFFS = Boolean.parseBoolean(frozenSettings.getProperty("AltNewCharBuffs", "False"));
+			if(NEW_PLAYER_BUFFS)
+			{
+				String[] fighterBuffSplit = frozenSettings.getProperty("FighterBuffList", "").split(";");
+				FIGHTER_BUFF_LIST = new FastMap<Integer, Integer>(fighterBuffSplit.length);
+				for(String skill : fighterBuffSplit)
+				{
+					String[] skillSplit = skill.split(",");
+					if(skillSplit.length != 2)
+					{
+						System.out.println("invalid config property in " + Frozen + " -> FighterBuffList \"" + skill + "\"");
+					}
+					else
+					{
+						try
+						{
+							FIGHTER_BUFF_LIST.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
+						}
+						catch(NumberFormatException nfe)
+						{
+							if(!skill.equals(""))
+							{
+								System.out.println("invalid config property in " + Frozen + " -> FighterBuffList \"" + skillSplit[0] + "\"" + skillSplit[1]);
+							}
+						}
+					}
+				}
 
+				String[] mageBuffSplit = frozenSettings.getProperty("MageBuffList", "").split(";");
+				MAGE_BUFF_LIST = new FastMap<Integer, Integer>(mageBuffSplit.length);
+				for(String skill : mageBuffSplit)
+				{
+					String[] skillSplit = skill.split(",");
+					if(skillSplit.length != 2)
+					{
+						System.out.println("invalid config property in " + Frozen + " -> MageBuffList \"" + skill + "\"");
+					}
+					else
+					{
+						try
+						{
+							MAGE_BUFF_LIST.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
+						}
+						catch(NumberFormatException nfe)
+						{
+							if(!skill.equals(""))
+							{
+								System.out.println("invalid config property in" + Frozen + " -> MageBuffList \"" + skillSplit[0] + "\"" + skillSplit[1]);
+							}
+						}
+					}
+				}
+			}
 		}
 		catch(Exception e)
 		{
Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java	(revision 939)
+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -285,6 +285,9 @@
 		Announcements.getInstance().showAnnouncements(activeChar);
 
 		loadTutorial(activeChar);
+
+		if(activeChar.getFirstLog())
+			onEnterNewbie(activeChar);
 		
 		// Check for crowns
 		CrownManager.getInstance().checkCrowns(activeChar);
@@ -543,20 +546,6 @@
 		if (Config.ONLINE_PLAYERS_ON_LOGIN)
 			sendPacket(new SystemMessage(SystemMessageId.S1_S2).addString("There are " + L2World.getInstance().getAllPlayers().size() + " players online."));
 
-		if (activeChar.getFirstLog() && Config.NEW_PLAYER_EFFECT)
-		{
-			L2Skill skill = SkillTable.getInstance().getInfo(2025,1);
-			if (skill != null)
-			{
-				MagicSkillUser MSU = new MagicSkillUser(activeChar, activeChar, 2025, 1, 1, 0);
-				activeChar.sendPacket(MSU);
-				activeChar.broadcastPacket(MSU);
-				activeChar.useMagic(skill, false, false);
-			}
-			activeChar.setFirstLog(false);
-			activeChar.updateFirstLog();
-		}
-
 		if (Config.WELCOME_HTM && isValidName(activeChar.getName()))
 		{
 			String Welcome_Path = "data/html/welcome.htm";
@@ -688,6 +677,50 @@
 	}
 
 	/**
+	 * @param activeChar
+	 */
+	private void onEnterNewbie(L2PcInstance activeChar)
+	{
+		if(Config.NEW_PLAYER_EFFECT)
+		{
+			L2Skill skill = SkillTable.getInstance().getInfo(2025, 1);
+			if(skill != null)
+			{
+				MagicSkillUser MSU = new MagicSkillUser(activeChar, activeChar, 2025, 1, 1, 0);
+				activeChar.sendPacket(MSU);
+				activeChar.broadcastPacket(MSU);
+				activeChar.useMagic(skill, false, false);
+			}
+		}
+
+		if(Config.NEW_PLAYER_BUFFS)
+		{
+			if(activeChar.isMageClass())
+			{
+				for(Integer skillid : Config.MAGE_BUFF_LIST.keySet())
+				{
+					int skilllvl = Config.MAGE_BUFF_LIST.get(skillid);
+					L2Skill skill = SkillTable.getInstance().getInfo(skillid, skilllvl);
+					if(skill != null)
+						skill.getEffects(activeChar, activeChar);
+				}
+			}
+			else
+			{
+				for(Integer skillid : Config.FIGHTER_BUFF_LIST.keySet())
+				{
+					int skilllvl = Config.FIGHTER_BUFF_LIST.get(skillid);
+					L2Skill skill = SkillTable.getInstance().getInfo(skillid, skilllvl);
+					if(skill != null)
+						skill.getEffects(activeChar, activeChar);
+				}
+			}
+		}
+		activeChar.setFirstLog(false);
+		activeChar.updateFirstLog();
+	}
+
+	/**
 	 * @param cha 
 	 */
 	private void engage(L2PcInstance cha)
Index: config/frozen/frozen.properties
===================================================================
--- config/frozen/frozen.properties	(revision 939)
+++ config/frozen/frozen.properties	(working copy)
@@ -21,4 +21,18 @@
 
 # New players get fireworks the first time they log in
 # Default: False
-NewPlayerEffect = False
\ No newline at end of file
+NewPlayerEffect = False
+
+# Give buffs to character on first game log in.
+# Default: False
+AltNewCharBuffs = False
+
+# The List of Fighter Buffs
+# Format : skillid,skilllvl;skillid2,skilllvl2;....skillidn,skilllvln
+FighterBuffList = 1204,2;1068,3;1040,3;1035,4;1036,2;1045,6;1086,2;1077,3;1240,3;1242,3;\
+264,1;267,1;268,1;269,1;304,1;349,1;364,1;271,1;274,1;275,1;1363,1;1391,3;4699,1;4703,1
+
+# The List of Mage Buffs
+# Format : skillid,skilllvl;skillid2,skilllvl2;....skillidn,skilllvln
+MageBuffList = 1204,2;1040,3;1035,4;1045,6;1048,6;1036,2;1303,2;1085,3;1059,3;1078,6;\
+1062,2;1397,3;264,1;267,1;268,1;304,1;349,1;364,1;273,1;276,1;365,1;1413,1;1391,3;4703,1

Credits: ????

  • 3 months later...

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


  • Posts

    • Is there tutorial how to make this effects? Thanks in Advance  
    • https://pastebin.com/UJcX7rXH    
    • Does anyone have more information about bugs and errors in the Frozen review? Any ideas? Any help is welcome!   Modifications and corrections made   https://pastebin.com/vqYjM8ZH   Sorry if this is the wrong area.
    • Purchase Telegram Stars at a favorable price with minimal markup. New auctions from Telegram are expected, and our bot will help you prepare in advance. Active links: Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. Other services: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to SMM Panel: Go to – promotion of your social media accounts. We want to present to you the current list of promotions and special offers for purchasing products and services of our service: 1. You can use a promo code for your first purchase: SOCNET (15% discount) 2. Get $1 on your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write this in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our bot for purchasing stars! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • 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