MichaelCrow

Untitled

Apr 4th, 2012
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. race = {}
  2.  
  3. race[1] = 1 --Human
  4. race[2] = 2 --Orc
  5. race[3] = 1 --Dwarf
  6. race[4] = 1 --Night elf
  7. race[5] = 2 --Undead
  8. race[6] = 2 --Tauren
  9. race[7] = 1 --Gnome
  10. race[8] = 2 --Troll
  11. race[10] = 2 --Blood Elf
  12. race[11] = 1 --Draenei
  13.  
  14. function Teleport_main_menu(pUnit, player)
  15. local prace = player:GetPlayerRace()
  16. if ( race[prace] == 2) then
  17.         pUnit:GossipCreateMenu(3544, player, 0)
  18.         pUnit:GossipMenuAddItem(0, "Are you here to save us?", 7, 0)
  19.         pUnit:GossipSendMenu(player)
  20.         else
  21.      end
  22.       pUnit:GossipCreateMenu(3543, player, 0) --Alliance Citys
  23.       pUnit:GossipMenuAddItem(1, "Stormwind", 2, 0)
  24.       pUnit:GossipMenuAddItem(1, "Ironforge", 3, 0)
  25.       pUnit:GossipMenuAddItem(1, "Darnassus", 4, 0)
  26.       pUnit:GossipMenuAddItem(1, "Exodar", 5, 0)
  27.       pUnit:GossipMenuAddItem(2, "[Main Menu]", 100, 0)
  28.       pUnit:GossipSendMenu(player)
  29.     end
  30.  
  31.  
  32.  function Teleport_on_gossip_select(pUnit, event, player, id, intid, code, pMisc)
  33.    if(intid == 7) then
  34.    player:PlayerSendChatMessage(0, 1, "Yes brother, your salvation has arrived.")
  35.    pUnit:RegisterEvent("chatback", 1500, 1)
  36.    end
  37.    
  38.    if(intid == 100) then
  39.       pUnit:GossipCreateMenu(3544, player, 0) --Alliance Citys
  40.       pUnit:GossipMenuAddItem(1, "Stormwind", 2, 0)
  41.       pUnit:GossipMenuAddItem(1, "Ironforge", 3, 0)
  42.       pUnit:GossipMenuAddItem(1, "Darnassus", 4, 0)
  43.       pUnit:GossipMenuAddItem(1, "Exodar", 5, 0)
  44.       pUnit:GossipMenuAddItem(2, "[Main Menu]", 100, 0)
  45.       pUnit:GossipSendMenu(player)
  46. end
  47. end
  48.    
  49.    function chatback(pUnit, event, player)
  50.    pUnit:SendChatMessage(0, 1, "Thank you. I will spill the blood of the Scarlets and avenge the fallen.", 8, 0)
  51.    pUnit:RegisterEvent("Despawn", 2000, 1)
  52.    end
  53.    
  54.    
  55.    function Despawn(pUnit, Event, player)
  56.     pUnit:Despawn(0, 900000)
  57.     if player:HasQuest(81003) then   
  58.     player:AdvanceQuestObjective(81003, 0)
  59. end
  60. end
  61.  
  62.  
  63.  
  64. RegisterUnitGossipEvent(81008, 1, "Teleport_main_menu")
  65. RegisterUnitGossipEvent(81008, 2, "Teleport_on_gossip_select")
Advertisement
Add Comment
Please, Sign In to add comment