Jump to content

Recommended Posts

Posted

Starting buffs for newbie characters.

### Eclipse Workspace Patch 1.0
#P Hero-GS
Index: config/players.properties
===================================================================
--- config/players.properties (revision 36)
+++ config/players.properties (working copy)
@@ -5,6 +5,15 @@
 #Amount of adenas that a new character is given, default is 100
 StartingAdena = 250000
 
+#Newbie Characters have starting buffs
+StartingBuffs = True
+
+#Starting Buffs for Mystics.
+StartingBuffsMage = 1204,2;1085,3;
+
+#Starting Buffs for Fighters.
+StartingBuffsFighter = 1204,2;1086,2;
+
 # If True, when effects of the same stack group are used, lesser
 # effects will be canceled if stronger effects are used. New effects
 # that are added will be canceled if they are of lesser priority to the old one.
Index: java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (revision 35)
+++ java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (working copy)
@@ -22,15 +22,18 @@
 import net.sf.l2j.gameserver.datatables.SkillTreeTable;
 import net.sf.l2j.gameserver.idfactory.IdFactory;
 import net.sf.l2j.gameserver.model.L2ShortCut;
+import net.sf.l2j.gameserver.model.L2Skill;
 import net.sf.l2j.gameserver.model.L2SkillLearn;
 import net.sf.l2j.gameserver.model.L2World;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.model.actor.template.PcTemplate;
 import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
 import net.sf.l2j.gameserver.model.item.kind.Item;
+import net.sf.l2j.gameserver.network.SystemMessageId;
 import net.sf.l2j.gameserver.network.serverpackets.CharCreateFail;
 import net.sf.l2j.gameserver.network.serverpackets.CharCreateOk;
 import net.sf.l2j.gameserver.network.serverpackets.CharSelectInfo;
+import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
 import net.sf.l2j.gameserver.scripting.Quest;
 import net.sf.l2j.gameserver.scripting.ScriptManager;
 
@@ -146,6 +149,7 @@
  newChar.addAdena("Init", Config.STARTING_ADENA, null, false);
     }
+        if(Config.STARTING_BUFFS)
+        {
+         if(!newChar.isMageClass())
+         {
+         for (int[] buff : Config.STARTING_BUFFS_F) //Custom buffs for fighters
+         {
+         L2Skill skill = SkillTable.getInstance().getInfo(buff[0], buff[1]);
+         if (skill != null)
+         {
+         skill.getEffects(newChar, newChar);
+         newChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(buff[0]));
+         }
+         }
+         }
+         else
+         {
+         for (int[] buff : Config.STARTING_BUFFS_M) //Custom buffs for mystics
+         {
+         L2Skill skill = SkillTable.getInstance().getInfo(buff[0], buff[1]); 
+         if (skill != null)
+         {
+         skill.getEffects(newChar, newChar);
+         newChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(buff[0]));
+         }
+         }
+         }        
+        }
  newChar.setXYZInvisible(template.getSpawnX(), template.getSpawnY(), template.getSpawnZ());
  newChar.setTitle("");
  
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 46)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -401,6 +401,9 @@
  
  /** Misc */
  public static int STARTING_ADENA;
+ public static boolean STARTING_BUFFS;
+ public static List<int[]> STARTING_BUFFS_M = new ArrayList<int[]>(); 
+ public static List<int[]> STARTING_BUFFS_F = new ArrayList<int[]>();
  public static boolean EFFECT_CANCELING;
  public static double HP_REGEN_MULTIPLIER;
  public static double MP_REGEN_MULTIPLIER;
@@ -1075,6 +1078,47 @@
  // players
  ExProperties players = load(PLAYERS_FILE);
  STARTING_ADENA = players.getProperty("StartingAdena", 100);
+ STARTING_BUFFS = players.getProperty("StartingBuffs", true);
+ String[] propertySplit = players.getProperty("StartingBuffsMage", "1204,2").split(";");
+ STARTING_BUFFS_M.clear();
+ for (String buff : propertySplit)
+ {
+ String[] buffSplit = buff.split(",");
+ if (buffSplit.length != 2)
+ _log.warning("StartingBuffsMage[Config.load()]: invalid config property -> StartingBuffsMage \"" + buff + "\"");
+ else
+ {
+ try
+ {
+ STARTING_BUFFS_M.add(new int[]{Integer.parseInt(buffSplit[0]), Integer.parseInt(buffSplit[1])});
+ }
+             catch (NumberFormatException nfe)
+             {
+             if (STARTING_BUFFS_M.equals(""))
+             System.out.println("EROOOOOOOOOOOR WITH STARTING BUFS");
+             }
+ }
+ }
+ propertySplit = players.getProperty("StartingBuffsFighter", "1204,2").split(";");
+ STARTING_BUFFS_F.clear();
+ for (String buff : propertySplit)
+ {
+ String[] buffSplit = buff.split(",");
+ if (buffSplit.length != 2)
+ _log.warning("StartingBuffsFighter[Config.load()]: invalid config property -> StartingBuffsFighter \"" + buff + "\"");
+ else
+ {
+ try
+ {
+ STARTING_BUFFS_F.add(new int[]{Integer.parseInt(buffSplit[0]), Integer.parseInt(buffSplit[1])});
+ }
+             catch (NumberFormatException nfe)
+             {
+             if (STARTING_BUFFS_F.equals(""))
+             System.out.println("EROOOOOOOOOOOR WITH STARTING BUFS");
+             }
+ }
+ }     
  EFFECT_CANCELING = players.getProperty("CancelLesserEffect", true);
  HP_REGEN_MULTIPLIER = players.getProperty("HpRegenMultiplier", 1.);
  MP_REGEN_MULTIPLIER = players.getProperty("MpRegenMultiplier", 1.);
