You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:AddQuestPrereqQuest"
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | {{LUAFunction | |
| − | AddQuestPrereqQuest | + | |Name = AddQuestPrereqQuest |
| − | + | |Description = Adds a quest prerequisite to the given quest. | |
| − | + | |Param1 = Quest | |
| − | + | |Param1Desc = is the quest we are adding a prerequisite to | |
| − | + | |Param2 = int32 | |
| − | + | |Param2Desc = is the id of the prerequisite quest | |
| − | + | |Example = | |
| − | + | <pre> | |
| − | + | function Init(Quest) | |
| − | + | -- can only do this quest if you have completed quest 2 | |
| − | + | AddQuestPrereqQuest(Quest, 2) | |
| − | + | end | |
| − | + | </pre> | |
| − | + | |ExampleDesc = Only a player who has completed the quest with id 2 can do this quest. | |
| − | + | |Notes = While this function should still work it is now prefered to add quest prerequisite data into the DB. | |
| − | + | }} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Latest revision as of 12:18, 30 January 2021
LUA:AllFunctions - AddQuestPrereqQuest
Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker
Adds a quest prerequisite to the given quest.
Syntax
AddQuestPrereqQuest(param1, param2)
Parameters
- Required - param1 (Quest), param2 (int32)
- param1 is the quest we are adding a prerequisite to
- param2 is the id of the prerequisite quest
Example
function Init(Quest)
-- can only do this quest if you have completed quest 2
AddQuestPrereqQuest(Quest, 2)
end
Only a player who has completed the quest with id 2 can do this quest.
Notes
While this function should still work it is now prefered to add quest prerequisite data into the DB.