surer123 Posted January 3, 2014 Share Posted January 3, 2014 (edited) Hello Guys! I Understand, that i am not well known on this forum but hey, everyone needs to start somewhere! But now let's get to the point... I will be making a script called: "Surer's LumbySpinner". Maybe at somepoint i will transform it into an AIO spinner but for now it's just a flax spinner. I Will update this topic very often(daily i hope). The script will be FREE. What will this script include?: Good AntiBan A Sexy Paint Flaweless Spinning and Banking Source code(NOT FINISHED!): package LumbridgeSpinner; import java.awt.Graphics; import org.osbot.script.Script; import org.osbot.script.ScriptManifest; import org.osbot.script.rs2.model.Entity; import org.osbot.script.rs2.utility.Area; import org.osbot.script.rs2.ui.Bank; @ScriptManifest(author = "surer123", info = "Will spin Flax on the spinning wheel in Lumbridge Castle.", name = "Surer's LumbyFlaxSpinner", version = 1.0) public class Spinner extends Script{ final Area BankArea = new Area(3207, 3220, 3210, 3216); final Area SpinArea = new Area(3208, 3213, 3212, 3217); static final int BANK = 18491; private Object Bank = null; static final int FLAX_ID = 1779; private Object SpinningWheel = null; public void onStart(){ } public void onExit(){ } public int onLoop(){ //Declaring some things Entity Bank = (Entity) this.Bank; this.Bank = closestObject(BANK); Bank bank = this.client.getBank(); if(this.client.getMyPlayer().getZ() == 2 && this.client.getMyPlayer().isInArea(BankArea) && this.client.getInventory().isFull()){ //Deposit the string try{ if (bank.isOpen()) { bank.depositAll(); } else { if (Bank != null) { if (Bank.isVisible()) { Bank.interact("Bank"); sleep(random(700, 800)); }else{ client.moveCameraToEntity(Bank); } } } }catch(Exception e){ log("There was an exception: " + e); } }else if(this.client.getMyPlayer().getZ() == 2 && this.client.getMyPlayer().isInArea(BankArea) && !this.client.getInventory().isFull()){ //withdraw flax try{ if (bank.isOpen()) { bank.withdrawAll(FLAX_ID); } else { if (Bank != null) { if (Bank.isVisible()) { Bank.interact("Bank"); sleep(random(700, 800)); }else{ client.moveCameraToEntity(Bank); } } } }catch(Exception e){ log("There was an exception: " + e); } } if(this.client.getMyPlayer().isInArea(SpinArea) && this.client.getInventory().contains(FLAX_ID) && this.client.getMyPlayer().getZ() == 1){ //spin flax this.SpinningWheel = closestObjectForName("Spinning Wheel"); Entity spinningwheel = (Entity)this.SpinningWheel; if(!this.client.getMyPlayer().isAnimating() && !this.client.getMyPlayer().isMoving()){ if(!spinningwheel.isVisible()){ try{ this.client.moveCameraToEntity(spinningwheel); sleep(random(700, 800)); }catch(Exception e){ log("Exception: " + e); } } } } return 50; } public void onPaint(Graphics g){ } } P.S. Don't judge if i wrote something wrong! Help me instead. Edited January 4, 2014 by surer123 1 Link to comment Share on other sites More sharing options...
Swizzbeat Posted January 3, 2014 Share Posted January 3, 2014 Good luck with this 1 Link to comment Share on other sites More sharing options...
surer123 Posted January 3, 2014 Author Share Posted January 3, 2014 Good luck with this Thank you, Swizz! Link to comment Share on other sites More sharing options...
BottersLyfe Posted January 3, 2014 Share Posted January 3, 2014 Gotta love all the new scripts, good luck sir 1 Link to comment Share on other sites More sharing options...
surer123 Posted January 4, 2014 Author Share Posted January 4, 2014 Gotta love all the new scripts, good luck sir Thanks! ;) First update was made to the source code ;) Link to comment Share on other sites More sharing options...
Doout Posted January 4, 2014 Share Posted January 4, 2014 good job, is this your frist script? one tip I can gave is to break up the main loop into method. this will make your life easier for debugging Link to comment Share on other sites More sharing options...
lolmanden Posted January 5, 2014 Share Posted January 5, 2014 Good luck on creating a good one. Link to comment Share on other sites More sharing options...
surer123 Posted January 6, 2014 Author Share Posted January 6, 2014 good job, is this your frist script? one tip I can gave is to break up the main loop into method. this will make your life easier for debugging Will look into it, thanks! The script is not really my "first" i made them before, just didn't publish them! Good luck on creating a good one. Thanks, but it will have to struggle to make a "good one"... Link to comment Share on other sites More sharing options...
lolmanden Posted January 6, 2014 Share Posted January 6, 2014 Will look into it, thanks! The script is not really my "first" i made them before, just didn't publish them! Thanks, but it will have to struggle to make a "good one"... I'll give you my best lucks. Link to comment Share on other sites More sharing options...
surer123 Posted January 9, 2014 Author Share Posted January 9, 2014 hmm i think i will have to put this project on "hold". Kinda busy with school related thing lately! Link to comment Share on other sites More sharing options...