Jump to content

jar not showing up


Recommended Posts

Posted

Hi guys, 

When i make a jar of a script it's now showing up in the scripts folder maybe there is something wrong with the code and I don't see it.

 

this is the code:

 

package woodcutter;

import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

public class woodcutter extends Script {
    final String TREE_NAME = "Tree";

    @ScriptManifest(info="test", logo = "", version = 0, author = "Lupy", name = "Woodcutter script")

    @Override
    public int onLoop() throws InterruptedException {

        if(! getInventory().isFull()) {
            //chop
            Entity tree = objects.closest(TREE_NAME);
            if(tree != null && tree.isVisible()) {
                tree.interact("Chop Down");
            } else {
                camera.toEntity(tree);
            }
        } else {
            //bank
        }
        return 0;
    }



    //when script is started
    public void onStart() {

    }
    //when script is exited
    public void onExit() {

    }
}

 

thanks in advance

 

Posted (edited)
21 hours ago, lupy said:

Hi guys, 

When i make a jar of a script it's now showing up in the scripts folder maybe there is something wrong with the code and I don't see it.

 

this is the code:

 


package woodcutter;

import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

public class woodcutter extends Script {
    final String TREE_NAME = "Tree";

    @ScriptManifest(info="test", logo = "", version = 0, author = "Lupy", name = "Woodcutter script")

    @Override
    public int onLoop() throws InterruptedException {

        if(! getInventory().isFull()) {
            //chop
            Entity tree = objects.closest(TREE_NAME);
            if(tree != null && tree.isVisible()) {
                tree.interact("Chop Down");
            } else {
                camera.toEntity(tree);
            }
        } else {
            //bank
        }
        return 0;
    }



    //when script is started
    public void onStart() {

    }
    //when script is exited
    public void onExit() {

    }
}

 

thanks in advance

 

Your script manifest is in the wrong spot. And since OsBot uses that to identify your script it will not show up in the script selector. Place it above the class and all should be fixed.

Edited by BravoTaco

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...