Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P L2jFrozen_GS
- Index: config/functions/l2jfrozen.properties
- ===================================================================
- --- config/functions/l2jfrozen.properties (revision 948)
- +++ config/functions/l2jfrozen.properties (working copy)
- @@ -280,4 +280,22 @@
- ProtectorSkillLevel = 13
- ProtectorSkillTime = 600
- # Npc Protector Message
- -ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
- \ No newline at end of file
- +ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
- +
- +# -----------------------------------------
- +# Combo System - by Crystalia
- +# -----------------------------------------
- +# True = Enable, False = Disable
- +AllowCombo = False
- +# ID of your skill.
- +ComboSkillId = 7029
- +# Level of your skill.
- +Combo1Level = 1
- +Combo2Level = 2
- +Combo3Level = 4
- +Combo4Level = 5
- +# Amount of kills for combo.
- +Combo1Kills = 5
- +Combo2Kills = 10
- +Combo3Kills = 15
- +Combo4Kills = 25
- \ No newline at end of file
- ### Eclipse Workspace Patch 1.0
- #P L2jFrozen_GS
- Index: head-src/com/l2jfrozen/Config.java
- ===================================================================
- --- head-src/com/l2jfrozen/Config.java (revision 948)
- +++ head-src/com/l2jfrozen/Config.java (working copy)
- @@ -2378,6 +2378,17 @@
- public static String FARM2_CUSTOM_MESSAGE;
- public static String PVP1_CUSTOM_MESSAGE;
- public static String PVP2_CUSTOM_MESSAGE;
- +
- + public static boolean ALLOW_COMBO;
- + public static int COMBO_SKILL_ID;
- + public static int COMBO1_LEVEL;
- + public static int COMBO2_LEVEL;
- + public static int COMBO3_LEVEL;
- + public static int COMBO4_LEVEL;
- + public static int COMBO1_KILLS;
- + public static int COMBO2_KILLS;
- + public static int COMBO3_KILLS;
- + public static int COMBO4_KILLS;
- //============================================================
- public static void loadL2JFrozenConfig()
- @@ -2497,6 +2508,17 @@
- FARM2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm2CustomMeesage", "You have been teleported to Farm Zone 2!");
- PVP1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP1CustomMeesage", "You have been teleported to PvP Zone 1!");
- PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!");
- +
- + ALLOW_COMBO = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowCombo" , "False"));
- + COMBO_SKILL_ID = Integer.parseInt(L2JFrozenSettings.getProperty("ComboSkillId","7029"));
- + COMBO1_LEVEL = Integer.parseInt(L2JFrozenSettings.getProperty("Combo1Level" , "1"));
- + COMBO2_LEVEL = Integer.parseInt(L2JFrozenSettings.getProperty("Combo2Level" , "1"));
- + COMBO3_LEVEL = Integer.parseInt(L2JFrozenSettings.getProperty("Combo3Level" , "1"));
- + COMBO4_LEVEL = Integer.parseInt(L2JFrozenSettings.getProperty("Combo4Level" , "1"));
- + COMBO1_KILLS = Integer.parseInt(L2JFrozenSettings.getProperty("Combo1Kills" , "5"));
- + COMBO2_KILLS = Integer.parseInt(L2JFrozenSettings.getProperty("Combo2Kills" , "10"));
- + COMBO3_KILLS = Integer.parseInt(L2JFrozenSettings.getProperty("Combo3Kills" , "15"));
- + COMBO4_KILLS = Integer.parseInt(L2JFrozenSettings.getProperty("Combo4Kills" , "25"));
- }
- catch(Exception e)
- {
- ### Eclipse Workspace Patch 1.0
- #P L2jFrozen_GS
- Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 948)
- +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- @@ -861,6 +861,8 @@
- public boolean _inEventCTF = false,
- _haveFlagCTF = false;
- + private int combo = 0;
- +
- /** The _pos checker ctf. */
- public Future<?> _posCheckerCTF = null;
- @@ -1470,6 +1472,8 @@
- /** Quake System. */
- private int quakeSystem = 0;
- +
- +
- /** The _is locked. */
- private boolean _isLocked = false;
- @@ -7524,6 +7528,8 @@
- stopRentPet();
- stopWaterTask();
- quakeSystem = 0;
- + comboDie(killer);
- + removeSkill(Config.COMBO_SKILL_ID);
- //leave war legend aura if enabled
- heroConsecutiveKillCount=0;
- @@ -7990,6 +7996,9 @@
- // Add karma to attacker and increase its PK counter
- setPvpKills(getPvpKills() + 1);
- +
- + if(Config.ALLOW_COMBO)
- + checkCombo();
- // Increase the kill count for a special hero aura
- heroConsecutiveKillCount++;
- @@ -8028,6 +8037,56 @@
- // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
- sendPacket(new UserInfo(this));
- }
- +
- + private void checkCombo()
- + {
- + int i = 0;
- + combo++;
- + int combos = 0;
- +
- + if(combo == Config.COMBO1_KILLS)
- + {
- + i = 1;
- + addSkill(SkillTable.getInstance().getInfo(Config.COMBO_SKILL_ID, Config.COMBO1_LEVEL), false);
- + combos = Config.COMBO1_KILLS;
- + }
- + else if(combo == Config.COMBO2_KILLS)
- + {
- + i = 2;
- + addSkill(SkillTable.getInstance().getInfo(Config.COMBO_SKILL_ID, Config.COMBO2_LEVEL), false);
- + combos = Config.COMBO2_KILLS;
- + }
- + else if(combo == Config.COMBO3_KILLS)
- + {
- + i = 3;
- + addSkill(SkillTable.getInstance().getInfo(Config.COMBO_SKILL_ID, Config.COMBO3_LEVEL), false);
- + combos = Config.COMBO3_KILLS;
- + }
- + else if(combo == Config.COMBO4_KILLS)
- + {
- + i = 4;
- + addSkill(SkillTable.getInstance().getInfo(Config.COMBO_SKILL_ID, Config.COMBO4_LEVEL), false);
- + combos = Config.COMBO4_KILLS;
- + }
- +
- + if(i > 0)
- + {
- + sendMessage("You have been rewarded with a skill.");
- + Announcements.getInstance().announceToAll("Player "+getName() + " is in a Combo Mode with " +combos +" pvp kills in a row!");
- + }
- +
- + i = 0;
- + combos = 0;
- + }
- +
- + private void comboDie(L2Character killer)
- + {
- + if(combo > Config.COMBO1_KILLS)
- + {
- + Announcements.getInstance().announceToAll("Player "+getName() +" has lost his combo of "+combo +" kills by "+killer.getName());
- + }
- + combo = 0;
- + }
- /**
- * Quake system.
Advertisement
Add Comment
Please, Sign In to add comment