Explv / Explvs-AIO

Explv's AIO
MIT License
23 stars 18 forks source link

Questing areas and talking #43

Closed ghost closed 4 years ago

ghost commented 5 years ago

So, if a quest has an area where the bot is supposed to go and talk to someone, it will go the area and try to find the person. If the person is out of the specified area it, then it will go and talk to the npc but then realize it's not in the area anymore and try to go to the area specified, therefore getting stuck in a look of going back and forth, should be a simple check if the bot is already talking to the npc.

Azn2000 commented 5 years ago

In a task that i've wrote and currently testing im not checking for the area im checking for the npc found maybe this also works for your problem

NPC target = getNpcs().closest("Some NPC name");

if(target != null){
    if (!getDialogues().inDialogue() || !myPlayer().isInteracting(target)) {
        if (target.interact("Talk-to")) {
            Sleep.sleepUntil(() -> getDialogues().inDialogue() && myPlayer().isInteracting(target), 5000);
        }
    } else {
        getDialogues().completeDialogue(DIALOG_OPTIONS);
    }
}else{
    //Move to the area
    getWalking().webWalk(target);
}
Azn2000 commented 5 years ago

I dont know how usefull this is to you because of more building levels etc, needs probably some changes.

Explv commented 5 years ago

If you update all quests to use this class: https://github.com/Explv/Explvs-AIO/blob/master/AIO/src/org/aio/activities/quests/DialogueCompleter.java

This issue should be resolved

Explv commented 5 years ago

Example of how to use: https://github.com/Explv/Explvs-AIO/commit/d4bc4197799503f58137c3977731786191218fdc

ghost commented 5 years ago

46 should fix this :)

ghost commented 5 years ago

@Azn2000 what happened to this fix? I am looking to fix this, but was wondering if you already have a fix that you closed?! :o

Explv commented 4 years ago

Fixed in d79cfd5306ada1b301fde81ab4581baf60f97f13