Lua MoveTo

From ArcEmu-Wiki
Jump to: navigation, search

Contents

MoveTo()

Function

Used to move an NPC to a certain Location (the specified coordinates)

Usage

 MoveTo(X Coordinates, Y Coordinates, Z coordinates, Orientation) 

Examples

Example:

function Kobold_Run(pUnit, event)
if pUnit:GetHealthPct() < 1 then
pUnit:MoveTo(3211.36272, -11136.46187, 2372.23267, 3.4567)
end
end

The examle checks if its health is lower then one, and if so, it then moves to another location, specified in the MoveTo parameters.

Those GPS Locations are EXAMPLES. That Script will not work in every location.

Personal tools