Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function OnGossipHello(pUnit, event, player)
- pUnit:GossipCreateMenu(100, player, 0)
- pUnit:GossipMenuAddItem(0, "return number 1", 1, 0)
- pUnit:GossipMenuAddItem(0, "Return number 2", 2, 0)
- pUnit:GossipSendMenu(player)
- end
- local function OnGossipSelect(pUnit, event, player, id, intid, code)
- if(intid == 1) then
- print(1)
- end
- if(intid == 2) then
- print(2)
- end
- -- basically could just do print(intid)
- end
- ALTERNATIVE:
- local function OnGossipHello(pUnit, event, player)
- pUnit:GossipCreateMenu(100, player, 0)
- pUnit:GossipMenuAddItem(0, "return number 1", 1, 0)
- pUnit:GossipMenuAddItem(0, "Return number 2", 1, 0)
- pUnit:GossipSendMenu(player)
- end
- local function OnGossipSelect(pUnit, event, player, id, intid, code)
- if(intid == 1) then
- print(id)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement