Code:
package server.model.players;
import server.model.players.*;
import server.Server;
import server.util.Misc;
public class PvpCombat {
private Client c;
public PvpCombat(Client Client) {
this.c = Client;
}
public void HighAndLow() {
if (c.combatLevel < 15) {
int Low = 3;
int High = c.combatLevel + 12;
c.getPA().sendFrame126("@yel@"+Low+"@yel@ - @yel@"+High+"", 199);
}
if (c.combatLevel > 15 && c.combatLevel < 114) {
int Low = c.combatLevel - 12;
int High = c.combatLevel + 12;
c.getPA().sendFrame126("@yel@"+Low+"@yel@ - @yel@"+High+"", 199);
}
if (c.combatLevel > 114) {
int Low = c.combatLevel - 12;
int High = 126;
c.getPA().sendFrame126("@yel@"+Low+"@yel@ - @yel@"+High+"", 199);
}
}
/**
Potential Drops
**/
private static int[][] randomDrops = {{13879,12},{13879,12},{13883,12},{4675,1},{1340,1},{13879,12},{13883,12},{1725,1},{1729,1},{1351,1},{1319,1},{1333,1},{1359,1},{1731,1},{391,2},{1351,1},{1319,1},{1333,1},{1359,1},{4091,1},{4093,1},{4095,1},{4097,1},{4101,1},{4103,1},{1340,1},{1725,1},{1729,1},{1731,1},{4105,1},{13858,1},{4107,1},{4111,1},{4113,1},{4115,1},{4117,1},{4131,1},{1079,1},{1093,1},{1127,1},{1163,1},{1201,1},{4587,1},{1149,1},{13883,12},{1079,1},{13879,12},{13883,12},{1351,1},{1319,1},{13879,12},{13883,12},{1333,1},{1359,1},{1704,1},{157,3},{145,2},{175,4},{1379,1},{1381,1},{1393,1},{861,1},{6731,1},{6733,1},{4712,1},{1340,1},{1725,1},{1729,1},{1731,1},{4714,1},{4716,1},{4718,1},{4720,1},{4722,1},{4736,1},{4738,1},{4749,1},{4751,1},{1127,1},{391,2},{1093,1},{4087,1},{4585,1},{3140,1},{6737,1},{6731,1},{6733,1},{4712,1},{4714,1},{4716,1},{4718,1},{4720,1},{4722,1},{4736,1},{4738,1},{4749,1},{4751,1},{11732,1},
{11235,1},{11335,1},{391,2},{11212,40},{4151,1},{1351,1},{1319,1},{1333,1},{1359,1},{6585,1},{1187,1},{13861,1},{1379,1},{1381,1},{1393,1},{861,1},{4675,1}};
private static int[][] lowEP = {{13879,12},{13883,12},{4675,1},{1340,1},{13879,12},{13883,12},{1725,1},{1729,1},{1351,1},{1319,1},{1333,1},{1359,1},{1731,1},{391,2},{1351,1},{1319,1},{1333,1},{1359,1},{4091,1},{4093,1},{4095,1},{4097,1},{4101,1},{4103,1},{1340,1},{1725,1},{1729,1},{1731,1},{4105,1},{13858,1},{4107,1},{4111,1},{4113,1},{4115,1},{4117,1},{4131,1},{1079,1},{1093,1},{1127,1},{1163,1},{1201,1},{4587,1},{1149,1}};
private static int[][] medEP = {{13879,12},{13879,12},{13883,12},{4675,1},{1340,1},{13879,12},{13883,12},{1725,1},{1729,1},{1351,1},{1319,1},{1333,1},{1359,1},{1731,1},{391,2},{1351,1},{1319,1},{1333,1},{1359,1},{4091,1},{4093,1},{4095,1},{4097,1},{4101,1},{4103,1},{1340,1},{1725,1},{1729,1},{1731,1},{4105,1},{13858,1},{4107,1},{4111,1},{4113,1},{4115,1},{4117,1},{4131,1},{1079,1},{1093,1},{1127,1},{1163,1},{1201,1},{4587,1},{1149,1},{13883,12},{1187,1},{13879,12},{13883,12},{1704,1},{13879,12},{13883,12},{157,3},{145,2},{175,4},{13879,12},{13883,12},{1704,1},{157,3},{145,2},{175,4},{6731,1},{6733,1},{13879,12},{13883,12},{4712,1},{4714,1},{4716,1},{4718,1},{4720,1},{4722,1},{4736,1},{4738,1},{4749,1},{4751,1},{1305,1},{391,2},{1377,1},{1540,1},{1434,1},{1702,1},{5698,1},{3204,1},{6528,1},{10384,1},{10386,1},{10388,1},{10390,1}};
private static int[][] highEP = {{13879,12},{13883,12},{868,50},{13879,12},{13883,12},{1704,1},{157,3},{145,2},{175,4},{995,14700},{995,22500},{4151,1},{6585,1},{6731,1},{6733,1},{4712,1},{4714,1},{4716,1},{4718,1},{4720,1},{4722,1},{4736,1},{4738,1},{4749,1},{4751,1},{391,2},{4714,1},{4712,1},{13890,1},{4716,1},{4718,1},{4720,1},{4722,1},{4675,1},{4091,1},{4093,1},
{4095,1},{13879,12},{13883,12},{4097,1},{13879,12},{13883,12},{4675,1},{1340,1},{13879,12},{13883,12},{1725,1},{1729,1},{1351,1},{1319,1},{1333,1},{1359,1},{1731,1},{391,2},{1351,1},{1319,1},{1333,1},{1359,1},{4091,1},{4093,1},{4095,1},{4097,1},{4101,1},{4103,1},{1340,1},{1725,1},{1729,1},{1731,1},{4105,1},{13858,1},{4107,1},{4111,1},{4113,1},{4115,1},{4117,1},{4131,1},{1079,1},{1093,1},{1127,1},{1163,1},{1201,1},{4587,1},{1149,1},{13879,12},{13883,12},{4101,1},{13879,12},{13883,12},{4103,1},{868,50},{13879,12},{13883,12},{1351,1},{1319,1},{1333,1},{1359,1},{995,14700},{995,22500},{1351,1},{1319,1},{1333,1},{1359,1},{4105,1},{4107,1},{4111,1},{13879,12},{13883,12},{4113,1},{4115,1},{4117,1},{4131,1},{1079,1},{1340,1},{1725,1},{1729,1},{1731,1},{1093,1},{1127,1},{1163,1},{1201,1},
{4587,1},{1149,1},{4724,1},{13879,12},{13883,12},{4726,1},{4728,1},{4730,1},{13879,12},{13883,12},{4732,1},{4734,1},{13879,12},{13883,12},{391,2},{4736,1},{4738,1},{4745,1},{1351,1},{1340,1},{13879,12},{13883,12},{1725,1},{1729,1},{1731,1},{1319,1},{1333,1},{13879,12},{13883,12},{1359,1},{4712,1},{4714,1},{4740,1},{4741,1},{4743,1},{4745,1}};
private static int[][] mHighEP = {{13879,12},{13879,12},{13883,12},{4675,1},{1340,1},{13879,12},{13883,12},{1725,1},{1729,1},{1351,1},{1319,1},{1333,1},{1359,1},{1731,1},{391,2},{1351,1},{1319,1},{1333,1},{1359,1},{4091,1},{4093,1},{4095,1},{4097,1},{4101,1},{4103,1},{1340,1},{1725,1},{1729,1},{1731,1},{4105,1},{13858,1},{4107,1},{4111,1},{4113,1},{4115,1},{4117,1},{4131,1},{1079,1},{1093,1},{1127,1},{1163,1},{1201,1},{4587,1},{1149,1},{13883,12},{3140,1},{13879,12},{13883,12},{1704,1},{157,3},{145,2},{175,4},{391,2},{4585,1},{4087,1},{13902,1},{4151,1},{6585,1},{1187,1},{1305,1},{1377,1},{13879,12},{13883,12},{1540,1},{1434,1},{1702,1},{5698,1},{3204,1},{6528,1},{10384,1},{10386,1},{10388,1},{10390,1},
{4714,1},{13879,12},{13883,12},{4712,1},{13879,12},{13883,12},{4716,1},{4718,1},{4720,1},{13879,12},{13883,12},{1351,1},{1319,1},{1333,1},{1359,1},{1340,1},{1379,1},{1381,1},{1393,1},{13879,12},{13883,12},{861,1},{1725,1},{1729,1},{1731,1},{6731,1},{1351,1},{1319,1},{1333,1},{1359,1},{6733,1},{4712,1},{4714,1},{4716,1},{4718,1},{4720,1},{4722,1},{4736,1},{4738,1},{4749,1},{4751,1},{4722,1},{4724,1},{13899,1},{4726,1},{4728,1},{6731,1},{6733,1},{4712,1},{4714,1},{4716,1},{4718,1},{4720,1},{4722,1},{4736,1},{4738,1},{4749,1},{4751,1},{4730,1},{4732,1},{391,2},{4734,1},
{4736,1},{13879,12},{13883,12},{4738,1},{13879,12},{13883,12},{4745,1},{13879,12},{13883,12},{4712,1},{4714,1},{13879,12},{13883,12},{4740,1},{1351,1},{1319,1},{1333,1},{1359,1},{391,2},{4741,1},{995,5815},{995,300000},{1085,1},{1089,1},{1351,1},{4743,1},{4745,1}};
private static int[][] xEP = {{13879,12},{13883,12},{868,50},{13879,12},{13883,12},{1099,1},{1165,1},{1351,1},{1319,1},{1333,1},{1359,1},{1149,1},{1185,1},{1704,1},{157,3},{145,2},{175,4},{995,14700},{995,22500},{391,2},{6731,1},{6733,1},{4712,1},{4714,1},{4716,1},{4718,1},{4720,1},{4722,1},{4736,1},{4738,1},{4749,1},{4751,1},{391,2},{4675,1},{4091,1},{4093,1},{4095,1},{4097,1},{4101,1},{4103,1},{4105,1},{391,2},{13873,1},{13879,12},{13883,12},{4107,1},{4111,1},{4113,1},{4115,1},{4117,1},{4131,1},{1079,1},{1093,1},{1127,1},
{1163,1},{1201,1},{4587,1},{1340,1},{1725,1},{13879,12},{13883,12},{1729,1},{1731,1},{1149,1},{391,2},{1351,1},{1319,1},{1333,1},{1359,1},{13905,1},{391,2},{995,5815},{995,300000},{1085,1},{1089,1},{1351,1},{391,2},{1079,1},{13879,12},{13883,12},{391,2},{13858,1},{391,2},{13861,1},{391,2},{13864,1},{6731,1},{6733,1},{4712,1},{4714,1},{4716,1},{4718,1},{4720,1},{4722,1},{4736,1},{4738,1},{4749,1},{4751,1},{13879,12},{13883,12},{391,2},{13876,1},{391,2},{13870,1},{13879,12},{13883,12},{1127,1},{1093,1},{4087,1},{4585,1},{3140,1},{6737,1},{6731,1},{6733,1},{4712,1},{4714,1},{4716,1},{4718,1},
{4720,1},{4722,1},{4736,1},{13879,12},{13883,12},{13879,12},{13883,12},{391,2},{13879,12},{13883,12},{13879,12},{13883,12},{391,2},{13879,12},{13883,12},{4738,1},{13879,12},{13883,12},{1704,1},{157,3},{1379,1},{1381,1},{1393,1},{861,1},{145,2},{13879,12},{13883,12},{175,4},{13879,12},{13883,12},{4749,1},{4751,1},{13879,12},{13883,12},{11732,1},
{391,2},{1340,1},{1725,1},{1729,1},{13879,12},{13883,12},{13879,12},{13883,12},{1731,1},{13879,12},{13883,12},{11235,1},{1079,1},{1127,1},{1099,1},{1165,1},{1149,1},{1351,1},{1319,1},{1333,1},{1359,1},{1379,1},{1381,1},{13879,12},{13883,12},{13879,12},{13883,12},{1393,1},{861,1},{1185,1},{391,2},{1093,1},{4087,1},{4585,1},{3140,1},{995,5815},{995,300000},{1085,1},{1089,1},{1340,1},{1725,1},{1729,1},{1731,1},{1351,1},{13879,12},{13883,12},{4675,1},{1340,1},{13879,12},{13883,12},{1725,1},{1729,1},{1351,1},{1319,1},{1333,1},{1359,1},{1731,1},{391,2},{1351,1},{1319,1},{1333,1},{1359,1},{4091,1},{4093,1},{4095,1},{4097,1},{4101,1},{4103,1},{1340,1},{1725,1},{1729,1},{1731,1},{4105,1},{13858,1},{4107,1},{4111,1},{4113,1},{4115,1},{4117,1},{4131,1},{1079,1},{1093,1},{1127,1},{1163,1},{1201,1},{4587,1},{1149,1},{6737,1},{6731,1},{11335,1},{11212,40},{4151,1},{6585,1},{1187,1},{4675,1},{13879,12},{13883,12},{13879,12},{13883,12},{1351,1},{1319,1},{1333,1},{1359,1},{13899,1},{13893,1},
{13887,1},{13890,1},{391,2},{1099,1},{1165,1},{13879,12},{13883,12},{13879,12},{13883,12},{1149,1},{1185,1},{13890,1},{391,2},{13896,1},{391,2},{13902,1},{995,5815},{1351,1},{1319,1},{1333,1},{1359,1},{995,300000},{1085,1},{1089,1},{1351,1}};
public static void checkPotential(Client c) {
if (c.isInPvP()) {
if (++c.epDelay == 750) {
if(c.getItems().getCarriedWealth() > 300000 || c.getPA().getWearingAmount2() > 200000) {
c.earningPotential += 13 + Misc.random(12);
if (c.earningPotential > 100)
c.earningPotential = 100;
c.sendMessage("Your EP increases to: " + c.earningPotential + ".");
} else {
c.sendMessage("You must risk more than 300K to increase your EP!");
}
c.epDelay = 0;
}
}
}
public static void checkTeleport(Client c) {
if (c.isInPvP())
if (c.underAttackBy > 0) {
c.earningPotential -= 10 + Misc.random(5);
c.sendMessage("You now have "+c.earningPotential+" EP since you teleported in combat!");
if (c.earningPotential < 0)
c.earningPotential = 0;
}
}
public static void giveBonusDrops(Client c, Client c2) {
Client o = (Client) Server.playerHandler.players[c.killerId];
Client pl = (Client) Server.playerHandler.players[c.killerId];
if (c.isInPvP() && c2.isInPvP()) {
if(c2.getItems().getCarriedWealth() > 300000 || c2.getPA().getWearingAmount2() > 200000) {
if (c.earningPotential >= 0 && c.earningPotential <= 9) {
c.earningPotential -= 0 + Misc.random(7);
if (c.earningPotential < 0)
c.earningPotential = 0;
int random = (int)(Math.random() * (lowEP.length - 1));
Server.itemHandler.createGroundItem(c, lowEP[random][0], c2.absX, c2.absY,
lowEP[random][1], c.playerId);
c.sendMessage("Your EP decreased to: "+c.earningPotential+".");
}
if (c.earningPotential >= 10 && c.earningPotential <= 24) {
c.earningPotential -= 10 + Misc.random(15);
if (c.earningPotential < 0)
c.earningPotential = 0;
int random = (int)(Math.random() * (medEP.length - 1));
Server.itemHandler.createGroundItem(c, medEP[random][0], c2.absX, c2.absY,
medEP[random][1], c.playerId);
c.sendMessage("Your EP decreased to: "+c.earningPotential+".");
}
if (c.earningPotential >= 25 && c.earningPotential <= 49) {
c.earningPotential -= 20 + Misc.random(15);
if (c.earningPotential < 0)
c.earningPotential = 0;
int random = (int)(Math.random() * (highEP.length - 1));
Server.itemHandler.createGroundItem(c, highEP[random][0], c2.absX, c2.absY,
highEP[random][1], c.playerId);
c.sendMessage("Your EP decreased to: "+c.earningPotential+".");
}
if (c.earningPotential >= 50 && c.earningPotential <= 89) {
c.earningPotential -= 30 + Misc.random(25);
if (c.earningPotential < 0)
c.earningPotential = 0;
int random = (int)(Math.random() * (mHighEP.length - 1));
Server.itemHandler.createGroundItem(c, mHighEP[random][0], c2.absX, c2.absY,
mHighEP[random][1], c.playerId);
c.sendMessage("Your EP decreased to: "+c.earningPotential+".");
}
if (c.earningPotential >= 85) {
c.earningPotential -= 40 + Misc.random(50);
int random = (int)(Math.random() * (xEP.length - 1));
Server.itemHandler.createGroundItem(c, xEP[random][0], c2.absX, c2.absY,
xEP[random][1], c.playerId);
c.sendMessage("Your EP decreased to: "+c.earningPotential+".");
}
}
}
}
}
to server.model.players folder. client.java replace the walkableInterface for inWild with