Jump to content

How to make libraries


Recommended Posts

Posted

When I started out with OSBot scripts, I used this guide which was very helpful - thanks @Token

 

I am still unfamiliar with intellij though really - I can output scripts, but that is about it - I am limited to a directory of classes, which has been OK so far

 

However, moving forward, I would like to make a library similar to the osbot.jar file whereby I can import my classes in a similar way

for example;


import org.osbot.rs07.api.ui.Skill;

import org.fanny.utils.whatever;

How do I go about this in intellij idea? This is a pretty major step to producing scripts faster and more accurately

Posted
15 hours ago, Fanny said:

When I started out with OSBot scripts, I used this guide which was very helpful - thanks @Token

 

I am still unfamiliar with intellij though really - I can output scripts, but that is about it - I am limited to a directory of classes, which has been OK so far

 

However, moving forward, I would like to make a library similar to the osbot.jar file whereby I can import my classes in a similar way

for example;


import org.osbot.rs07.api.ui.Skill;

import org.fanny.utils.whatever;

How do I go about this in intellij idea? This is a pretty major step to producing scripts faster and more accurately

Osbot has something called a dependency part that can be accessed from all scripts.

qUv8Ayx.png

Posted
4 hours ago, Khaleesi said:

Osbot has something called a dependency part that can be accessed from all scripts.

qUv8Ayx.png

Wow that does look very neat.

Yeah, mine looks nothing like that.

r8ODYAf.jpeg

 

Not sure where I went wrong, the other classes are what should be my dependencies like you have it

Also my script is the entire project? You seem to be able to access individual projects from the same screen

Dunno about IntelliJ Idea, my setup is more like No Idea :D

Posted
On 9/16/2024 at 4:01 PM, Khaleesi said:

Ya I have 1 project with multiple modules, each script is a module

This is what I was looking for, thanks so much!

Working on my utils now, hopefully better and less effort scripts result

 

13 hours ago, dubai said:

Right click the project folder you want to add a new package > new > package

I had my environment set up so that each script is a project, when there should be one project with multiple modules for scripts - seems to work now, not tested it extensively yet

Posted
57 minutes ago, Fanny said:

This is what I was looking for, thanks so much!

Working on my utils now, hopefully better and less effort scripts result

 

I had my environment set up so that each script is a project, when there should be one project with multiple modules for scripts - seems to work now, not tested it extensively yet

Glad to hear! If you have any other questions let me know :)

Posted
9 hours ago, Fanny said:

I had my environment set up so that each script is a project, when there should be one project with multiple modules for scripts - seems to work now, not tested it extensively yet

Ah gotcha, easy fix :)

8 hours ago, Khaleesi said:

Glad to hear! If you have any other questions let me know :)

I have a question!!! How did you get that epic colourful display name badge thingo that changes colour :o

Posted
On 9/16/2024 at 4:01 PM, Khaleesi said:

Ya I have 1 project with multiple modules, each script is a module

-Khaleesi
--Dependencies folder
--ScriptName1
--Scriptname2

Quick update:

Spent a lot of time fleshing out my utility scripts

Writing scripts is a breeze now, with all the complex logic handled in the utilities, no need for writing extensive checks on every action etc,

Thanks for this, 10X developer overnight :D

 

I just have a quick question; regards paid scripts, the guide says requires Scripter II, but it makes no indication of what that means or how to get it (but I see you have that badge)

I seem to recall someone mentioning a test or something, but IDK, would be interested to know?

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