You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:GetQuestCompleteCount"
| Line 9: | Line 9: | ||
== Parameters == | == Parameters == | ||
| − | ; Required - ''param1'' (Spawn), ''param2'' ( | + | ; Required - ''param1'' (Spawn), ''param2'' (int32) |
: ''param1'' is a reference to a player. | : ''param1'' is a reference to a player. | ||
: ''param2'' is the quest ID. | : ''param2'' is the quest ID. | ||
Revision as of 23:35, 8 July 2015
LUA - GetQuestCompleteCount
Return to: LUA | Tutorials | Portal | Forum | Project Manager | Bug Tracker
GetQuestCompleteCount()
Gets the number of times the given quest has been completed by the given player
Syntax
var = GetQuestCompleteCount(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (int32)
- param1 is a reference to a player.
- param2 is the quest ID.
Returns
- int16
Usage
function hailed(NPC, Spawn)
local count = GetQuestCompleteCount(Spawn, Quest1)
if count <= 4 then
OfferQuest(Spawn, Quest1)
else
OfferQuest(Spawn, Quest2)
end
end
This will offer the player a different quest if they completed Quest1 4 times