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.

Need help with NPC facing/Interacting with another player

Featured Replies

So I'm not a complete noob to scripting (not saying I'm crazy good either), but I am very new to the whole combat portion of the api and am in the process of making my first basic combat script.

 

To cut to the point I am unsure what filter/boolean to use for an npc that another playing is splash mage training on. Everything works great, except when a player is splashing the npc/entity I have chosen to train on. It will only click it once (occasionally) and right after get filtered out of the npc requirements and choose to attack a different npc nearby.

 

I was wondering what methods/boolean would prevent this from occuring as I see this as a potential red flag to get detected botting if done frequent enough.

 

Here is my script (feel free to use it, but ask for consent before sharing yourself which I doubt will be an issue) it is kinda sloppy and could definitely be cleaned up, but its my first combat script and have been to lazy to go back and clean and cut down/simplify the script at the momement. 

 

Thank you all in advance.....


Entity name is seagull, because I was using it for seagulls originally and have been lazy to change it to a universal name hahahahah

 

EDIT: oh and the names/int with names like shark and what not are because I never changed/deleted them from the standard template that I use when i write new scripts


Oh and if anyone is interested in non combat scripts I wrote feel free to ask me, I might have what you're looking for that have worked well for me.

Edited by Strange_Fk

 

 

To cut to the point I am unsure what filter/boolean to use for an npc that another playing is splash mage training on. 

 

NPC seagull = npcs.Closest(n -> n.getName().equals("Seagull") && !n.isUnderAttack() && n.getInteracting() == null);

something along those lines. it will search for an seagul, that is called Seagull , is not underattack, and isnt interacting with anyone.

Edited by The Hero of Time

  • Author

 

 

 

 

NPC seagull = npcs.Closest(n -> n.getName().equals("Seagull") && !n.isUnderAttack() && n.getInteracting() == null);

something along those lines. it will search for an seagul, that is called Seagull , is not underattack, and isnt interacting with anyone.

 

Ahh dope ill try that man. I had that but instead of getInteracting() I had !npc.getInteracting(myPlayer). Thanks mate should work man

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.