Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: java/net/sf/l2j/Config.java
- ===================================================================
- --- java/net/sf/l2j/Config.java
- +/** Newbie Buffs */
- + public static boolean NEW_PLAYER_BUFFS;
- + public static HashMap<Integer, Integer> NEWBIE_BUFF_FIGHTER;
- + public static HashMap<Integer, Integer> NEWBIE_BUFF_MAGE;
- //============================================================
- + NEW_PLAYER_BUFFS = Boolean.parseBoolean(skills.getProperty("Newbie_Player_Buff", "False"));
- + if(NEW_PLAYER_BUFFS)
- + {
- + String[] fighterBuffSplit = skills.getProperty("Newlbie_Buff_Fighter", "").split(";");
- + NEWBIE_BUFF_FIGHTER = new HashMap<>(fighterBuffSplit.length);
- + for(String skill : fighterBuffSplit)
- + {
- + String[] skillSplit = skill.split(",");
- + if(skillSplit.length != 2)
- + {
- + System.out.println("invalid config property -> SkillList " + fighterBuffSplit + " -> FighterBuffList \"" + skill + "\"");
- + }
- + else
- + {
- + try
- + {
- + NEWBIE_BUFF_FIGHTER.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
- + }
- + catch(NumberFormatException nfe)
- + {
- + if(!skill.equals(""))
- + {
- + System.out.println("invalid config property -> SkillList " + fighterBuffSplit + " -> FighterBuffList \"" + skillSplit[0] + "\"" + skillSplit[1]);
- + }
- + }
- + }
- + }
- + String[] mageBuffSplit = skills.getProperty("Newlbie_Buff_Mage", "").split(";");
- + NEWBIE_BUFF_MAGE = new HashMap<>(mageBuffSplit.length);
- + for(String skill : mageBuffSplit)
- + {
- + String[] skillSplit = skill.split(",");
- + if(skillSplit.length != 2)
- + {
- + System.out.println("invalid config property -> SkillList " + mageBuffSplit + " -> MageBuffList \"" + skill + "\"");
- + }
- + else
- + {
- + try
- + {
- + NEWBIE_BUFF_MAGE.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
- + }
- + catch(NumberFormatException nfe)
- + {
- + if(!skill.equals(""))
- + {
- + System.out.println("invalid config property -> SkillList " + mageBuffSplit + " -> MageBuffList \"" + skillSplit[0] + "\"" + skillSplit[1]);
- + }
- + }
- + }
- + }
- + }
- Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
- +import net.sf.l2j.gameserver.model.L2Skill;
- + if(activeChar.getFirstLog())
- + onEnterNewbie(activeChar);
- + private static void onEnterNewbie(Player activeChar)
- + {
- + if(Config.NEW_PLAYER_BUFFS)
- + {
- + if(activeChar.isMageClass())
- + {
- + for(Integer skillid : Config.NEWBIE_BUFF_MAGE.keySet())
- + {
- + int skilllvl = Config.NEWBIE_BUFF_MAGE.get(skillid);
- + L2Skill skill = SkillTable.getInstance().getInfo(skillid, skilllvl);
- + if(skill != null)
- + skill.getEffects(activeChar, activeChar);
- + }
- + }
- + else
- + {
- + for(Integer skillid : Config.NEWBIE_BUFF_FIGHTER.keySet())
- + {
- + int skilllvl = Config.NEWBIE_BUFF_FIGHTER.get(skillid);
- + L2Skill skill = SkillTable.getInstance().getInfo(skillid, skilllvl);
- if(skill != null)
- + skill.getEffects(activeChar, activeChar);
- + }
- + }
- + }
- + activeChar.setFirstLog(false);
- + activeChar.updateFirstLog();
- + }
- Index: config/skills.properties
- ===================================================================
- +# Give buffs to character on first game log in.
- +# Default: False
- +Newbie_Player_Buff = True
- +# The List of Fighter Buffs
- +# Format : skillid,skilllvl;skillid2,skilllvl2;....skillidn,skilllvln
- +Newlbie_Buff_Fighter = 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
- +Newlbie_Buff_Mage = 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement