Advertisement
blackwolfsden

SouthPark vendor script

Feb 15th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.82 KB | None | 0 0
  1. -- by Runemaster of xx-xxx.xxx
  2. -- adapted to Eluna by Slp13at420 of Emudevs.com for Blackwolfsden.dyndns-free.com
  3. local Stan = {4080, 13955, 23087, 1154, 10740, 14621, 23577, 10835, 19031}
  4. local Cartman = {14806, 2575, 8312, 23663, 8318, 8316, 4072, 3198}
  5. local Kyle = {21157, 14289, 20654}
  6. local Kenny = {10261, 10056, 6526, 6594, 5963, 10257, 12522, 21697, 15289}
  7.  
  8. function southpark_GossipOnTalk(Event, player, Unit)
  9.  
  10.     VendorRemoveAllItems(60000)
  11.     player:GossipClearMenu()
  12.     player:GossipMenuAddItem(0, "Give Me Stan's Armor! (Warrior)", 0, 1)
  13.     player:GossipMenuAddItem(0, "Give Me Cartman's Armor! (Paladin)", 0, 2)
  14.     player:GossipMenuAddItem(0, "Give Me Kyle's Armor! (Mage)", 0, 3)
  15.     player:GossipMenuAddItem(0, "Give Me Kenny's Armor! (Range)", 0, 4)
  16.     player:GossipMenuAddItem(7, "Nevermind...", 0, 5)
  17.     player:GossipSendMenu(1, Unit)
  18.      
  19. end
  20.  
  21. function southpark_GossipOnSelect(Event, player, Unit, id, intid, code)
  22.  
  23.     if(intid == 1) then
  24.         for i=1, #Stan do
  25.             player:AddItem(Stan[i], 1)
  26.             player:SendBroadcastMessage("Here is your armor, Stan!")
  27.             player:GossipComplete()
  28.         end
  29.     end
  30.  
  31.     if(intid == 2) then
  32.         for i=1, #Cartman do
  33.             player:AddItem(Cartman[i], 1)
  34.             player:SendBroadcastMessage("Here is your armor, Cartman!")
  35.             player:GossipComplete()
  36.         end
  37.     end
  38.  
  39.     if(intid == 3) then
  40.         for i=1, #Kyle do
  41.             player:AddItem(Kyle[i], 1)
  42.             player:SendBroadcastMessage("Here is your armor, Kyle!")
  43.             player:GossipComplete()
  44.         end
  45.     end
  46.  
  47.     if(intid == 4) then
  48.         for i=1, #Kenny do
  49.             player:AddItem(Kenny[i], 1)
  50.             player:SendBroadcastMessage("Here is your armor, Kenny!")
  51.             player:GossipComplete()
  52.         end
  53.     end
  54.  
  55.     if(intid == 5) then
  56.         player:GossipComplete()
  57.     end
  58. end    
  59.  
  60. RegisterCreatureGossipEvent(60000, 1, southpark_GossipOnTalk)
  61. RegisterCreatureGossipEvent(60000, 2, southpark_GossipOnSelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement