Jump to content

OSBot Script Skeleton - The minimum code to make a script


Alek

Recommended Posts

  • 4 weeks later...
  • 1 month later...
  • 9 months later...
  • 2 months later...
  • 2 months later...
  • 1 month later...
  • 2 years later...
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. 

Link to comment
Share on other sites

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

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;
    }
}

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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