Jump to content

Sara

$250.00 Donor
  • Posts

    19
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Posts posted by Sara

  1. 2 hours ago, raikzun420 said:

    Progress screens for those 5 or 6 days nonstop please.

    Other than the one I posted this morning this is the only other one I could find. Sorry, I can't go back and take screenshots from prior times :(

    unknown.png

  2. 8 minutes ago, HoboStick said:

    No, I used the GE / Center option. Even after I use the GUI, it keeps reading as "waiting for GUI Input". I can post some screenshots if you need.

    I had this issue as well, the problem was that it was on re-sizable mode, not fixed mode.
    Try switching to fixed view mode and I bet it'll work immediately.

    • Heart 1
  3. 20 minutes ago, jeiser1997 said:

    What is your minimum and maximum? I mean, the price of the loot you put. (min item and priorize)

     
    •  
    •  

    5000/50000

     

    25 minutes ago, raikzun420 said:

    ^ Probably just dropped items to yourself in the end :D

    I've been running the bot for 5 or 6 days nonstop, it gets lucky sometimes, and other times it doesn't. That's the beauty of this bot, it's all luck :)

    • Like 2
  4. 2 hours ago, mazr said:

    @Sara how much GP per hour can some one get from this script?

    Based off the current screenshots in the progress reports section I would say the average to be between 18.3-18.6k per account picking cabbages (fetching) when doing Draynor picking.
    On any given world, if you were running 5 fetchers you could expect 91.5-93k per hour.

    Once I implement sacks into the script I would expect that number to significantly increase, however, it's definitely not the fastest money maker out there.

     

    • Like 1
  5. Sara's Dank Cabbage Acquirer

    image.png.3356e2c11337ccda020dc6d3f9d5c3a0.png

    !~~~Features~~~!
    Currently supports two locations (Draynor and Edgeville)
    ~575-625 Cabbages picked per hour per account (Draynor)
    ~450-500 Cabbages picked per hour per account (Edgeville)
    Basic GUI which supports two roles and both locations (Fetcher and Mule)
    Automatically transfers items to specified mule
    If no mule specified fetchers will pick indefinitely
    Basic paint with informational statistics


    !~~~In Progress~~~!

    P2P: Sacks (Will drastically increase amount of cabbages per inventory)
    P2P: Glory Teleporting for quicker runs (Maybe, assuming it's not too cost prohibitive)
    F2P+: Automatic world-hopping to the specified mule
    F2P+: Banking cabbages if in combat


    !~~~Progress Reports~~~!

    Spoiler

    !~~~Mule Progress Reports~~~!
    image.png.244945d768df4b77ef205e885c8c6f6d.png

    image.png.2ef5f5b158c66c181a8db0a7dfb3300d.png

    Spoiler

    !~~~Fetcher Progress Reports~~~!
    image.png.fd5137fb56aeaeb6e0fd46a65263ff25.png

    image.png.47d43675a960b73393219675bde5b4a9.png

    !~~~Special Mentions~~~!
    FuryShark: For helping me with this when I would get stuck or just need a second set of eyes! :D
    Coworkers: For putting up with me talking about my virtual cabbage collection every day
    Tanya: My beautiful girlfriend for constantly being excited about my nerdy project :)


    !~~~Download~~~!
    [Click Here (v1.0)]
    Please report any bugs or feature requests to this thread, thanks!

    • Like 5
    • Heart 1
  6. 28 minutes ago, ExtraBotz said:

    Nice work! You should add comments to your code to make it easier to read.

    May I ask why you use specific positions for walking? Not that I know any better, but I typically use something like getWalking.webWalk(area); which automatically finds a random point within the area. I do this so that the walking stays unpredictable.

    My personal belief is that after your script is ran 1, 100, 1000+ times then patterns start to develop if you use static information.

    I actually didn't realize that you can use areas with webWalk, and since I already have the cabbage patch and bank configured as defined areas, that would simplify the code even further, I'll go ahead and give that a shot, thank you! (Edit: Implemented 😊)

     

    1 hour ago, Ragboys is back said:

    Pretty good for a first script, good job

    Thanks! :D

    • Like 1
  7. 3 hours ago, Hybris said:

    Definitely looks great for a first script, the only thing I noticed is this:

    
    @Override
    	public boolean canProcess() {
    		//If player inventory *IS NOT* full and player *IS NOT* at the cabbage patch, this evaluates to true
    		if(!api.getInventory().isFull() && !Cabbage_Area.contains(api.myPlayer())) {
    			return true;
    		} else {
    			return false;
    		}
    	}

     

    You can write this way easier:

    
    @Override
    	public boolean canProcess() {
    		//If player inventory *IS NOT* full and player *IS NOT* at the cabbage patch, this evaluates to true
    		return !api.getInventory().isFull() && !Cabbage_Area.contains(api.myPlayer()));
    	}


     

    If you have any questions feel free to ask :)

    Thanks for this!

    I originally wrote it that way but when I was struggling with tasks (ended up being unrelated) I switched these to if/else in desperation to figure out what I was doing wrong 😅. You’re 100% right it’s absolutely much simpler and aesthetically pleasing how you wrote, and I’ll be switching back to that moving forward.

     

    Thanks again!

  8. Hey everyone :)

    I decided to try my hand at learning how to write my own scripts, I've been consuming as many tutorials as I can (Thank you everyone who contributes to that section) and reviewing the API during lax points at work, figured I should finally start a project. I started this script this afternoon and am pretty happy with how it turned out, but was looking for any input you all have on how to make it better, where to go from here, any bad practices I may have done that I should avoid, best practices to do, etc.

    Main class: 

    Spoiler
    
    package core;
    
    import java.util.ArrayList;
    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;
    import task.BankCabbage;
    import task.GetCabbage;
    import task.Task;
    import task.WalkToBank;
    import task.WalkToCabbage;
    
    @ScriptManifest(author = "Sara", info = "Script I'm using to learn Java", name = "SaraCabbage", version = 0, logo = "")
    
    public class Main extends Script {
    	ArrayList<Task> tasks = new ArrayList<Task>();
    	@Override
    	public void onStart() {
    		tasks.add(new BankCabbage(this));
    		tasks.add(new GetCabbage(this));
    		tasks.add(new WalkToBank(this));
    		tasks.add(new WalkToCabbage(this));
    	}
    	@Override
    	public int onLoop() throws InterruptedException {
    		tasks.forEach(tasks -> tasks.run());
    		return 700;
    	}
    }

     

    Task class: 

    Spoiler
    
    package task;
    
    import org.osbot.rs07.script.MethodProvider;
    
    public abstract class Task {
    	protected MethodProvider api;
    	public Task(MethodProvider api) {
    		this.api = api;
    	}
    	public abstract boolean canProcess();
    	public abstract void process();
    	public void run() {
    		if (canProcess())
    			process();
    	}
    }

     

    Sleep class: 

    Spoiler
    
    package util;
    
    import org.osbot.rs07.utility.ConditionalSleep;
    
    import java.util.function.BooleanSupplier;
    
    public final class Sleep extends ConditionalSleep {
    
        private final BooleanSupplier condition;
    
        public Sleep(final BooleanSupplier condition, final int timeout) {
            super(timeout);
            this.condition = condition;
        }
    
        @Override
        public final boolean condition() throws InterruptedException {
            return condition.getAsBoolean();
        }
    
        public static boolean sleepUntil(final BooleanSupplier condition, final int timeout) {
            return new Sleep(condition, timeout).sleep();
        }
    }

     

    WalkToCabbage class: 

    Spoiler
    
    package task;
    
    import org.osbot.rs07.api.map.Area;
    import org.osbot.rs07.api.map.Position;
    import org.osbot.rs07.event.WebWalkEvent;
    import org.osbot.rs07.event.webwalk.PathPreferenceProfile;
    import org.osbot.rs07.script.MethodProvider;
    
    public class WalkToCabbage extends Task {
    	
    	private static final Area Cabbage_Area = new Area(3067, 3298, 3044, 3285);
    	Position pos1 = new Position(3060, 3286, 0);
    
    	public WalkToCabbage(MethodProvider api) {
    		super(api);
    	}
    
    	@Override
    	public boolean canProcess() {
    		//If player inventory *IS NOT* full and player *IS NOT* at the cabbage patch, this evaluates to true
    		if(!api.getInventory().isFull() && !Cabbage_Area.contains(api.myPlayer())) {
    			return true;
    		} else {
    			return false;
    		}
    	}
    
    	@Override
    	public void process() {
    		//If canProcess condition evaluates to true, do this
    		api.log("Walking to Cabbage");
    		WebWalkEvent webEvent = new WebWalkEvent(pos1);
    		webEvent.useSimplePath();
    		PathPreferenceProfile ppp = new PathPreferenceProfile();
    		ppp.setAllowTeleports(false);
    		webEvent.setPathPreferenceProfile(ppp);
    		api.execute(webEvent);
    	}
    	
    }

     

    GetCabbage class: 

    Spoiler
    
    package task;
    
    import org.osbot.rs07.api.map.Area;
    import org.osbot.rs07.api.model.Entity;
    import org.osbot.rs07.script.MethodProvider;
    
    import util.Sleep;
    
    public class GetCabbage extends Task {
    	
    	private static final int[] Cabbage_GroundID = { 1161 };
    	private static final Area Cabbage_Area = new Area(3067, 3298, 3044, 3285);
    	
    	public GetCabbage(MethodProvider api) {
    		super(api);
    	}
    	
    	@Override
    	public boolean canProcess() {
    		//If player inventory *IS NOT* full and player *IS* at the cabbage patch, this evaluates to true
    		if(!api.getInventory().isFull() && Cabbage_Area.contains(api.myPlayer())) {
    			return true;
    		} else {
    			return false;
    		}
    	}
    	
    	@Override
    	public void process() {
    		//If canProcess condition evaluates to true, do this
    		Entity cabbage = api.getObjects().closest(Cabbage_GroundID);
    		if (!api.myPlayer().isMoving() && cabbage != null && cabbage.interact("Pick")) {
    		    Sleep.sleepUntil(() -> api.myPlayer().isAnimating() || !cabbage.exists(), 5000);
    		}
    	}
    }

     

    WalkToBank class: 

    Spoiler
    
    package task;
    
    import org.osbot.rs07.api.map.Area;
    import org.osbot.rs07.api.map.Position;
    import org.osbot.rs07.event.WebWalkEvent;
    import org.osbot.rs07.event.webwalk.PathPreferenceProfile;
    import org.osbot.rs07.script.MethodProvider;
    
    public class WalkToBank extends Task {
    	
    	private static final Area Bank_Area = new Area(3088, 3246, 3097, 3240);
    	Position pos1 = new Position(3095, 3241, 0);
    	
    	public WalkToBank(MethodProvider api) {
    		super(api);
    	}
    
    	@Override
    	public boolean canProcess() {
    		//If player inventory *IS* full and player *IS NOT* at the bank, this evaluates to true
    		if(api.getInventory().isFull() && !Bank_Area.contains(api.myPlayer())) {
    			return true;
    		} else {
    			return false;
    		}
    	}
    
    	@Override
    	public void process() {
    		//If canProcess condition evaluates to true, do this
    		api.log("Walking to bank");
    		WebWalkEvent webEvent = new WebWalkEvent(pos1);
    		webEvent.useSimplePath();
    		PathPreferenceProfile ppp = new PathPreferenceProfile();
    		ppp.setAllowTeleports(false);
    		webEvent.setPathPreferenceProfile(ppp);
    		api.execute(webEvent);
    
    	}
    	
    }

     

    BankCabbage class: 

    Spoiler
    
    package task;
    
    import org.osbot.rs07.api.map.Area;
    import org.osbot.rs07.script.MethodProvider;
    
    public class BankCabbage extends Task {
    	
    	private static final Area Bank_Area = new Area(3088, 3246, 3097, 3240);
    	
    	public BankCabbage(MethodProvider api) {
    		super(api);
    	}
    
    	@Override
    	public boolean canProcess() {
    		//If player inventory *IS* full and player *IS* at bank, this evaluates to true
    		if(api.getInventory().isFull() && Bank_Area.contains(api.myPlayer())) {
    			return true;
    		} else {
    			return false;
    		}
    	}
    
    	@Override
    	public void process() {
    		//If canProcess condition evaluates to true, do this
    		if (!api.getBank().isOpen()) {
    		    try {
    				api.log("Depositing cabbages");
    				api.getBank().open();
    			} catch (InterruptedException e) {
    				e.printStackTrace();
    			}
    		} else {
    			api.log("Cabbages have been deposited");
    		    api.getBank().depositAll();
    		}
    	}
    }

     

     

    • Like 1
×
×
  • Create New...