eluna-scripts-ornfelt/lua/Scripts/Example Scripts/example_creature_quest.lua

18 lines
520 B
Lua
Raw Permalink Normal View History

2023-08-16 00:50:59 +02:00
local NpcId = 123
local QuestId = 123
local function OnQuestAccept(event, player, creature, quest)
if (quest:GetId() == QuestId) then
creature:SendUnitSay("You have accepted a quest!", 0)
end
end
local function OnQuestReward(event, player, creature, quest) // Same effect as OnQuestComplete
if (quest:GetId() == QuestId) then
creature:SendUnitSay("You have completed a quest!", 0)
end
end
RegisterCreatureEvent(NpcId, 31, OnQuestAccept)
RegisterCreatureEvent(NpcId, 34, OnQuestReward)