This commit is contained in:
2024-08-24 22:45:34 +02:00
parent d163cf93eb
commit 9749f5a6eb
20 changed files with 484 additions and 484 deletions

View File

@@ -1,42 +1,42 @@
-- QUEST_POI_UPDATE QUEST_DETAIL QUEST_COMPLETE QUEST_GREETING QUEST_PROGRESS GOSSIP_SHOW
function(e)
if e == "QUEST_POI_UPDATE" then
CloseGossip()
elseif e == "QUEST_DETAIL" then
AcceptQuest()
elseif e == "QUEST_COMPLETE" then
if GetNumQuestChoices() <= 1 then
GetQuestReward(1)
end
elseif e == "GOSSIP_SHOW" then
local quests = GetNumGossipAvailableQuests()
local completedQuests = GetNumGossipActiveQuests()
local options = GetNumGossipOptions()
if completedQuests > 0 and options == 0 then
for i = 1, completedQuests do
SelectGossipActiveQuest(i)
end
end
if quests > 0 and options == 0 then
SelectGossipAvailableQuest(1)
end
if options == 1 and quests + completedQuests == 0 then
SelectGossipOption(1)
end
elseif e == "QUEST_GREETING" then
local quests = GetNumGossipAvailableQuests()
local completedQuests = GetNumGossipActiveQuests()
if completedQuests > 0 then
for i = 1, completedQuests do
SelectActiveQuest(1)
end
end
if quests > 0 then
SelectAvailableQuest(1)
end
elseif e == "QUEST_PROGRESS" then
if IsQuestCompletable(i) then
CompleteQuest()
end
end
-- QUEST_POI_UPDATE QUEST_DETAIL QUEST_COMPLETE QUEST_GREETING QUEST_PROGRESS GOSSIP_SHOW
function(e)
if e == "QUEST_POI_UPDATE" then
CloseGossip()
elseif e == "QUEST_DETAIL" then
AcceptQuest()
elseif e == "QUEST_COMPLETE" then
if GetNumQuestChoices() <= 1 then
GetQuestReward(1)
end
elseif e == "GOSSIP_SHOW" then
local quests = GetNumGossipAvailableQuests()
local completedQuests = GetNumGossipActiveQuests()
local options = GetNumGossipOptions()
if completedQuests > 0 and options == 0 then
for i = 1, completedQuests do
SelectGossipActiveQuest(i)
end
end
if quests > 0 and options == 0 then
SelectGossipAvailableQuest(1)
end
if options == 1 and quests + completedQuests == 0 then
SelectGossipOption(1)
end
elseif e == "QUEST_GREETING" then
local quests = GetNumGossipAvailableQuests()
local completedQuests = GetNumGossipActiveQuests()
if completedQuests > 0 then
for i = 1, completedQuests do
SelectActiveQuest(1)
end
end
if quests > 0 then
SelectAvailableQuest(1)
end
elseif e == "QUEST_PROGRESS" then
if IsQuestCompletable(i) then
CompleteQuest()
end
end
end