Advertisement
Rochet2

Basic gossip menu

Sep 13th, 2012
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local function Hello(unit, event, player)
  2.     unit:GossipCreateMenu(100, player, 0)
  3.     unit:GossipMenuAddItem(0, "Do stuff", 1, 0, "Are you sure?", 100)
  4.     unit:GossipMenuAddItem(0, "Close", 0, 0)
  5.     unit:GossipSendMenu(player)
  6. end
  7.  
  8. local function Select(unit, event, player, id, intid, code)
  9.     if(intid == 1) then
  10.         -- do stuff
  11.     end
  12.     player:GossipComplete()
  13. end
  14.  
  15. RegisterUnitGossipEvent(ENTRY, 1, Hello)
  16. RegisterUnitGossipEvent(ENTRY, 2, Select)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement