Difference between revisions of "LUA:IsCasting"
(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: IsCasting() = |
| − | + | Checks to see if the given spawn is casting a spell | |
==== Syntax ==== | ==== Syntax ==== | ||
| − | + | IsCasting(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_busy(NPC, Spawn) |
| − | + | if IsCasting(NPC) then | |
| − | + | Say(NPC, "Don't bother me, I am busy casting.") | |
| + | else | ||
| + | Say(NPC, "I'm busy") | ||
| + | end | ||
end | end | ||
</pre> | </pre> | ||
| − | This | + | This will have the spawn respond to a hail while in combat differently if the spawn is casting or not |
== Notes == | == Notes == | ||
| − | + | Returns a bool, true if casting | |
Latest revision as of 19:52, 28 August 2013
LUA Functions: IsCasting()
Checks to see if the given spawn is casting a spell
Syntax
IsCasting(param1)
Parameters
- Required - param1 (Spawn)
- param1 is the spawn we want to check
Usage
function hailed_busy(NPC, Spawn)
if IsCasting(NPC) then
Say(NPC, "Don't bother me, I am busy casting.")
else
Say(NPC, "I'm busy")
end
end
This will have the spawn respond to a hail while in combat differently if the spawn is casting or not
Notes
Returns a bool, true if casting