How to detect that teleport is completed
Posted: Sat Feb 06, 2010 12:44 pm
I've created a waypoint file for solo Raichika farming. All work well except one. Sometimes the script crashes on Cpawn:update when my character teleports from/to the instance. I think that this problem is caused by characters address changing. So, my question is: how to detect that teleport is completed and don't call Cpawn:update until TP is active?
I've tried a script like:
but it doesn't help...
I've tried a script like:
Code: Select all
player.free_counter2 = 0;
while(true)do
yrest(6000);
cprintf(cli.lightblue, "Testing zone ID\n");
local zoneid = RoMScript("GetZoneID();");
if(zoneid == 207)then
break;
end
player.free_counter2 = player.free_counter2 + 1;
if(player.free_counter2 > 3)then
cprintf(cli.lightblue, " Moving back and retry\n");
player:moveTo( CWaypoint(4576, 1669), true);
player:moveTo( CWaypoint(4573, 1764), true);
player.free_counter2 = 0;
end
end