azerothcore / mod-eluna

Eluna Lua Engine © for WoW Emulators
https://elunaluaengine.github.io/
GNU General Public License v3.0
101 stars 131 forks source link

player:SendQuestTemplate(questID) #149

Open 28269890 opened 1 year ago

28269890 commented 1 year ago

I'm having trouble using the player:SendQuestTemplate(questID) function to allow players to accept quests. The function displays quest details but doesn't enable quest acceptance. Could someone please advise me on how to implement quest acceptance for players? Thank you!

r-o-b-o-t-o commented 1 year ago

Does this happen only with a specific quest id or with any quest?

28269890 commented 1 year ago
    player:GossipMenuAddItem(0, "aaaa", 4289,0)
    player:GossipMenuAddItem(0, "bbbb", 10713,0)
    player:GossipMenuAddItem(0, "cccc", 13082,0)
    player:GossipMenuAddItem(0, "dddd", 11262,0)
    player:GossipMenuAddItem(0, "eeee", 11252,0)
    player:GossipMenuAddItem(0, "ffff", 3379,0)
    player:GossipMenuAddItem(0, "ffff", 1718,0)

local selectQuest = function(event, player, unit, sender, intid, code, menu_id)
    local questID = sender
    player:GossipComplete()
    player:SendQuestTemplate( questID ) 
    --player:AddQuest(questID)
end

I have tested the above task IDs, but none of them worked. It seems that none of the tasks can be accepted.