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
  • Try asking for help in the chatbox
  • Basic fire making Script


    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 post
    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.

    Edited by notsmile
    Added some more suggestions/Improvements
    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    ×
    ×
    • Create New...