Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This function will drive the player to click on the combat style matching the text in String combat_style
- public static void changeCombatStyle(MethodProvider api, String combat_style)
- {
- //First, get the combat style icon...
- RS2Widget combatStanceIcon = api.getWidgets().get(164, 50);
- //Click on the combat style icon
- if(combatStanceIcon != null){
- combatStanceIcon.interact();
- }
- //Get the combat style widget of the matching combat style
- RS2Widget combatStanceWidget = api.getWidgets().getWidgetContainingText(combat_style);
- //Click on the matching style... switching styles.
- if(combatStanceWidget != null){
- combatStanceWidget.interact();
- }
- //And closing the Combat Style screen
- if(combatStanceIcon != null){
- combatStanceIcon.interact();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement