Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NoClassDefFoundError when executing WebWalkEvent

Featured Replies

1. OSBot Version (do NOT put "current version", be specific) 2.4.52

2. A description of the issue. Include relevant logs. A user reported that the script is unable to webwalk during a quest

3. Are you receiving any errors in the client canvas or the logger?  Yes, see below

4. How can you replicate the issue? I believe using the code below which simply creates an event, adds a break condition, disables teleports and executes it. The same code executed in the same context seems to work for me, but he's still having this issue.

5. Has this issue persisted through multiple versions? If so, how far back? No, only been reported today.

 

Error message:

[ERROR][bot #1][04/21 01:32:59 PM]: Error in bot executor!
java.lang.NoClassDefFoundError: Could not initialize class org.osbot.rs07.api.webwalk.map.ObjectDescription
at org.osbot.rs07.api.webwalk.impl.Helper$1.resolveObject(nk:174)
at org.osbot.rs07.api.webwalk.impl.Helper$1.resolveObject(nk:185)
at org.osbot.rs07.api.webwalk.impl.DirEntity.needsExecute(je:99)
at org.osbot.rs07.event.WebWalkEvent.execute(fj:248)
at org.osbot.rs07.event.EventExecutor$2.run(bk:270)
at org.osbot.rs07.event.EventExecutor.execute(bk:132)
at org.osbot.rs07.script.MethodProvider.execute(rd:473)
at api.Interactions.useItemOnObjectById(Interactions.java:856)
at api.Interactions.useItemOnObjectById(Interactions.java:1258)
at quests.TheKnightsSword$1.execute(TheKnightsSword.java:40)
at api.Quest.populateStageArrayList(Quest.java:167)
at java.util.ArrayList.forEach(Unknown Source)
at api.Quest.populateStageArrayList(Quest.java:139)
at api.Quests.isStarted(Quests.java:197)
at functionalities.Quester.runtimeCode(Quester.java:138)
at api.ComplexTask.lambda$execute$0(ComplexTask.java:47)
at main.Core.onLoop(Core.java:247)
at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(cj:186)
at java.lang.Thread.run(Unknown Source)

 

Error is at api.execute(e)

 

Code:

public boolean navigateToPosition(Teleport teleport, Position destination) throws InterruptedException {
deselectItem();
deselectSpell();
if (teleport != null && teleport.destination.distance(destination) < api.myPosition().distance(destination))
    api.teleports.teleport(teleport);
Position validPosition = findValidPosition(destination, 2);
if (validPosition == null) {
    api.log("[ERROR][iNTERACTIONS] No valid tile found");
    return false;
}
WebWalkEvent e = new WebWalkEvent(api.finder, validPosition);
startTime = System.currentTimeMillis();
lastCheck = startTime;
lastPosition = api.myPosition();
e.setBreakCondition(new Condition() {
    @Override
    public boolean evaluate() {
        if (api.myPosition().distance(lastPosition) > 0) {

            lastPosition = api.myPosition();

            lastCheck = System.currentTimeMillis();

        }

        if (System.currentTimeMillis() - 5000 > lastCheck)

            return true;

        return api.skills.getDynamic(Skill.HITPOINTS) < api.hpThreshold && api.food.hasFood();

    }
});
e.noTeleports();
api.execute(e); // ************************ ERROR ************************************
if (e.hasFailed()) {
    api.log("Event failed");
    ArrayList positions = new ArrayList();
    List directions = api.finder.route(api.myPosition(), validPosition);
    for (IDirection direction : directions) {
        positions.add(direction.getDestination());

    }
    api.log(api.finder.route(api.myPosition(), validPosition));
    WalkingEvent w = new WalkingEvent();
    LinkedList f = new LinkedList();
    f.addAll(positions);
    if (f.size() > 0) {
        w.setPath(f);

        long time = System.currentTimeMillis();

        w.setBreakCondition(new Condition() {

            @Override

            public boolean evaluate() {

                return System.currentTimeMillis() - 6000 > time

                    || (api.skills.getDynamic(Skill.HITPOINTS) < api.hpThreshold && api.food.hasFood());

            }

        });

        api.execute(w);

    }
}
return true;
}

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.