Rochet2

Untitled

Jul 11th, 2016
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.96 KB | None | 0 0
  1. local NpcList = {
  2.     950000,
  3.     950001,
  4.     950002,
  5.     950003,
  6.     950004,
  7.     950005,
  8. };
  9.  
  10. local TeleTable = {
  11.     {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  12.     {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  13.     {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  14.     {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  15.     {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  16.     {571, 7582.549805, 4848.779785, 43.179600, 3.1654207},
  17. };
  18.  
  19. local function PortalTrigger(event, creature, target)
  20.     if (creature:GetDistance(target) <= 3) then -- 15 is the [float] radius, change it to whatever you feel comfortable with
  21.         local npcid = creature:GetEntry()
  22.         for k, entry in ipairs(NpcList) do
  23.             if entry == npcid then
  24.                 target:Teleport(table.unpack(TeleTable[k]))
  25.             end
  26.         end
  27.     end
  28. end
  29.  
  30. for k, v in ipairs(NpcList) do
  31.     RegisterCreatureEvent(v, 27, PortalTrigger)
  32. end
Add Comment
Please, Sign In to add comment