bigd123 Posted February 2, 2019 Share Posted February 2, 2019 (edited) Hello! I made my first working script. It's fairly simple, just steals from the fruit stalls in hosidious and drops all the items when your inventory is full. I'll include the code incase anyone want to take a look and potentially help me Current Features: Basic Theiving XP/Level tracker To add: GUI Option to bank Potentially other farming options Let me know if you have any suggestions! Code: Spoiler package core; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Point; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "bigd123", info = "Hosidius Stall Thiever", name = "Hosidius Stall Thiever", version = 0, logo = "") public class Main extends Script { @Override public void onStart() { getExperienceTracker().start(Skill.THIEVING); } @Override public int onLoop() throws InterruptedException { RS2Object stall = getObjects().closest("Fruit Stall"); if(getInventory().isFull()){ if(getInventory().dropAll()){ new ConditionalSleep(5000) { @Override public boolean condition() { return !getInventory().isFull(); } }.sleep(); } } else if (stall != null && !myPlayer().isAnimating()) { stall.interact("Steal-from"); sleep(random(100,300)); } return random(200, 300); } @Override public void onExit() { } @Override public void onPaint(Graphics2D g) { g.setColor(Color.black); g.fillRect(10, 50, 220, 150); g.setColor(Color.white); g.drawString("Current XP:" + getSkills().getExperience(Skill.THIEVING),25, 80); g.drawString("XP Per Hour: " + getExperienceTracker().getGainedXPPerHour(Skill.THIEVING), 25,95); g.drawString("XP Gained: " + getExperienceTracker().getGainedXP(Skill.THIEVING), 25, 110); g.drawString("XP Until Next Level: " + getSkills().experienceToLevel(Skill.THIEVING), 25, 125); g.drawString("Current Level: " + getSkills().getDynamic(Skill.THIEVING),25, 140); g.drawString("Time To Level: " + getExperienceTracker().getTimeToLevel(Skill.THIEVING)/60000 + " Minute(s)", 25,155); g.drawString("Levels Gained: " + getExperienceTracker().getGainedLevels(Skill.THIEVING), 25, 170); g.drawString("Time Elapsed: " + getExperienceTracker().getElapsed(Skill.THIEVING)/60000 + " Minute(s)", 25, 185); Point mP = getMouse().getPosition(); g.drawLine(mP.x - 5, mP.y + 5, mP.x + 5, mP.y - 5); g.drawLine(mP.x + 5, mP.y + 5, mP.x - 5, mP.y - 5); } } hosidiusthiever.jar Edited February 2, 2019 by bigd123 1 Quote Link to comment Share on other sites More sharing options...
Ernestog90 Posted February 2, 2019 Share Posted February 2, 2019 Have you tested the script yet? Have you encountered any errors or problems as of recent? Quote Link to comment Share on other sites More sharing options...
bigd123 Posted February 2, 2019 Author Share Posted February 2, 2019 3 minutes ago, Ernestog90 said: Have you tested the script yet? Have you encountered any errors or problems as of recent? I tested it for about 3 hours without any errors Quote Link to comment Share on other sites More sharing options...
Ernestog90 Posted February 2, 2019 Share Posted February 2, 2019 2 minutes ago, bigd123 said: I tested it for about 3 hours without any errors I would see if you can create something for random breaks within a span of 2 times. IE every hour to 2 hours it would take a break sometime between that at random. You said it also supports banking? Quote Link to comment Share on other sites More sharing options...
bigd123 Posted February 2, 2019 Author Share Posted February 2, 2019 Just now, Ernestog90 said: I would see if you can create something for random breaks within a span of 2 times. IE every hour to 2 hours it would take a break sometime between that at random. You said it also supports banking? I said banking is on the to-do list. I could add a break timer but osbot has that built in already. Quote Link to comment Share on other sites More sharing options...
Ernestog90 Posted February 2, 2019 Share Posted February 2, 2019 I guess I haven't looked into the breaks myself then lol, but seems interesting, I'll give it a go when I got sometime! Best of luck with it! Quote Link to comment Share on other sites More sharing options...
bigd123 Posted February 2, 2019 Author Share Posted February 2, 2019 1 minute ago, Ernestog90 said: I guess I haven't looked into the breaks myself then lol, but seems interesting, I'll give it a go when I got sometime! Best of luck with it! Thank you! Quote Link to comment Share on other sites More sharing options...
Destrupt Posted February 2, 2019 Share Posted February 2, 2019 Best of luck, I believe someone just announced a script the same as this maybe 2 days ago that banks the strange fruit for profit haha. Try suicide a couple of accounts also, it'd be cool to see some proggies Quote Link to comment Share on other sites More sharing options...
bigd123 Posted February 2, 2019 Author Share Posted February 2, 2019 1 minute ago, Destrupt said: Best of luck, I believe someone just announced a script the same as this maybe 2 days ago that banks the strange fruit for profit haha. Try suicide a couple of accounts also, it'd be cool to see some proggies I'd like to try a suicide run but I'm too poor to bond it hahaha. I'm going to try to add bank support, shouldn't be too difficult. Thanks man. Quote Link to comment Share on other sites More sharing options...
Divergent07 Posted February 2, 2019 Share Posted February 2, 2019 @TutIslander Just added this! But congrats on the script! Try posting a proggy! 1 Quote Link to comment Share on other sites More sharing options...
TutIslander Posted February 2, 2019 Share Posted February 2, 2019 8 hours ago, Divergent07 said: @TutIslander Just added this! But congrats on the script! Try posting a proggy! He just wanna be me Jokes jokes, well done mate! Quote Link to comment Share on other sites More sharing options...
bigd123 Posted February 2, 2019 Author Share Posted February 2, 2019 3 hours ago, TutIslander said: He just wanna be me Jokes jokes, well done mate! Haha thanks, I'm sure yours is much better since I'm still learning. This is going to kind of be a bot for me just to learn alot of stuff. Quote Link to comment Share on other sites More sharing options...
TutIslander Posted February 2, 2019 Share Posted February 2, 2019 (edited) 6 hours ago, bigd123 said: Haha thanks, I'm sure yours is much better since I'm still learning. This is going to kind of be a bot for me just to learn alot of stuff. Add me on Discord mate, I'm more than happy to try and help in future if you get stuck I know you definitely need help looking at what your gonna do if those guard dogs attack you Edited February 2, 2019 by TutIslander Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.