Guest User

Crash45

a guest
Apr 7th, 2010
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.53 KB | None | 0 0
  1. --[[       
  2.             Russian Roulette NPC
  3.             Scripted by: Crash45 of Ac-Web
  4.            
  5.     DO NOT Remove Credits or change them in any way shape or form unless given consent by myself.
  6. ]]
  7.  
  8.  
  9.  
  10. local Npc_Id = 40003
  11.  
  12. function Roulette_OnGossipTalk(pUnit, event, player, pMisc)
  13.     if (player:IsInCombat() == true) then
  14.         player:SendAreaTriggerMessage("You are in combat!")
  15.     else
  16.         pUnit:GossipCreateMenu(3544, player, 0)
  17.             pUnit:GossipMenuAddItem(3, "Let's Play!", 3, 0)
  18.             pUnit:GossipMenuAddItem(1, "Nevermind", 999, 0)
  19.         pUnit:GossipSendMenu(player)
  20.     end
  21. end
  22.  
  23. function Roulette_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
  24.     if(intid == 3) then
  25.         local rand = math.random(1,6)
  26.             if (rand==1 or rand==3)  then
  27.             player:CastSpell(31984) --Finger of Death
  28.             pUnit:SendChatMessage(12, 0, "Hahahaha!")
  29.             player:PlaySoundToPlayer(11965) --Headless Horseman Laugh
  30.         elseif (rand==2) then
  31.             pUnit:SendChatMessage(12, 0, "Why must you ruin the fun?")
  32.             player:PlaySoundToPlayer(7914) --Sigh
  33.         elseif (rand==5 and rand==4) then
  34.             player:CastSpell(31984)
  35.             pUnit:SendChatMessage(12, 0, "YOU ARE NOT PREPARED!!")
  36.             player:PlaySoundToPlayer(11466) --Illidan "You are not prepared!"          
  37.         elseif (rand==6) then
  38.             pUnit:SendChatMessage(12, 0, "Well since you lived, here's to you! LETS ROCK!!!")
  39.             player:PlaySoundToPlayer(11803) --
  40.         end
  41.     end
  42. end
  43.     if(intid == 999) then
  44.         pUnit:GossipComplete(player)
  45. end
  46.  
  47.  
  48.  
  49. RegisterUnitGossipEvent(Npc_Id, 1, "Roulette_OnGossipTalk")
  50. RegisterUnitGossipEvent(Npc_Id, 2, "Roulette_OnGossipSelect")
Advertisement
Add Comment
Please, Sign In to add comment