Everything posted by wood1master7
-
Wood's Flax Picker And Bow Stringer
I believe i fixed the evil chick atm. I might make it so it can suppor the random pop ups, and i am making it so it wont log out... Unless it is really really stuck. -----------------------------------------EDIT--------------------------------------------- Next update WILL support running.
-
Wood's Flax Picker And Bow Stringer
Ok guys. I'll start working on the randoms . Anyways, the troble and random logging out is a catch. You should make an account so it can log in, once out. This happens when the bot is broke and needs to be fixed or if it is running slowly. Don't worry i am updating the log out part. That'll become last resort. Thanks for the support guys! Ill get updating!
-
BETA v1.4.1
My flax picker and bser is flawless.
-
How to Get Parents and Children of Interfaces
Thanks for big help
-
How to Get Parents and Children of Interfaces
I realized that... lol sorry. Anyways, do i have to add like, client. or client.getMyPlayer() ?
-
How to Get Parents and Children of Interfaces
Where's the method provider?
-
How to Get Parents and Children of Interfaces
Well i guess i mean my brain doesn't work... can you explain all the numbers in the black box? like P: parent and C: child How do i tell the interface, that's the P right? Like can you tell me how to turn on run? Through code?
-
How to Get Parents and Children of Interfaces
How do i get the above (title) using OSBOT client... I tryed using the interface thing, and the interface debugger... They d on't seem to work or something, what do i do?
-
Flax Picker
It's all good... I mean it's still your code. I did that because some people said that it couldn't always go to the point you had, so i did it this way, so if it fails one way, it has 12 other options... Oh and can you change it to this: import java.awt.*import org.osbot.script.Scriptimport org.osbot.script.ScriptManifestimport org.osbot.script.mouse.*import org.osbot.script.rs2.*import org.osbot.script.rs2.map.Positionimport org.osbot.script.rs2.model.GroundItemimport org.osbot.script.rs2.model.Itemimport org.osbot.script.rs2.model.PrimaryObjectimport org.osbot.script.rs2.model.RS2Objectimport org.osbot.script.rs2.ui.*import javax.imageio.ImageIOimport java.io.IOExceptionimport java.net.URLimport org.osbot.script.rs2.model.*@ScriptManifest(name = "Flaxpicker", author = "KrulVis", version = 2.0D, info="Picks flax")class Flaxpicker extends Script { int bankId = 25808; int flax = 1780; int bs = 1777; int flaxObj = 3634; boolean deur = true; def starttime = null; def state = State.PICKING int picked = 0; int coordx = 2742; int coordy = 3444; private final Color color1 = new Color(0.1f, 0.1f, 0.1f, 0.7f); private final Color color2 = new Color(255, 0, 0); private final Font font1 = new Font("Calisto MT", 0, 16); private final Font font2 = new Font("Calisto MT", 0, 11); void onStart() { starttime = System.currentTimeMillis(); if(client.getInventory().isFull()){ state = State.TOBANK } } enum State { PICKING, TOBANK, BANKING } int onLoop() { switch (state){ case State.PICKING: return onPick() case State.TOBANK: return toBank() case State.BANKING: return bank() } } int onPick(){ if(client.getMyPlayer().getY() >= 3450 && !client.getInventory().isFull()){ walkExact(new Position(coordx, coordy, 0)) return 1000 }else if(!client.getInventory().isFull()){ selectEntityOption(closestObject(flaxObj), "Pick") return 300 + random(300) }else{ state = State.TOBANK return 1200 } } int toBank() { log("Walk to bank") if(client.getMyPlayer().getY() <= 3485){ log("Got to walk a bit first.") walkExact(new Position(2725, 3490, 0)) return 600 + random(500) }else{ if(client.getBank().isOpen()){ state = State.BANKING log("BANK IS OPEN!") coordy = 3444 + gRandom(-3, 3); coordx = 2742 + gRandom(-4, 4); return 1200 }else{ selectEntityOption(closestObject(bankId), "Bank", "Bank booth") return(3000) } } } int bank() { if(!client.getInventory().isEmpty()){ client.getBank().depositAll() state = State.PICKING return 1000 } else if(client.getInventory().isEmpty()){ client.getBank().close() return 1000 } else if(!client.getBank().isOpen()){ log("Bank is closed, not opened. State of PICKING!") state = State.PICKING return 1000 } return 100 } void onPaint(Graphics g) { g.setColor(color1); g.fillRect(1, 51, 209, 94); g.setFont(font1); g.setColor(color2); g.drawString("Flax Picker V2.0", 7, 76); g.setFont(font2); g.drawString("Time: " + format(System.currentTimeMillis() - starttime), 7, 130); g.drawString("Flax Picked: (${picked})", 7, 100); g.drawString("State: ${state}", 7, 115); } String format(final long time) { final StringBuilder t = new StringBuilder(); final long total_secs = time / 1000; final long total_mins = total_secs / 60; final long total_hrs = total_mins / 60; final int secs = (int) total_secs % 60; final int mins = (int) total_mins % 60; final int hrs = (int) total_hrs % 24; if (hrs < 10) { t.append("0"); } t.append(hrs); t.append(":"); if (mins < 10) { t.append("0"); } t.append(mins); t.append(":"); if (secs < 10) { t.append("0"); } else if (secs < 0){ t.append("0") } else{ t.append(secs); } return t.toString(); }void onMessage(String message) { if (message == "You pick some flax.") { log("Picked a flax!") picked ++;}}}
-
Flax Picker
I updated a more randomed based walking unit... I updated the flax counting It works better when banking, it would sometimes break: import java.awt.*import org.osbot.script.Scriptimport org.osbot.script.ScriptManifestimport org.osbot.script.mouse.*import org.osbot.script.rs2.*import org.osbot.script.rs2.map.Positionimport org.osbot.script.rs2.model.GroundItemimport org.osbot.script.rs2.model.Itemimport org.osbot.script.rs2.model.PrimaryObjectimport org.osbot.script.rs2.model.RS2Objectimport org.osbot.script.rs2.ui.*import javax.imageio.ImageIOimport java.io.IOExceptionimport java.net.URLimport org.osbot.script.rs2.model.*@ScriptManifest(name = "Flaxpicker", author = "KrulVis", version = 2.0D, info="Picks flax")class Flaxpicker extends Script { int bankId = 25808; int flax = 1780; int bs = 1777; int flaxObj = 3634; boolean deur = true; def starttime = null; def state = State.PICKING int picked = 0; int coordx = 2742; int coordy = 3444; private final Color color1 = new Color(0.1f, 0.1f, 0.1f, 0.7f); private final Color color2 = new Color(255, 0, 0); private final Font font1 = new Font("Calisto MT", 0, 16); private final Font font2 = new Font("Calisto MT", 0, 11); void onStart() { starttime = System.currentTimeMillis(); if(client.getInventory().isFull()){ state = State.TOBANK } } enum State { PICKING, TOBANK, BANKING } int onLoop() { switch (state){ case State.PICKING: return onPick() case State.TOBANK: return toBank() case State.BANKING: return bank() } } int onPick(){ if(client.getMyPlayer().getY() >= 3450 && !client.getInventory().isFull()){ walkExact(new Position(coordx, coordy, 0)) return 1000 }else if(!client.getInventory().isFull()){ selectEntityOption(closestObject(flaxObj), "Pick") return 300 + random(300) }else{ coordy = 3444 + gRandom(-3, 3); coordx = 2742 + gRandom(-4, 4); state = State.TOBANK return 1200 } } int toBank() { log("Walk to bank") if(client.getMyPlayer().getY() <= 3485){ log("Got to walk a bit first.") walkExact(new Position(2725, 3490, 0)) return 600 + random(500) }else{ if(client.getBank().isOpen()){ state = State.BANKING log("BANK IS OPEN!") return 1200 }else{ selectEntityOption(closestObject(bankId), "Bank", "Bank booth") return(3000) } } } int bank() { if(!client.getInventory().isEmpty()){ client.getBank().depositAll() state = State.PICKING return 1000 } else if(client.getInventory().isEmpty()){ client.getBank().close() return 1000 } else if(!client.getBank().isOpen()){ log("Bank is closed, not opened. State of PICKING!") state = State.PICKING return 1000 } return 100 } void onPaint(Graphics g) { g.setColor(color1); g.fillRect(1, 51, 209, 94); g.setFont(font1); g.setColor(color2); g.drawString("Flax Picker V2.0", 7, 76); g.setFont(font2); g.drawString("Time: " + format(System.currentTimeMillis() - starttime), 7, 130); g.drawString("Flax Picked: (${picked})", 7, 100); g.drawString("State: ${state}", 7, 115); } String format(final long time) { final StringBuilder t = new StringBuilder(); final long total_secs = time / 1000; final long total_mins = total_secs / 60; final long total_hrs = total_mins / 60; final int secs = (int) total_secs % 60; final int mins = (int) total_mins % 60; final int hrs = (int) total_hrs % 24; if (hrs < 10) { t.append("0"); } t.append(hrs); t.append(":"); if (mins < 10) { t.append("0"); } t.append(mins); t.append(":"); if (secs < 10) { t.append("0"); } else if (secs < 0){ t.append("0") } else{ t.append(secs); } return t.toString(); }void onMessage(String message) { if (message == "You pick some flax.") { log("Picked a flax!") picked ++;}}} Enjoy . This is still krulvis's code! I just fixed it a tad! This is also still not 100%.