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

Proper way to get assets into resouces folder?

Featured Replies

If I wanted to put an asset in the resouce folder what is the proper approach to do so?

Do I under onStart() download the asset into the resouce folder if it doesn't exist? Or is there a way to bake the asset into the jar itself?

Thanks. 

I would indeed go with a check in your onStart whether the resources already exist in the data folder or not.

Do they? Load them locally.
Don't they? Grab them from your/a server.

Edited by Eagle Scripts

With the new API introduced a few client versions back, the proper approach without downloading from the web would be:

In the local script project:
- Create a 'resources' package/folder in the root (not in a sub-package)
- Put resource files in this folder
- Get the resources using Script#getScriptResourceAsStream (provide relative path, eg. "resources/image.png")

On the SDN:
- Put the resources folder at the root level of your script directory

> ScriptName
--> src
----> scriptname.mainpackage
--> resources
----> image.png
----> font.ttf


 

- git root folder
    - scriptname1
        - src
        - resources (for this script)
    - scriptname2
        - src
        - resources (for this script)
    - resources (this is for all scripts)

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.