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.

Tshelf

Members
  • Joined

  • Last visited

  1. Hey, I'm just getting into scripting having some java and other various programming background. From following the tutorials I've come up with a bit of a base for a simple cow fighter which I want to build off of, and I have what I think will give me a script which will attack cows, but whenever I run it nothing happens. Here's my onLoop() code. my onStart() code sets the current state to initialState. Any idea what I'm doing wrong? Also I might just be blind, but if anybody could link me to a good debugging tutorial I'd be very appreciative! public int onLoop() throws InterruptedException { objects.closest("Cow").interact("Attack"); switch (getCurrentState()){ //state transitions case initialState: setState(states.lookingForFight); break; case inCombat: if(!myPlayer().isUnderAttack()){ setState(states.lookingForFight); } break; case lookingForFight: if(myPlayer().isUnderAttack()){ setState(states.inCombat); } break; case lowHealth: setState(states.eating); break; case eating: if (!needToEat()){ if (myPlayer().isUnderAttack()){ setState(states.inCombat); } else{ setState(states.lookingForFight); } } break; case waiting: break; case finish: break; case bank: break; default: break; } switch (getCurrentState()){ //state actions case initialState: break; case inCombat: break; case lookingForFight: log("attempting to attack"); Entity cow = objects.closest("Cow"); if(cow != null ){ cow.interact("Attack"); } break; case lowHealth: break; case eating: getInventory().interact("Trout", "Eat"); break; case waiting: break; case finish: break; default: break; } return random(400, 1200); }

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.