Everything posted by uyfgfarOS
-
[Stable] OSBot 2.6.71
Can someone help? I can't download it. When I click the link, nothing happens. When I try update through OSBot, it just greys out 'Update to v2.6.71' and nothing happens EDIT: nevermind, right click save as saved the day
-
Buying from shop with widget
Re-using old code that worked perfectly. I get stuck at the log "Store is open" Any ideas why it's not finding the widget and proceeding with the method? It's not actually being used for grapes anymore, I'm just using the grape code. Widget numbers are correct for the new widget. int buyGrapes() throws InterruptedException { if (store.isOpen()) { log("store is open"); sleep(300); RS2Widget grapeWidge = getWidgets().get(300, 548, 300); if (grapeWidge != null) { grapeCount = grapeWidge.getItemAmount(); if (grapeCount > 0) { log("Shop in stock, buying"); grapeWidge.interact("Buy 10"); sleep(400); } else if (grapeCount == 0) { getWorlds().hopToP2PWorld(); //state = State.HOP; } } } return 0; }
-
Failed to load local scripts
Hi mate, it's because I wasn't running it on Java SE 1.8. I got confused thinking that wasn't Java 8, but it is
-
Failed to load local scripts
bump
-
Failed to load local scripts
Just set up my IDE (Eclipse) and using some old code from a previous bot I scripted. Getting the error [ERROR][01/16 04:31:07 PM]: Failed to load local script : buyer/main$State.class [ERROR][01/16 04:31:07 PM]: Failed to load local script : buyer/main.class I thought it may be my code, so loaded up a skeleton script that I know has 0 issues. Same error with that, too. I had one of the newer Javas, uninstalled that and tried just using Java 8, same error again. Any ideas? Cheers.
-
AIO MTA
Hi mate. Can i get a trial please? Looks sick
-
Status: Cannot connect to OSBOT
Same here, I think the bot is down
-
Stuck in p2p world hop loop
Cheers for your patience. I can see this is a lot simpler now, I think the whole switch case thing was confusing me. Only thing I had to change from your code was the fact that the Culinaromancer chest doesn't like the buy option, so I have to use widgets. Also once my inventory is full it's sat spamming on the grapes (0) to buy them. That's something I'll try figure out. Thankyou!
-
Stuck in p2p world hop loop
Hi mate, thanks for the reply. In my mind I thought the loop would take care of changing states. I have added a state change into both hopping & banking now. But a little unsure. My hopping method looks like this now: int hopping() throws InterruptedException { int hopCount = 0; log("hopping"); while (hopCount == 0) { getWorlds().hopToP2PWorld(); hopCount = 1; } state = State.OPENCHEST; return 0; } I can appreciate I probably don't need the while loop in there, I was just trying something out as I changed state to OPENCHEST, hoping it would hop and then open chest, but it opens the world viewer and then clicks the chest, without hopping. Apologies if it's dumb on my part I've been out of coding for about 3 years
-
Stuck in p2p world hop loop
Hi guys, creating a script to buy grapes & hop. All working fine except when it hops it will be stuck in the hopping method. I've tried using counters to counteract it being stuck inside the method but I can't seem to get it out. package testBuyer; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import testBuyer.main.State; import java.awt.*; import javax.swing.text.html.parser.Entity; @ScriptManifest(info = "GRAPE BUYER", version = 1.0, logo = "", author = "MATT", name = "Test2") public class main extends Script { int grapeCount = 1; enum State { OPENCHEST, BUYGRAPES, BANK, HOP; } public State state; public void onStart(){ if(getInventory().isFull()) { log("FULL - BANKING"); state = State.BANK; } if (getInventory().onlyContains("Coins")) { log("ONLY COINS IN INVENT"); state = State.OPENCHEST; log("OPEN CHEST"); } if(getStore().isOpen()) { state = State.BUYGRAPES; } if (grapeCount == 0) { log("out of grapes"); state = State.HOP; } if (getInventory().contains("Coins") && getInventory().contains("Grapes") && !getInventory().isFull()) { log("Invent has coins & grapes, but isn't full."); state = State.OPENCHEST; } } public int onLoop() throws InterruptedException{ switch (state){ case OPENCHEST: return openChest(); case BUYGRAPES: return buyGrapes(); case BANK: return bank(); case HOP: return hopping(); } return random(100, 220); } int openChest() throws InterruptedException { objects.closest("Chest").interact("Buy-food"); sleep(900); if (getInventory().contains("Coins") && !getInventory().isFull()) { log("Changing state to buying"); state = State.BUYGRAPES; } return 0; } int buyGrapes() throws InterruptedException { if (store.isOpen()) { log("store is open"); sleep(300); RS2Widget grapeWidge = getWidgets().get(300, 16, 5); if (grapeWidge != null) { grapeCount = grapeWidge.getItemAmount(); if (grapeCount > 0) { log("Shop in stock, buying"); grapeWidge.interact("Buy 10"); sleep(400); } else { state = State.HOP; } } } return 0; } int hopping() throws InterruptedException { log("hopping"); getWorlds().hopToP2PWorld(); grapeCount = 1; return 0; } int bank() throws InterruptedException{ getBank().depositAllExcept("Coins"); sleep(300); return 0; } } Here's what the log shows, initially when entering the hopping method it will show the log "hopping" twice, instantly. Followed by loads. [INFO][Bot #1][01/10 11:26:05 AM]: hopping [INFO][Bot #1][01/10 11:26:05 AM]: hopping [INFO][Bot #1][01/10 11:26:05 AM]: hopping [INFO][Bot #1][01/10 11:26:05 AM]: hopping [INFO][Bot #1][01/10 11:26:05 AM]: hopping [INFO][Bot #1][01/10 11:26:05 AM]: hopping Thanks a lot guys.
-
Simple buying script issue
Not finding any widget, It gets to the log stating the store is open, but won't get to the next log "buying 10" if (store.isOpen()) { log("store is open"); sleep(300); RS2Widget grapeWidget = getWidgets().getWidgetContainingText("Grapes"); if (grapeWidget != null && grapeWidget.interact("Buy 10")) { log("buying 10"); sleep(300); } I then thought that the interact should be within the if statement, so I moved it there but still same results. EDIT: Solved by just changing the widget declaration to RS2Widget grapeWidge = getWidgets().get(300, 16, 5);
-
Simple buying script issue
Ah apologies mate, it's been a while haha! I'll try this out now. Appreciate it.
-
Simple buying script issue
I was trying to figure this out earlier, I can get the widget for the grape, but I can't figure out how I'd move the mouse cursor down to the buying option, as there isn't a widget for the mouse position I want. Hmm okay cheers for that! Once I've got it buying I'll see if the hop method works or not.
-
Simple buying script issue
Hi all, not wanting to get properly back into coding I just can't be bothered to buy grapes from the Culinaromancer chest. I wrote a little script but it doesn't seem to buy from the store. Is it because it's a chest, rather than an NPC? It will open up the shop & jump to the buying grapes method but it won't actually buy them. Probably a simple fix but I'm rusty. Cheers. package cookingTrainer; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import javax.swing.text.html.parser.Entity; @ScriptManifest(info = "GRAPE BUYER", version = 1.0, logo = "", author = "MATT", name = "") public class main extends Script { enum State { OPENCHEST, BUYGRAPES, BANK, HOP; } public State state; public void onStart(){ if(getInventory().isFull()) { state = State.BANK; log("BANK"); } if (getInventory().onlyContains("Coins")) { state = State.OPENCHEST; log("OPEN CHEST"); } if(getStore().isOpen()) { state = State.BUYGRAPES; } } public int onLoop() throws InterruptedException{ switch (state){ case OPENCHEST: return openChest(); case BUYGRAPES: return buyGrapes(); case BANK: return bank(); case HOP: return hopWorlds(); } return random(100, 220); } int openChest() throws InterruptedException { objects.closest("Chest").interact("Buy-food"); sleep(900); if (getInventory().contains("Coins") && !getInventory().isFull()) { if (!getStore().contains("Grapes")) { state = State.HOP; log("HOPPING"); } else { log("Changing state to buying"); state = State.BUYGRAPES; } } return 0; } int buyGrapes() throws InterruptedException{ log("BUYING"); if (!getStore().contains("Grapes")) { store.close(); sleep(300); state = State.HOP; log("HOPPING"); } else { log("BUYING GRAPES NOW"); if (store.isOpen()) { log("store is open"); sleep(300); store.buy("Grapes", 10); sleep(300); sleep(300); sleep(300); } } sleep(300); return 0; } int bank() throws InterruptedException{ getBank().depositAllExcept("Coins"); sleep(300); return 0; } int hopWorlds() throws InterruptedException { getWorlds().hopToP2PWorld(); sleep(300); return 0; } }
-
Script not showing up even though its in the script folder
SOLVED: For anyone else having this issue, I had to change the JRE environment to JavaSE-1.8, as it was on JavaSE-15 and it now works.
-
Script not showing up even though its in the script folder
Just loaded in an old NMZ script I had and it shows up. So something in the code or something? I've seen people post about SDK version but not sure how to check which one I've compiled my script with. EDIT: I've also noticed Eclipse keeps making a "module" when I create a new project? I've never seen this before. Have I set something up wrong or something? Because I've noticed when I keep the module in there all my code is red, but when I delete the module then all the red disappears.
-
Script not showing up even though its in the script folder
I have mate yeah, OSBot's GUI is different to the last time I've used it. But I just click the refresh button and it just shows server scripts, non local.
-
Script not showing up even though its in the script folder
Thanks for the quick reply. Yes I have, got a couple of versions sat in that folder with different Java versions, just trying to get it to work.
-
Script not showing up even though its in the script folder
Hi all, been a while since I've been doing any sort of coding, but I wanted to script something to buy some grapes for me. Simple script but I can't get it to show up on the client. Any ideas? import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(info = "GRAPE BUYER", version = 1.0, logo = "", author = "MATT", name = "First Script") public class main extends Script { enum State { OPENCHEST, BUYGRAPES, BANK, HOP; } private State state; public void onStart(){ if(getInventory().isFull()){ state = State.BANK; } if (getInventory().onlyContains("Coins")) { state = State.OPENCHEST; } if (getInventory().contains("Coins") && getInventory().contains("Grapes") && !getInventory().isFull()) { state = State.BUYGRAPES; } if (!getStore().contains("Grapes")) { state = State.HOP; } } public int onLoop() throws InterruptedException{ switch (state){ case OPENCHEST: return openChest(); case BUYGRAPES: return buyGrapes(); case BANK: return bank(); case HOP: return hopWorlds(); } return random(10, 20); } int openChest() throws InterruptedException { objects.closest("Chest").interact("Buy-food"); sleep(300); return 0; } int buyGrapes() throws InterruptedException{ store.buy("Grapes", 10); sleep(300); return 0; } int bank() throws InterruptedException{ getBank().depositAllExcept("Coins"); sleep(300); return 0; } int hopWorlds() throws InterruptedException { getWorlds().hopToP2PWorld(); sleep(300); return 0; } }
-
Trouble declaring an area.
imports: import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.geom.Area; import org.osbot.rs07.api.GrandExchange; import org.osbot.rs07.api.Prayer; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.Bank.BankMode; import org.osbot.rs07.api.model.Item; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.event.WalkingEvent; import org.osbot.rs07.input.mouse.InventorySlotDestination; import org.osbot.rs07.input.mouse.RectangleDestination; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.Bot; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; and the Jar is 100% added I tried important another area import earlier & I remember it just bringing up errors. I'm sure this will be the issue but cant figure it out
-
Trouble declaring an area.
Hi all. didn't have this problem in the past but now when I try make a new area it says the constructor is undefined. I have the correct imports. I declare the area like so: public static Area anArea = new Area(2519, 3578, 2522, 3581); but get this error: The constructor Area(int, int, int, int) is undefined something really simple I'm sure but I can't figure it out. Cheers.
-
Khal Pest Control
May I have a trial please matey?
-
AIO Farming
Bot seems to be running pretty well for me! Enjoying watching the progress. A couple things I've noticed, for example when planting at an allotment, with each stage (compost, planting, etc) it will always use the tile to the right, so the player will walk a step right before doing the next task. Not sure if this is just me but could seem a bit weird. Also sometimes when doing trips it'll complete a task but then teleport leaving a dead plant there. Nice one
-
AIO Farming
Okay, no worries, didn't realise! I'll just have to make a new account haha Apologies for not getting any evidence I didn't think anything of it just restarted the bot after I'd bought some more seeds.
-
AIO Farming
This happened to me & subsequently got me banned after just 2 days of using it I've submitted a refund appeal but haven't heard anything yet. Hate to be requesting a refund but after getting banned I don't have any interest in playing anymore so would it be possible? Thanks a lot