Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lua] :GossipMenuAddItem #314

Open
ghost opened this issue Nov 22, 2012 · 2 comments
Open

[Lua] :GossipMenuAddItem #314

ghost opened this issue Nov 22, 2012 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 22, 2012

:GossipMenuAddItem(10, "Example", 0)

10 = a Dot as what the wiki says.

Once you talk to the creature, gameobject or whatsoever you assigned it too; Well if you leave the gossip and talk to the assigned thing to the script, it will choose a random number like 1, 2, 3 out of 10 instead of showing the dot. I'll provide screenshot's/video for an proof and more detail of what i mean soon.

@jackpoz
Copy link
Member

jackpoz commented Nov 23, 2012

a Lua script would be enough

@ghost
Copy link
Author

ghost commented Nov 25, 2012

function spellst_on_gossip(Unit, Event, player)
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(1, "im 1", 1, 0)
Unit:GossipMenuAddItem(2, "me 2", 2, 0)
Unit:GossipMenuAddItem(3, "me 3", 3, 0)
Unit:GossipMenuAddItem(4, "four", 4, 0)
Unit:GossipMenuAddItem(5, "five eurp", 5, 0)
Unit:GossipMenuAddItem(6, "six", 6, 0)
Unit:GossipMenuAddItem(7, "seVen", 7, 0)
Unit:GossipMenuAddItem(8, "EiGhT", 8, 0)
Unit:GossipMenuAddItem(9, "nine", 9, 0)
Unit:GossipMenuAddItem(10, "broken", 10, 0)
Unit:GossipSendMenu(player)
end

function spellst_submenus(Unit, event, player, id, intid, code, pMisc)
if(intid == 1) then
player:GossipComplete()
elseif(intid == 10) then
Unit:SendChatMessage(14, 0, "Y U NO HELP ME")
player:GossipComplete()
else
player:GossipComplete()
end
end

RegisterUnitGossipEvent(4949, 1, "spellst_on_gossip")
RegisterUnitGossipEvent(4949, 2, "spellst_submenus")--Thrall 4949

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant