Jump to content

Explv

Scripter II
  • Posts

    2313
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    100%

Posts posted by Explv

  1. 8 hours ago, Psybration said:

    Dang this is lit!

    Authed

    6 hours ago, Doalrian20 said:

    i'd love to test if its still available :D your older walker works great but this looks dope

    Authed 

    5 hours ago, Farken Dan said:

    This looks awesome!

    Authed

    12 hours ago, Bobbey said:

    The issue still occurs.

    I'll take another look tonight, thanks 

  2. 4 hours ago, Bobbey said:

    [INFO][Bot #1][08/14 03:29:19 PM]: WebWalkingEvent; Terminated because of break condition!
    [INFO][Bot #1][08/14 03:30:21 PM]: WebWalkingEvent; Terminated because of high priority break condition!
    [ERROR][08/14 03:30:24 PM]: Uncaught exception!
    java.util.ConcurrentModificationException
        at java.base/java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:970)
        at java.base/java.util.LinkedList$ListItr.next(LinkedList.java:892)
        at e.e.e.e.cOn.paintComponent(aa:721)
        at java.desktop/javax.swing.JComponent.paint(JComponent.java:1119)
        at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5311)
        at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:246)
        at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1337)
        at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5259)
        at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5069)
        at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:879)
        at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:862)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:862)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:835)
        at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:784)
        at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1898)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    [ERROR][08/14 03:30:40 PM]: Uncaught exception!
    java.util.ConcurrentModificationException
        at java.base/java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:970)
        at java.base/java.util.LinkedList$ListItr.next(LinkedList.java:892)
        at e.e.e.e.cOn.paintComponent(aa:721)
        at java.desktop/javax.swing.JComponent.paint(JComponent.java:1119)
        at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5311)
        at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:246)
        at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1337)
        at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5259)
        at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5069)
        at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:879)
        at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:862)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:862)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:835)
        at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:784)
        at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1898)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

    My character was walking the previous path reversed when I already cleared that path to make a new one. Perhaps it has to do with the trace as this might mess up the order of pathing or the path might not have been cleared properly.


    [Edit] this error seems to occur when I start a walk, stop it, then drag the map

     

    The script has updated on the SDN, could you see if this still happens?

    Thanks

  3. 1 hour ago, Ichindar said:

    I dont know if I am doing something wrong or if its something to do with mirror mode...

    But the "sprint" function for me starts my character running all the way down to 0, then rests until 15-17 and then runs again.

    It does however burn whatever stam I have left when I reach the Ice Mountain never Catherby when the wolves attack which is by design.

    Did you try setting the run energy threshold setting to something higher than 15?

    This is just how OSBot's Web walker works. It runs until 0, rests until energy threshold reached.

    I can try adding some custom functionality 

     

  4. 28 minutes ago, Bobbey said:

    Dear god. The quality is insane like always with @Explv I notice the culling etc. You build good software. Been using the website for years for using with scripting. It would be nice if you could add location assistance in this. Just like the location assistant script. I don't like the location assistant and website combo so much and I think if you add area selection to this, that I would really use this! The problem with the website is that it is slow and funky to use. The problem with the location assistant is that it's only usable on the canvas. If I could select areas on the map in this script and see them in game that would be awesome!

    I dreamed about a script like this a couple times. Now it's real.

    Thanks a lot!

    With regards to the location assistant / map, I would be hesitant to add that functionality to this script, because it over-complicates the purpose here.

    I could build it out as a separate premium script to replace the location assistant.

    I can also take a look at the website performance at some point

  5. 48 minutes ago, Ichindar said:

    Just ran my first trial journey. Pretty much from one side of the world to the other.

    The presentation and ease of use is right up there in my opinion.

    My only question would be how run threshold is supposed to work? Is it a case of when the character starts moving itll sprint to 0 and then rest until you hit the magic number you set? I envisioned it working like it would run until it met that number and then rest until 100 where it would run again.

    It enables run if the player has more than the specified run energy.

    However I can take a look at adding some more customisation to that

  6. Explv's Walker Pro

    The perfect walking script.

    Status: Beta Testing

    Price: TBD

    Beta details:

    • Request to become a beta tester of this script by posting in this thread.
    • Beta testers will be authorised to use the script for free up until release
    • Beta testers will need to provide feedback (positive or negative), and highlight areas for improvement to the script, or new features they would like to see.

    Features:

    • Click anywhere on the map (that your player can reach) and your player will walk there.
    • Map displays a preview of the route that your  player will take, including any boat charters, teleports, shortcuts, etc.
    • Allows selecting multiple destinations on a path
    • Option to repeat the path once complete
    • Option to stop the script when the destination is reached
    • Option to prompt the user for confirmation before proceeding to the next destination in the path
    • Allows full customisation of OSBot's webwalking features.
      • Toggle boat chartering / fairy rings / gliders / agility shortcuts / quest shortcuts / spirit trees / teleports
      • Toggle checking bank / equipment / inventory for items
      • Set run energy threshold
      • Disable moving the camera
      • Set click distance thresholds
    • Save configurations to re-use them later
    • CLI support, allowing you to load a configuration from a file
    • [Other features requested by YOU]

    UI Preview:

    Please note that the script is still under development so the following UI is subject to change / improvement.

    6ucrvO2.gif

     

    uNmMHMk.png

     

    pq5jy4s.jpeg

     

    uG3efTi.gif

    • Like 2
    • Boge 1
  7. 10 hours ago, Doalrian20 said:

    the players location right now is WAY off from the map in the script, tried walking to the GE and ended up somewhere near draenor. would love a fix when you can :D

     

    There was an update to the underlying map tiles. I did push a code change to update this script, maybe it hasn't been released yet. I'll double check

    • Like 1
  8. 1 hour ago, RS13159265 said:

    Thanks. 

    For my understanding:

    1) What does new Bank() do / refer to? 

    2) And, reiterating, why does a non-null object raise a Null exception? 


    1. You're creating a new instance of the Bank class, this is an OSBot API class which extends MethodProvider. Any class which extends MethodProvider needs to have some context provided, so that it has access to all the other OSBot API class instances (e.g. inventory, equipment, etc.). In your case, you have not provided this context, and so all of these API references are null. You don't *need* to create an instance of the Bank class anyway, because OSBot provides you one that is correctly setup, which you access via getBank().
    2. It is the `open` function throwing a null pointer exception. This means that something the open function is trying to access is null (again because you have not exchanged context, so the internal fields in the Bank class are null)


    You can see the open function here:

    epXNEqD.png

    On the 4th line of the function you can see `this.inventory.isItemSelected()`

    `this.inventory` will be null, as you have not exchanged context. Therefore this function call will throw a NullPointerException.

    This would probably work:
     

    Bank bank = new Bank();
    bank.exchangeContext(getBot());


    exchangeContext sets all the internal context fields in the API class instance using the provided Bot reference. You can see the implementation here:

    4Nu06jd.png

    However there is no need for it, because you can access the already setup instance using `getBank()`.

    • Like 2
  9. On 5/11/2021 at 6:12 PM, dyb said:

    Confirming what everyone else has said - nothing runs at all

     

    On 2/22/2021 at 7:43 PM, Asimo said:

    @ExplvCooking script has error when I try cook Raw meat on any Range. When it arrive on range it log off and show this error on Logger:

    "INFO][Bot #1][02/22 07:37:43 PM]: Found null pointer exception. Task failed, exiting.
    [INFO][Bot #1][02/22 07:37:43 PM]: e.a.m.cON.f(cl:246)
    [INFO][Bot #1][02/22 07:37:43 PM]: e.a.m.cON.i(cl:172)
    [INFO][Bot #1][02/22 07:37:43 PM]: e.c.Nul.g(li:162)
    [INFO][Bot #1][02/22 07:37:43 PM]: a.Nul.g(yb:91)
    [INFO][Bot #1][02/22 07:37:43 PM]: a.a.aux.d(cb:102)
    [INFO][Bot #1][02/22 07:37:43 PM]: a.a.aux.g(cb:245)
    [INFO][Bot #1][02/22 07:37:43 PM]: script.AIO.onLoop(bb:59)
    [INFO][Bot #1][02/22 07:37:43 PM]: org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(mg:59)
    [INFO][Bot #1][02/22 07:37:43 PM]: java.lang.Thread.run(Unknown Source)
    [INFO][Bot #1][02/22 07:37:46 PM]: Terminating script Explv's AIO v3.2.7...
    [INFO][Bot #1][02/22 07:37:46 PM]: Script Explv's AIO v3.2.7 has exited!"

     

    On 2/18/2021 at 9:40 AM, animtiddies said:

    It is still getting stuck on quests with the latest update from github

     

    On 3/15/2021 at 4:46 AM, LeonardoNarco666 said:

    when i set it to complete the cook assistant quest and the sheep sheerer quest it would get all the neccisary items but it would bug out when attempting to accept the quests. itd choose the dialog that denied the quests and keep doing that repetedly. other than that its been amazing for me

     

    On 3/16/2021 at 8:40 PM, nz420 said:

    Hi. it seems when i try the agilty at gnome stronghold it just runs me to the bank and then logs out

     

    On 3/25/2021 at 11:42 PM, GameDance said:

    Anyone else has this problem. The woodcutting does not cut maple when you set it to maple trees.

     

    On 4/16/2021 at 9:48 PM, osrsBotter182 said:

    None of the quests working for me. Does anybody else have this problem? it never acceps the quests.

     

    On 5/5/2021 at 3:13 AM, tryingthishard said:

    I tried to run this script to just run Cooks Assistant and it doesn't do anything it just sits there. This is true for anything I try to make it do. Whats the problem here?

     

    On 5/8/2021 at 9:33 PM, RunYisus said:

    Hi, the script dont work from the las osbot update 


    Published a new version to GitHub. Please let me know if you still have any of these issues https://github.com/Explv/Explvs-AIO/releases/latest

    SDN update will follow

  10. 4 hours ago, ez11 said:

    Please do

     

    1. Define your custom method provider, this extends OSBot's MethodProvider class, and then adds on / overrides functionality. In this example, I am overriding getInventory() with my own class which adds a "use" function. The CustomMethodProvider class defined below also supplies a custom "execute" function, which runs an Executable (a different class I have defined later)
     

    class CustomMethodProvider extends MethodProvider {
    
        private ExtendedInventory extendedInventory;
        private boolean hasContext;
    
        public void init(final Bot bot) {
            super.exchangeContext(bot);
            this.extendedInventory = new ExtendedInventory();
            extendedInventory.exchangeContext(bot);
            hasContext = true;
        }
    
        public boolean hasContext() {
            return hasContext;
        }
    
        // Deprecated as exchangeContext(Bot bot, CustomMethodProvider methodProvider) should be used instead.
        @Deprecated
        public MethodProvider exchangeContext(final Bot bot) { return super.exchangeContext(bot); }
    
        public CustomMethodProvider exchangeContext(final Bot bot, final CustomMethodProvider methodProvider) {
            this.extendedInventory = methodProvider.extendedInventory;
            super.exchangeContext(bot);
            hasContext = true;
            return this;
        }
    
        @Override
        public ExtendedInventory getInventory() {
            return extendedInventory;
        }
    
        /**
         * Helper function which exchanges context with an Executable
         * (if not already exchanged), and then calls Executable::run
         * @param executable The Executable to execute
         * @throws InterruptedException
         */
        public void execute(final Executable executable) throws InterruptedException {
            if (!executable.hasContext()) {
                executable.exchangeContext(getBot(), this);
            }
            executable.run();
        }
    }


    Here is my "ExtendedInventory" class:
     

    class ExtendedInventory extends Inventory {
    
        public boolean isUsing(final String itemName) {
            return itemName.equals(getSelectedItemName());
        }
      
        public boolean use(final String itemName) {
            if (isUsing(itemName)) {
                return true;
            }
            if (getInventory().interact("Use", itemName)) {
                Sleep.sleepUntil(() -> itemName.equals(getSelectedItemName()), 1000);
                return true;
            }
            return false;
        }
    }


    2. Define the Executable class, this is what we will use for other classes in our script that have a common "onStart" / "onLoop" / "onEnd" pattern:

     

    abstract class Executable extends CustomMethodProvider {
    
        public void onStart() throws InterruptedException {}
    
        public abstract void run() throws InterruptedException;
    
        public void onEnd() throws InterruptedException {}
    }


    Note how this class extends our CustomMethodProvider, which means anything we define in the CustomMethodProvider class will be available to subclasses of "Executable"


    3. In the main script class, set everything up (create an instance of CustomMethodProvider, and exchange context)

     

    @ScriptManifest(author = "Explv", name = "Example", info="", logo = "", version = 0.1)
    public class Example extends Script {
    
        private final CustomMethodProvider customMethodProvider = new CustomMethodProvider();
    
        @Override
        public void onStart() {
            customMethodProvider.init(getBot());
        }
    
        @Override
        public int onLoop() throws InterruptedException {
            return 0;
        }
    }


    4. Finally, whenever you want some other class with an onStart / onLoop / onEnd, just extend the Executable class, and then run it using "execute". Here is a very contrived example:

     

    class ExampleExecutable extends Executable {
    
        private static final String TINDERBOX = "Tinderbox";
        private final Executable someOtherExecutable = new SomeOtherExecutable();
    
        @Override
        public void run() throws InterruptedException {
            if (!getInventory().isUsing(TINDERBOX)) {
                getInventory().use(TINDERBOX);
            } else {
                execute(someOtherExecutable);
            }
        }
    }
    
    class SomeOtherExecutable extends Executable {
    
        @Override
        public void run() throws InterruptedException {
            getWalking().webWalk(new Area(1, 2, 3, 4));
        }
    }
    
    @ScriptManifest(author = "Explv", name = "Example", info="", logo = "", version = 0.1)
    public class Example extends Script {
    
        private final CustomMethodProvider customMethodProvider = new CustomMethodProvider();
        private final Executable exampleExecutable = new ExampleExecutable();
    
        @Override
        public void onStart() {
            customMethodProvider.init(getBot());
        }
    
        @Override
        public int onLoop() throws InterruptedException {
            customMethodProvider.execute(exampleExecutable);
            return 600;
        }
    }


    5. If you want an "Executable" that blocks until completion, then you can either use OSBot's Event class, or define your own "BlockingExecutable" which utlises OSBot's Event, for example:
     

    public abstract class BlockingExecutable extends Executable {
    
        private boolean finished;
        private ExecutionFailedException executionFailedException;
    
        @Override
        public final void run() throws InterruptedException {
            finished = false;
            executionFailedException = null;
            onStart();
            execute(new Event() {
                @Override
                public int execute() throws InterruptedException {
                    if (finished) {
                        setFinished();
                    } else {
                        try {
                            blockingRun();
                        } catch (ExecutionFailedException executionFailedException) {
                            BlockingExecutable.this.executionFailedException = executionFailedException;
                            setFailed();
                        }
                    }
                    return 0;
                }
            });
            onEnd();
            if (executionFailedException != null) {
                throw executionFailedException;
            }
        }
    
        protected abstract void blockingRun() throws InterruptedException;
    
        protected void setFinished() {
            finished = true;
        }
    }
    
    public class ExecutionFailedException extends RuntimeException {
        public ExecutionFailedException(String message) {
            super(message);
        }
    }

     

    • Like 6
  11. This is cool, although I would recommend using your own class instead of the Script class. Using your own class would let you extend the MethodProvider and supply additional functionality to all your subclasses, which can be useful in a big script.

    Can provide example if helpful

  12. I'd recommend following some Java tutorials, in your first example you didn't even construct an instance of your Fishing class. You also made your Fishing class abstract, which means it cannot be instantiated directly.

    Only your main script class should extend Script.

    If you want other classes to be able to access the API, either pass MethodProvider as a constructor arg, or make your other class extend MethodProvider and exchange context.

    See section 5 of https://osbot.org/forum/topic/115124-explvs-scripting-101/

     

     

  13. 3 hours ago, jackknife32 said:

    b6e1my5.png
    g7vSf8n.pngHLfVevE.png

    You're including the OSBot.jar in your script, instead of the compiled output.

    In the bottom right of your screen shot, where it says "Available Elements", you should be including "FirstBot2 compile output" (it should show up on the left side under the "Woodcutting_Script.jar". The "OSBot 2.6.20" should be on the right hand side (excluded from the compiled script)

×
×
  • Create New...