Page 1 of 1

Bot thinks I am not in Cyclops Lair

Posted: Sun Apr 22, 2012 9:50 am
by spawni
Hi folks - haven´t played the game for a while.
Restarted today - all works fine after updating the bot - only in CA I have some trouble.

Right after entering the instance the bot still thinks I´am outside.
So instead of going on with wp 7 in the code - he goes to a waypoint near wp 5 and 6
and stucks running arround.
Script always worked fine the last times.
Maybe you can give me a hint?

Here is the code. The problem appears after wp 6 and after loadingscreen.

Code: Select all

<!-- # 5 --><waypoint x="-38152" z="-9323" y="1061" type="TRAVEL"> </waypoint>
<!-- # 6 --><waypoint x="-38200" z="-9265" y="1061" type="TRAVEL">waitForLoadingScreen(); </waypoint>

<!-- Dentro de la instancia CL -->
<!-- # 7 --><waypoint x="2009" z="1084" y="47" tag="dentro">

    changeProfileOption("COMBAT_RANGED_PULL", false);
    changeProfileOption("MAX_TARGET_DIST", 110);
    if inventory:itemTotalCount(0) == 0 then
    sendMacro("LeaveParty();");
    yrest(4000);
    waitForLoadingScreen(); 
    player:update();
    player:mount();
    __WPL:setWaypointIndex(__WPL:findWaypointTag("rerun"));
    end
    </waypoint>
 
<!-- # 8 --><waypoint x="2051" z="1153" y="47"> </waypoint>
<!-- # 9 --><waypoint x="2045" z="1281" y="47"> </waypoint>

Re: Bot thinks I am not in Cyclops Lair

Posted: Sun Apr 22, 2012 10:14 am
by rock5
Sometimes creating a waypoint inside the portal and using waitForLoadingScreen() works ok, but if there is a little lag or things changed then it might teleport before it has a chance to register that it reached the waypoint. In that case once it has finished teleporting it will still try to get to the last waypoint.

People have been having good results using a function I wrote based on an idea by BillDoorNZ. It's called GoToPortal().
http://www.solarstrike.net/phpBB3/viewt ... 171#p36171
Seeing as portals don't have names this function targets the nearest object with no name.

So remove waypoint 6 that is in the portal and add GoToPortal() in waypoint 7 followed by a waitForLoadingScreen().

I'm planning on adding some helper NPC and portal functions soon to the bot.

Re: Bot thinks I am not in Cyclops Lair

Posted: Sun Apr 22, 2012 10:51 am
by spawni
TY - works fine :)