powbot / issues

1 stars 0 forks source link

[BUG] Misclick NPC Interaction #207

Closed nschaa closed 1 year ago

nschaa commented 1 year ago

Describe the bug Frequent misclicks when trying to interact with NPCs that moves around. Seems to be NPCs that occupy an area >1 tile.

To Reproduce/Line of code causing issue Try to interact with any NPC that moves around and that occupies >1 tile.

val npc = Npcs.stream().name("Yak").first().interact("Attack") 
val npc = Npcs.stream().name("Yak").first().click()

Screenshots If applicable, add screenshots to help explain your problem.

Logs

[WARNING] Received unexpected action while waiting for Attack - GameActionEvent(v0=-1, widgetId=-1, rawOp=1006, id=-1, interaction='Cancel', rawEntityName='', mouseX=469, mouseY=259) 
[INFO] action waiter finished after 1
[WARNING] Received unexpected action while waiting for Attack - GameActionEvent(v0=458, widgetId=263, rawOp=23, id=0, interaction='Walk here', rawEntityName='', mouseX=458, mouseY=263) 
[INFO] trying to click menu itemorg.powbot.api.rt4.Menu$TextFilter@950886b
[SEVERE] Menu item doesn't exist - [Walk here, Examine Yak  (level-22), Cancel]
[INFO] trying to click menu itemorg.powbot.api.rt4.Menu$click$1@e9cdfc8
[INFO] found menu item at 2
[WARNING] Received unexpected action while waiting for Attack - GameActionEvent(v0=-1, widgetId=-1, rawOp=1006, id=-1, interaction='Cancel', rawEntityName='', mouseX=484, mouseY=248) 
[INFO] action waiter finished after 0
[WARNING] Received unexpected action while waiting for Attack - GameActionEvent(v0=307, widgetId=252, rawOp=23, id=0, interaction='Walk here', rawEntityName='', mouseX=307, mouseY=252) 
[WARNING] Received unexpected action while waiting for Attack - GameActionEvent(v0=331, widgetId=245, rawOp=23, id=0, interaction='Walk here', rawEntityName='', mouseX=331, mouseY=245) 
[INFO] trying to click menu itemorg.powbot.api.rt4.Menu$TextFilter@843074
[INFO] found menu item at 0
[INFO] Received expected action - NpcActionEvent(name=Yak, id=10074, level=22, interaction=Attack)
[INFO] action waiter finished after 0
[] Successfully in combat...

Emulator or device (please complete the following information): Bluestacks, Android 11, latest version (5.10.110.1002)

Additional context Might also be related to a similar issue regarding misclicks but with Objects.

nschaa commented 1 year ago

UPDATE: Tested more thoroughly to hopefully narrow down the issue.

Tested with an NPC that moves around but does not have any issues with misclicks (Anne Isaakson) https://discord.com/channels/341014842745815054/763451943477182484/1070104383720792256

vs.

Tested with NPC that has misclicks https://discord.com/channels/341014842745815054/763451943477182484/1070104565292224624

Seems like maybe some NPCs move around faster/more frequently and the NPC model area being generated to click for is delayed and hence the misclicks?

nschaa commented 1 year ago

Fixed