Advertisement
Rochet2

Untitled

Jul 11th, 2016
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. local NpcList = {
  2. --  [entry] = {map, x, y, z}
  3.     [950000] = {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  4.     [950001] = {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  5.     [950002] = {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  6.     [950003] = {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  7.     [950004] = {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  8.     [950005] = {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  9. }
  10.  
  11. local function PortalTrigger(event, creature, target)
  12.     if (creature:GetDistance(target) <= 3) then -- 15 is the [float] radius, change it to whatever you feel comfortable with
  13.         target:Teleport(table.unpack(NpcList[creature:GetEntry()]))
  14.     end
  15. end
  16.  
  17. for entry, coordinates in pairs(NpcList) do
  18.     RegisterCreatureEvent(entry, 27, PortalTrigger)
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement