Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • checking what combat style icon is red?


    sergbot

    Recommended Posts

    Hey, I'm trying to make the client change combat styles. 

    I was usin the interface explorer to try to see what interfaces and children to press to change attack styles. However there seems to be zero discernable chance interface wise between the selected interface and the non selected. Either that or the interface explorer doesnt update at every in game action and if that is the case, then i have to take damn screenshots of everything.

     

     

    Although since this is a more legit client, we cant do shit like check combat styles without the interface being open.... So even if i did figure out how to tell what button is on, id still have to keep going to the combat menu every time i wanted to check if im in aggressive or not, and that would make the script open the combat menu every loop iteration...

     

    So maybe it would be better just to identify what skills are getting experience gained and deduce the combat style that way.. and in that case identifying the red interface is completely pointless.......................

    Link to comment
    Share on other sites

    Widgets hold the current active combat stance ( i believe ID 43 is for combat styles). This can be used in conjuction with below to change combat stance. you will just need to work out correlation of Widget ID value -> Combat stance set

     

            Widget cbtWidget = Widgets.getWidget(593);
            if (cbtWidget == null) {
                return 0;
            }
    
    
            //Select the combat style
            switch (ctx.skills.combat.skillToTrain) {
                case ATTACK:
                    cbtWidget.getChild(4).interact();
                    break;
                case STRENGTH:
                    cbtWidget.getChild(8).interact();
                    break;
                case DEFENCE:
                    cbtWidget.getChild(16).interact();
                    break;
            }
    
            return 0;
        }

     

    Link to comment
    Share on other sites

    13 hours ago, TheCloakdOne said:

    Widgets hold the current active combat stance ( i believe ID 43 is for combat styles). This can be used in conjuction with below to change combat stance. you will just need to work out correlation of Widget ID value -> Combat stance set

     

    
            Widget cbtWidget = Widgets.getWidget(593);
            if (cbtWidget == null) {
                return 0;
            }
    
    
            //Select the combat style
            switch (ctx.skills.combat.skillToTrain) {
                case ATTACK:
                    cbtWidget.getChild(4).interact();
                    break;
                case STRENGTH:
                    cbtWidget.getChild(8).interact();
                    break;
                case DEFENCE:
                    cbtWidget.getChild(16).interact();
                    break;
            }
    
            return 0;
        }

     

    I mean that just turns on a specific combat style. 

    I don't want to blindly keep toggling on attack. 

    So I discovered

    if (Widgets.getWidget(593).getChild(9).getChild(4).getTextureId() == 1145)  {
        log("Aggressive is off, turning on aggressive");
        Widgets.getWidget(593).getChild(9).interact();
        Nap();
    }

    That the texture id is the red stuff, so you can check what combat style is selected, but then again, i just wish i already knew automatically somehow. 

    Link to comment
    Share on other sites

    oh i'm retarded, and that was all pointless

    int combatStyle = PlayerSettings.getConfig(43);

    if (combatStyle != 1) {

    Widgets.getWidget(593).getChild(9).interact();
    }

    if (combatStyle == 0) {//accurate}

    if (combatStyle == 1) {//aggressive}

    if (combatStyle == 2) {//controlled}

    if (combatStyle == 3) {//defensive}

     

     

     

     

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.