Posted
+        if(Config.STARTING_BUFFS)
+        {
+         if(!newChar.isMageClass())
+         {
+         for (int[] buff : Config.STARTING_BUFFS_F) //Custom buffs for fighters
+         {
+         L2Skill skill = SkillTable.getInstance().getInfo(buff[0], buff[1]);
+         if (skill != null)
+         {
+         skill.getEffects(newChar, newChar);
+         newChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(buff[0]));
+         }
+         }
+         }
+         else
+         {
+         for (int[] buff : Config.STARTING_BUFFS_M) //Custom buffs for mystics
+         {
+         L2Skill skill = SkillTable.getInstance().getInfo(buff[0], buff[1]); 
+         if (skill != null)
+         {
+         skill.getEffects(newChar, newChar);
+         newChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(buff[0]));
+         }
+         }
+         }        
+        }

>

+        if(Config.STARTING_BUFFS)
+        {
+         for (int[] buff : (newChar.isMageClass()) ? Config.STARTING_BUFFS_M : Config.STARTING_BUFFS_F)
+         {
+         L2Skill skill = SkillTable.getInstance().getInfo(buff[0], buff[1]);
+         if (skill != null)
+         {
+         skill.getEffects(newChar, newChar);
+         newChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(buff[0]));
+         }
+         }    
+        }
Posted

Good share. i select this code for create a guide.

http://www.maxcheaters.com/topic/202517-l2jacis-%CF%80%CF%89%CF%82-%CE%BD%CE%B1-%CF%80%CE%B5%CF%81%CE%BD%CE%B1%CE%BC%CE%B5-%CE%B5%CE%BD%CE%B1-config/

I hope not to have problems. and I put the link from this share. :D 

Posted

It's cleaner, and there is embbed getSkill().

 

whats the point of a getSkill() method since you CANT cache a L2Skill instance?

Posted (edited)

whats the point of a getSkill() method since you CANT cache a L2Skill instance?

 

Avoid to rewrite SkillTable.getInstance().getSkill everytime.

 

By definition, all skills are cached...

private static final Map<Integer, L2Skill> _skills = new HashMap<>();
Edited by Tryskell
Posted (edited)

 

Avoid to rewrite SkillTable.getInstance().getSkill everytime.

 

By definition, all skills are cached...

private static final Map<Integer, L2Skill> _skills = new HashMap<>();

 

lol, the _skills will be updated with new L2Skill instances uppon //reload skills, while ALL other L2Skill references will hold the old obsolete L2Skill with old data inside.

 

PS: "By definition"

Edited by xxdem
Posted (edited)

lol, the _skills will be updated with new L2Skill instances uppon //reload skills, while ALL other L2Skill references will hold the old obsolete L2Skill with old data inside.

 

PS: "By definition"

 

Lol, what is the point to cache old skills upon skills reload ? That's all you don't want to do on a server. That would lead to a lot of idiot issues, and making the whole reload command totally pointless. I don't get your point.

 

Moreover, reload commands are only for dev purposes, nothing more.

 

And yes, almost everything is mapped or listed, so... Cached. I doubt I learn you anything.

Edited by Tryskell
Posted

Lol, what is the point to cache old skills upon skills reload ? That's all you don't want to do on a server. That would lead to a lot of idiot issues, and making the whole reload command totally pointless. I don't get your point.

 

Moreover, reload commands are only for dev purposes, nothing more.

 

And yes, almost everything is mapped or listed, so... Cached. I doubt I learn you anything.

 

lmao, read again I won't bother

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

    • Dear partners! At the moment we are in great need of the following positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old (brute or hacked origin, self-registered) accounts with post and comment karma from 100 to 100,000+ | Full email access included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010–2023) | Full email access (possibly with active 2FA password) — Facebook old accounts (2010–2023) | Full email access (possibly with active 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with active 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts — Email accounts: mail.ru, yahoo.com, gazeta.pl, gmx.ch / gmx.de / gmx.net (BUT NOT gmx.com) — Google ADS Manual Farm accounts (verified via email and phone number) | GEO: USA/Europe, mostly USA. — WhatsApp OLD Accounts — Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! We are also ready to consider other partnership and collaboration options. Active links to our projects: 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 Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • why is he still not banned? scammer
    • Complete verification on the services you need and unlock new earning opportunities. Use our newest service in the store: Learn more Active links: 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 Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We would like 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 write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." – you need to post 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
    • Complete verification on the services you need and unlock new earning opportunities. Use our newest service in the store: Learn more Active links: 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 Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. We would like 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 write your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." – you need to post 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
    • Had some luck checking out resources on luckybrand.cz—their guides helped me structure pages so search engines picked up relevance better. Even simple tweaks made a noticeable difference over random premium backlinks.
  • 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