Alright, i'll try and make this brief.
Code:
function On_GossipMenu(pUnit, event, player)
pUnit:GossipCreateMenu(50, player, 0)
pUnit:GossipMenuAddItem(2, "Bla bla bla.", 1, 0)
pUnit:GossipMenuAddItem(3, "Bla 2", 2, 0)
pUnit:GossipSendMenu(player)
end
function On_GossipSelect(pUnit, event, player, id, intid, code)
if (intid == 1) then
player:GossipComplete()
end
if (intid == 2) then
player:GossipComplete()
end
end
RegisterUnitGossipEvent(2527111, 1, "On_GossipMenu")
RegisterUnitGossipEvent(2527111, 2, "On_GossipSelect")
so heres my basic layout, now that works fine, I can add in parts and it will all work. Now if I try and add in a function...
Code:
function On_GossipMenu(pUnit, event, player)
pUnit:GossipCreateMenu(50, player, 0)
pUnit:GossipMenuAddItem(2, "Bla bla bla.", 1, 0)
pUnit:GossipMenuAddItem(3, "Bla 2", 2, 0)
pUnit:GossipSendMenu(player)
end
function On_GossipSelect(pUnit, event, player, id, intid, code)
if (intid == 1) then
pUnit:SendChatMessage(12, 0, "Lets do this.")
pUnit:RegisterEvent("Start", 3000, 0)
player:GossipComplete()
end
if (intid == 2) then
player:GossipComplete()
end
end
function Start(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Lerroyyyyyy")
pUnit:Emote(45)
end
RegisterUnitGossipEvent(2527111, 1, "On_GossipMenu")
RegisterUnitGossipEvent(2527111, 2, "On_GossipSelect")
It doesn't do anything. I waited 3 seconds, nothing, no errors in console, no errors on load, nothing.
What can I do to make him say something else after a timer on a gossip script? I thought about quickly making him hostile then friendly again with a on enter combat but that could turn out buggy and messy. I just want more functions with a gossip script, can anyone help?
Thanks, 3 rep to whoever finds the answer