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.

AeroCows - First Script

Featured Replies

1 hour ago, aerodude30 said:

Hey everyone,

heres my first script. There was no combat script I could find which fought cows and banked their hides so I made one. Lemme know your thoughts I'd like to get this on the SDN

https://github.com/cbartram/AeroCows

Excellent job, love seeing professionalism especially in regard to scripting - open source (check), readme.md file (check) and the license (check) :D 

Looking good!

In your AttackCow code, you're finding a suitable cow on the activate method and on the execute method. Perhaps create a cow variable up top and reuse the same cow? Also, you could filter out any cows that are being attacked by other players:

private boolean isCow(NPC npc) {
	return npc.getName().equals("Cow")
		&& npc.getAnimation() != Cow.DYING.getAnimation()
		&& (ctx.myPlayer().equals(npc.getInteracting()) || npc.getInteracting() == null); // So either we're the dude the cow's focused on OR the cow's not focused on anybody right now
}

NPC cow = ctx.getNpcs().singleFilter(ctx.getNpcs().getAll(), (Filter<NPC>) this::isCow);

Also, you could make your Task a little easier to use by having it extend MethodProvider and then exchanging the context. You can find it under the MethodProvider section here:

 

Edited by liverare

I looked quickly but just 2 quick comments:

Your task class could extend methodProvider instead of passing the reference throughout all the sub-classes. 

Your util to grab the cost of an item is probably costly (guessing a second or so). There's a json api that lets you grab the costs - https://osbot.org/forum/topic/146793-ge-data/

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.