Everything posted by Paradox68
-
My fishing script.
What exactly constitutes an AIO? I don't think it's AIO. I thought an AIO script was one that can detect its surroundings or what area it's in and act and set variables accordingly without user input. e.g. Being able to start a script anywhere and have it detect the closest spot for what you want to fish and act accordingly. First off those won't be the only locations, it's just the ones i'm currently coding. Second, you don't need to be a sassy little prick about it...
-
My fishing script.
And what script rule might this be breaking? I'm not undercutting anyone because this is a completely unique script if that's what you're referring to. And to be honest you shouldn't be worried dude, I've seen your Logic Fisher and i'm never going to add all that cool shit like high scores and dynamic signatures EDIT: Added XP per hour, and Fish per hour, and updated the paint.
-
My fishing script.
That's a good idea to add.
-
My fishing script.
It started out as a simple Barb Village fishing script that banked (because there were only power fishers for that location for free on the SDN) and now i'm turning it into something real. This is probably going to be the best Free fishing script on the SDN (until someone makes one better ) It's still a work in progress and there's a lot more work to be done on the script before releasing it, but stay on the lookout Features: Web walking to multiple locations Karamja support Decent anti-ban while fishing Change fishing spots for whirlpool Detect and activate Run when energy is sufficient Webwalking to closest bank Intuitive reaction speed to depleted fishing spots Easy to use GUI Gold Gained with updating prices retrieved from G.E. Purchase more supplies (Bait, Feather) when you run out Hide paint button Add the rest of the locations Artificially intelligent responses to nearby player messages Add XP and GP per hour Add a Tasks panel to change fishing interactions at determined points. Coming soon to the SDN!
-
SRSYL wtf JFormDesigner
How do I make it so an image is kept in the GUI (the .jar) so that other people can load it when they use the script? I thought it was to put it in classpath...? Also it seems to work when I remove the image and change the font of the header.
-
SRSYL wtf JFormDesigner
Nope. By all accounts none of this follows any form of logic.
-
SRSYL wtf JFormDesigner
Dispose is for the button click method. UI class is in the pastebin link in original post. If I remove the GUI the script runs normally so I know the GUI is causing it, but symptom is that the script instantly stops itself when I run it.
-
SRSYL wtf JFormDesigner
I have never had any issues in the past developing with JformDesigner but now whenever I create a GUI with it, the script will not load. @Override public void onStart() throws InterruptedException { UI gui = new UI(); gui.setVisible(true); while (gui.isVisible()) { sleep(100); } getExperienceTracker().start(Skill.FISHING); timeStart = System.currentTimeMillis(); } and a pastebin for the GUI code: http://pastebin.com/CRgidXqW I had Explv helping me with the same problem on a different script, not even he could figure out why it's doing this. OSBot @Devs pls.
-
GUI Fonts?
So does the font load locally or is it saved into the jar when you create a script? I want to use a non-system font in my GUI and i'm afraid that when other people use the script, it won't show on their end. Which way does it go?
-
Anyone got the code for GetImage?
@FrostBug are.....are you a wizard? p.s. I thought @Explv was a wizard before, but he just got WIZARDED wtfffff
-
Anyone got the code for GetImage?
why is bufferedImage better for scripting than just using an Image?
-
FREE FISHING SCRIPT
Since the script got a bit of love, here's an updated version of the original script with some mouse moving anti-ban methods, and switched to webwalking. import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "Paradox68", info = "Paradox simple Edgeville fishing script.", name = "Paradox Simple Edge Fisher", version = 1.0, logo = "") public class main extends Script { private long timeStart; private String state = "Initializing.."; private int invCount = 0; private int caught = 0; private int lastMA = 0; Area fishArea = new Area( new Position(3111,3437,0), new Position(3100,3422,0)); Area edgeBank = new Area( new Position(3098,3499,0), new Position(3091,3488,0)); @Override public void onStart() { getExperienceTracker().start(Skill.FISHING); timeStart = System.currentTimeMillis(); } @Override public void onPaint(Graphics2D g) { long timeElapsed = System.currentTimeMillis() - timeStart; long seconds = (timeElapsed / 1000) % 60; long minutes = (timeElapsed / (1000 * 60)) % 60; long hours = (timeElapsed / (1000 * 60 * 60)) % 24; g.setFont(new Font("Trebuchet MS", Font.PLAIN, 14)); g.setColor(Color.white); g.drawString("x", (int)getMouse().getPosition().getX() - 4, (int)getMouse().getPosition().getY() + 5); g.drawString(state, 8, 50); g.drawString("Time Running: " + (hours >= 10 ? "" + hours : "0" + hours) + ":" + (minutes >= 10 ? "" + minutes : "0" + minutes) + ":" + (seconds >= 10 ? "" + seconds : "0" + seconds), 8, 65); g.drawString("XP Gained: " + getExperienceTracker().getGainedXP(Skill.FISHING) + " (" + getExperienceTracker().getGainedLevels(Skill.FISHING) + ")", 8, 80); g.drawString("Fish caught: " + caught, 8, 95); } private void randomizeMouse() { lastMA++; if (lastMA > 4) { int i = random(5); switch (i) { case 0: case 1: getMouse().moveOutsideScreen(); break; case 2: getMouse().moveRandomly(); break; case 3: getMouse().moveSlightly(); lastMA = 3; break; case 4: getMouse().moveVerySlightly(); break; case 5: getTabs().open(randomTab()); if (getTabs().getOpen() == Tab.SKILLS) { getMouse().move(704, 283); } } lastMA = 0; } } private Tab randomTab() { int i = random(6); switch(i) { case 0: case 1: return Tab.INVENTORY; case 2: return Tab.EQUIPMENT; case 3: return Tab.ATTACK; case 4: return Tab.SKILLS; case 5: return Tab.FRIENDS; case 6: return Tab.QUEST; } return Tab.SKILLS; } @Override public int onLoop() throws InterruptedException { if (getInventory().isFull() && !edgeBank.contains(myPlayer()) && !getBank().isOpen()) { state = "Walking to bank"; getWalking().webWalk(new Position(Banks.EDGEVILLE.getRandomPosition())); } if (getInventory().isFull() && edgeBank.contains(myPlayer()) && !getBank().isOpen()) { RS2Object bank = getObjects().closest("Bank booth"); state = "Opening bank"; if (bank != null) { if (bank.interact("Bank")) { state = "Depositing items"; sleep(1000); } } } if (getInventory().isFull() && edgeBank.contains(myPlayer()) && getBank().isOpen()) { getBank().depositAllExcept("Fly fishing rod", "Feather"); while (getInventory().contains("Trout") || getInventory().contains("Salmon")) { sleep(100); } state = "Closing bank"; getBank().close(); } if (!getInventory().isFull() && !fishArea.contains(myPlayer()) && !getBank().isOpen() ) { state = "Walking to fishing spots."; getWalking().webWalk(new Position(3102 + random(3), 3433 + random(3), 0)); } if (!getInventory().isFull() && fishArea.contains(myPlayer())) { NPC spot = getNpcs().closest("Fishing spot"); state = "Finding spot."; if (spot != null && spot.hasAction("Lure")) { spot.interact("Lure"); sleep(2000); invCount = getInventory().getEmptySlots(); } while (myPlayer().isAnimating()) { state = "Catching fish."; randomizeMouse(); if (getInventory().getEmptySlots() != invCount && fishArea.contains(myPlayer())) { invCount = getInventory().getEmptySlots(); caught += 1; } sleep(1000); } } return random(500, 800); } }
-
OSBot - 2016 New Year
"A leader" LOL shoulda said "The." Would have sounded way better.
-
Anyone got the code for GetImage?
I had it but I lost the snippet for getting an image from URL and putting it into onPaint
-
i have this problem
http://osbot.org/forum/topic/90130-script-wont-start/ refer to above
-
i have this problem
I was having issues with GUI the other day. Try removing your GUI and seeing if the script will stay started.
-
Script won't start
Qubit nobody who knows what they're doing cares about your script lol. We're all capable of recreating it anyways but if you don't feel comfortable posting code for us to analyze you're crap outta luck. Troubleshooting method: after each line in the onstart add a log so you can see what checkpoint the code stops at. If you're loading a GUI built with JFormDesigner and it's complex, you might have to redo the GUI because I had that same issue. example: @Override public void onStart() throws InterruptedException { log("a"); UI gui = new UI(this); log("b"); gui.setVisible(true); log("c"); while (gui.isVisible()) { sleep(100); } log("d"); apply method as needed to figure out where the code stops being called.
-
FREE FISHING SCRIPT
Nah it won't get stuck because the onLoop calls depositAllExcept("Fly fishing rod", "Feather"); in the event before the while event is handled. So logically unless the computer somehow skips a line of code for the first time since the computer was invented, then the event should execute just fine. I ran the script for 8 hours yesterday no errors. If you feel more comfortable removing it, you're welcome to do so. I just used it so depositAllExcept("Fly fishing rod", "Feather"); wasn't being called every 500-800ms while the bank was open. I'm sure there are better ways but as you can see this is not a full-measure script release.
-
FREE FISHING SCRIPT
Yeah I was kinda upset there was nothing on the SDN for free people could use to fish for trout and salmon at edgeville/barb AND bank the fish....So I made a script really quick that does just that figured you guys might like it? I'm too lazy to upload it so if someone wants to do that go ahead. It just catches fish and banks them as opposed to power fishing. No configurable options, just does that one thing. You're welcome to those who wanted this. import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "Paradox68", info = "Paradox simple Edgeville fishing script.", name = "Paradox Simple Edge Fisher", version = 1.0, logo = "") public class main extends Script { private long timeStart; private String state = "Initializing.."; private int invCount = 0; private int caught = 0; private int lastMA = 0; Area fishArea = new Area( new Position(3111,3437,0), new Position(3100,3422,0)); Area edgeBank = new Area( new Position(3098,3499,0), new Position(3091,3488,0)); @Override public void onStart() { getExperienceTracker().start(Skill.FISHING); timeStart = System.currentTimeMillis(); } @Override public void onPaint(Graphics2D g) { long timeElapsed = System.currentTimeMillis() - timeStart; long seconds = (timeElapsed / 1000) % 60; long minutes = (timeElapsed / (1000 * 60)) % 60; long hours = (timeElapsed / (1000 * 60 * 60)) % 24; g.setFont(new Font("Trebuchet MS", Font.PLAIN, 14)); g.setColor(Color.white); g.drawString("x", (int)getMouse().getPosition().getX() - 4, (int)getMouse().getPosition().getY() + 5); g.drawString(state, 8, 50); g.drawString("Time Running: " + (hours >= 10 ? "" + hours : "0" + hours) + ":" + (minutes >= 10 ? "" + minutes : "0" + minutes) + ":" + (seconds >= 10 ? "" + seconds : "0" + seconds), 8, 65); g.drawString("XP Gained: " + getExperienceTracker().getGainedXP(Skill.FISHING) + " (" + getExperienceTracker().getGainedLevels(Skill.FISHING) + ")", 8, 80); g.drawString("Fish caught: " + caught, 8, 95); } private void randomizeMouse() { lastMA++; if (lastMA > 4) { int i = random(5); switch (i) { case 0: case 1: getMouse().moveOutsideScreen(); break; case 2: getMouse().moveRandomly(); break; case 3: getMouse().moveSlightly(); lastMA = 3; break; case 4: getMouse().moveVerySlightly(); break; case 5: getTabs().open(randomTab()); if (getTabs().getOpen() == Tab.SKILLS) { getMouse().move(704, 283); } } lastMA = 0; } } private Tab randomTab() { int i = random(6); switch(i) { case 0: case 1: return Tab.INVENTORY; case 2: return Tab.EQUIPMENT; case 3: return Tab.ATTACK; case 4: return Tab.SKILLS; case 5: return Tab.FRIENDS; case 6: return Tab.QUEST; } return Tab.SKILLS; } @Override public int onLoop() throws InterruptedException { if (getInventory().isFull() && !edgeBank.contains(myPlayer()) && !getBank().isOpen()) { state = "Walking to bank"; getWalking().webWalk(new Position(Banks.EDGEVILLE.getRandomPosition())); } if (getInventory().isFull() && edgeBank.contains(myPlayer()) && !getBank().isOpen()) { RS2Object bank = getObjects().closest("Bank booth"); state = "Opening bank"; if (bank != null) { if (bank.interact("Bank")) { state = "Depositing items"; sleep(1000); } } } if (getInventory().isFull() && edgeBank.contains(myPlayer()) && getBank().isOpen()) { getBank().depositAllExcept("Fly fishing rod", "Feather"); while (getInventory().contains("Trout") || getInventory().contains("Salmon")) { sleep(100); } state = "Closing bank"; getBank().close(); } if (!getInventory().isFull() && !fishArea.contains(myPlayer()) && !getBank().isOpen() ) { state = "Walking to fishing spots."; getWalking().webWalk(new Position(3102 + random(3), 3433 + random(3), 0)); } if (!getInventory().isFull() && fishArea.contains(myPlayer())) { NPC spot = getNpcs().closest("Fishing spot"); state = "Finding spot."; if (spot != null && spot.hasAction("Lure")) { spot.interact("Lure"); sleep(2000); invCount = getInventory().getEmptySlots(); } while (myPlayer().isAnimating()) { state = "Catching fish."; randomizeMouse(); if (getInventory().getEmptySlots() != invCount && fishArea.contains(myPlayer())) { invCount = getInventory().getEmptySlots(); caught += 1; } sleep(1000); } } return random(500, 800); } } Not gonna wait two hours for a good proggy but here's one. Theoretically if it lasts through one full iteration, it can last through a billion....I did two iterations for posterity and cause i'm such a saint.
-
How would I detect obstacles on a path
i think it's like getWalking().canReach(); or getMap().canReach(); something with canReach...
-
Bought VIP, gone after one day?
Don't you know we like to scam people here? LOL jk Talk to Maldesto he'll sort it out for you ASAP. He's on a lot so just PM him.
-
lend me an account somoene
Hi guys it's me Assnerd. Can someone Lend give me an account so i can test my script steal all your items. It'd mean a lot, thanks guys! haha fuck you guys so easy scams.
-
Have $100 spare what do with it?
http://www.giftideas.com/great-things-under-100/a5bx7dw
-
Creating a JFormDesigner Form View from code?
That could be the equivalent of me saying "Stop coding for the rest of your life. And you'll never have that issue." If you won't stay related to the question at hand, don't bother posting.
-
Which signature do you guys prefer?
Just pick the one you like better.... *sigh*