Difference between revisions of "LUA:SetSuccessTimer"
(Created page with "= LUA Functions: SetSuccessTimer() = Sets the instance success timer for the given spawn ==== Syntax ==== SetSuccessTimer(param1) ==== Parameters ==== ; Required - ''param1''...") |
(No difference)
|
Latest revision as of 15:25, 8 September 2013
LUA Functions: SetSuccessTimer()
Sets the instance success timer for the given spawn
Syntax
SetSuccessTimer(param1)
Parameters
- Required - param1 (Spawn)
- param1 is the player to set the success timer for
Usage
function death(NPC, Spawn)
if IsPlayer(Spawn) then
SetSuccessTimer(Spawn)
end
end
On the death of the NPC this spawn script will set the zones reuse timer for the killer.
Notes
The param given must be a player.
Here is a more complete way to set the timer for the killer and their group, however it still does not handle if the killer was a players pet
function death(NPC, Spawn) if IsPlayer(Spawn) then group = GetGroup(Spawn) if group ~= nil then for index, value in pairs(group) do if IsPlayer(value) then SetSuccessTimer(value) end end else SetSuccessTimer(Spawn) end end