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.

Barbarian village fly fishing + cooking snippet

Featured Replies

Wasn't satisfied with the available fly fish + cook scripts in the script network.
Here's a simple snippet for you all: 
Simply have feathers and fly fishing rod in your inventory. Make sure inventory slot 2 is empty as the script will always cook the raw fish in this slot first, then will cook the opposite (salmon or trout) after.

FYI: Since cooking on a fire causes the player to go out of animation after every cooking action, using My Player Is Not Animating is not good enough. If your player is cooking and your script enters the IF statement where you select the fish, by the time the script has selected that fish, your player will have cooked that fish. Your script will then attempt to use the selected cooked fish on the fire. Therefore, you must guarantee that once your player has started cooking fish, your script will not enter the initial IF statement of selecting the fish.

To do this, use Zackaery's threaded animation sleep method. The idea is to use an timer to keep track of your player animation. Suppose that the cooking animation lasts 1000 ms and the player exits animation for 500 ms before cooking the next fish, set an animation timer that runs for greater than 1500ms so that your script will recognize your player is animating for >=1500ms instead of 1000ms. In this way, you chain animations together.
In practice, you shouldn't need to know the ms duration of an animation. I use 2 seconds for this timer and it works quite well.

 

<Boolean>CookTrout:false
<Boolean>CookSalmon:false
<Timer>Animating:2000,false,0,false
[0, MyPlayer, isAnimating, {true}]
[0, Timers, reset, 1:[Animating]]
[1, Inventory, isFull, {false}]
[1, MyPlayer, isAnimating, {false}]
[1, Timers, isRunning, {false}, 1:Animating]
[1, Camera, toEntity, 2:1526, 1:NPC]
[1, NPC, interactWith, 2:1526, 1:Lure, 3:true, 3:false, 3:true, 3:false, 3:false]
[1, Sleeping, sleepMoving]
[1, Mouse, moveOutsideScreen]
[2, Inventory, slotContains, {true}, 1:Raw trout, 2:2]
[2, Inventory, isFull, {true}]
[2, Variables, editBoolean, 1:CookTrout, 3:true]
[3, Inventory, slotContains, {true}, 1:Raw Salmon, 2:2]
[3, Inventory, isFull, {true}]
[3, Variables, editBoolean, 1:CookSalmon, 3:true]
[4, Variables, getBoolean, 1:CookSalmon, 3:true]
[4, Inventory, inventoryContainsPartialName, {false}, 1:Raw Salmon, 3:false, 3:true]
[4, Inventory, inventoryContainsPartialName, {true}, 1:Raw trout, 3:false, 3:true]
[4, Variables, getBoolean, 1:CookTrout, 3:false]
[4, Variables, editBoolean, 1:CookSalmon, 3:false]
[4, Variables, editBoolean, 1:CookTrout, 3:true]
[5, Variables, getBoolean, 1:CookSalmon, 3:false]
[5, Variables, getBoolean, 1:CookTrout, 3:true]
[5, Inventory, inventoryContainsPartialName, {true}, 1:Raw salmon, 3:false, 3:true]
[5, Inventory, inventoryContainsPartialName, {false}, 1:Raw trout, 3:false, 3:true]
[5, Variables, editBoolean, 1:CookSalmon, 3:true]
[5, Variables, editBoolean, 1:CookTrout, 3:false]
[6, Variables, getBoolean, 1:CookSalmon, 3:true]
[6, Timers, isRunning, {false}, 1:Animating]
[6, Inventory, interactWith, 1:Raw Salmon, 1:Use]
[7, Variables, getBoolean, 1:CookTrout, 3:true]
[7, Timers, isRunning, {false}, 1:Animating]
[7, Inventory, interactWith, 1:Raw trout, 1:Use]
[8, Inventory, contains, {false}, 1:Raw Salmon, 1:Raw trout]
[8, Timers, isRunning, {false}, 1:Animating]
[8, Inventory, isFull, {true}]
[8, Inventory, dropAllExcept, 1:Feather, 1:Fly fishing rod]
[8, Variables, editBoolean, 1:CookSalmon, 3:false]
[8, Variables, editBoolean, 1:CookTrout, 3:false]
[10, Inventory, isItemSelected, {true}]
[10, Camera, toEntity, 1:Fire, 1:RS2Object]
[10, RS2Object, interactWith, 1:Fire, 1:Use, 3:true, 3:false, 3:true, 3:false, 3:false]
[10, Sleeping, sleepMoving]
[11, RS2Widget, isVisibleContainingText, {true}, 1:[How many]]
[11, Keyboard, pressSpace]
[11, Mouse, moveOutsideScreen]
[11, Sleeping, sleepRandom, 2:800, 2:1000]
[11, Variables, goTo, 2:[0]]


*I'd like to spoiler this above code, please let me know how. Also if I should just go ahead and upload this to the script network, let me know. IMO this is a fully functional script but feels too small.

Edited by Bnywarrior

  • Bnywarrior changed the title to Barbarian village fly fishing + cooking snippet

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.