Thread: can someone help me with my EP system?

Results 1 to 2 of 2
  1. #1 can someone help me with my EP system? 
    Proud User
    Join Date
    Feb 2011
    Posts
    532
    Thanks given
    69
    Thanks received
    28
    Rep Power
    29
    Okay the source is RuneLive and here is the ep system:

    package server.model.players;

    import server.Server;
    import server.util.Misc;

    public class EarningPotential {

    private static int[][] randomDrops = {{15015,12},{15015,12},{14887,1},{14888,1},{14889, 1},{14890,1},{14891,1},{14880,1},{14881,1},{14882, 1},{14883,1},{14876,1},{14877,1},{14878,1},{14879, 1},{14884,1},{14885,1},{14886,1},{14892,1},{15016, 12},{4675,1},{1340,1},{15015,12},{15016,12},{1725, 1},{1729,1},{1351,1},{1319,1},{1333,1},{1359,1},{1 731,1},{391,2},{1351,1},{1319,1},{1333,1},{1359,1} ,{4091,1},{4093,1},{4095,1},{4097,1},{4101,1},{410 3,1},{1340,1},{1725,1},{1729,1},{1731,1},{4105,1}, {15008,1},{4107,1},{4111,1},{4113,1},{4115,1},{411 7,1},{4131,1},{1079,1},{1093,1},{1127,1},{1163,1}, {1201,1},{4587,1},{1149,1},{15016,12},{1079,1},{15 015,12},{15016,12},{1351,1},{1319,1},{15015,12},{1 5016,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},{3 91,2},{1093,1},{4087,1},{4585,1},{3140,1},{6737,1} ,{6731,1},{6733,1},{4712,1},{4714,1},{4716,1},{471 8,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},{1 351,1},{1319,1},{1333,1},{1359,1},{6585,1},{1187,1 },{15009,1},{1379,1},{1381,1},{1393,1},{861,1},{46 75,1}};
    private static int[][] lowEP = {{15015,12},{14887,1},{14888,1},{14889,1},{14890,1 },{14891,1},{14892,1},{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},{4 095,1},{4097,1},{4101,1},{4103,1},{1340,1},{1725,1 },{1729,1},{1731,1},{4105,1},{15008,1},{4107,1},{4 111,1},{4113,1},{4115,1},{4117,1},{4131,1},{1079,1 },{1093,1},{1127,1},{1163,1},{1201,1},{4587,1},{11 49,1}};
    private static int[][] medEP = {{15015,12},{14880,1},{14881,1},{14882,1},{14883,1 },{14884,1},{14885,1},{14886,1},{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},{15008,1},{ 4107,1},{4111,1},{4113,1},{4115,1},{4117,1},{4131, 1},{1079,1},{1093,1},{1127,1},{1163,1},{1201,1},{4 587,1},{1149,1},{15016,12},{1187,1},{15015,12},{15 016,12},{1704,1},{15015,12},{15016,12},{157,3},{14 5,2},{175,4},{15015,12},{15016,12},{1704,1},{157,3 },{145,2},{175,4},{6731,1},{6733,1},{15015,12},{15 016,12},{4712,1},{4714,1},{4716,1},{4718,1},{4720, 1},{4722,1},{4736,1},{4738,1},{4749,1},{4751,1},{1 305,1},{391,2},{1377,1},{1540,1},{1434,1},{1702,1} ,{5698,1},{3204,1},{6528,1},{10384,1},{10386,1},{1 0388,1},{10390,1}};
    private static int[][] highEP = {{15015,12},{15016,12},{868,50},{15015,12},{15016, 12},{1704,1},{14876,1},{14877,1},{14878,1},{14879, 1},{157,3},{145,2},{175,4},{995,14700},{995,22500} ,{4151,1},{6585,1},{6731,1},{6733,1},{4712,1},{471 4,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},{15016,12},{4097,1},{15015,12} ,{15016,12},{4675,1},{1340,1},{15015,12},{15016,12 },{1725,1},{1729,1},{1351,1},{1319,1},{1333,1},{13 59,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},{15008,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},{150 16,12},{4101,1},{15015,12},{15016,12},{4103,1},{86 8,50},{15015,12},{15016,12},{1351,1},{1319,1},{133 3,1},{1359,1},{995,14700},{995,22500},{1351,1},{13 19,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},{15015,12},{15016,12},{ 4726,1},{4728,1},{4730,1},{15015,12},{15016,12},{4 732,1},{4734,1},{15015,12},{15016,12},{391,2},{473 6,1},{4738,1},{4745,1},{1351,1},{1340,1},{15015,12 },{15016,12},{1725,1},{1729,1},{1731,1},{1319,1},{ 1333,1},{15015,12},{15016,12},{1359,1},{4712,1},{4 714,1},{4740,1},{4741,1},{4743,1},{4745,1}};
    private static int[][] mHighEP = {{15015,12},{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},{15008,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},{1 149,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},{15015,12},{15016,12},{4712,1},{15015,12} ,{15016,12},{4716,1},{4718,1},{4720,1},{15015,12}, {15016,12},{1351,1},{1319,1},{1333,1},{1359,1},{13 40,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},{4 736,1},{4738,1},{4749,1},{4751,1},{4722,1},{4724,1 },{15006,1},{4726,1},{4728,1},{6731,1},{6733,1},{4 712,1},{4714,1},{4716,1},{4718,1},{4720,1},{4722,1 },{4736,1},{4738,1},{4749,1},{4751,1},{4730,1},{47 32,1},{391,2},{4734,1},
    {4736,1},{15015,12},{15016,12},{4738,1},{15015,12} ,{15016,12},{4745,1},{15015,12},{15016,12},{4712,1 },{4714,1},{15015,12},{15016,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},{474 3,1},{4745,1}};
    private static int[][] xEP = {{15015,12},{15016,12},{868,50},{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},{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},{15 015,12},{15016,12},{4107,1},{4111,1},{4113,1},{411 5,1},{4117,1},{4131,1},{1079,1},{1093,1},{1127,1},
    {1163,1},{1201,1},{4587,1},{1340,1},{1725,1},{1501 5,12},{15016,12},{1729,1},{1731,1},{1149,1},{391,2 },{1351,1},{1319,1},{1333,1},{1359,1},{15007,1},{3 91,2},{995,5815},{995,300000},{1085,1},{1089,1},{1 351,1},{391,2},{1079,1},{15015,12},{15016,12},{391 ,2},{15008,1},{391,2},{15009,1},{391,2},{15011,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},{15014,1},{3 91,2},{15012,1},{15015,12},{15016,12},{1127,1},{10 93,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},{15015,12},{15016,12},{ 15015,12},{15016,12},{391,2},{15015,12},{15016,12} ,{15015,12},{15016,12},{391,2},{15015,12},{15016,1 2},{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},{474 9,1},{4751,1},{15015,12},{15016,12},{11732,1},
    {391,2},{1340,1},{1725,1},{1729,1},{15015,12},{150 16,12},{15015,12},{15016,12},{1731,1},{15015,12},{ 15016,12},{11235,1},{1079,1},{1127,1},{1099,1},{11 65,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},{10 93,1},{4087,1},{4585,1},{3140,1},{995,5815},{995,3 00000},{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},{1319,1},{1333,1},{1359,1},{4091,1},{4 093,1},{4095,1},{4097,1},{4101,1},{4103,1},{1340,1 },{1725,1},{1729,1},{1731,1},{4105,1},{15008,1},{4 107,1},{4111,1},{4113,1},{4115,1},{4117,1},{4131,1 },{1079,1},{1093,1},{1127,1},{1163,1},{1201,1},{45 87,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},{15006,1},{15005,1},
    {15004,1},{15018,1},{391,2},{1099,1},{1165,1},{150 15,12},{15016,12},{15015,12},{15016,12},{1149,1},{ 1185,1},{15017,1},{391,2},{15019,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 == 750) {
    if(c.getItems().getCarriedWealth() > 200000 || c.getPA().getWearingAmount2() > 100000) {
    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.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+".");
    }
    }
    }
    }
    }
    but i dont get any random drops? or anything like that
    Reply With Quote  
     

  2. #2  
    Proud User
    Join Date
    Feb 2011
    Posts
    532
    Thanks given
    69
    Thanks received
    28
    Rep Power
    29
    bump
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 5
    Last Post: 07-13-2011, 08:15 PM
  2. Replies: 10
    Last Post: 07-01-2010, 11:14 AM
  3. Replies: 0
    Last Post: 08-26-2009, 11:14 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •