Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

My first script - wine maker

Featured Replies

This is my first attemt making a script in java.

the script is very basic it just makes wines until it runs out of jugs of water or grapes and then stops and logs out.

using the script: start the script near any bank,  you dont need to have an empty inventory cause the script will jsut bank everything if inventory contains any unnecessary items.

Download souce + jar:

https://github.com/Cloudyman420/wine-maker

would like to see any feedback about the code and the actual script and see where could I improve.

  • Author
Just now, hidden arrow said:

I think you have to be approved to post this my brother goodluck.

oh damn, really? where could I get approved then?

1 hour ago, CloudyMan said:

This is my first attemt making a script in java.

the script is very basic it just makes wines until it runs out of jugs of water or grapes and then stops and logs out.

using the script: start the script near any bank,  you dont need to have an empty inventory cause the script will jsut bank everything if inventory contains any unnecessary items.

Download souce + jar:

https://github.com/Cloudyman420/wine-maker

would like to see any feedback about the code and the actual script and see where could I improve.

Good to see some new scripters :)

Some tips:
- I would only initiliaze stuff in the onStart, never really executed any interaction code in it.
  Since it's only run once it can fail.

Another thing that will cause issues is that you do 15 tasks in a row. This will clog up sooner or later.
If 1 action missclicks it could get stuck.

What you should do instead is only execute 1-2 commands every loop.

if animating => Wait, we are making wines
else if inventory contains jug of water and grapes => use grapes on water
else if inventory does not contain water and grapes => Bank
else if bank is open? => if we have wine deposit
else if bank is open and we have no wine? check if we have water else withdraw water
else if bank is open and we have no wine? check if we have grapes else withdraw grapes

this is just an example but it will improve stability by a lot.

Kind regards 
Khaleesi

Edited by Khaleesi

Welcome to the world of scripting!

You don't need permission to post in the unofficial scripts section, so you're good.

100% agree with what Khal said, work on doing only one action per loop, and the onStart stuff. Other than that, a winemaker is a great idea for a first script.
 

Hope to see more from you soon! Good luck!

  • Author
18 minutes ago, Lunar said:

Welcome to the world of scripting!

You don't need permission to post in the unofficial scripts section, so you're good.

100% agree with what Khal said, work on doing only one action per loop, and the onStart stuff. Other than that, a winemaker is a great idea for a first script.
 

Hope to see more from you soon! Good luck!

thank you, will try to work on it in the future.

27 minutes ago, Khaleesi said:

Good to see some new scripters :)

Some tips:
- I would only initiliaze stuff in the onStart, never really executed any interaction code in it.
  Since it's only run once it can fail.

Another thing that will cause issues is that you do 15 tasks in a row. This will clog up sooner or later.
If 1 action missclicks it could get stuck.

What you should do instead is only execute 1-2 commands every loop.

if animating => Wait, we are making wines
else if inventory contains jug of water and grapes => use grapes on water
else if inventory does not contain water and grapes => Bank
else if bank is open? => if we have wine deposit
else if bank is open and we have no wine? check if we have water else withdraw water
else if bank is open and we have no wine? check if we have grapes else withdraw grapes

this is just an example but it will improve stability by a lot.

Kind regards 
Khaleesi

thanks for the tips, and the little private lesson <3

  • Author
8 hours ago, skillerkidos1 said:

Looks good! Can’t wait to see what else you make! :D

thank you :D trying to improve this one at the moment, but have some ideas for the future if everything works out.

  • 1 year later...
On 5/8/2021 at 6:25 PM, CloudyMan said:

This is my first attemt making a script in java.

the script is very basic it just makes wines until it runs out of jugs of water or grapes and then stops and logs out.

using the script: start the script near any bank,  you dont need to have an empty inventory cause the script will jsut bank everything if inventory contains any unnecessary items.

Download souce + jar:

https://github.com/Cloudyman420/wine-maker

would like to see any feedback about the code and the actual script and see where could I improve.

I'll try it, thanks :)

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.