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.

Method(s) request - Related to isInteracting

Featured Replies

Background

SF has a Is Interacting and Is Not Interacting checks. However, these are general checks and only come true if an (any) npc is interacting with the player. It doesn't take into account whether the distance you're trying to check comes from that interacting npc or whether the action you want to perform will be performed on the interacting npc. Having the following would be extremely useful for making more advanced scripts.

Methods:
If Player Distance to Entity <-- Add isInteracting filter

Interact with NPC <-- Add isInteracting filter

If NPC Overhead Prayer is <--  Add isInteracting filter

If NPC Overhead Prayer is not <-- Add isInteracting filter

If NPC Health percent is <-- Ad isInteracting filter

isInteracting(Character<?> character)
Returns whether this character is facing/interacting with the specified character.

Why is this useful?

There are certain actions in osrs that require for you to take an action based on the interacting npc rather that any npc. This includes trying to keep a safe distance from an npc in a room full of other, similar npcs (Undead Druids, Brutal Dragons, etc.). Switching to correct attack style (Demonic Gorillas). Also, when creating a slayer script so that the slayer items such as bag of salt, ice, etc. are used in the interacting npc rather than any npc in the room.

How can it be used?
Moving away from melee range in Undead Druids:

[0, Variables, getBoolean, 1:shouldMoveAway, 3:false]
[0, MyPlayer, getDistanceTo, 1:Undead Druid, 1:NPC, 1:<=, 2:1, 3:true] (isInteracting Filter)
[0, Variables, editBoolean, 1:shouldMoveAway, 3:true]

Changing to the correct weapon in Demonic Gorillas

[1, NPC, getPrayerIcon, {true}, 1:Demonic Gorilla, 1:PROTECT_FROM_MELEE] (isInteracting Filter)
[1, Variables, editString, 1:Weapon Type, 1:enableRangeWeapon]

Interacting with the correct NPC during slayer:

[2, Variables, getBoolean, 1:shouldUseSlayerItem, 3:false]
[2, NPC, getCurrentHealthPercent, 1:Rock Slug, 2:10, 1:<=] (isInteracting Filter)
[2, Variables, editBoolean, 1:shouldUseSlayerItem, 3:true]

[3, Variables, getBoolean, 1:shouldUseSlayerItem, 3:true]
[3, NPC, getCurrentHealthPercent, 1:Rock slug, 2:11, 1:>=] (isInteracting Filter)
[3, Variables, addOr]
[3, Variables, getBoolean, 1:shouldUseSlayerItem, 3:true]
[3, MyPlayer, myPlayerIsInteracting, {false}]
[3, Variables, editBoolean, 1:shouldUseSlayerItem, 3:false]

[4, Variables, getBoolean, 1:shouldUseSlayerItem, 3:true]
[4, Inventory, interactWith, 1:Bag of salt, 1:Use]
[4, NPC, interactWith, 1:Rock slug, 1:Use, 3:true, 3:false, 3:true, 3:false, 3:false] (isInteracting Filter)

 

Edited by FushigiBot

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.