Jump to content

Script not showing up in OSBot Scripts Folder?


Recommended Posts

Posted

Hey guys, 

Just wondering if I could have some input into why my script isn't being identified in my OSBot scripts folder.. it's not even appearing in my scripts folder when I compile if that's useful information for troubleshooting. I have tried fully reinstalling OSBot but this has not seemed to of worked. 

 

  • I am using IntelliJ Community version. 
  • I have set the project SDK to "1.8 java version 1.8.0_241"
  • I have set the Project language level to "8 - Lambdas, type annotations etc."
  • I have selected my libraries as "OSBot 2.5.67.jar"
  • I have configured my Artifacts (JAR used) output directory to C:\\Users\Me\OSBot\Scripts 
  • I have set my compile output to https://imgur.com/19AZta4

 

My script code is the following

 

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

import java.awt.*;

@ScriptManifest(info = "Test", version = 1.0, logo = "", author = "Kiwiibotter", name = "First Script")
public class Main extends Script {
    //CRTL + O to implement methods

    @Override
    public void onStart() throws InterruptedException {
        super.onStart();
        //Anything place here runs once on script start
    }

    @Override
    public int onLoop() throws InterruptedException {
        return 700;
        //Anything placed here runs every 700ms
    }

    @Override
    public void onExit() throws InterruptedException {
        super.onExit();
        //Anything run here runs once on script exit
    }

    @Override
    public void onPaint(Graphics2D g) {
        super.onPaint(g);
    }
}

Side note: From the guides I've been watching (Chris from OSBot) the "super.onStart()'" portion of the code is not there. But it was automatically added when I implemented methods, do I need to worry about this?

Posted
24 minutes ago, Kiwiibotter said:

Hey guys, 

Just wondering if I could have some input into why my script isn't being identified in my OSBot scripts folder.. it's not even appearing in my scripts folder when I compile if that's useful information for troubleshooting. I have tried fully reinstalling OSBot but this has not seemed to of worked. 

 

  • I am using IntelliJ Community version. 
  • I have set the project SDK to "1.8 java version 1.8.0_241"
  • I have set the Project language level to "8 - Lambdas, type annotations etc."
  • I have selected my libraries as "OSBot 2.5.67.jar"
  • I have configured my Artifacts (JAR used) output directory to C:\\Users\Me\OSBot\Scripts 
  • I have set my compile output to https://imgur.com/19AZta4

 

My script code is the following

 


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

import java.awt.*;

@ScriptManifest(info = "Test", version = 1.0, logo = "", author = "Kiwiibotter", name = "First Script")
public class Main extends Script {
    //CRTL + O to implement methods

    @Override
    public void onStart() throws InterruptedException {
        super.onStart();
        //Anything place here runs once on script start
    }

    @Override
    public int onLoop() throws InterruptedException {
        return 700;
        //Anything placed here runs every 700ms
    }

    @Override
    public void onExit() throws InterruptedException {
        super.onExit();
        //Anything run here runs once on script exit
    }

    @Override
    public void onPaint(Graphics2D g) {
        super.onPaint(g);
    }
}

Side note: From the guides I've been watching (Chris from OSBot) the "super.onStart()'" portion of the code is not there. But it was automatically added when I implemented methods, do I need to worry about this?

You can remove the super calls

  • Like 1
Posted

Fixed. 

Even though it made zero sense how my fix worked. 

My compiler output was set to what it should be (C:\\Users\Me\IdeaProjects\Scripts1\out ... I changed this destination to my OSBot\Scripts folder. I rebuilt the project... i deleted the production folder in OSBot\Scripts because it wasn't a .jar ... I changed back to original C:\\Users\Me\IdeaProjects\Scripts1\out and Rebuilt again.... .jar file was compiled correctly.

No idea how this fixed it but shoutout to @ProjectPact and @Chris for assisting me on Discord. Legendsssss <3 

  • Heart 1

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