Jump to content

OSBot Script Skeleton - The minimum code to make a script


Recommended Posts

  • 4 weeks later...
  • 1 month later...
  • 9 months later...
  • 2 months later...
  • 2 months later...
  • 1 month later...
  • 2 years later...
Posted
On 3/26/2016 at 10:58 PM, trunksrozwell said:

Do you know of any indepth, basic tutorials on how to create unique projects, how to include antibans and walkpaths and that sort of stuff?

The best way, if you have some know how about java, is to look over the API, learn it, and try to achieve something that there is no public resource for, this way you are forced to research specific concepts, instead of just looking at a source and not understanding. The way to include antibans is to not include them, they are pointless. Walkpaths you can look at the API in the classes "Walking, walking event, webwalking". There can never be a tutorial on making something "unique". There is also a scripting help section, which i've found users to be very willing to help answer questions. Furthermore, the snippets section has a lot of good resources as well. 

  • 11 months later...
  • 1 month later...
Posted

Hi, I'm compiling a simplified version of this skeleton a .jar file, but when I add it into my Scripts folder, it won't appear in my list of scripts inside the client.

I've also made sure to include OSBot 2.5.77.jar as a library/dependency when compiling the final .jar file.

I've tried adding other people's scripts into the Scripts folder, and they appear normally, so that is not the issue.

Could someone please help me out?

code:

package com.dpdmi2;

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "dpdmi2", name = "test", info = "bot_test", version = 0, logo = "")
public final class Test extends Script {
    @Override
    public final int onLoop() throws InterruptedException {
        return 0;
    }
}

 

Posted
On 4/14/2020 at 7:12 AM, dpdmi2 said:

Hi, I'm compiling a simplified version of this skeleton a .jar file, but when I add it into my Scripts folder, it won't appear in my list of scripts inside the client.

I've also made sure to include OSBot 2.5.77.jar as a library/dependency when compiling the final .jar file.

I've tried adding other people's scripts into the Scripts folder, and they appear normally, so that is not the issue.

Could someone please help me out?

code:


package com.dpdmi2;

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "dpdmi2", name = "test", info = "bot_test", version = 0, logo = "")
public final class Test extends Script {
    @Override
    public final int onLoop() throws InterruptedException {
        return 0;
    }
}

 

Additionally, when I download .class files from public github scripts and convert them into .jar files, they also work just fine. However, when I copy the source code for the .class file and try to compile it myself (first to .class, then convert .class to .jar), then it doesn't work. So the problem has to lie in the compilation I assume?

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