No categories assigned

LUA:AddQuestPrereqQuest

Revision as of 15:33, 3 April 2009 by Xanibunib (talk | contribs)

Syntax
AddQuestPrereqQuest(Quest, QuestID)

Explination
Used whithin the "function Init(Quest)" function to set a required level for the quest. Here is an example from the quest, "He said, he said." in the Scale Yard.


 function Init(Quest)


    RegisterQuest(Quest, "He said, he said", "Miscellaneous", "Scale Yard", 4, "Vrim tells me that Barbarians can be easily manipulated by the power of suggestion. I am to deceive two particular Barbarians and turn them agaist one another.")
-- Brood Matron's Private Reserve
-- Kunark Krisps
AddQuestRewardItem(Quest, 43957, 10)
AddQuestRewardItem(Quest, 44779, 10)
AddQuestRewardCoin(Quest, 2, 1, 0, 0)
SetQuestRewardExp(Quest, 100)
SetQuestPrereqLevel(Quest, 2)
AddQuestPrereqQuest(Quest, 142)


    AddQuestStepChat(Quest, 1, "I must speak with Tristan. He is standing near the Heated Stone Inn.", 1, "I need to manipulate two Barbarians into hating each other.", 0, 1390036)


    AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_Tristan") 


    SetCompletedDescription(Quest, "Success! I have fooled the Barbarians and turned them agaisnt one another.")
QuestReturnNPC(Quest, 1390091)
end

This will call the "AddQuestPrereqQuest" function so that if the player has NOT completed quest 142 they will not have the option to get this quest. If you do not add a "AddQuestPrereqQuest" in the quest script an NPC that offers more than one quest will continue to have a feather over their head and try to offer you another quest.



Back to LUA Functions