Difference between revisions of "LUA:SetQuestPrereqLevel"

(Removing all content from page)
 
Line 1: Line 1:
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)<br>
 
<br>
 
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.")<br>
 
-- Brood Matron's Private Reserve<br>
 
-- Kunark Krisps<br>
 
AddQuestRewardItem(Quest, 43957, 10)<br>
 
AddQuestRewardItem(Quest, 44779, 10)<br>
 
AddQuestRewardCoin(Quest, 2, 1, 0, 0)<br>
 
SetQuestRewardExp(Quest, 100)<br>
 
SetQuestPrereqLevel(Quest, 2)<br>
 
'''AddQuestPrereqQuest(Quest, 142)'''<br>
 
<br>
 
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)<br>
 
<br>
 
AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_Tristan") <br>
 
<br>
 
SetCompletedDescription(Quest, "Success! I have fooled the Barbarians and turned them agaisnt one another.")<br>
 
QuestReturnNPC(Quest, 1390091)<br>
 
end<br>
 
 
----
 
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.
 
 
--[[User:Xanibunib|Xanibunib]] 16:56, 3 April 2009 (CDT)
 

Latest revision as of 14:57, 3 April 2009