difference in functions
Posted: Wed Aug 10, 2016 10:11 pm
Hi,
is there a difference between QuestIsComplete() and HasCompletedQuest()?
In the walkthrough for quest scripts, Dave.lua has a section of conditionals where:
Here, after completing the quest, Dave never says the section with the option 'Great!' with 'Hello 'name' thank you so much for helping me..' Instead after completion, he says the part near the bottom with the response 'Hello' after 'Hello again GetName(Spawn) '.
So I'm assuming if quest has been completed, then it's no longer available so HasQuest will always be false?
is there a difference between QuestIsComplete() and HasCompletedQuest()?
In the walkthrough for quest scripts, Dave.lua has a section of conditionals where:
Code: Select all
if HasQuest(Spawn, 3) then
-- If the Quest ID 3 has been completed (change this to yours)
if QuestIsComplete(Spawn, 3) then
-- say great to the message below
AddConversationOption(conversation, "Great!")
-- say thanks to the player for completing quest 3
StartConversation(conversation, NPC, Spawn, "Hello " .. GetName(Spawn) .. ", thank you so much for helping me.")
else
-- they haven't completed quest 3 ask them to hurry up!
AddConversationOption(conversation, "Not yet!")
StartConversation(conversation, NPC, Spawn, "Hello again " .. GetName(Spawn) .. ". did you give my wife the message yet?")
end
else
-- they have already finished quest 3 (change this to yours)
if HasCompletedQuest(Spawn, 3) then
-- just say hey
AddConversationOption(conversation, "Hello!")
-- say hello
StartConversation(conversation, NPC, Spawn, "Hello again " .. GetName(Spawn) )
else...
So I'm assuming if quest has been completed, then it's no longer available so HasQuest will always be false?