Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2011
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.30 KB | None | 0 0
  1. crashUnit = nil
  2. crashGo = nil
  3.  
  4. function Crash_OnGossip(Unit, event, player)
  5.         Unit:GossipCreateMenu(100, player, 0)
  6.         Unit:GossipMenuAddItem( 0, "Test chat msg", 1, 0)
  7.         Unit:GossipMenuAddItem( 0, "Crash Part 1", 2, 0)
  8.         Unit:GossipMenuAddItem( 0, "Crash Part 2", 3, 0)
  9.         Unit:GossipSendMenu(player)
  10. end
  11.  
  12. function Crash_OnSelect(Unit, event, player, id, intid, code, pMisc)
  13.     if (id == 0) then
  14.         Unit:SendChatMessage(12, 0, "This is a chat msg. Lua script loaded and working.", 0)
  15.         player:GossipComplete()
  16.     end
  17.     if (id == 1) then
  18.         Unit:SendChatMessage(12, 0, "Choose Crash Part 2 to crash arcemu. Hold tight!", 0)
  19.         player:GossipComplete()
  20.         crashUnit = Unit:SpawnCreature(1126, player:GetX(), player:GetY(), player:GetZ(), player:GetO(), 56, 1)-- despawn after 1 ms
  21.         crashGo = Unit:SpawnGameObject(194569, player:GetX(), player:GetY(), player:GetZ(), player:GetO(), 1, 19)--despawn after 1 ms
  22.     end
  23.     if (id == 2) then
  24.         Unit:FullCastSpellOnTarget(57652, crashUnit) -- Crashing Wave spell
  25.         Unit:FullCastSpellOnTarget(57652, crashGo) -- Crashing Wave spell
  26.         Unit:SendChatMessage(12, 0, "Did you see this msg? Nice, no crash!", 0)
  27.         player:GossipComplete()
  28.     end
  29. end
  30.    
  31. RegisterUnitGossipEvent(1000, 1, Crash_OnGossip)
  32. RegisterUnitGossipEvent(1000, 2, Crash_OnSelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement