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.

Testing script changes without restarting client

Featured Replies

Basically as the title states, I'm one of the people that have to restart the entire client just to test script changes.

I read this thread but nothing that was offered there helped me out:

This is how I setup Eclipse:

Yes, I'm clicking refresh in the bot client. All of the files are compiling in the OSBot script folder just fine and up to date, but the client will simply not run the new script.

 

If anyone has any other suggestions, I'd love to hear them. Thanks in advanced.

Export the jar file to the same path, and just overwrite the old jar. Then hit refresh on the client. That's all I have to do using eclipse anyway.

  • Author
32 minutes ago, Chikan said:

Export the jar file to the same path, and just overwrite the old jar. Then hit refresh on the client. That's all I have to do using eclipse anyway.

I've tried that. Still runs the old script somehow.

38 minutes ago, DrizzyBot said:

I've tried that. Still runs the old script somehow.

Check carefully if you really overwritten the jar (last change date in file system).

  • Author
3 hours ago, El_Maestro said:

Are you using eclipse or intellij?

Eclipse

3 hours ago, nosepicker said:

Check carefully if you really overwritten the jar (last change date in file system).

Yes, it's overwriting correctly.

 

EDIT: Figured it out. It only wasn't reloading scripts correctly if I ran the client directly through Eclipse. Once I launched OSBot by itself, it worked properly.

Edited by DrizzyBot

You can also write your own reloader that will reload the script on jar change, and run it on top of your script. Then you don't even need to go and stop the script and refresh for changes.

6 hours ago, MadDev said:

You can also write your own reloader that will reload the script on jar change, and run it on top of your script. Then you don't even need to go and stop the script and refresh for changes.

Enlighten us, sounds interesting

On 1/7/2018 at 3:49 PM, DrizzyBot said:

 

EDIT: Figured it out. It only wasn't reloading scripts correctly if I ran the client directly through Eclipse. Once I launched OSBot by itself, it worked properly.

What if I want to run the client through the ide to set breakpoints?

On 1/7/2018 at 11:25 PM, nosepicker said:

Enlighten us, sounds interesting

Basically you just run a script as normal... but this script you run should actually just be something that loads in an external jar and executes it. Reloading the jar in whenever it changes (so you'd watch for file changes)

https://gist.github.com/anonymous/50ad5efb7e7cf3a3da8a097eadbd276d This is one i wrote for a different client (i apologize if this is not allowed),

but its the same basic idea, you can use that and just change it to make it work with osbot.

As far as I know, when you instantiate the class from the jar file, you can just pass the Script instance to the new class through the constructor.

Looks like you got it sorted out. Another thing worth watching out for is making sure you don't have multiple script files in the folder with the same manifest name.

Apa

58 minutes ago, Juggles said:

This happened to me when I first started writing scripts 

yep me too

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.