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.

FOOD SUPPORT

Featured Replies

Hey guys i've got an idea but i don't know if it works.

 

We got this random scripts that work while doing any other script.

So would it be possible to write a script that eats automatically at low hp and add it like this random solver.

I mean that we can use any script where you lose hp (e.g. auto fighter, agility ...) and the script writer wouldn't have to use food support in their script. I'm mentioning this because we don't have script that support food.

I hope you understand me, although my english isn't very good :D

 

 

It's just an idea..

Food API is coming in the next release, and I dont support that the bot it self eat food when the hp is low. I think the Script owners/writers should implement this feature by their own.

Food eating is bugged for some reason, it gives errors on the 2nd time it eats, first time works fine.

? What are you doing... my fighter eats, banks, and does everything fine... What method are you using?

  • Author

? What are you doing... my fighter eats, banks, and does everything fine... What method are you using?

What script are you using?

? What are you doing... my fighter eats, banks, and does everything fine... What method are you using?

client.getInventory.interactwithId(blabla, "Eat");

 

I'm pretty sure that's it.

This is what I am using. It works with no problem at all:

int slot = invent.getSlotForId(foodId);selectInventoryOption(slot, "Eat");

 

 

You know that you determine when a random activates?

package aeterna.randoms;import org.osbot.script.RandomEventSolver;import org.osbot.script.rs2.skill.Skill;public class HealthListener extends RandomEventSolver {		private int[] foodIds = new int[] {		1	};	@Override	public void onActivate() {		// TODO Auto-generated method stub	}	@Override	public boolean shouldActivate() {		return client.getSkills().getCurrentLevel(Skill.HITPOINTS) <= (client.getSkills().getLevel(Skill.HITPOINTS) * .30); // hp reaches 30% or less health	}		@Override	public int onLoop() throws InterruptedException {		for (int food : foodIds) {			if (client.getInventory().contains(food)) {				selectInventoryOption(client.getInventory().getSlotForId(food), "Eat");			}		}		return 400 + gRandom(1000, 1750);	}}
  • Developer

I still don't see why people are complaining about a missing food API. Instead of you using: client.blabla.eatFood(id), you now use selectInventoryOption(id, "Eat"). Anyways, that's besides the scope of this topic.

 

@OP: It would limit the flexibility of the entire bot overriding behaviour of the script in such a way it could be problematic for some scripts. Writing food support should not be difficult at all with the current API, so I suggest you contact the writers of scripts to request them to add food support. If they tell you OSBot is not supporting it, you can tell them they either have not been informed well or that their own research on the API is incorrect.

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.