Thread: [PI] Firemaking help

Results 1 to 4 of 4
  1. #1 [PI] Firemaking help 
    Registered Member
    Join Date
    May 2011
    Posts
    24
    Thanks given
    0
    Thanks received
    3
    Rep Power
    2
    Hello everyone,


    Recently I've discovered a bug in my server.

    So firemakings works, but there's one annoying thing wich is:
    If you use a log you do not have the FM requirment for it glitches the whole skill, then you wont be able to use any log on the tinderbox not even the ones to do have the requirment for nothing happends.
    But if you relog you're able to light te logs again (the ones you have the requirment for)



    Thanks,
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Jul 2014
    Posts
    509
    Thanks given
    90
    Thanks received
    87
    Rep Power
    503
    Quote Originally Posted by r0yxd View Post
    Hello everyone,


    Recently I've discovered a bug in my server.

    So firemakings works, but there's one annoying thing wich is:
    If you use a log you do not have the FM requirment for it glitches the whole skill, then you wont be able to use any log on the tinderbox not even the ones to do have the requirment for nothing happends.
    But if you relog you're able to light te logs again (the ones you have the requirment for)



    Thanks,
    Will you post your firemaking class please?
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2011
    Posts
    24
    Thanks given
    0
    Thanks received
    3
    Rep Power
    2
    Quote Originally Posted by Curry View Post
    Will you post your firemaking class please?
    [SPOIL]package server.model.players.skills;

    import server.cycle.*;
    import server.clip.region.Region;
    import server.model.players.Client;
    import server.model.objects.Objects;
    import server.model.items.GroundItem;
    import server.world.ItemHandler;
    import server.world.ObjectHandler;
    import server.model.players.Experience;

    public class Firemaking {

    private static int[][] data = {
    {1511, 1, 250, 2732}, // LOG
    {7406, 1, 175, 11406}, // RED LOG
    {7405, 1, 175, 11405}, // BLUE LOG
    {7404, 1, 175, 11404}, // RED LOG
    {2862, 1, 250, 2732}, // ACHEY
    {1521, 15, 400, 2732}, // OAK
    {1519, 30, 700, 2732}, // WILLOW
    {6333, 35, 1300, 2732}, // TEAK
    {1517, 45, 2050, 2732}, // MAPLE
    {10810, 45, 2930, 2732}, // ARTIC PINE
    {6332, 50, 3320, 2732}, // MAHOGANY
    {1515, 60, 3800, 2732}, // YEW
    {1513, 75, 4090, 2732}, // MAGIC
    };

    public static boolean playerLogs(Client c, int i, int l) {
    boolean flag = false;
    for (int kl = 0; kl < data.length; kl++) {
    if ((i == data[kl][0] && l == 590) || (i == 590 && l == data[kl][0])) {
    flag = true;
    }
    }
    return flag;
    }

    public static void grabData(final Client c, final int useWith, final int withUse, int slot) {
    if (c == null || c.disconnected || c.duelStatus >= 5 || c.playerIsFiremaking || System.currentTimeMillis() - c.lastFire < 1200)
    return;

    final int[] coords = new int[3];
    coords[0] = c.absX;
    coords[1] = c.absY;
    coords[2] = c.heightLevel;

    Objects o = ObjectHandler.objectExists(coords[0], coords[1], coords[2]);
    if (o != null) {
    c.sendMessage("You can't light a fire here.");
    return;
    }
    if (c.woodcut[0] > 0)
    c.woodcut[0] = 0;

    c.playerIsFiremaking = true;

    for (int i = 0; i < data.length; i++) {
    if (useWith == 590 || withUse == 590) {
    if ((useWith == 590 ? withUse : useWith) != data[i][0])
    continue;
    }

    if (c.playerLevel[11] < data[i][1]) {
    c.sendMessage("You need a firemaking level of at least " + data[i][1] + " to light this log.");
    return;
    }

    final int log = data[i][0];
    final int fire = data[i][3];
    final int xpAmount = data[i][2];

    c.startAnimation(733);

    c.lastFire = System.currentTimeMillis();

    c.resetWalkingQueue();
    c.getItems().deleteItem(log, 1);
    ItemHandler.createGroundItem(c, log, coords[0], coords[1], 1, c.getId());


    CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
    public void execute(CycleEventContainer container) {
    if (c == null || c.disconnected) {
    container.stop();
    return;
    }
    ItemHandler.removeGroundItem(c, log, coords[0], coords[1], false);
    Objects o = new Objects(fire, coords[0], coords[1], coords[2], 0, 10, 0);
    ObjectHandler.placeObject(o);
    Experience.addExperience(c, xpAmount, 11);
    c.playerIsFiremaking = false;
    container.stop();
    }
    public void stop() {
    }
    }, 2);

    if (Region.getClipping(c.getX(), c.getY(), c.heightLevel, -1, 0, false)) {
    c.getPA().walkTo(-1, 0);
    } else if (Region.getClipping(c.getX(), c.getY(), c.heightLevel, 1, 0, false)) {
    c.getPA().walkTo(1, 0);
    } else if (Region.getClipping(c.getX(), c.getY(), c.heightLevel, 0, -1, false)) {
    c.getPA().walkTo(0, -1);
    } else if (Region.getClipping(c.getX(), c.getY(), c.heightLevel, 0, 1, false)) {
    c.getPA().walkTo(0, 1);
    }

    c.sendMessage("You light the logs.");
    c.sendMessage("<col=1532693>830 Coins have been added to your Money Pouch!</col>");
    c.MoneyCash += 830;
    if(c.MoneyCash > 99999 && c.MoneyCash <= 999999) {
    c.getPA().sendFrame126(""+c.MoneyCash/1000+"K", 8134);
    } else if(c.MoneyCash > 999999 && c.MoneyCash <= 2147483647) {
    c.getPA().sendFrame126(""+c.MoneyCash/1000000+"M", 8134);
    } else {
    c.getPA().sendFrame126(""+c.MoneyCash+"", 8134);
    }
    c.getPA().sendFrame126(""+c.MoneyCash+"", 8135);

    CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
    public void execute(CycleEventContainer container) {
    if (c == null || c.disconnected) {
    container.stop();
    return;
    }
    c.startAnimation(65535);
    container.stop();
    }
    public void stop() {
    }
    }, 2);

    CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
    public void execute(CycleEventContainer container) {
    container.stop();
    }
    public void stop() {
    Objects removeFire = ObjectHandler.objectExists(coords[0], coords[1], coords[2]);
    ObjectHandler.globalRemoveObject(removeFire);
    GroundItem item = new GroundItem(592, coords[0], coords[1], coords[2], 1, 0, 0, "");
    item.removeTicks = 25;
    ItemHandler.createGlobalItem(item);
    ItemHandler.addItem(item);
    }
    }, 30);

    c.turnPlayerTo(c.absX + 1, c.absY);
    break;
    }
    }
    }[/SPOIL]
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Oct 2012
    Posts
    4,710
    Thanks given
    1,679
    Thanks received
    1,105
    Rep Power
    0
    This is very old lol, i suggest you rewrite or use my release.

    https://www.rune-server.ee/runescape...g-release.html
    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. [Pi] Firemaking Help
    By Dark98 in forum Help
    Replies: 5
    Last Post: 06-12-2013, 05:27 AM
  2. [Pi] Firemaking help [Pi]
    By b00mz1029 in forum Help
    Replies: 4
    Last Post: 03-18-2013, 02:13 AM
  3. [pi] firemakeing help
    By ajmcbsat1 in forum Help
    Replies: 9
    Last Post: 01-01-2013, 06:24 PM
  4. [PI] Firemaking Help
    By Acquittal in forum Help
    Replies: 11
    Last Post: 04-18-2012, 01:42 AM
  5. [PI] Firemaking help. :/
    By Brandonnnn in forum Help
    Replies: 0
    Last Post: 06-07-2011, 06:18 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •