Jump to content

Script not showing up in OSBot Scripts Folder?


Kiwiibotter

Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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