osrsbot69 1 Share Posted April 17, 2020 I am starting on working on own tutorial island script at the moment, and am just wondering if anyone has experience with the clothing/character customization. Is there a good way of doing this? I imagine its using widgets but it seems like a real pain to do. Will adjusting the clothing randomly even have an affect on ban rate, like is this a pointless thing to even do? Side note, does anyone have these widget ids or a snippet I could steal? Thanks guys. Link to comment Share on other sites More sharing options...
Defiled 423 Share Posted April 17, 2020 2 hours ago, osrsbot69 said: I am starting on working on own tutorial island script at the moment, and am just wondering if anyone has experience with the clothing/character customization. Is there a good way of doing this? I imagine its using widgets but it seems like a real pain to do. Will adjusting the clothing randomly even have an affect on ban rate, like is this a pointless thing to even do? Side note, does anyone have these widget ids or a snippet I could steal? Thanks guys. Changing the clothing of the bot decreases the stares of the people that speaks "Oh there's a standard bot" and yeah.. its through widgets.. you don't have to customize all the bot.. just pick 2 - 3 clothing and their colors then loop a random number of clicks.. Here's some widgets //Gender Picking WidgetChild male = a.getWidgets().getWidgetChild(269,138); WidgetChild female = a.getWidgets().getWidgetChild(269,139); //Changing hair WidgetChild changehair = a.getWidgets().getWidgetChild(269,106); //Colouring hair WidgetChild colourhair = a.getWidgets().getWidgetChild(269,105); //Change torso WidgetChild changetorso = a.getWidgets().getWidgetChild(269,108); //Colour torso WidgetChild colourtorso = a.getWidgets().getWidgetChild(269,123); //Colour legs WidgetChild colourlegs = a.getWidgets().getWidgetChild(269,122); WidgetChild acceptbutton = a.getWidgets().getWidgetChild(269,100); TIP: you can loop instead of creating multiple Widget Objects stacked above each other creating stage 4 cancer by a loop that loops a random amount of times and clicks random widgetChildren on the widget 269. Link to comment Share on other sites More sharing options...
Soldtodie 76 Share Posted April 17, 2020 import org.dreambot.api.methods.MethodContext; import org.dreambot.api.methods.tabs.Tab; import org.dreambot.api.methods.widget.Widget; import org.dreambot.api.wrappers.widgets.WidgetChild; import java.util.List; import static org.dreambot.api.methods.Calculations.random; /** * Created by Soldtodie on 03.03.2017. */ public class CreationTool { private MethodContext mp; public CreationTool(MethodContext mp) { this.mp = mp; init(); } public void createAccount() { if(random(0, 1) == 0) { wgs[24].interact(); } else { wgs[25].interact(); } mp.sleep(random(100, 1000)); for(int i = 0; i < random(2, 30); i++) { wgs[random(0, 23)].interact(); mp.sleep(random(50, 500)); } mp.sleep(random(500, 1500)); acceptWidget.interact(); } public boolean isReady() { return isInitialized() && isOpen(); } public void init() { if(!isInitialized() && isOpen()) { setAcceptButton(); setGenderButtons(); setLeftRightButtons(); } } public boolean isInitialized() { return colorSkinRight != -1 && genderFemale != -1 && accept != -1; } public boolean isOpen() { List<WidgetChild> widgets = getRootWidgets(); if(widgets != null) { for(WidgetChild wid : widgets) { if(wid != null && wid.getText().contains("Use the buttons below to design your player")) { return true; } } } return false; } public void setAcceptButton() { List<WidgetChild> widgets = getRootWidgets(); if(widgets != null) { for(int i = 0; i < widgets.size(); i++) { if(widgets.get(i) != null && widgets.get(i).getTooltip() != null && !widgets.get(i).getTooltip().equals("")) { if(widgets.get(i).getTooltip().equals("Accept")) { accept = i; acceptWidget = widgets.get(i); return; } } } } } public void setGenderButtons() { List<WidgetChild> widgets = getRootWidgets(); if(widgets != null) { for(int i = 0; i < widgets.size(); i++) { if(widgets.get(i) != null && widgets.get(i).getTooltip() != null && !widgets.get(i).getTooltip().equals("")) { switch(widgets.get(i).getTooltip()) { case "Male": genderMale = i; wgs[24] = widgets.get(i); case "Female": genderFemale = i; wgs[25] = widgets.get(i); } } } } } public void setLeftRightButtons() { List<WidgetChild> widgets = getRootWidgets(); if(widgets != null) { for(int i = 0; i < widgets.size(); i++) { if(widgets.get(i) != null && (widgets.get(i).getTextureId() == buttonLeft || widgets.get(i).getTextureId() == buttonRight)) { switch(widgets.get(i).getTooltip()) { case "Change head": if(widgets.get(i).getTextureId() == buttonLeft) { designHeadLeft = i; wgs[0] = widgets.get(i); } else { designHeadRight = i; wgs[1] = widgets.get(i); } case "Change jaw": if(widgets.get(i).getTextureId() == buttonLeft) { designJawLeft = i; wgs[2] = widgets.get(i); } else { designJawRight = i; wgs[3] = widgets.get(i); } case "Change torso": if(widgets.get(i).getTextureId() == buttonLeft) { designTorsoLeft = i; wgs[4] = widgets.get(i); } else { designTorsoRight = i; wgs[5] = widgets.get(i); } case "Change arms": if(widgets.get(i).getTextureId() == buttonLeft) { designArmsLeft = i; wgs[6] = widgets.get(i); } else { designArmsRight = i; wgs[7] = widgets.get(i); } case "Change hands": if(widgets.get(i).getTextureId() == buttonLeft) { designHandsLeft = i; wgs[8] = widgets.get(i); } else { designHandsRight = i; wgs[9] = widgets.get(i); } case "Change legs": if(widgets.get(i).getTextureId() == buttonLeft) { designLegsLeft = i; wgs[10] = widgets.get(i); } else { designLegsRight = i; wgs[11] = widgets.get(i); } case "Change feet": if(widgets.get(i).getTextureId() == buttonLeft) { designFeetLeft = i; wgs[12] = widgets.get(i); } else { designFeetRight = i; wgs[13] = widgets.get(i); } case "Recolour hair": if(widgets.get(i).getTextureId() == buttonLeft) { colorHairLeft = i; wgs[14] = widgets.get(i); } else { colorHairRight = i; wgs[15] = widgets.get(i); } case "Recolour torso": if(widgets.get(i).getTextureId() == buttonLeft) { colorTorsoLeft = i; wgs[16] = widgets.get(i); } else { colorTorsoRight = i; wgs[17] = widgets.get(i); } case "Recolour legs": if(widgets.get(i).getTextureId() == buttonLeft) { colorLegsLeft = i; wgs[18] = widgets.get(i); } else { colorLegsRight = i; wgs[19] = widgets.get(i); } case "Recolour feet": if(widgets.get(i).getTextureId() == buttonLeft) { colorFeetLeft = i; wgs[20] = widgets.get(i); } else { colorFeetRight = i; wgs[21] = widgets.get(i); } case "Recolour skin": if(widgets.get(i).getTextureId() == buttonLeft) { colorSkinLeft = i; wgs[22] = widgets.get(i); } else { colorSkinRight = i; wgs[23] = widgets.get(i); } } } } } } public List<WidgetChild> getRootWidgets() { Widget wg = mp.getWidgets().getWidget(root); if(wg != null) { return wg.getChildren(); } return null; } private final int root = 269; private final int buttonLeft = 308; private final int buttonRight = 309; WidgetChild[] wgs = new WidgetChild[26]; WidgetChild acceptWidget; private int designHeadLeft = -1; private int designJawLeft = -1; private int designTorsoLeft = -1; private int designArmsLeft = -1; private int designHandsLeft = -1; private int designLegsLeft = -1; private int designFeetLeft = -1; private int colorHairLeft = -1; private int colorTorsoLeft = -1; private int colorLegsLeft = -1; private int colorFeetLeft = -1; private int colorSkinLeft = -1; private int designHeadRight = -1; private int designJawRight = -1; private int designTorsoRight = -1; private int designArmsRight = -1; private int designHandsRight = -1; private int designLegsRight = -1; private int designFeetRight = -1; private int colorHairRight = -1; private int colorTorsoRight = -1; private int colorLegsRight = -1; private int colorFeetRight = -1; private int colorSkinRight = -1; private int genderMale = -1; private int genderFemale = -1; private int accept = -1; } I don't know if it works... Link to comment Share on other sites More sharing options...
osrsbot69 1 Author Share Posted April 17, 2020 Awesome thanks guys. Link to comment Share on other sites More sharing options...
kamilo 7 Share Posted May 14, 2020 On 4/17/2020 at 6:12 PM, Soldtodie said: import org.dreambot.api.methods.MethodContext; import org.dreambot.api.methods.tabs.Tab; import org.dreambot.api.methods.widget.Widget; import org.dreambot.api.wrappers.widgets.WidgetChild; import java.util.List; import static org.dreambot.api.methods.Calculations.random; /** * Created by Soldtodie on 03.03.2017. */ public class CreationTool { private MethodContext mp; public CreationTool(MethodContext mp) { this.mp = mp; init(); } public void createAccount() { if(random(0, 1) == 0) { wgs[24].interact(); } else { wgs[25].interact(); } mp.sleep(random(100, 1000)); for(int i = 0; i < random(2, 30); i++) { wgs[random(0, 23)].interact(); mp.sleep(random(50, 500)); } mp.sleep(random(500, 1500)); acceptWidget.interact(); } public boolean isReady() { return isInitialized() && isOpen(); } public void init() { if(!isInitialized() && isOpen()) { setAcceptButton(); setGenderButtons(); setLeftRightButtons(); } } public boolean isInitialized() { return colorSkinRight != -1 && genderFemale != -1 && accept != -1; } public boolean isOpen() { List<WidgetChild> widgets = getRootWidgets(); if(widgets != null) { for(WidgetChild wid : widgets) { if(wid != null && wid.getText().contains("Use the buttons below to design your player")) { return true; } } } return false; } public void setAcceptButton() { List<WidgetChild> widgets = getRootWidgets(); if(widgets != null) { for(int i = 0; i < widgets.size(); i++) { if(widgets.get(i) != null && widgets.get(i).getTooltip() != null && !widgets.get(i).getTooltip().equals("")) { if(widgets.get(i).getTooltip().equals("Accept")) { accept = i; acceptWidget = widgets.get(i); return; } } } } } public void setGenderButtons() { List<WidgetChild> widgets = getRootWidgets(); if(widgets != null) { for(int i = 0; i < widgets.size(); i++) { if(widgets.get(i) != null && widgets.get(i).getTooltip() != null && !widgets.get(i).getTooltip().equals("")) { switch(widgets.get(i).getTooltip()) { case "Male": genderMale = i; wgs[24] = widgets.get(i); case "Female": genderFemale = i; wgs[25] = widgets.get(i); } } } } } public void setLeftRightButtons() { List<WidgetChild> widgets = getRootWidgets(); if(widgets != null) { for(int i = 0; i < widgets.size(); i++) { if(widgets.get(i) != null && (widgets.get(i).getTextureId() == buttonLeft || widgets.get(i).getTextureId() == buttonRight)) { switch(widgets.get(i).getTooltip()) { case "Change head": if(widgets.get(i).getTextureId() == buttonLeft) { designHeadLeft = i; wgs[0] = widgets.get(i); } else { designHeadRight = i; wgs[1] = widgets.get(i); } case "Change jaw": if(widgets.get(i).getTextureId() == buttonLeft) { designJawLeft = i; wgs[2] = widgets.get(i); } else { designJawRight = i; wgs[3] = widgets.get(i); } case "Change torso": if(widgets.get(i).getTextureId() == buttonLeft) { designTorsoLeft = i; wgs[4] = widgets.get(i); } else { designTorsoRight = i; wgs[5] = widgets.get(i); } case "Change arms": if(widgets.get(i).getTextureId() == buttonLeft) { designArmsLeft = i; wgs[6] = widgets.get(i); } else { designArmsRight = i; wgs[7] = widgets.get(i); } case "Change hands": if(widgets.get(i).getTextureId() == buttonLeft) { designHandsLeft = i; wgs[8] = widgets.get(i); } else { designHandsRight = i; wgs[9] = widgets.get(i); } case "Change legs": if(widgets.get(i).getTextureId() == buttonLeft) { designLegsLeft = i; wgs[10] = widgets.get(i); } else { designLegsRight = i; wgs[11] = widgets.get(i); } case "Change feet": if(widgets.get(i).getTextureId() == buttonLeft) { designFeetLeft = i; wgs[12] = widgets.get(i); } else { designFeetRight = i; wgs[13] = widgets.get(i); } case "Recolour hair": if(widgets.get(i).getTextureId() == buttonLeft) { colorHairLeft = i; wgs[14] = widgets.get(i); } else { colorHairRight = i; wgs[15] = widgets.get(i); } case "Recolour torso": if(widgets.get(i).getTextureId() == buttonLeft) { colorTorsoLeft = i; wgs[16] = widgets.get(i); } else { colorTorsoRight = i; wgs[17] = widgets.get(i); } case "Recolour legs": if(widgets.get(i).getTextureId() == buttonLeft) { colorLegsLeft = i; wgs[18] = widgets.get(i); } else { colorLegsRight = i; wgs[19] = widgets.get(i); } case "Recolour feet": if(widgets.get(i).getTextureId() == buttonLeft) { colorFeetLeft = i; wgs[20] = widgets.get(i); } else { colorFeetRight = i; wgs[21] = widgets.get(i); } case "Recolour skin": if(widgets.get(i).getTextureId() == buttonLeft) { colorSkinLeft = i; wgs[22] = widgets.get(i); } else { colorSkinRight = i; wgs[23] = widgets.get(i); } } } } } } public List<WidgetChild> getRootWidgets() { Widget wg = mp.getWidgets().getWidget(root); if(wg != null) { return wg.getChildren(); } return null; } private final int root = 269; private final int buttonLeft = 308; private final int buttonRight = 309; WidgetChild[] wgs = new WidgetChild[26]; WidgetChild acceptWidget; private int designHeadLeft = -1; private int designJawLeft = -1; private int designTorsoLeft = -1; private int designArmsLeft = -1; private int designHandsLeft = -1; private int designLegsLeft = -1; private int designFeetLeft = -1; private int colorHairLeft = -1; private int colorTorsoLeft = -1; private int colorLegsLeft = -1; private int colorFeetLeft = -1; private int colorSkinLeft = -1; private int designHeadRight = -1; private int designJawRight = -1; private int designTorsoRight = -1; private int designArmsRight = -1; private int designHandsRight = -1; private int designLegsRight = -1; private int designFeetRight = -1; private int colorHairRight = -1; private int colorTorsoRight = -1; private int colorLegsRight = -1; private int colorFeetRight = -1; private int colorSkinRight = -1; private int genderMale = -1; private int genderFemale = -1; private int accept = -1; } I don't know if it works... hair colour left button and leg colour left button are appearing wrong, i dont get why they should every other butotn is right tryna debug it rn Link to comment Share on other sites More sharing options...
kamilo 7 Share Posted May 14, 2020 update.. this man forgot to add break; in those switch-case statement.... thanks for wasting my 3 hours.. but thanks for the codee too i guess Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.