Also on the 3rd step it wont allow me to talk to my quest npc to complete the step, it shows the quest completed over the guys head but when i speak to him it says you havent finished your quest
Code: Select all
--[[
This is the EQ2Emu example LUA Quest.
These functions are shared, so don't save any character data in them.
If you have any questions be sure to read the Quest Functions.txt in the Quests directory or the wiki site location on the eq2emulator.net website.
--]]
function Init(Quest)
RegisterQuest(Quest, "Orc Mischief", "Hallmark", "New Tunaria", 5, "Lord Elrond has asked you to investigate a nearby grotto. He has intelligence that leads him to believe the orcs are up to somthing evil.")
AddQuestRewardCoin(Quest, 1000)
SetQuestRewardExp(Quest, 1000)
AddQuestStepLocation(Quest, 1, "Investigate the activities of the orcs in the nearby grotto and report back to lord elrond", 30, "", 1, -2497, 15, -61)
AddQuestStepCompleteAction(Quest, 1, "step1orcmischiefcomplete")
end
function step1orcmischiefcomplete(Quest, QuestGiver, Player)
UpdateQuestStepDescription(Quest, 1, "I have investigated the grotto as instructed. It seems Lord Elrond is right there is evil afoot!")
AddQuestStepKill(Quest, 2, "Kill the orc mystics and the foul demon they have summoned", 1, 100, "", 0, 23)
AddQuestStepCompleteAction(Quest, 2, "step2orcmischiefcomplete")
end
function step2orcmischiefcomplete(Quest, QuestGiver, Player)
UpdateQuestStepDescription(Quest, 2, "I need to return to Lord Elrond and inform him of what I have found!")
AddQuestStepChat(Quest, 3, "I need to inform Lord Elrond of what has transpired here!", 1, "", 0, 28)
AddQuestStepCompleteAction(Quest, 3, "step3orcmischiefcomplete")
end
function step3orcmischiefcomplete(Quest, QuestGiver, Player)
-- tidy up step
UpdateQuestStepDescription(Quest, 3, "I spoke to Lord Elrond")
-- tidy up quest
SetCompletedDescription(Quest, "I spoke to Lord Elrond")
UpdateQuestDescription(Quest, "I spoke to Lord Elrond")
-- give reward
GiveQuestReward(Quest, Player)
end
function Reload(Quest, QuestGiver, Player, Step)
if Step == 1 then
step1orcmischiefcomplete(Quest, QuestGiver, Player)
end
if Step == 2 then
step2orcmischiefcomplete(Quest, QuestGiver, Player)
end
-- 3 only gets triggered when 2 is complete so not needed to be reloaded
end
function Accepted(Quest, QuestGiver, Player)
end
function Declined(Quest, QuestGiver, Player)
if QuestGiver ~= nil then
if GetDistance(Player, QuestGiver) < 30 then
FaceTarget(QuestGiver, Player)
Say(QuestGiver, "Perhaps another time, ")
end
end
end