Aeglen 328 Share Posted April 20, 2021 Basic Construction This script is probably outdated, but since it's open source you can fix it yourself right Trains Construction from 1-99. Start near Rimmington portal with a house already created. Bring coins, hammer, saw, noted planks, and nails as necessary. The script will progressively build-remove an efficient piece of furniture for your level, up to Oak Larders (thus you should only bring up to oak planks). It stops when it's out of planks, but make sure there's always enough coins and nails or else. There's some anti-ban but it's not as good as that of my other script. Warning: Script can replace the room directly to the north of your portal with whatever it needs for training. The main logic of this script is open source! package nodes; import base.Main; import base.Utils; import org.dreambot.api.methods.container.impl.Inventory; import org.dreambot.api.methods.dialogues.Dialogues; import org.dreambot.api.methods.interactive.GameObjects; import org.dreambot.api.methods.map.Tile; import org.dreambot.api.methods.skills.Skill; import org.dreambot.api.methods.skills.Skills; import org.dreambot.api.methods.widget.Widgets; import org.dreambot.api.script.ScriptManager; import org.dreambot.api.script.TaskNode; import org.dreambot.api.wrappers.interactive.GameObject; public class Construction extends TaskNode { private enum Plank { NORMAL_NOTED(961), OAK_NOTED(8779), NORMAL_ITEM(960), OAK_ITEM(8778); private final int id; Plank(final int x) { id = x; } } private enum Furniture { OAK_LARDER("Oak larder",33,15403,"Kitchen",8,"Larder"), CARVED_OAK_TABLE("Carved oak table",31,15298,"Dining room",6,"Oak table"), OAK_DINING_TABLE("Oak dining table",22,15298,"Dining room",4,"Oak table"), WOODEN_LARDER("Wooden larder",9,15403,"Kitchen",8,"Larder"), WOODEN_BOOKCASE("Wooden bookcase",4,4521,"Parlour",4,"Bookcase"), CRUDE_WOODEN_CHAIR("Crude wooden chair",1,4515,"Parlour",2,"Chair"); private final String name; private final int level; private final int spot_id; private final String room; private final int planks; private final String built_name; Furniture(String name, int level, int spot_id, String room, int planks, String built_name) { this.name = name; this.level = level; this.spot_id = spot_id; this.room = room; this.planks = planks; this.built_name = built_name; } } @Override public int priority() { //higher = more important return 0; } @Override public boolean accept() { //when to do it return Main.task.equals("Construction"); } @Override public int execute() { //decide what to build int level = Skills.getRealLevel(Skill.CONSTRUCTION); int best_level = -1; Furniture thing_to_build = Furniture.CRUDE_WOODEN_CHAIR; for (Furniture f: Furniture.values()) { if (f.level > best_level) { best_level = level; thing_to_build = f; } } log("Want to build " + thing_to_build.name); //decide what planks it needs int plank_id; if (thing_to_build.level < 15) { plank_id = Plank.NORMAL_NOTED.id; } else { plank_id = Plank.OAK_NOTED.id; if (Inventory.contains(Plank.NORMAL_ITEM.id) && getLocalPlayer().getX() < 3000) { log("Dropping old planks"); //can't do this in the house, hence < 3000 Inventory.dropAll(Plank.NORMAL_ITEM.id); sleep(Utils.delay(Main.standard_delay)); } } //check for out of resources if (Inventory.count(plank_id) < 28 && !Inventory.isFull()) { log("Low on planks!"); return -1; } if (getLocalPlayer().getX() < 3000 && Inventory.contains(plank_id) && !Inventory.isFull()) { log("Un-noting planks"); //check if upstairs by mistake if (getLocalPlayer().getZ() == 1) { Utils.moveFloor(0); } Utils.walkTo(new Tile(2949, 3213)); int plank_count = Inventory.count(plank_id); Utils.useOnNPC(plank_id, "Phials"); sleepUntil(()-> Dialogues.inDialogue(), Utils.delay(3000)); Utils.solveDialogue(3); int temp = plank_id; sleepUntil(()-> Inventory.count(temp) < plank_count, Utils.delay(2000)); return Utils.delay(Main.standard_delay); } //go to house if (getLocalPlayer().getX() < 3000) { log("Entering house"); //check if house advertisement opened by mistake if (Utils.getCloseButton() != null) { Utils.getCloseButton().interact(); } Utils.interactOBJ("Portal","Build mode",null); sleep(Utils.delay(1000)); sleepUntil(() -> getLocalPlayer().getX() > 3000,20000); Utils.waitUntilNotLoading(); sleepUntil(() -> !Utils.checkForCutscene(),20000); return Utils.delay(Main.standard_delay); } //check for building spot if (getLocalPlayer().getX() > 3000) { log("Looking for building spot"); int spot_id = thing_to_build.spot_id; GameObject building_spot_temp = GameObjects.closest(spot_id); if (building_spot_temp == null) { //build the room String desired_room = thing_to_build.room; log("Building new " + desired_room); Tile portal = GameObjects.closest("Portal").getTile(); Tile target_tile = new Tile(portal.getX(),portal.getY()+4); //the door to the north Utils.walkTo(target_tile,true); //it's important to be in the portal room for this GameObject hotspot = GameObjects.closest("Door hotspot"); hotspot.interact("Build"); sleepUntil(()-> Utils.getWidgetWithAction(desired_room)!=null || Dialogues.inDialogue(), Utils.delay(10000)); if (Dialogues.inDialogue()) { Utils.solveDialogue(1); //remove existing room sleep(Utils.delay(1000)); Utils.waitUntilNotLoading(); sleepUntil(() -> !Utils.checkForCutscene(),20000); } sleep(Utils.delay(Main.standard_delay)); if (Utils.getWidgetWithAction(desired_room) != null) { Utils.getWidgetWithAction(desired_room).interact(); sleepUntil(() -> Dialogues.inDialogue(), Utils.delay(10000)); Utils.solveDialogue(3); sleep(Utils.delay(1000)); Utils.waitUntilNotLoading(); sleepUntil(() -> !Utils.checkForCutscene(),20000); } return Utils.delay(Main.standard_delay); } else { if (thing_to_build.name.equals("Wooden bookcase")) { Utils.walkTo(new Tile(building_spot_temp.getTile().getX() - 1, building_spot_temp.getTile().getY())); //db collision seems buggy in POH } else { Utils.walkTo(new Tile(building_spot_temp.getTile().getX(), building_spot_temp.getTile().getY() - 1)); //db collision seems buggy in POH } int plank_id_2; if (thing_to_build.level < 15) { plank_id_2 = Plank.NORMAL_ITEM.id; } else { plank_id_2 = Plank.OAK_ITEM.id; } while(Inventory.count(plank_id_2) >= thing_to_build.planks) { //has resources if (!ScriptManager.getScriptManager().isRunning()) { return -1; } log("Building " + thing_to_build.name); final GameObject building_spot = GameObjects.closest(spot_id); if (building_spot != null) { building_spot.interact(); final String temp = thing_to_build.name; sleepUntil(() -> Widgets.getWidgetChildrenContainingText(temp).size() > 0, Utils.delay(10000)); sleep(Utils.delay(Main.standard_delay)); Widgets.getWidgetChildrenContainingText(temp).get(0).interact(); sleepUntil(() -> !building_spot.exists(), Utils.delay(10000)); sleepUntil(() -> !getLocalPlayer().isAnimating(), Utils.delay(6000)); } if (building_spot == null || !building_spot.exists()) { log("Removing " + thing_to_build.built_name); GameObject thing = GameObjects.closest(thing_to_build.built_name); if (thing == null) { return Utils.delay(Main.standard_delay); } else { thing.interact("Remove"); sleepUntil(()-> Dialogues.inDialogue(), Utils.delay(10000)); Utils.solveDialogue(1); sleepUntil(() -> getLocalPlayer().isAnimating(), Utils.delay(2000)); sleepUntil(() -> !getLocalPlayer().isAnimating(), Utils.delay(6000)); sleep(Main.standard_delay); } } } //leave house log("Leaving house"); GameObject portal = GameObjects.closest("Portal"); Utils.walkTo(portal.getTile()); portal.interact(); sleep(Utils.delay(1000)); sleepUntil(() -> getLocalPlayer().getX() < 3000,20000); Utils.waitUntilNotLoading(); sleepUntil(() -> !Utils.checkForCutscene(),20000); return Utils.delay(Main.standard_delay); } } return Utils.delay(Main.standard_delay); } } Link to comment Share on other sites More sharing options...
Hashtag 8822 Share Posted April 23, 2021 Released! Link to comment Share on other sites More sharing options...
Rias Gremory 11 Share Posted April 26, 2021 nice work @Aeglen Link to comment Share on other sites More sharing options...
yahpure 0 Share Posted June 4, 2021 DO NOT USE! GOT MY MAIN ACCOUNT PERM BANNED AFTER HOUR OF USING. Link to comment Share on other sites More sharing options...
purepanic 48 Share Posted June 4, 2021 1 hour ago, yahpure said: DO NOT USE! GOT MY MAIN ACCOUNT PERM BANNED AFTER HOUR OF USING. Botting is a bannable offence 😕 All accounts get banned at some point. Link to comment Share on other sites More sharing options...
Aeglen 328 Author Share Posted June 4, 2021 2 hours ago, yahpure said: DO NOT USE! GOT MY MAIN ACCOUNT PERM BANNED AFTER HOUR OF USING. Sounds implausible given my own and others' results, but rip Link to comment Share on other sites More sharing options...
hans123poep 2 Share Posted July 9, 2021 Funny enough i got banned on my main but not for using this script. I used this script to get from 50-ish to 75 and never even got noticed, later on i got banned for using a different script and client ^^. New main in the making so let's hope this doesn't get caught like before, anyway it's a nice script you made, because training construction isn't that fun for my arm. Link to comment Share on other sites More sharing options...
hans123poep 2 Share Posted July 10, 2021 23 hours ago, hans123poep said: Funny enough i got banned on my main but not for using this script. I used this script to get from 50-ish to 75 and never even got noticed, later on i got banned for using a different script and client ^^. New main in the making so let's hope this doesn't get caught like before, anyway it's a nice script you made, because training construction isn't that fun for my arm. Well i got temp banned because of this. On the bright side i'll get it back in 1 day, to add that my construction will then be still 64 ^^ on the otherside i'm not risking this again. Link to comment Share on other sites More sharing options...
kibblenz 0 Share Posted December 24, 2021 My dude is level 1 construction, went and bought the house from the bloke in Varrock for 1 grand. Gone to my house with all the gear and he starts out trying to build a level 4 bookcase and keeps producing errors in chat. This would probably lead to detection. Gonna manually get to bookcase level and see how it goes after. EDIT: Yeah this is shit, I got level 5 and it tries to buy a kitchen and build larders. Nuk good Link to comment Share on other sites More sharing options...
Aeglen 328 Author Share Posted December 24, 2021 6 hours ago, kibblenz said: My dude is level 1 construction, went and bought the house from the bloke in Varrock for 1 grand. Gone to my house with all the gear and he starts out trying to build a level 4 bookcase and keeps producing errors in chat. This would probably lead to detection. Gonna manually get to bookcase level and see how it goes after. EDIT: Yeah this is shit, I got level 5 and it tries to buy a kitchen and build larders. Nuk good Maybe it finally stopped working, maybe you didn't follow the instructions. Meh, it's open-source so if you really want the bot you can probably figure it out. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.