Jump to content

Satan

Lifetime Sponsor
  • Posts

    173
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by Satan

  1. On 6/1/2020 at 8:43 PM, jesenican said:

    wanted to show my new project with alredy 300m made with mouse recorder but dont know...

    I'd like to see it. i followed your botting thread and this one in the past. would be great to see more from you.
    But if it's a method that can crash real quick if a few more bots are added. you shouldn't share it.

    • Like 1
  2. On 7/26/2018 at 8:15 AM, Pegasus said:

    When I run it, it shows NullPointerException immediately.

     

    Script doesn't start if account hasn't logined / I turned off client auto login?:???:

    onstart not being called before user is logged :feels:

    
    Uncaught exception!
    java.lang.NullPointerException
    	at org.osbot.rs07.event.ScriptExecutor$3.run(kl:211)
    	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    	at java.awt.EventQueue.access$500(Unknown Source)
    	at java.awt.EventQueue$3.run(Unknown Source)
    	at java.awt.EventQueue$3.run(Unknown Source)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    	at java.awt.EventQueue.dispatchEvent(Unknown Source)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    	at java.awt.EventDispatchThread.run(Unknown Source)
    

     

    Getting the same error :(

  3. On 6/6/2019 at 2:25 PM, Token said:

    I don't see any onLoop in there nor the code running after webwalking so I can't provide any info on that

     

    On 6/6/2019 at 4:21 PM, Neanel said:

    So could you post the log output? Then it'll be clearer what the problem is

    I put the full code in the OP now. Did change what the script collects but the banking and walking is identical. Hopefully y'all can help.

  4. 5 minutes ago, Neanel said:

    Are you checking if the player is already in the area before calling the webwalk event? Otherwise it would just be stuck in a loop.

    if suddenly you’re script isn’t doing anything you might wanna reinstall everything & check if there are no nullpointers when assigning a value to a variable.

    Thanks again, but yes I do checks before calling any method and there are null checks troughout the script, also if there were to be a NPE it would log it to the console i believe.

  5. 14 minutes ago, Neanel said:

    Place a log after "execute(webEvent)" & see if it ever gets there, if it does you know the problem is indeed with webwalking, when do you exactly call this function?
    If it's not, place logs throughout the script & see which one shows up last to know where exactly it failed.

    Hey, thanks for replying. It always gets to where it needs to be, and logs: "WebWalkingEvent; Terminated because of break condition!" in the console. weirdly enough that is also the last method being called before it stops and just stands there. Even after restarting the script it does not seem to do anything now, where as before it did. Note that i didnt change anything in the script.

  6. Hi all,

    I'm working on a script.

    There are no errors in my script and no error messages appear, This is not the first script I have made and I like to believe I have a decent amount of scripting knowledge. 

    For some reason, the script just likes to sit still after having webwalked to the bank / field. Not doing anything, not logging anything even though I have a log messages troughout my whole script, also in the beginning of the onloop and before calling the actual methods.

    The weird thing is if I pause and then resume the script it will run as expected. (for a couple of trips) And sometimes runs fine for like ~10 trips.

    import org.osbot.rs07.api.map.Area;
    import org.osbot.rs07.api.map.constants.Banks;
    import org.osbot.rs07.api.model.Entity;
    import org.osbot.rs07.event.WebWalkEvent;
    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;
    import org.osbot.rs07.utility.Condition;
    import org.osbot.rs07.utility.ConditionalSleep;
    
    @ScriptManifest(author = "contiez", info = "Farms", logo = "", name = "potato", version = 1.0)
    
    public class potato extends Script {
    
    	private int itemid = 1942;
    	private int world = 0;
    
    	@Override
    	public int onLoop() throws InterruptedException {
    		log("Loop");
    		getPotatos();
    		return (random(400, 600));
    	}
    
    	private void getPotatos() throws InterruptedException {
    		log("method 1");
    		
    		Area field = new Area(3155, 3290, 3140, 3268);
    		Area pregate = new Area(3143, 3292, 3146, 3294);
    		Entity potato = objects.closest("Potato");
    
    		if (world == 0) {
    			world = worlds.getCurrentWorld();
    		}
    
    		if (!getInventory().isFull()) {
    			if (!field.contains(myPlayer())) {
    				log("walk to field");
    				WebWalkEvent webEvent = new WebWalkEvent(field);
    				webEvent.setBreakCondition(new Condition() {
    					@Override
    					public boolean evaluate() {
    						return field.contains(myPlayer());
    					}
    				});
    				execute(webEvent);
    			} else if (field.contains(myPlayer()) && getMap().canReach(potato)) {
    				if (potato != null)
    					potato.interact("Pick");
    				new ConditionalSleep(750, 500) {
    					@Override
    					public boolean condition() throws InterruptedException {
    						return myPlayer().isAnimating() && myPlayer().isMoving();
    					}
    				}.sleep();
    			} else if (field.contains(myPlayer()) && !getMap().canReach(potato)) {
    				log("walk to gate");
    				WebWalkEvent webEvent = new WebWalkEvent(pregate);
    				webEvent.setBreakCondition(new Condition() {
    					@Override
    					public boolean evaluate() {
    						return pregate.contains(myPlayer());
    					}
    				});
    				execute(webEvent);
    			}
    		} else if (getInventory().isFull()) {
    			bank();
    		}
    
    	}
    
    	private void bank() throws InterruptedException {
    		if (Banks.DRAYNOR.contains(myPlayer())) {
    			if (getBank().isOpen()) {
    				getBank().depositAll();
    			} else {
    				getBank().open();
    			}
    		} else {
    			WebWalkEvent webEvent = new WebWalkEvent(Banks.DRAYNOR);
    			log("walk to bank");
    			webEvent.setBreakCondition(new Condition() {
    				@Override
    				public boolean evaluate() {
    					return Banks.DRAYNOR.contains(myPlayer());
    				}
    			});
    			execute(webEvent);
    		}
    	}
    
    }

    Help would be really appreciated!

  7. Thanks for this great script! Few bugs:

    Typo in paint

    Sometimes dies at dark wizards

    Sometimes when Juliet isn't on the balcony but in the room, it will get stuck between walking to the balcony and clicking on her.

    Sometimes during rune mysteries it gets stuck in the basement, not sure why. this happens rarely.

  8. @Apaec can you add lumbride castle support, is it possible to make the bot open the gate in edgeville?
    I also noticed that the bot at edgeville and at alkharid most of the time right clicks the door tile (when the door is open) and then walks to it. looks realy obvious can this be changed?

×
×
  • Create New...