Basically yup, I'd go with switch, but well.. You have your own way and that's cool :)
I tested you code, and guess what.. It's working fine. Dunno how you tested, but it's working only for the pvp case, not pk :P
So, if it's not working for you, you facked the placement of the code.
### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 327)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -4012,6 +4012,9 @@
if (isMounted())
stopFeed();
+ comboDie(killer);
+ removeSkill(264);
+
synchronized (this)
{
if (isFakeDeath())
@@ -4226,6 +4229,9 @@
// Add PvP point to attacker.
setPvpKills(getPvpKills() + 1);
+ // killing spree
+ checkCombo();
+
// Send UserInfo packet to attacker with its Karma and PK Counter
sendPacket(new UserInfo(this));
}
@@ -4245,6 +4251,56 @@
}
}
+ /** Fallen system */
+ private int combo = 0;
+
+ private void checkCombo()
+ {
+ int i = 0;
+ combo++;
+ int combos = 0;
+
+ if(combo == 1)
+ {
+ i = 1;
+ addSkill(SkillTable.getInstance().getInfo(264, 1), false);
+ combos = 1;
+ }
+ else if(combo == 2)
+ {
+ i = 2;
+ addSkill(SkillTable.getInstance().getInfo(264, 110), false);
+ combos = 2;
+ }
+ else if(combo == 3)
+ {
+ i = 3;
+ addSkill(SkillTable.getInstance().getInfo(264, 120), false);
+ combos = 3;
+ }
+
+ if(i > 0)
+ {
+ sendMessage("You have been rewarded with a skill.");
+ Broadcast.announceToOnlinePlayers("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 > 1)
+ Broadcast.announceToOnlinePlayers("Player "+getName() +" has lost his combo of "+combo +" kills by "+killer.getName());
+
+ combo = 0;
+ }
+
public void updatePvPStatus()
{
if (isInsideZone(ZoneId.PVP))