

futurepasts
Members-
Posts
54 -
Joined
-
Last visited
-
Feedback
100%
Everything posted by futurepasts
-
Hello so i wanted to draw my path for debugging resons cuz it sometimes doesn't work properly but don't know where to start i know how to draw my current location but how to draw my path? Thanks for help that i will hopefully get
-
Got it fixed for some reason area was the problem changed 1 number and it got fixed
-
Don't know what happened just compilled my script and i't started to not load(local script) then after this deleted osbot,reinstalled java and restarted pc then made wombo combo to reverse my script using ctrl+z and it still doesn't work it wont event load cuz i can't see shit in logger (deleted every possible osbot and even rs folders) if sombody have solution pls post cuz i don't wanna to rewrite all my script
-
Can u give me example ? can't really understand where that must contain
-
Hello guys maybe sombody know why my bot isn't walking ? I tried these methods but once my player is in 1st or 2nd or 3rd floor at any buiding any of these methods that i tried isn't working.First i check if my player is in area using if(AREA.contains(myPlayer())){ walking.walk() localWalker.walkPath(); getWalking().webWalk(new Position(x,z,y)); Remember that these methods works if my player isn't in some kind of 2nd or 1st floor it works great when im for example at varrock bank but it stops working once i get into building like that one in quest Romeo and juliet. Hope sombody could help me.Thanks
-
Omg thanks EXPLV it works now ;)
-
First of all thanks for guys who helped me with webwalking it now works perfectly. But now i'm in trouble with 1 thing im trying to make Cooks assistant bot for so i don't need to complete this on shit ton of my accounts But i face problem to go from current state to next. Example. If my character contains area ( Lumbridge Cook's kitchen) then talk to Cook it talks to cook then finish dialog and then stands cuz i don't know how to move to other state since i don't get any items in my inventory The other state must be go to Chicken's near lumbridge cows and pick egg. But how to do it? Im trying this but it isn't working if (getDialogues().toString().contains("Text that cook's says")) return State.WALK_TO_CHICKENS; And another question so i don't need to create multiple threads Is it possible to change to other character from some kind of list and login to runescape? Thanks for guys who helps me
-
Thanks guys for amazing answer
-
Hello today i opened my osbot and saw that they finally added webwalking but how to use it tried to look at api but didn't understood shit i wan't to use webwalking because its better than localwalking method. And if sombody helps me pls give small tutorial on how to walk to place i wanted if possible Example: Varrock West mine Thanks.
-
In need of 2 quest workers (Lots of quests)
futurepasts replied to Give me nats's topic in Worker Applications
Which position applying for? : Account creation, powerlevel, questing Do you agree to paying the fee? : Discuss on skype How often do you play? : From 10 to max 13 hours every single day Your skype: thefighterlt (I have u added on skype from before) Any other questions? : Will ask on skype. -
Hello can anyone can show me example of picking up multiple items on the ground?
-
So i wanted to ask about depositBox is it broken now? Because i founded on api this depositBox.open(); But it doesn't open deposit box i stand near box And 2nd question about shop buying I made script that buys simple few items then hop and do this till full inventory,it does everything perfectly except it sometimes after hoping world while buying items try to buy it like 10 times even if i have function if (store.getAmount("Shop item") == 0) and then hops sometimes i need to restart script to get it working again My code of buying items NPC SHOP NPC= npcs.closest("SHOP NPC"); if (SHOP NPC!= null) { if(SHOP NPC.isVisible()) { SHOP NPC.interact("Trade"); sleep(random(2000, 2500)); store.buy(ITEM ID, AMOUNT); sleep(random(500, 600)); store.buy(ITEM , AMOUNT); sleep(random(500, 600)); store.buy(ITEM , AMOUNT sleep(random(600,900)); if (store.getAmount("SHOP ITEM") == 0) { worlds.hopToF2PWorld(); } } } My states NPC SHOP NPC= npcs.closest("SHOP NPC"); if (!inventory.isFull() && Shoparea.contains(myPlayer()) && SHOP NPC!= null) return State.BUY; if (!inventory.isFull() && BankArea.contains(myPlayer())) return State.WALK_TO_SHOP; if (inventory.isFull() && Shoparea.contains(myPlayer())) return State.BANK; return State.WAIT; }
-
Well i cant be even more precise because i dont know what to write else even if i add if invenotry contains tin and copper it still do same shit
-
So i try and try to make my scripts working but i always fail I tried to make simple bronze bar smelter but it doesnt really works maybe sombody can point me to right direction what im doing wrong? What my script does is just simply spam click Furnace and doesn't move to other CASE: For example if i put all my CASES: to onstart it works like a charm and when im put it back to onLoop it just spam clicks. Script is not finished since i want to test if it smelt My tutorial sources:https://www.youtube.com/watch?v=Mdil7v1J5es (Helped to understand basics even if its old) https://www.youtube.com/watch?v=0mIWSUHXB9c (Helped to understand widgets tutorials is old too) Also i readed Apeac and Pandemic tutorials to understand even better And 2nd Question(So i dont need to create another thread) Example: I have case Click(it clicks continue after im leveled up) But after that how do i check if im still have left something to smelt I was thinking something like this: if(inventory.getAmount("Bronze bar") > 14 ) return State.SMELT package main; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(name = "SmelterBronze", author = "Futurepasts", version = 1.0, info = "", logo = "") public class main extends Script { private enum State { USE, BANK, WALK_TO_BANK, WALK_TO_FURNACE, OPEN_FURNACE, SMELT, CLICK; }; Area SMELT_AREA = new Area( new Position(3279,3187,0), new Position(3273,3184,0)); Area BANK_AREA = new Area( new Position(3270,3161,0), new Position(3271,3170,0)); Position[] pathtofurnace = new Position[] { new Position(3269,3169,0), new Position(3277,3175,0), new Position(3280,3184,0),}; Position[] pathtobank = new Position[] { new Position(3274,3186,0), new Position(3280,3183,0), new Position(3280,3175,0), new Position(3278,3173,0), new Position(3272,3166,0), new Position(3269,3166,0),}; private State getState() { Entity furnace = objects.closest("Furnace"); if(furnace != null && SMELT_AREA.contains(myPlayer())) return State.USE; if (widgets.get(311,4) != null) return State.SMELT; if (!inventory.contains("Tin ore") && SMELT_AREA.contains(myPlayer())) return State.WALK_TO_BANK; if (inventory.contains("Tin ore") && inventory.contains("Copper ore") && BANK_AREA.contains(myPlayer())) return State.WALK_TO_FURNACE; if (!inventory.contains("Tin ore") && inventory.contains("Copper ore") && BANK_AREA.contains(myPlayer())) return State.BANK; if (widgets.get(193,3) != null) return State.CLICK; return State.OPEN_FURNACE; } @Override public void onStart() { } @Override public void onExit() { //Code here will execute after the script ends } @Override public int onLoop() throws InterruptedException { switch (getState()) { case USE: if (!myPlayer().isAnimating()) { Entity furnace = objects.closest("Furnace"); if(furnace != null){ if(furnace.isVisible()){ furnace.interact("Smelt"); } } } break; case SMELT: RS2Widget options = widgets.get(311,4); if (options != null) { options.interact("Smelt X Bronze"); log("Typing number"); sleep(gRandom(1200, 500)); RS2Widget smelter = widgets.get(162,33); keyboard.typeString("" + random(29,99), true); } sleep(100); break; case CLICK: if(dialogues.isPendingContinuation()) { dialogues.clickContinue(); } break; } return 100; //The amount of time in milliseconds before the loop starts over } @Override public void onPaint(Graphics2D g) { //This is where you will put your code for paint(s) } }
-
Still needs help
-
What do you mean i never execute Open bank? Edit:Made script bank after filled buckets but still cant make it take buckets from bank on start
-
Now it fills buckets great but when it comes to bank or when i start the script and my player is in the bank it just stands package main; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.api.Bank; import org.osbot.rs07.api.Inventory; import java.util.Arrays; import java.util.concurrent.TimeUnit; import java.awt.*; @ScriptManifest(author = "test", info = "test", name = "test", version = 1.0, logo = "") public class main extends Script { @Override public void onStart() { timeBegan = System.currentTimeMillis(); } private enum State { USE, BANK, WAIT, WALK_TO_PUMP, FILL, TAKE, ANIMATE; }; private long timeBegan; private long timeRan; Position[] pathtopump = {new Position(3185,3444,0), new Position(3183,3443,0), new Position(3183,3438,0), new Position(3183,3436,0), new Position(3183,3432,0), new Position(3187,3432,0), new Position(3189,3432,0), new Position(3193,3432,0), new Position(3195,3432,0), new Position(3198,3429,0), new Position(3200,3429,0), new Position(3203,3429,0), new Position(3206,3429,0), new Position(3208,3430,0)}; Position[] pathtobank = {new Position(3209,3430,0), new Position(3207,3430,0), new Position(3205,3430,0), new Position(3201,3430,0), new Position(3199,3430,0), new Position(3195,3430,0), new Position(3193,3430,0), new Position(3191,3430,0), new Position(3187,3430,0), new Position(3184,3431,0), new Position(3183,3433,0), new Position(3183,3436,0), new Position(3182,3439,0), new Position(3185,3440,0)}; private State getState() { Entity pump = objects.closest("Fountain"); if(inventory.getAmount("Bucket of water") == 27) return State.BANK; if (pump != null) return State.USE; if (bank.contains("Bucket")) return State.TAKE; if (inventory.contains("Bucket")) return State.WALK_TO_PUMP; if (!inventory.contains("Bucket")) return State.BANK; if(myPlayer().isAnimating() && !myPlayer().isMoving()){ updateTimes(); return State.ANIMATE; } return State.WAIT; } long lastAnimation = 0; public void updateTimes() { if (inventory.isItemSelected()) { inventory.deselectItem(); } if (myPlayer().isAnimating()) { lastAnimation = System.currentTimeMillis(); } } public boolean canAnimate() { return System.currentTimeMillis() > (lastAnimation + 2000); } @Override public int onLoop() throws InterruptedException { switch (getState()) { case TAKE: bank.open(); if (bank.contains("Bucket")) bank.withdraw("Bucket", 27); sleep(random(200, 420)); break; case USE: if(canAnimate()){ RS2Object well = objects.closest("Fountain"); getInventory().interact("Use", "Bucket"); if (well != null) { well.interact("Use"); sleep(random(8000, 9000)); break; } } case BANK: localWalker.walkPath(pathtobank); log("Walking to bank"); sleep(random(5000, 5700)); RS2Object bank1 = objects.closest("Bank booth"); if (bank1 != null) { if(Arrays.asList(bank1.getDefinition().getActions()).contains("Bank")){ bank.open(); while (bank.isOpen()) sleep(random(200, 420)); bank.depositAll(); } } break; case WALK_TO_PUMP: localWalker.walkPath(pathtopump); break; case WAIT: sleep(random(5000, 5700)); break; } return random(200, 300); } @Override public void onExit() { log("Script stopped!"); } @Override public void onPaint(Graphics2D g) { timeRan = System.currentTimeMillis() - this.timeBegan; g.drawString(ft(timeRan), 50, 50); } // How long the script has been running! private String ft(long duration) { String res = "Time ran:"; long days = TimeUnit.MILLISECONDS.toDays(duration); long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration)); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS .toHours(duration)); long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS .toMinutes(duration)); if (days == 0) { res = (hours + ":" + minutes + ":" + seconds); } else { res = (days + ":" + hours + ":" + minutes + ":" + seconds); } return res; } }
-
Maybe you could edit script with your method because i done what you said and it still does same things
-
Well i will try that but question why In CASE:USE it interacts with waterpump and after like 6-7 or sometimes less buckets it tries to interact again and then it clicks on bucket of water after it idles and script stops.
-
Hello maybe anyone could check my script it doesn't do things as i want. package Main; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.api.Bank; import org.osbot.rs07.api.Inventory; import java.util.concurrent.TimeUnit; import java.awt.*; @ScriptManifest(author = "test", info = "test", name = "test", version = 1.0, logo = "") public class main extends Script { @Override public void onStart() { timeBegan = System.currentTimeMillis(); } private enum State { USE, BANK, WAIT, WALK_TO_PUMP, FILL, TAKE; }; private long timeBegan; private long timeRan; Position[] pathtopump = {new Position(2945,3368,0), new Position(2945,3370,0), new Position(2945,3372,0), new Position(2947,3374,0), new Position(2949,3376,0), new Position(2949,3378,0), new Position(2950,3380,0), new Position(2949,3382,0)}; Position[] pathtobank = {new Position(2949,3382,0), new Position(2950,3380,0), new Position(2948,3376,0), new Position(2946,3372,0), new Position(2946,3369,0)}; private State getState() { Entity pump = objects.closest("Waterpump"); if(inventory.getAmount("Bucket of water") == 27) return State.BANK; if (pump != null) return State.USE; if (bank.contains("Bucket")) return State.TAKE; if (inventory.contains("Bucket")) return State.WALK_TO_PUMP; if (!inventory.contains("Bucket")) return State.BANK; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case TAKE: bank.open(); if (bank.contains("Bucket")) bank.withdraw("Bucket", 27); sleep(random(200, 420)); case USE: RS2Object well = objects.closest("Waterpump"); getInventory().interact("Use", "Bucket"); if (well != null) { well.interact("Use"); sleep(random(7200, 7511)); if(inventory.getAmount("Bucket of water") == 27) break; } case BANK: localWalker.walkPath(pathtobank); log("Walking to bank"); sleep(random(5000, 5700)); bank.open(); while (bank.isOpen()) sleep(random(200, 420)); bank.depositAll(); break; case WALK_TO_PUMP: localWalker.walkPath(pathtopump); break; case WAIT: sleep(random(5000, 5700)); break; } return random(200, 300); } @Override public void onExit() { log("Script stopped!"); } @Override public void onPaint(Graphics2D g) { timeRan = System.currentTimeMillis() - this.timeBegan; g.drawString(ft(timeRan), 50, 50); } // How long the script has been running! private String ft(long duration) { String res = "Time ran:"; long days = TimeUnit.MILLISECONDS.toDays(duration); long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration)); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS .toHours(duration)); long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS .toMinutes(duration)); if (days == 0) { res = (hours + ":" + minutes + ":" + seconds); } else { res = (days + ":" + hours + ":" + minutes + ":" + seconds); } return res; } } I was thinking about areas but it seems it doesn't work for me too What my script does wrong is that on start it ignore CASE:Take and instantly goes to Waterpump(if i have buckets in inventory it goes to Waterpump and fill water then goes back to bank open it and the IDLE) Also when filling buckets(after filling about 5-6 it tries to use bucket again but clicks on bucket of water and then fails and idle again) When filling i tried to add but, it keeps doing same shit. if(!myPlayer().isAnimating()) {
-
Thanks for amazing answers it really helped me
-
Hello again so i was looking at API and didnt founded anything about how to get item amount in my bank. For example: I want to check if my bank contains 2000 Oak logs If it contains 2000 Oak logs do something. Thanks for the help
-
So my question is there any way to interact npc faster. What my script does is simply "Use" item in my inventory and clicks on npc and repeat till inventory is full, but it clicks every 1-2 seconds and thats slow code that i use. if (getInventory().isItemSelected()) { npc.interact("use"); } else { getInventory().interact("Use", "item name"); } Please answer understandable way cuz im newbie.
-
Hello can sombody show me example script that interact npc and then interact's dialog.