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.

Help with using an item on an Object in the game world - Coding

Featured Replies

Currently I'm having trouble using an item on an object within the game world.
What i'm trying to do is fill up empty vials and then bank, but I get to the point of clicking use on vials then the bot hovers over the fountain not sure what to do, then ends up going through the return cycle again.
The option to fill the Vial up is "Use Vial -> Fountain".
If I could get some help with this, I could continue my script, thanks!
 
// My current unworking code.
selectInventoryOption(this.client.getInventory().getSlotForId(229), "Use");
        RS2Object fountain = closestObject(24214);
        fountain.interact("Use");
        return 1000;

Edit: Figured out that it has to be "Use <col=ff9040>".

 

This topic can now be closed.

Edited by Tanner

That code should work.

 

I suggest placing null checks and sleeping between each action/interaction.

  • Author

It's weird because it doesn't. Do you mind explaining how exactly I would place null checks in between each interaction?


if (fountain != null && fountain.isVisible()) {

  • Author
if (fountain != null && fountain.isVisible()) {

Ok thanks, I'm gonna do some testing now.

 

Edit: Close... but still no cigar. Does the same thing. For testing purposes I made it forget about using the vial then the fountain, and instead just made it examine the fountain over and over again, which it does fine! Is this an API feature that must be implemented to make this work correctly or am I just insane?

 

Edit 2: Figured it out! It uses a weird interaction when using items "Use <col=ff9040>"

Edited by Tanner

Guest
This topic is now closed to further replies.

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.