Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Basic fire making Script


    Deep Slayer

    Recommended Posts

    This is a basic fire making script that will check the players inventory and bank for Logs and burn them at the g/e.

    To get this script to work, all you have to do is make sure you have enough logs either in the bank or inventory and have a tinderbox in the inventory.

    This script is intended for any newbies that want some ideas on how to put together a basic fire making script.

    all source code files are here:  https://github.com/deepslayer/Firemaking

    Link to comment
    Share on other sites

    • 2 weeks later...

    Hey! Just wanted to point out a few things:

     

    public static boolean isFireUnderPlayer() {
            GameObject Fire = GameObjects.closest("Fire");
            if (Fire != null && Fire.getTile().equals(Players.localPlayer().getTile())) {
                MethodProvider.log("True");
                return true;
            } else {
    
                MethodProvider.log("False");
                return false;
            }

    This can just be minimized to:
     

    public static boolean isFireUnderPlayer() {
    	GameObject fire = GameObjects.closest("Fire");
    	if (fire != null && fire.getTile().equals(getLocalPlayer.getTile()) {
    		return true;
    	}
    	return false;
    }

    You have this w/ other methods as well, I don't think I should need to repeat the representation, you don't need to add an else statement since if the condition is true, it will return true.

    Your interaction statements should be wrapped around an if as well.
    Currently (burnLogs method line 59-64):
     

     if (hasLogs() && hasTinderbox() && Inventory.isItemSelected()) {
                    MethodProvider.log("clicking on logs");
                    Inventory.interact("Logs", "Use");
                    MethodProvider.sleep(2000);
                    MethodProvider.sleepUntil(() -> !isLightingFire(), 60000);
                }

    Should/Can be turned into:
     

     if (hasLogs() && hasTinderbox() && Inventory.isItemSelected()) {
                    MethodProvider.log("clicking on logs");
                    if(Inventory.interact("Logs", "Use")) {
                    	MethodProvider.sleepWhile(() -> getLocalPlayer.isAnimating(), () -> getLocalPlayer.isAnimating(), 2000, 100);
                    }
                }

    As well as with your banking statement in withdrdrawLogs() line 75, 81 and 90.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.