Function for Prior Position
Posted: Sun Nov 01, 2015 7:42 am
I created a custom command for @bazaar that takes you to Provenance. For the glimmering troves in the area, an OnTrigger will send the player back to their previous zone. The command that sends them there, however, only has the starting point coordinates.
I'd like to fine tune this further by sending the player back to their last known position in their previous zone. I do not see any function available to call for the last position like I can for the last zone.
Is there a way to define a custom function to get the last known coordinates from the previous zone? Or is there something already available I can use?
Appreciate the help, thanks.
I'd like to fine tune this further by sending the player back to their last known position in their previous zone. I do not see any function available to call for the last position like I can for the last zone.
Code: Select all
ZoneID = player:getPreviousZone();
if (ZoneID == nil or ZoneID == 0) then
player:PrintToPlayer( "Previous Zone was a Mog House or there was a problem fetching the ID.");
else
player:setPos( 0, 0, 0, 0, ZoneID );
Is there a way to define a custom function to get the last known coordinates from the previous zone? Or is there something already available I can use?
Appreciate the help, thanks.