Advertisement
Rochet2

Untitled

Mar 26th, 2017
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. local msgs =
  2. {
  3.     "And just what do you think you are doing? You dare to interfere with my master's experiment?",
  4.     "Do you like what we've done here? Perhaps we will drop these crystals from the sky all over Outland.",
  5.     "I grow bored with your attempt to heal the land and quell the energies summoning and driving the colossi mad. Goliathon, King of the Colossi, Prince Kael'thas and I demand that you defend the crystal!",
  6.     "We will meet again soon."
  7. }
  8.  
  9. local function waitAndSay(creature, msg, delay)
  10.     creature:RegisterEvent(function(_,_,_,creature)
  11.         creature:Say(msg, 0)
  12.     end, delay, 1)
  13. end
  14.  
  15. function Item_OnUse(event, player, item, target)
  16.     local distance = player:GetExactDistance(134.354996, 4835.589844, 76.730400)
  17.     if distance <= 3.5 then
  18.         player:RegisterEvent(function(_,_,_,player)
  19.             local creature = player:SpawnCreature(21504, 130.342712, 4836.767090, 76.039124, 6.217642, 1, 42000)
  20.             if creature then
  21.                 waitAndSay(creature, msgs[1], 3000)
  22.                 waitAndSay(creature, msgs[2], 3000)
  23.                 waitAndSay(creature, msgs[3], 3000)
  24.                 waitAndSay(creature, msgs[4], 3000)
  25.             end
  26.         end, 3000, 1)
  27.     end
  28. end
  29.  
  30. RegisterItemEvent(29478, 2, Item_OnUse)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement