Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!
RuneMate will permanently shut down on August 7, 2026
due to events outside our control. You can continue using RuneMate until this date after which it will no longer be available. Thank you to everyone that contributed to RuneMate's success and to the community for the opportunity to serve you all these years.

  • Learn about RuneMate Vault and how its zero knowledge local encryption already protects your sensitive information.
  • Edit or delete your RuneMate account from your Account Settings.
  • All account upgrade subscriptions have been cancelled. No action required.

Player in combat?

First Bot Author
Joined
Aug 7, 2013
Messages
262
1: check if local player health bar is showing, if not, return false
2: get all npcs
3: filter the npcs to only npcs that interact with the local player
4: filter the npcs based on attack options (if it cannot be attacked, it’s probably a follower)
5: return true if 1 or more npcs remain
 
Joined
Apr 18, 2015
Messages
408
How about Player#getTarget().getTarget() == Players.getLocal() ?

(Just a thought)

If the players' target's target is the player then they are in combat with eachother, right?
 
The only thing Alpha about me is my bots
Joined
Sep 22, 2014
Messages
618
How about Player#getTarget().getTarget() == Players.getLocal() ?

(Just a thought)

If the players' target's target is the player then they are in combat with eachother, right?

If the player isn't targeting anything, but something is targeting the player, this method will fail.
 
First Bot Author
Joined
Aug 7, 2013
Messages
262
I use:
if player has target || player is targetted
I read this as: player is following another player, player is trading another player, player is trading an npc, player is banking, player has a pet cat
 
Joined
Nov 5, 2014
Messages
505
I use a query to check if any attackable NPC's within a reasonable range have the local player as their target.
 
Top