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.

Resolved combat options

Joined
May 16, 2019
Messages
18
I haven't found if this was already implemented or if I had to do it from scratch.

It seems you can open the COMBAT_OPTIONS menu, but you can't select an attack mode or change it. For instance, change from "Stab" to "Slash" or "Defend" and such.

I was wondering if that was already implemented or if I had to do it myself. And if it's already implemented, where is it? I can't seem to find it in the documentation, but I'm not yet very familiar with it.

EDIT:

I've hacked a solution, though I'm far from sure that's how it's supposed to be done. Presuming I'm not supposed to change to the tab, scan through all the interface until I find the right button, and click it.
 
Last edited:
#1 Fabric Cleaner
Joined
Mar 18, 2017
Messages
393
I believe the there is no method within the API to change combat modes but you can implement a method very easily. Just use visual developer or interface explorer to see exactly what the interfaceconainer and interfacecomponent are and do it from there. You will have to deal with interfaces at one point so it might as well be now!
 
Joined
May 16, 2019
Messages
18
I believe the there is no method within the API to change combat modes but you can implement a method very easily. Just use visual developer or interface explorer to see exactly what the interfaceconainer and interfacecomponent are and do it from there. You will have to deal with interfaces at one point so it might as well be now!

Yeah, for now I did a very hacky thing that works, but because I'm not sure of how exactly it's being implemented on the API side, I'm not even sure if it's safe. I did that quick thing just to see if it worked - it did. But yeah, if I ever feel like it's very important, I'll re-visit it and make sure I'm doing it in a safer way if possible.



for(InterfaceComponent ic : Interfaces.getLoaded()){
if(ic.getText() != null){
String txt = ic.getText().trim().toLowerCase();
if(txt.equals(mode)){
System.out.println(mode+" FOUND");
ic.click();
break;​
}​
}​
}


PS: How do I write code in here without going through the pain of manually indenting it?
 
Joined
Jun 9, 2015
Messages
3,745
Use queries to get the right interface. See here. They're easy to use and much more efficient.
 
Joined
May 16, 2019
Messages
18
Use queries to get the right interface. See here. They're easy to use and much more efficient.

Yeah, I've used them at quite a few places so far, didn't know they worked in interface too. That solves that then. Thanks a lot!
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
I have an API for the entire combat options tab that will be going in the xapi very soon.
 
Joined
May 16, 2019
Messages
18
I have an API for the entire combat options tab that will be going in the xapi very soon.

Awesome! Yeah, I dealt with it in the end using the Interface API. Ended up a learning experience anyways. Thank you!
 
Top