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.

Use item on entity?

Featured Replies

(Hopefully) simple. What I want to do is use my Gold bar on a furnace.

getInventory().interact("Use", "Gold bar");
furnace.interact("Smelt");
log("Smelting");

The Smelt option only works when I don't interact with a Gold bar first.

Help? :(

Interact with item 'use'

Check if item is selected

See if ent is not null & visible

Interact with ent

:D API is ur friend for the code :P

  • Author

Interact with item 'use'

Check if item is selected

See if ent is not null & visible

Interact with ent

biggrin.png API is ur friend for the code tongue.png

 

Thanks dude, but the API isn't very useful to me..

Anyway, so now I am trying to simulate a "press enter" in the Make-X section. I currently have this:

sleep(125 + rand.getRandom(99));
getKeyboard().typeKey(Character.forDigit(rand.getRandom(3, 9), 10));
sleep(11 + rand.getRandom(200, 482));
				
getKeyboard().typeKey(Character.forDigit(rand.getRandom(0, 9), 10));
sleep(14 + rand.getRandom(50, 122));
				
getKeyboard().typeKey((char)13);

Character 13 is your standard carriage return, and is used a lot for detection with JS normally.

Is RS checking for a standard CLRF? (\r\n - 13 10) or just 13 or just 10?

 

EDIT: Sorted this myself. OSRS expects the standard CLRF, which is character 13 followed by character 10. (Do not put a delay between these as when you press enter, your keyboard sends both characters simultaneously)

getKeyboard().typeKey((char)13);
getKeyboard().typeKey((char)10);

Edited by Bobrocket

Thanks dude, but the API isn't very useful to me..

Anyway, so now I am trying to simulate a "press enter" in the Make-X section. I currently have this:

sleep(125 + rand.getRandom(99));
getKeyboard().typeKey(Character.forDigit(rand.getRandom(3, 9), 10));
sleep(11 + rand.getRandom(200, 482));
				
getKeyboard().typeKey(Character.forDigit(rand.getRandom(0, 9), 10));
sleep(14 + rand.getRandom(50, 122));
				
getKeyboard().typeKey((char)13);

Character 13 is your standard carriage return, and is used a lot for detection with JS normally.

Is RS checking for a standard CLRF? (\r\n - 13 10) or just 13 or just 10?

 

API Is very useful when you understand it tongue.png

 

For the typing and pressing enter use this

 

keyboard.typeString(String.valueOf(random(50,100)), true);

 

Or something similar, the true means press enter after the string has been typed i believe

Edited by Fruity

  • Author

API Is very useful when you understand it tongue.png

 

For the typing and pressing enter use this

 

keyboard.typeString(String.valueOf(random(50,100)), true);

 

Or something similar, the true means press enter after the strign has been typed i believe

 

I see. I wanted to type each character individually as then it feels more like a human click. I seem to be reinventing the wheel every time :p

Thank you though. My script seems to be working well so far so all is good.

 

Is there a way to find out when my character has crafted a gold item? Usually you would use Onmessage (right?) but there is no message when you create a gold item.

I see. I wanted to type each character individually as then it feels more like a human click. I seem to be reinventing the wheel every time tongue.png

Thank you though. My script seems to be working well so far so all is good.

 

Is there a way to find out when my character has crafted a gold item? Usually you would use Onmessage (right?) but there is no message when you create a gold item.

 

Maybe on animation? is there an animation that the player does when it crafts the gold item?

  • Author

Maybe on animation? is there an animation that the player does when it crafts the gold item?

 

Yeah, but I'm not sure how I would do that. Can I check by animation ID maybe?

 

  • Author

Aye im sure there is a certain animation for smithing. do player debug thingy

 

Will do, and will update with results. Thank you.

 

  • Author

YW

 

Alright, so I really cannot figure this out.

When smithing an item, the animation ID is 899.

So it will smith the item, go back to no animation, and then smith another. How would I detect this and add another item to my counter?

 

Alright, so I really cannot figure this out.

When smithing an item, the animation ID is 899.

So it will smith the item, go back to no animation, and then smith another. How would I detect this and add another item to my counter?

 

 

If there is a chat message, you can listen for that.

if there is XP gain, you can calculate it from that.

 

  • Author

If there is a chat message, you can listen for that.

if there is XP gain, you can calculate it from that.

 

 

 I ended up just making a Thread and checking the animation from that (and then doing a conditonalsleep until the animation was finished). Not the best, but it works.

 

Thanks everyone!

 

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.