2014-01-25 21:55:47 +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
|
|
|
|
|
|
2014-09-17 13:58:11 +02:00
|
|
|
local function OnQuestReward(event, player, creature, quest) // Same effect as OnQuestComplete
|
2014-01-25 21:55:47 +02:00
|
|
|
if (quest:GetId() == QuestId) then
|
|
|
|
|
creature:SendUnitSay("You have completed a quest!", 0)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
RegisterCreatureEvent(NpcId, 31, OnQuestAccept)
|
2014-09-17 13:58:11 +02:00
|
|
|
RegisterCreatureEvent(NpcId, 34, OnQuestReward)
|