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
  • Change NPC options to always left click


    claybotter

    Recommended Posts

        public void setAttackStyle() {
            getTabs().open(Tab.OPTIONS);
            sleep(1000);
            if (getWidgets().getWidget(261).getChild(1).getChild(6) != null) {
                getWidgets().getWidget(261).getChild(1).getChild(6).interact();
                sleep(1000);
            }
            if (getWidgets().getWidget(261).getChild(70).getChild(4) != null) {
                getWidgets().getWidget(261).getChild(70).getChild(4).interact();
                sleep(1000);
            }
            if (getWidgets().getWidget(261).getChild(86).getChild(3) != null) {
                getWidgets().getWidget(261).getChild(86).getChild(3).interact();
                sleep(1000);
            }
            getTabs().open(Tab.INVENTORY);
            sleep(1000);
        }
     

    Link to comment
    Share on other sites

    private enum AttackOption {
            DEPENDS_ON_COMBAT_LEVEL, ALWAYS_RIGHT_CLICK, LEFT_CLICK_WHERE_AVAILABLE, HIDDEN
        }
    	
        private boolean isAttackOption(SettingType settingType, AttackOption attackOption) {
            return (getPlayerSettings().getConfig(settingType.getConfigValue()) & attackOption.ordinal()) == attackOption.ordinal();
        }
        private enum SettingType {
        	PLAYER(69, 85, 1107), NPC(70, 86, 1306);
            private int mainChildIndex, childIndex, configValue;
    
            SettingType(int mainChildIndex, int childIndex, int configValue) {
                this.mainChildIndex = mainChildIndex;
                this.childIndex = childIndex;
                this.configValue = configValue;
            }
    
            public int getMainChildIndex() {
                return mainChildIndex;
            }
    
            public int getChildIndex() {
                return childIndex;
            }
    
            public int getConfigValue() {
                return configValue;
            }
        }
        // Attack options
        private boolean openConfig() {
            return getTabs().isOpen(Tab.OPTIONS) || m.getTabs().open(Tab.OPTIONS);
        }
    
        private boolean openControls() {
            WidgetChild configChild = getWidgets().getWidgetChild(261, 1, 6);
            return configChild != null && (configChild.getTextureId() == 762 || configChild.interact("Controls"));
        }
    
        private boolean toggleAttackOption(SettingType settingType, AttackOption attackOption) {
            if (openConfig() && openControls()) {
                WidgetChild optionChild = getWidgets().getWidgetChild(261, settingType.getChildIndex(), (attackOption.ordinal() + 1));
                if (optionChild != null && optionChild.isVisible()) {
                    return optionChild.interact();
                } else {
                    WidgetChild comboBox = getWidgets().getWidgetChild(261, settingType.getMainChildIndex(), 0);
                    return comboBox != null && comboBox.interact();
                }
            }
            return false;
        }		

    Credits to: @Dinh 

    Link to comment
    Share on other sites

    11 hours ago, Nex said:
    
    private enum AttackOption {
            DEPENDS_ON_COMBAT_LEVEL, ALWAYS_RIGHT_CLICK, LEFT_CLICK_WHERE_AVAILABLE, HIDDEN
        }
    	
        private boolean isAttackOption(SettingType settingType, AttackOption attackOption) {
            return (getPlayerSettings().getConfig(settingType.getConfigValue()) & attackOption.ordinal()) == attackOption.ordinal();
        }
        private enum SettingType {
        	PLAYER(69, 85, 1107), NPC(70, 86, 1306);
            private int mainChildIndex, childIndex, configValue;
    
            SettingType(int mainChildIndex, int childIndex, int configValue) {
                this.mainChildIndex = mainChildIndex;
                this.childIndex = childIndex;
                this.configValue = configValue;
            }
    
            public int getMainChildIndex() {
                return mainChildIndex;
            }
    
            public int getChildIndex() {
                return childIndex;
            }
    
            public int getConfigValue() {
                return configValue;
            }
        }
        // Attack options
        private boolean openConfig() {
            return getTabs().isOpen(Tab.OPTIONS) || m.getTabs().open(Tab.OPTIONS);
        }
    
        private boolean openControls() {
            WidgetChild configChild = getWidgets().getWidgetChild(261, 1, 6);
            return configChild != null && (configChild.getTextureId() == 762 || configChild.interact("Controls"));
        }
    
        private boolean toggleAttackOption(SettingType settingType, AttackOption attackOption) {
            if (openConfig() && openControls()) {
                WidgetChild optionChild = getWidgets().getWidgetChild(261, settingType.getChildIndex(), (attackOption.ordinal() + 1));
                if (optionChild != null && optionChild.isVisible()) {
                    return optionChild.interact();
                } else {
                    WidgetChild comboBox = getWidgets().getWidgetChild(261, settingType.getMainChildIndex(), 0);
                    return comboBox != null && comboBox.interact();
                }
            }
            return false;
        }		

    Credits to: @Dinh 

    gunna use this instead ty

     

    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.