• Log in or sign up for an account here: https://www.sythe.org/login

[Tribot] Player.getRSPlayer().isInCombat()

i jamie i

Forum Addict
Joined
Nov 1, 2008
Sythe Gold
0
Messages
258
I am new to java (but not new to programming), and thought I might as well try to make some simple tribot scripts.
Testing the isInCombat method just returns false every time, no matter if my character is in combat. I can't think why this wouldn't be working - is it broken or am I missing something really obvious?
Thanks.
 
Potamus
Wait, do you not have an Archer rank?
Code:
			if (Player.getRSPlayer().getInteractingCharacter() != null
					&& Player.getRSPlayer().getInteractingCharacter()
							.getCombatCycle() > 0) {

Try this snipplet instead.
 
Code:
			if (Player.getRSPlayer().getInteractingCharacter() != null
					&& Player.getRSPlayer().getInteractingCharacter()
							.getCombatCycle() > 0) {

Try this snipplet instead.

Thanks, what does getCombatCycle() do?
 
Potamus
Wait, do you not have an Archer rank?
Gets your combat cycle, if you are trading hits with another NPC it will return an integer of your combat cycle with that NPC.
 
duelarena.gg
Back
Top