powbot / issues

1 stars 0 forks source link

[BUG] Webwalker doesn't use spirit tree correctly #129

Open gavinnn101 opened 2 years ago

gavinnn101 commented 2 years ago

Describe the bug

    public void goToVarrockBank() {
        public static final Area VARROCK_EAST_BANK = new Area(new Tile(3182, 3436, 0), new Tile(3185, 3440, 0));
        if (!Constants.VARROCK_EAST_BANK.contains(Players.local().tile())) {
            GFisher.state("Walking to varrock");
            Movement.moveTo(Constants.VARROCK_EAST_BANK.getRandomTile());
            Condition.wait(() -> Constants.VARROCK_EAST_BANK.contains(Players.local().tile()), 500, 20);
        }
    }

Using this function from Ardougne, it will use the ardy/khazard spirit tree to get to the Tree Gnome stronghold. Then we'll get:

[INFO] trying to click menu itemorg.powbot.api.rt4.Menu$TextFilter@b54f008
[INFO] found menu item at 0
[INFO] got all wanted touch events
[INFO] wait for touch succeeded
[INFO] Received expected action - GameObjectActionEvent(name=Spirit tree, id=1295, interaction=Travel, tile=Tile(x=2451, y=3444, floor=0, localX=43, localY=52))
[INFO] Interacting with Spirit tree - Travel at Tile(x=2556, y=3261, floor=0, localX=148, localY=-131) (Transporting), attempt: 1
[INFO] Interacting with Spirit tree - Travel at Tile(x=2556, y=3261, floor=0, localX=148, localY=-131) (Transporting), attempt: 2
[INFO] Interacting with Spirit tree - Travel at Tile(x=2556, y=3261, floor=0, localX=148, localY=-131) (Transporting), attempt: 3
[INFO] Interacting with Spirit tree - Travel at Tile(x=2556, y=3261, floor=0, localX=148, localY=-131) (Transporting), attempt: 4
[INFO] Interacting with Spirit tree - Travel at Tile(x=2556, y=3261, floor=0, localX=148, localY=-131) (Transporting), attempt: 5
[INFO] Failed to handle edge=Edge(from=WebTile(x=2552, y=3256, z=0, regionID=10034), to=WebTile(x=3185, y=3508, z=0, regionID=12598), type=GameObject, interaction=GameObjectInteraction(objectName='Spirit tree', objectLocation=Tile(x=2556, y=3261, floor=0, localX=148, localY=-131), action=Travel, actions=[Travel]))
[INFO] findNext() edges=59, filteredEdges=59
[INFO] Could not find next Edge

It sits in the first chat dialogue after teleport to the tree gnome stronghold and gets the above logs. It then runs all the way back to the ardy/khazard spirit tree and uses it to teleport back to the tree gnome stronghold in a loop.

I imagine it wants to use the spirit tree to teleport to the Grand Exchange but it never clicks that entry in the spirit tree menu.

Similarly, when it tries to go back from varrock to the barbarian fishing area (by barbarian assault minigame), it will first use the spirit tree at the grand exchange to teleport to the tree gnome village and then use it again to get to the gnome stronghold before running to the location.

Expected behavior Webwalker utilizes the spirit tree correctly and doesn't infinite loop.

Emulator or device (please complete the following information):

PTYB commented 2 years ago

I dont believe we have mapped Gnome Tree Stronghold correctly as we don't have the varpbit for completed gnome stronghold