Jump to content

A Beginners Guide to Writing OSBot Scripts (where to get started!) by Apaec


Apaec

Recommended Posts

nice guide, up and running and shitting scripts out left and right for trivial things now :)

how can i link scripts together? i really avoided java, it wants me to create a static method to use it in my onLoop in my osbot plugin however if i do that then it wants me to make your methods static and it just cascades, what's the proper way to make things like, a shared bank module so I can have my own logic? trying to do like osbotplugin.util.Bank.bank(items) for example which would in turn call a bunch of your api methods?

Link to comment
Share on other sites

On 6/18/2021 at 12:01 AM, rawgreaze said:

nice guide, up and running and shitting scripts out left and right for trivial things now :)

how can i link scripts together? i really avoided java, it wants me to create a static method to use it in my onLoop in my osbot plugin however if i do that then it wants me to make your methods static and it just cascades, what's the proper way to make things like, a shared bank module so I can have my own logic? trying to do like osbotplugin.util.Bank.bank(items) for example which would in turn call a bunch of your api methods?

I'm not aware of a nice way to share code between scripts. Though not ideal, i'd recommend copying over important logic between scripts. To make it easier, you can abstract your logic into a class, and copy that class file between scripts. If you do this, you can version the files to keep track of which versions you have where. Glad you're seeing some success with your scripts!

-Apa

Link to comment
Share on other sites

On 6/19/2021 at 6:28 AM, Apaec said:

I'm not aware of a nice way to share code between scripts. Though not ideal, i'd recommend copying over important logic between scripts. To make it easier, you can abstract your logic into a class, and copy that class file between scripts. If you do this, you can version the files to keep track of which versions you have where. Glad you're seeing some success with your scripts!

-Apa

i want to have shared modules between scripts.. right now i have a wood cutter, fisher, etc, and they all go to the bank for example. i'd like to have a Bank.class that has the webwalk to bank function as well as deposit so I can reference these custom functions without code duplication. this must be a thing

also i botted for like 10 hours straight with no bans, i enabled breaks and got banned a few hours later so could be coincidence but make that what you will

Edited by rawgreaze
Link to comment
Share on other sites

  • 5 months later...
On 8/15/2014 at 9:51 AM, Apaec said:

Hi, when I try to run the project, I am getting this error: Provider class org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer not in module.

In the folder META-INF\services there is a file that has 1 line 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' when they should be on two lines. Does anyone know how to fix this?

 

 

Hi, when I try to run the project, I am getting this error: Provider class org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer not in module.

In the folder META-INF\services there is a file that has 1 line 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' when they should be on two lines. Does anyone know how to fix this?

Link to comment
Share on other sites

  • 2 weeks later...
12 hours ago, Sir Farms A Lot said:

I did. You can see it added in the image I attached.

Not sure why it would be complaining. From the looks of things, it seems you have everything set up correctly. When you hover over a red line, e.g. when you hover over "Script", what does it say? Are there any suggested auto-fixes?

Link to comment
Share on other sites

  • 4 weeks later...
On 12/30/2021 at 7:34 PM, Sir Farms A Lot said:

Hi, I am looking at your guide to perhaps start to understand java development for OSRS bots. I followed your guide step by step and It is saying the imports are not accessible. What am I missing? 

image.thumb.png.80707d073fd57502894d54af4adf3403.png

Your fix is go to: Project -> Properties -> Libraries -> Add library -> execution environment. Then drop down list and select “javaSE-1.7”

 

Edited by sleepyskiller
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 7 months later...
  • 1 month later...
  • 3 weeks later...

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