By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!private boolean isFamiliarPresent() {
Varbit value = Varbits.load(6051);
return value != null && value.getValue() > 0;
}
I'm sorry to hijack the thread some, but why did you never inform me that you found a more reliable way to detect if a familiar is present xD Does that apply to all familiars, and also does it not include pets that follow you?You can check if familiar is active with the Player class, or use varbits as I've noticed in the past using the Player class can fail in some cases:
Code:private boolean isFamiliarPresent() { Varbit value = Varbits.load(6051); return value != null && value.getValue() > 0; }
You'd be better off using an ActionBar query to get the specific slot object containing the ability/item you're looking for and then using activate() (I believe that's what the method is called anyways). Requiring a user to have things in specific slots is a pain for the user and will become annoying for you when people say something isn't working properly. Plus it's almost just as quick to write.Got those two working, any idea how to click on the first slot in the action bar?
I did not know this. Thanks!You can check if familiar is active with the Player class, or use varbits as I've noticed in the past using the Player class can fail in some cases:
Code:private boolean isFamiliarPresent() { Varbit value = Varbits.load(6051); return value != null && value.getValue() > 0; }
We use essential cookies to make this site work, and optional cookies to enhance your experience.