This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
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.
Question
panathinaikara
hey i have a java code problem and i cant fix it... it is a code for killing spree reward...
* Increase the pvp kills count and send the info to the player
*
*/
private int impro = 0;
public void increasePvpKills()
{
impro++;
switch(impro){
case 5:
ShowMessage case5 = new showMessage("You reached 5 killing spree!", 10000);
sendPacket(case5);
Announcements.getInstance().announceToAll("Player: " + getName() + " :reached 5 kill in a row!");
addItem("Loot", 57, 100, this, true);
break;
case 10:
showMessage case10 = new showMessage("You reached 10 killing spree!", 10000);
sendPacket(case10);
Announcements.getInstance().announceToAll("Player: " + getName() + " :reached 10 kill in a row!");
addItem("Loot", 57, 100, this, true);
break;
case 15:
ExShowScreenMessage case15 = new showMessage("You reached 15 killing spree!", 10000);
sendPacket(case15);
Announcements.getInstance().announceToAll("Player: " + getName() + " :reached 15 kill in a row!");
addItem("Loot", 57, 100, this, true);
break;
case 20:
showMessage case20 = new showMessage("You reached 20 killing spree!", 10000);
sendPacket(case20);
Announcements.getInstance().announceToAll("Player: " + getName() + " :reached 20 kill in a row!");
addItem("Loot", 57, 100, this, true);
break;
case 25:
showMessage case25 = new showMessage("You reached 25 killing spree!", 10000);
sendPacket(case25);
Announcements.getInstance().announceToAll("Player: " + getName() + " :reached 25 kill in a row!");
addItem("Loot", 57, 100, this, true);
break;
case 30:
showMessage case30 = new showMessage("You reached 30 killing spree!", 10000);
sendPacket(case30);
Announcements.getInstance().announceToAll("Player: " + getName() + " :reached 30 kill in a row!");
addItem("Loot", 57, 100, this, true);
break;
default:
;
}
if ((TvT._started && _inEventTvT) || (DM._started && _inEventDM) || (VIP._started && _inEventVIP) || (CTF._started && _inEventCTF))
return;
// temp fix here
if (isMounted())
dismount();
impro = 0;
if (isTransformed() && !isCursedWeaponEquipped())
{
if (target instanceof L2PcInstance
&& AntiFeedManager.getInstance().check(this, target))
// Add karma to attacker and increase its PK counter
setPvpKills(getPvpKills() + 1);
// Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
sendPacket(new UserInfo(this));
sendPacket(new ExBrExtraUserInfo(this));
there are some problems and i cant add the code in my server because i cant fix them... can any1 help me? thanks...
7 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now