Code:
package server.model.players;
import server.Server;
import server.util.Misc;
public class EarningPotential {
private static int[][] randomDrops = {{14876,1},{14877,1},{14878,1},{14878,1},{14879,1},{14880,1},{14881,1},{14882,1},{14883,1},{14884,1},{14885,1},{14886,1},{14887,1},{14888,1},{14889,1},{14890,1},{14891,1},{14892,1},{14892,1},{14887,1},{15015,12},{15015,12},{15016,12},{14891,1},{4675,1},{1340,1},{15015,12},{15016,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},{14886,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},{15016,12},{1079,1},{15015,12},{15016,12},{1351,1},{1319,1},{15015,12},{15016,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},{14889,1},{391,2},{14882,1},{14881,1},{14878,1},{14883,1},{14890,1},{11212,40},{4151,1},{14892,1},{1351,1},{1319,1},{14885,1},{1333,1},{1359,1},{6585,1},{1187,1},{15009,1},{1379,1},{1381,1},{1393,1},{861,1},{4675,1}};
private static int[][] lowEP = {{14889,1},{14883,1},{14881,1},{14881,1},{14878,1},{14878,1},{14881,1},{14882,1},{14882,1},{14882,1},{14886,1},{15015,12},{14887,1},{15016,12},{14892,1},{4675,1},{14891,1},{1340,1},{15015,12},{15016,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},{14886,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 = {{14889,1},{14885,1},{14879,1},{14879,1},{15015,12},{14886,1},{14891,1},{14892,1},{14885,1},{15015,12},{14886,1},{15016,12},{4675,1},{14888,1},{1340,1},{15015,12},{15016,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},{14886,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},{15016,12},{1187,1},{14881,1},{15015,12},{15016,12},{1704,1},{15015,12},{15016,12},{157,3},{145,2},{175,4},{15015,12},{15016,12},{1704,1},{157,3},{145,2},{175,4},{6731,1},{6733,1},{15015,12},{15016,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 = {{14889,1},{14880,1},{14877,1},{14877,1},{14880,1},{14884,1},{14880,1},{14887,1},{14879,1},{14889,1},{14884,1},{14889,1},{14883,1},{14885,1},{15015,12},{14887,1},{14891,1},{15016,12},{14890,1},{868,50},{14890,1},{15015,12},{15016,12},{1704,1},{14892,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},{15017,1},{4716,1},{4718,1},{4720,1},{4722,1},{4675,1},{4091,1},{4093,1},
{4095,1},{15015,12},{14891,1},{14888,1},{15016,12},{14881,1},{14876,1},{14881,1},{14883,1},{4097,1},{14881,1},{14885,1},{15015,12},{15016,12},{14884,1},{4675,1},{1340,1},{15015,12},{14890,1},{15016,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},{14886,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},{15015,12},{14881,1},{14881,1},{15016,12},{4101,1},{15015,12},{15016,12},{4103,1},{868,50},{15015,12},{15016,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},{15015,12},{15016,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},{14883,1},{15015,12},{14888,1},{14882,1},{15016,12},{14882,1},{14887,1},{4726,1},{4728,1},{14884,1},{4730,1},{15015,12},{15016,12},{4732,1},{4734,1},{15015,12},{15016,12},{391,2},{4736,1},{4738,1},{4745,1},{1351,1},{1340,1},{15015,12},{15016,12},{1725,1},{1729,1},{1731,1},{14886,1},{1319,1},{1333,1},{15015,12},{15016,12},{1359,1},{4712,1},{4714,1},{4740,1},{4741,1},{4743,1},{4745,1}};
private static int[][] mHighEP = {{15015,12},{14886,1},{14890,1},{14881,1},{14878,1},{14881,1},{14892,1},{14888,1},{14884,1},{15015,12},{15016,12},{4675,1},{1340,1},{15015,12},{15016,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},{14886,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},{15016,12},{3140,1},{15015,12},{15016,12},{1704,1},{157,3},{145,2},{175,4},{391,2},{4585,1},{4087,1},{15020,1},{4151,1},{6585,1},{1187,1},{1305,1},{1377,1},{15015,12},{15016,12},{1540,1},{1434,1},{1702,1},{5698,1},{3204,1},{6528,1},{10384,1},{10386,1},{10388,1},{10390,1},
{4714,1},{14882,1},{14879,1},{14891,1},{14888,1},{15015,12},{14886,1},{14887,1},{14876,1},{14891,1},{15016,12},{14887,1},{4712,1},{14881,1},{15015,12},{14890,1},{15016,12},{4716,1},{4718,1},{4720,1},{15015,12},{15016,12},{1351,1},{1319,1},{1333,1},{1359,1},{1340,1},{1379,1},{1381,1},{1393,1},{15015,12},{15016,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},{15006,1},{4726,1},{4728,1},{6731,1},{6733,1},{4712,1},{4714,1},{4716,1},{4718,1},{4720,1},{4722,1},{4736,1},{14879,1},{14879,1},{4738,1},{4749,1},{4751,1},{4730,1},{4732,1},{391,2},{4734,1},
{4736,1},{14878,1},{15015,12},{14879,1},{14882,1},{14885,1},{14879,1},{14883,1},{14885,1},{14885,1},{14883,1},{14888,1},{14887,1},{15016,12},{14886,1},{14887,1},{14889,1},{14888,1},{4738,1},{15015,12},{15016,12},{4745,1},{15015,12},{15016,12},{4712,1},{4714,1},{15015,12},{15016,12},{14886,1},{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 = {{15015,12},{14883,1},{14880,1},{14880,1},{14878,1},{14878,1},{14880,1},{14882,1},{15016,12},{868,50},{14885,1},{14890,1},{14886,1},{14888,1},{15015,12},{15016,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},{14886,1},{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},{15013,1},{15015,12},{15016,12},{4107,1},{4111,1},{4113,1},{4115,1},{4117,1},{4131,1},{1079,1},{1093,1},{1127,1},
{1163,1},{1201,1},{14889,1},{14880,1},{14886,1},{14885,1},{14891,1},{14877,1},{14882,1},{14892,1},{14876,1},{4587,1},{14891,1},{14884,1},{1340,1},{1725,1},{15015,12},{15016,12},{1729,1},{1731,1},{1149,1},{391,2},{1351,1},{1319,1},{1333,1},{1359,1},{15007,1},{391,2},{995,5815},{995,300000},{1085,1},{1089,1},{1351,1},{391,2},{1079,1},{15015,12},{15016,12},{391,2},{14886,1},{391,2},{15009,1},{391,2},{14877,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},{15015,12},{15016,12},{391,2},{14876,1},{391,2},{14881,1},{15012,1},{15015,12},{15016,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},{14878,1},{14879,1},{14890,1},{14876,1},{4722,1},{4736,1},{14887,1},{14892,1},{14877,1},{15015,12},{14879,1},{15016,12},{15015,12},{15016,12},{391,2},{15015,12},{15016,12},{15015,12},{15016,12},{391,2},{15015,12},{15016,12},{4738,1},{15015,12},{15016,12},{1704,1},{157,3},{1379,1},{1381,1},{1393,1},{861,1},{145,2},{15015,12},{15016,12},{175,4},{15015,12},{15016,12},{4749,1},{4751,1},{15015,12},{15016,12},{11732,1},
{391,2},{1340,1},{1725,1},{14877,1},{1729,1},{14880,1},{14877,1},{14892,1},{15015,12},{15016,12},{14892,1},{14886,1},{15015,12},{14881,1},{15016,12},{14887,1},{14889,1},{1731,1},{15015,12},{15016,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},{15015,12},{15016,12},{15015,12},{15016,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},{15015,12},{15016,12},{4675,1},{1340,1},{15015,12},{15016,12},{1725,1},{1729,1},{1351,1},{1319,1},{1333,1},{1359,1},{1731,1},{391,2},{1351,1},{14879,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},{14886,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},{15015,12},{15016,12},{15015,12},{15016,12},{1351,1},{1319,1},{1333,1},{1359,1},
{15018,1},{391,2},{1099,1},{14890,1},{14882,1},{14881,1},{14880,1},{14881,1},{14888,1},{14876,1},{14878,1},{14878,1},{14879,1},{14890,1},{14889,1},{14890,1},{1165,1},{15015,12},{14883,1},{14885,1},{15016,12},{15015,12},{15016,12},{1149,1},{1185,1},{15017,1},{391,2},{14876,1},{391,2},{15020,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.inWild()) {
if (++c.epDelay == 50) {
if (!c.inFunPk()) {
if(c.getItems().getCarriedWealth() > 5000000 || 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 5 mil to increase your EP!");
}
}
c.epDelay = 0;
}
}
}
public static void checkTeleport(Client c) {
if (c.inWild())
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.inWild() && c2.inWild()) {
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+".");
}
}
}
}
}