Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +++++++++++++++++++++++++L2JFrozen/config/head/other.properties
- AllowVipMulXpSp = True
- VipMulXp = 2
- VipMulSp = 2
- + EnableVipSystem = True
- + # List of Vip Skills
- + # Format : skillid,skilllvl;skillid2,skilllvl2;....skillidn,skilllvln
- + VipSkills = 395,1
- +++++++++++++++++++++++++com/l2jfrozen/Config.java
- public static int VIP_XP;
- public static int VIP_SP;
- + public static boolean ENABLE_VIP_SYSTEM;
- + public static Map VIP_SKILLS;
- public static boolean ANNOUNCE_CASTLE_LORDS;
- VIP_XP = Integer.parseInt(otherSettings.getProperty("VipMulXp", "2"));
- VIP_SP = Integer.parseInt(otherSettings.getProperty("VipMulSp", "2"));
- + ENABLE_VIP_SYSTEM = Boolean.parseBoolean(otherSettings.getProperty("EnableVipSystem", "True"));
- ANNOUNCE_CASTLE_LORDS = Boolean.parseBoolean(otherSettings.getProperty("AnnounceCastleLords", "False"));
- System.out.println("[Aio System]: invalid config property in "+OTHER+" -> AioSkills \"" + skillSplit[0] + "\"" + skillSplit[1]);
- }
- }
- }
- }
- }
- + //if(ENABLE_VIP_SYSTEM) //create map if system is enabled
- + {
- + String[] VipSkillsSplit = otherSettings.getProperty("VipSkills", "").split(";");
- + VIP_SKILLS = new FastMap(VipSkillsSplit.length);
- + for (String skill : VipSkillsSplit)
- + {
- + String[] skillSplit = skill.split(",");
- + if (skillSplit.length != 2)
- + {
- + System.out.println("[Vip System]: invalid config property in other.properties -> VipSkills \"" + skill + "\"");
- + }
- + else
- + {
- + try
- + {
- + VIP_SKILLS.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (!skill.equals(""))
- + {
- + System.out.println("[Vip System]: invalid config property in other.properties -> VipSkills \"" + skillSplit[0] + "\"" + skillSplit[1]);
- + }
- + }
- + }
- + }
- + }
- STARTING_ADENA = Integer.parseInt(otherSettings.getProperty("StartingAdena", "100"));
- STARTING_AA = Integer.parseInt(otherSettings.getProperty("StartingAncientAdena", "0"));
- +++++++++++++++++++++++++com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminVip.java
- public void doVip(L2PcInstance activeChar, L2PcInstance _player, String _playername, String _time)
- + _player.rewardVipSkills();
- _player.broadcastUserInfo();
- _player.sendPacket(new EtcStatusUpdate(_player));
- + _player.sendSkillList();
- public void removeVip(L2PcInstance activeChar, L2PcInstance _player, String _playername)
- + _player.lostVipSkills();
- _player.broadcastUserInfo();
- _player.sendPacket(new EtcStatusUpdate(_player));
- + _player.sendSkillList();
- +++++++++++++++++++++++++com/l2jfrozen/gameserver/model/actors/instance/L2PcInstance.java
- public void setVip(boolean val)
- {
- _isVip = val;
- -
- +
- }
- -
- +
- + public void rewardVipSkills()
- + {
- + L2Skill skill;
- + for(Integer skillid : Config.VIP_SKILLS.keySet())
- + {
- + int skilllvl = Config.VIP_SKILLS.get(skillid);
- + skill = SkillTable.getInstance().getInfo(skillid,skilllvl);
- + if(skill != null)
- + {
- + addSkill(skill, true);
- + }
- + }
- + sendMessage("GM give to you Vip's skills");
- + }
- +
- + public void lostVipSkills()
- + {
- + L2Skill skill;
- + for(Integer skillid : Config.VIP_SKILLS.keySet())
- + {
- + int skilllvl = Config.VIP_SKILLS.get(skillid);
- + skill = SkillTable.getInstance().getInfo(skillid,skilllvl);
- + removeSkill(skill);
- + }
- + }
- +
- 0
- Back to top
- Quote
- MultiQuote
- Edit
- Report
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement