Search the Community
Showing results for tags 'scripting help'.
-
Just a collection of utility classes within org.fanny.utils Hopefully this helps somebody get started, these make writing scripts super easy - see this example script: Example Script (FannyGoldDigger) - Uses the generic utils methods and very short to write Utils (for initialisation) UtilsConfig & Utils.java Sleep Sleep.java Constants (for constants I use) Const.java Tracker (easy paint) Tracker.java Banking BankLocation.java BankWalk.java Mining specific Rock.java Miner.java Walking Walk.java Worlds / Hopping World.java WorldManager.java WorldFilter.java Hopper.java
-
Hello, I have a doubt, is there any difference between the scripts that simulate the movement of the mouse when they have to interact with menus and those that move directly to the option?
-
Hey It's me again Have a problem with my miner, - tried writing it different from what I'm used to; Tried using private voids and then putting them into onLoop. What can I improve and what is making my script not runnable? public class LSCopperMiner extends Script { private Area miningArea = new Area( 3228, 3145, 3229, 3145); private void walking(){ if (getInventory().isEmptyExcept("Bronze pickaxe","Iron pickaxe","Steel pickaxe", "Mithril pickaxe","Adamant pickaxe","Rune pickaxe" ) && !miningArea.contains(myPosition())){ log("Inventory is empty and miningArea does not contain my position, walking to mining area"); getWalking().webWalk(miningArea); } else if(getInventory().isFull() && !Banks.LUMBRIDGE_UPPER.contains(myPosition())) { log("Inventory is full, walking to LBank"); getWalking().webWalk(Banks.LUMBRIDGE_UPPER); } } private RS2Object copperRocks = getObjects().closest(7484,7453); private void levelUpWhile() { while (getDialogues().isPendingContinuation()){ if(getDialogues().clickContinue()){ log("Interacting with copperRocks again"); copperRocks.interact("Mine"); } } } private void mining() throws InterruptedException { if(copperRocks != null && !myPlayer().isAnimating() && !myPlayer().isMoving()){ log("Interacting with copperRocks"); copperRocks.interact("Mine"); log("Sleeping a bit before 'going afk'"); sleep(random(1000,1400)); log("Moving mouse outside of screen,'going afk'"); getMouse().moveOutsideScreen(); } } private void banking() throws InterruptedException { RS2Object bankBooth = getObjects().closest("Bank booth"); if(!getBank().isOpen() && bankBooth != null && Banks.LUMBRIDGE_UPPER.contains(myPosition())) { log("In LBank and Bank is not open, interacting with Bank"); bankBooth.interact("Bank"); log("Sleeping for 1.5-2.5 sec to avoid interacting with bank again"); sleep(random(1500, 2500)); } if(getBank().isOpen()) { log("Bank is open, depositing everything except pickaxes"); getBank().depositAllExcept("Bronze pickaxe","Iron pickaxe","Steel pickaxe", "Mithril pickaxe","Adamant pickaxe","Rune pickaxe"); } } @Override public int onLoop() throws InterruptedException { if(!miningArea.contains(myPosition()) || !Banks.LUMBRIDGE_UPPER.contains(myPosition())) { walking(); } else if(miningArea.contains(myPosition())){ levelUpWhile(); mining(); banking(); } return 1000; } }
-
Hey Started learning how to script a few days ago, and I am now in need of some help I know how to display for how long the script has been running / and how many levels I have gained. How would I go about counting, logging and displaying f.ex amount of logs chopped since I started the script? - what code could I use? Thanks
- 4 replies
-
- beginner
- scripting help
-
(and 2 more)
Tagged with:
-
Hey guys im wanting to kinda make this thread into a free code thread for people so everyone can have some fun free code to use when botting. How it will work: You guys request a certain feature so for example a Automatic account replacement snippet and i'l make it and post it here in a for scripters easy to use way this can be anything from simple to complex projects Note: Big requests take alot of time as would be expected. Whats in it for me?: After i made the first free code release i'l be putting some crypto donate adreses for the people who want to show some extra special appreciation and i'l have a little thanks for the support to:donators part at the end of the thread. If you don't want to give anything there is absolutely no problem with that and its not expected either im mainly doing this in my free time to help my self keep learning and keep getting better since currently i by no means concider my self a "Good programmer" its just a way to show some support and who knows maybe earn a bit extra. Planned projects: Automatic account replacement Auto muling Finished projects: Nothing here yet Thanks for the support to: