Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2014
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. local EntryId = xxxx
  2. local range = xxxx --- how close(in yards) does the player need to stand to be teleported
  3.  
  4. local mapid = xxxx --- MAP ID
  5.  
  6. local hx = xxxx --- HORDE MALL X
  7. local hy = xxxx --- HORDE MALL Y
  8. local hz = xxxx --- HORDE MALL Z
  9.  
  10. local ax = xxxx --- ALLIANCE MALL X
  11. local ay = xxxx --- ALLIANCE MALL Y
  12. local az = xxxx --- ALLIANCE MALL Z
  13.  
  14. local cosmeticid = xxxx --- spell ID for the cosmetic spell to be cast on the player
  15. ---------------------------------------------------------------------------------------------
  16. function EPort_Tick(event, go, diff)
  17. local players = go:GetPlayersInRange(range)
  18.     for k,v in pairs(players) do
  19.         if v ~= nil then
  20.             v:CastSpell(v, cosmeticid)
  21.                 if v:GetFaction() == 0 then
  22.                 v:teleport(mapid, ax, ay, az, 1)
  23.                 else
  24.                 v:teleport(mapid, hx, hy, hz, 1)
  25.             end
  26.         end
  27.     end
  28. end
  29. RegisterGameObjectEvent(EntryId, 1, EPort_Tick)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement