Advertisement
Rochet2

rand

Apr 12th, 2012
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- ###CARLSBERG###
  2.  
  3. local npc_id = 72000
  4.  
  5. function GossipOnTalk(pUnit, event, pPlayer)
  6.     pUnit:GossipCreateMenu(100, pPlayer, 0)
  7.     pUnit:GossipMenuAddItem(0, "Change my look", 1, 0)
  8.     pUnit:GossipMenuAddItem(0, "Make me normal", 2, 0)
  9.     pUnit:GossipSendMenu(pPlayer)
  10. end
  11.  
  12. function GossipOnSelect(pUnit, event, pPlayer, id, intid, code)
  13.     if (intid == 1) then
  14.         local Choice = math.random(1, 6)
  15.         if (Choice == 1) then
  16.             pPlayer:SetModel(4875)
  17.         elseif (Choice == 2) then
  18.             pPlayer:SetModel(8715)
  19.         elseif (Choice == 3) then
  20.             pPlayer:SetModel(20976)
  21.         elseif (Choice == 4) then
  22.             pPlayer:SetModel(5293)
  23.         elseif (Choice == 5) then
  24.             pPlayer:SetModel(10318)
  25.         elseif (Choice == 6) then
  26.             pPlayer:SetModel(12064)
  27.         end
  28.     elseif (intid == 2) then
  29.         pPlayer:DeMorph()
  30.     end
  31.     pPlayer:GossipComplete()
  32. end
  33.  
  34. RegisterUnitGossipEvent(npc_id, 1, GossipOnTalk)
  35. RegisterUnitGossipEvent(npc_id, 2, GossipOnSelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement