July 7, 201510 yr When i was a little kid i always dreamed about making my own bot. My first attempt was at p****bot but they were not providing good tutorials like osbot. I found out about osbot yesterday and the tutorials was so good that i made my own working bot. Thanks OSBOT SIMPLE WOODCUTTING BOT (first bot in 6hrs) import javafx.animation.Animation; import org.osbot.rs07.api.Inventory; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(logo="",version = 1, author = "Hajar424", info = "" , name = "W3" ) public class Woodcutter extends Script{ final String tree = "Tree"; @Override public int onLoop() throws InterruptedException { Inventory invent = inventory.getInventory(); if (!invent.isFull()){ Entity TREE = objects.closest(tree); if (TREE != null){ if (TREE.isVisible()){ { TREE.interact("Chop down"); } }else{ camera.toEntity(TREE); } } }else{ inventory.dropAll(); } return 50; } }
July 7, 201510 yr You don't even need to add that visibility check, interaction event takes care of that for you. RS2Object tree = objects.closest(tree); if(tree != null){ tree.interact("Chop down"); }
July 7, 201510 yr When i was a little kid i always dreamed about making my own bot. My first attempt was at p****bot but they were not providing good tutorials like osbot. I found out about osbot yesterday and the tutorials was so good that i made my own working bot. Thanks OSBOT SIMPLE WOODCUTTING BOT (first bot in 6hrs) import javafx.animation.Animation; import org.osbot.rs07.api.Inventory; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(logo="",version = 1, author = "Hajar424", info = "" , name = "W3" ) public class Woodcutter extends Script{ final String tree = "Tree"; @Override public int onLoop() throws InterruptedException { Inventory invent = inventory.getInventory(); if (!invent.isFull()){ Entity TREE = objects.closest(tree); // might want to check if the tree is reachable if (TREE != null){ if (TREE.isVisible()){ // no need for this, client does that for you. { // remove TREE.interact("Chop down"); } // remove }else{ // remove camera.toEntity(TREE); // remove } // remove } }else{ inventory.dropAll(); // might change to dropAllExcept(Axes) } return 50; } } Good to see some new scripters around here! I added some notes in the code above ^^ Feel free to Message me your code if you want to feedback on it Khaleesi Edited July 7, 201510 yr by Khaleesi
July 7, 201510 yr Author Good to see some new scripters around here! I added some notes in the code above ^^ Feel free to Message me your code if you want to feedback on it Khaleesi Thanks, i have a question btw, do you know how to bank the logs? Right now i drop them inventory.dropAll("Oak logs"); Edited July 7, 201510 yr by hajar424
July 7, 201510 yr Thanks, i have a question btw, do you know how to bank the logs? Right now i drop them inventory.dropAll("Oak logs"); 1) Walk to a bank 2) bank.open(); 3) bank.depositAll("Oak logs"); Edited July 7, 201510 yr by Khaleesi
July 7, 201510 yr Author 1) Walk to a bank 2) bank.open(); 3) bank.depositAll("Oak logs"); it work but i dont know how to walk to a position, sorry for asking to much /:
July 8, 201510 yr Would need some work... i can help if you want not crazy good or anything but ive written about 3 scripts currently 2 level 80 wcs after about 1 week could definitely help if you want but I'm not the most efficient pm for my skype if you want help.
July 8, 201510 yr it work but i dont know how to walk to a position, sorry for asking to much /: To walk to a position: getLocalWalker().walk(Position) To walk a path: getLocalWalker().walkPath(Position[])