Jump to content
  • 0
i am prod

[PI] How to put seperate PkP values for killing in Fun Pk and normal Wild? Need Help!

Question

=== I SOLVED THIS, CHECK POST #4 :D ===



Alright so I do have a Public Boolean for whether or not you're in Fun Pk, [code]inFunPk()[/code] and I was going to try it here in my PlayerAssistant [code] if (Server.playerHandler.players[c.playerId].connectedFrom != o.lastKilled && c.duelStatus == 0) {
o.pkPoints = (o.pkPoints + 3);
o.sendMessage("You received 3 PK Points");
o.sendMessage("You wiped the floor with " +Misc.optimizeText(c.playerName)+ "!");
o.lastKilled = Server.playerHandler.players[c.playerId].connectedFrom;
o.getPA().addSkillXP(150000, 23);
//c.getPA().addSkillXP(-4000, 23);
if (o.earningPotential >= 85) {
o.earningPotential -= 40 + Misc.random(50);
int random = (int)(Math.random() * (xEP.length - 1));
Server.itemHandler.createGroundItem(o, xEP[random][0], c.absX, c.absY,
xEP[random][1], o.playerId);
o.sendMessage("You received an EP drop, Congratulations!");
o.sendMessage("Your EP decreased to: "+c.earningPotential+" :(.");
}
} else {
//c.getPA().addSkillXP(-4000, 23);
o.sendMessage("You do not recieve PK Points because you have killed " +c.playerName+ " twice in a row, fight others!");
if (o.earningPotential >= 85) {
o.earningPotential -= 40 + Misc.random(50);
int random = (int)(Math.random() * (xEP.length - 1));
Server.itemHandler.createGroundItem(o, xEP[random][0], c.absX, c.absY,
xEP[random][1], c.playerId);
o.sendMessage("Your EP decreased to: "+c.earningPotential+" :(.");
}
}
}
}[/code] but I don't know how to make it give different Pkp's. I would like if you're in fun pk to only get 1 Pkp but if you're in the wild you get 5. Anyone help, please? Not too savvy with java so any help is appreciated :P Edited by i am prod

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
[code]o.pkPoints = (o.pkPoints + inFunPk() ? 1 : inWild() ? 5 : 0);[/code]

Share this post


Link to post
Share on other sites
  • 0
[MENTION=17381]Hash[/MENTION]
Idk if that will work or not I might try it later but I already fixed it hehe.
Here is the fragment that made it so you get 2 Pkp inside Fun Pk (Yes I know I said I wanted one before, but w.e) and 5 outside of Fun Pk when you kill someone.
[code] if (Server.playerHandler.players[c.playerId].connectedFrom != o.lastKilled && c.duelStatus == 0) {
if (c.inFunPk()) {
o.pkPoints = (o.pkPoints + 2);
o.sendMessage("You get 2 PK Point for killing someone in Fun Pk! But no Exp :(");
return;
}
o.pkPoints = (o.pkPoints + 5);
o.sendMessage("You received 5 PK Points for NOT being in Fun Pk!");
o.sendMessage("You wiped the floor with " +Misc.optimizeText(c.playerName)+ "!");
o.lastKilled = Server.playerHandler.players[c.playerId].connectedFrom;
o.getPA().addSkillXP(150000, 23);
//c.getPA().addSkillXP(-4000, 23);
if (o.earningPotential >= 85) {
o.earningPotential -= 40 + Misc.random(50);
int random = (int)(Math.random() * (xEP.length - 1));
Server.itemHandler.createGroundItem(o, xEP[random][0], c.absX, c.absY,
xEP[random][1], o.playerId);
o.sendMessage("You received an EP drop, Congratulations!");
o.sendMessage("Your EP decreased to: "+c.earningPotential+" :(.");
}
} else {
//c.getPA().addSkillXP(-4000, 23);
o.sendMessage("You do not recieve PK Points because you have killed " +c.playerName+ " twice in a row, fight others!");
if (o.earningPotential >= 85) {
o.earningPotential -= 40 + Misc.random(50);
int random = (int)(Math.random() * (xEP.length - 1));
Server.itemHandler.createGroundItem(o, xEP[random][0], c.absX, c.absY,
xEP[random][1], c.playerId);
o.sendMessage("Your EP decreased to: "+c.earningPotential+" :(.");[/code]

As you can see, this is what I added:
[code] if (c.inFunPk()) {
o.pkPoints = (o.pkPoints + 2);
o.sendMessage("You get 2 PK Point for killing someone in Fun Pk! But no Exp :(");
return;
}[/code]
and it seems to be working. If you spot something that could pose a problem...please tell me! And thank you very much hash for trying to help! :) Edited by i am prod

Share this post


Link to post
Share on other sites

×