Difference between revisions of "LUA:HasRecovered"
(Created page with "= LUA Functions: AddHate() = Adds hate to ''param2'' from ''param1'' ==== Syntax ==== AddHate(param1, param2, param3) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''...") |
|||
| Line 1: | Line 1: | ||
| − | = LUA Functions: | + | = LUA Functions: HasRecovered() = |
| − | + | Checks to see if the given spawn has recovered from casting | |
==== Syntax ==== | ==== Syntax ==== | ||
| − | + | HasRecovered(param1) | |
==== Parameters ==== | ==== Parameters ==== | ||
| − | ; Required - ''param1'' (Spawn | + | ; Required - ''param1'' (Spawn) |
| − | : ''param1'' is the spawn | + | : ''param1'' is the spawn we want to check |
| − | |||
| − | |||
==== Usage ==== | ==== Usage ==== | ||
<pre> | <pre> | ||
| − | function | + | function hailed(NPC, Spawn) |
| − | + | if HasRecovered(NPC) then | |
| − | + | Say(NPC, "I have recovered") | |
| + | end | ||
end | end | ||
</pre> | </pre> | ||
| − | This | + | This will have the spawn respond to a hail if it has recovered from casting |
== Notes == | == Notes == | ||
| − | + | All spells cast through ProcessSpell() will result in a small cooldown and that is what this function checks, if that cool down has expired. | |
Latest revision as of 20:39, 28 August 2013
LUA Functions: HasRecovered()
Checks to see if the given spawn has recovered from casting
Syntax
HasRecovered(param1)
Parameters
- Required - param1 (Spawn)
- param1 is the spawn we want to check
Usage
function hailed(NPC, Spawn)
if HasRecovered(NPC) then
Say(NPC, "I have recovered")
end
end
This will have the spawn respond to a hail if it has recovered from casting
Notes
All spells cast through ProcessSpell() will result in a small cooldown and that is what this function checks, if that cool down has expired.