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.

item interaction

Featured Replies

I'm a real  noob but i can't seem to find how to use an item on another item in the API. Do i just use the click method? Can i get some feedback on the little script i tried to write?

 

Item chocolate = getInventory().getItem("Chocolate bar");
Item knife = getInventory().getItem("Knife");
 
if (inventory contains(chocolate)&& inventory.contains(knife){
click(chocolate);
click(knife);
}
Else{ 
objects.closest("Bankbooth").interact("Bank");
depositAllExept(knife);
withdrawAll(chocolate);
}

 

 

you would want to interact("Use");

 

Edited by TheObserver

  • Author

you would want to interact("Use");

 

Does that makes it just left click or does it really right clicks and clicks use? because that would make it very obvious that u are botting because no normal player would do that?

Does that makes it just left click or does it really right clicks and clicks use? because that would make it very obvious that u are botting because no normal player would do that?

 

 left click cause its the first option on the item

Does that makes it just left click or does it really right clicks and clicks use? because that would make it very obvious that u are botting because no normal player would do that?

 

Not necessarily, I'm not sure how the .interact() method works exactly as I've not looked at the client code, but I believe it will most times just left click but sometimes right click. Give it a test!

 

apa

 

 left click cause its the first option on the item

 

Not always!

  • Author

 left click cause its the first option on the item

 

but its not the first on chocolate bar is it?

so can i do: Item(Chocolate).Interact("use") 

                   Item(Chocolate).Interact("use")

but its not the first on chocolate bar is it?

so can i do: Item(Chocolate).Interact("use") 

                   Item(Chocolate).Interact("use")

 

if you've clicked use on the knife first then it is

 

09083896add8ce170dc32bf6e6932771.png

Edited by IHB

but its not the first on chocolate bar is it?

so can i do: Item(Chocolate).Interact("use") 

                   Item(Chocolate).Interact("use")

 

Interact will right click if necessary.

 Try something along these lines (assumes that a knife is present)

if(getInventory().contains("Chocolate bar")) {
    if("Knife".equals(getInventory().getSelectedItemName())) {
        int slot = getInventory().getSlot("Chocolate bar");
        getMouse().click(new InventorySlotDestination(getBot(), slot));
    } else {
        int slot = getInventory().getSlot("Knife");
        getMouse().click(new InventorySlotDestination(getBot(), slot));
    }
}

Edited by FrostBug

 

 Try something along these lines (assumes that a knife is present)

if(getInventory().contains("Chocolate bar")) {
    if("Knife".equals(getInventory().getSelectedItemName())) {
        int slot = getInventory().getSlot("Chocolate bar");
        getMouse().click(new InventorySlotDestination(getBot(), slot));
    } else {
        int slot = getInventory().getSlot("Knife");
        getMouse().click(new InventorySlotDestination(getBot(), slot));
    }
}

i like the flow

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.