Quest Question
Posted: Wed Mar 04, 2009 8:24 pm
Hi, I don't know if you guys even have time for this but we are stuck on something and can't find an answer.
Here it is,
We wrote a quest. It loads up just fine. But we cannot find out how to give the quest to the quest giver npc.
So in other words how do you assign the quest to the npc?
We put the primary command type to 1 because it refrences hail in entery comands as hail. So you can hail the npc.
But still the npc has no idea that she should hold the quest.
Do I need to add in a line in the quest saying that she is the one who starts it? Do we make a new script for her to start it?
here is the quest,
***************************************************************************************************************************************************
function Init(Quest)
RegisterQuest(Quest, "Kill The Spys", "Hallmark", "GreaterFaydark", 3, " Lanna wants you to kill the Spys that are watching our every move.")
AddQuestRewardCoin(Quest, 78)
SetQuestRewardExp(Quest, 500)
SetQuestPrereqLevel(Quest, 3)
AddQuestStepKill(Quest, 1, "Kill 6 of the Spys that are hidden watching us", 6, 100, "Kill The Spys for Lanna", 120514) --[[ this is the spys id to kill ]]--
AddQuestStepCompleteAction(Quest, 1, "KilledAllSpys")
SetCompletedDescription(Quest, "Now that we are no longer being watched, I must tell you, The Arathai's have taken over. I have never seen my race act like this. Someone of greater power is at fault. That is why I have betrayed them .")
QuestReturnNPC(Quest, 120540) --[[ this is lanna the quest giver id]]--
end
function Accepted(Quest, QuestGiver, Player)
if QuestGiver ~= nil then
if GetDistance(Player, QuestGiver) < 30 then
FaceTarget(QuestGiver, Player)
Say(QuestGiver, "Thank you for accepting this task " .. GetName(Player) .. ". Please return to me when you have completed it.")
Emote(QuestGiver, " thanks you warmly.", Player)
end
end
end
function Declined(Quest, QuestGiver, Player)
if QuestGiver ~= nil then
if GetDistance(Player, QuestGiver) < 30 then
FaceTarget(QuestGiver, Player)
Say(QuestGiver, "If you change your mind " .. GetName(Player) .. ", you know where to find me.")
Emote(QuestGiver, " Looks at you.", Player)
end
end
end
function KilledAllSpys(Quest, QuestGiver, Player)
UpdateQuestStepDescription(Quest, 1, "I killed the Spys as Lanna requested.")
UpdateQuestDescription(Quest, "I killed the spys that are hidden. Return to Lanna for your reward.")
end
***************************************************************************************************************************************************
How does Lanna know to give you the quest? So confused were to add her Id in... Thanks for any help Palaxe
Here it is,
We wrote a quest. It loads up just fine. But we cannot find out how to give the quest to the quest giver npc.
So in other words how do you assign the quest to the npc?
We put the primary command type to 1 because it refrences hail in entery comands as hail. So you can hail the npc.
But still the npc has no idea that she should hold the quest.
Do I need to add in a line in the quest saying that she is the one who starts it? Do we make a new script for her to start it?
here is the quest,
***************************************************************************************************************************************************
function Init(Quest)
RegisterQuest(Quest, "Kill The Spys", "Hallmark", "GreaterFaydark", 3, " Lanna wants you to kill the Spys that are watching our every move.")
AddQuestRewardCoin(Quest, 78)
SetQuestRewardExp(Quest, 500)
SetQuestPrereqLevel(Quest, 3)
AddQuestStepKill(Quest, 1, "Kill 6 of the Spys that are hidden watching us", 6, 100, "Kill The Spys for Lanna", 120514) --[[ this is the spys id to kill ]]--
AddQuestStepCompleteAction(Quest, 1, "KilledAllSpys")
SetCompletedDescription(Quest, "Now that we are no longer being watched, I must tell you, The Arathai's have taken over. I have never seen my race act like this. Someone of greater power is at fault. That is why I have betrayed them .")
QuestReturnNPC(Quest, 120540) --[[ this is lanna the quest giver id]]--
end
function Accepted(Quest, QuestGiver, Player)
if QuestGiver ~= nil then
if GetDistance(Player, QuestGiver) < 30 then
FaceTarget(QuestGiver, Player)
Say(QuestGiver, "Thank you for accepting this task " .. GetName(Player) .. ". Please return to me when you have completed it.")
Emote(QuestGiver, " thanks you warmly.", Player)
end
end
end
function Declined(Quest, QuestGiver, Player)
if QuestGiver ~= nil then
if GetDistance(Player, QuestGiver) < 30 then
FaceTarget(QuestGiver, Player)
Say(QuestGiver, "If you change your mind " .. GetName(Player) .. ", you know where to find me.")
Emote(QuestGiver, " Looks at you.", Player)
end
end
end
function KilledAllSpys(Quest, QuestGiver, Player)
UpdateQuestStepDescription(Quest, 1, "I killed the Spys as Lanna requested.")
UpdateQuestDescription(Quest, "I killed the spys that are hidden. Return to Lanna for your reward.")
end
***************************************************************************************************************************************************
How does Lanna know to give you the quest? So confused were to add her Id in... Thanks for any help Palaxe