You are viewing an old version of this page. Return to the latest version.
Version of 21:27, 10 October 2012 by I need to Update My Profile
Difference between revisions of "LUA:AddHate"
(Created page with "= LUA Functions: AddHate() = Adds hate to ''param2'' from ''param1'' ==== Syntax ==== AddHate(param1, param2, param3) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''...") |
(→LUA Functions: AddHate(): added 4th param) |
||
| Line 4: | Line 4: | ||
==== Syntax ==== | ==== Syntax ==== | ||
| − | AddHate(param1, param2, param3) | + | AddHate(param1, param2, param3, param4) |
| Line 12: | Line 12: | ||
: ''param2'' is the spawn recieving the hate | : ''param2'' is the spawn recieving the hate | ||
: ''param3'' is the amount of hate to add | : ''param3'' is the amount of hate to add | ||
| − | + | : ''param4'' is a bool to send the packet | |
==== Usage ==== | ==== Usage ==== | ||
<pre> | <pre> | ||
function cast(Caster, Target) | function cast(Caster, Target) | ||
-- Add 50 hate to the target | -- Add 50 hate to the target | ||
| − | AddHate(Caster, Target, 50) | + | AddHate(Caster, Target, 50, 1) |
end | end | ||
</pre> | </pre> | ||
Revision as of 10:24, 28 February 2020
LUA Functions: AddHate()
Adds hate to param2 from param1
Syntax
AddHate(param1, param2, param3, param4)
Parameters
- Required - param1 (Spawn), param2 (Spawn), param3 (sint32)
- param1 is the spawn that is adding hate
- param2 is the spawn recieving the hate
- param3 is the amount of hate to add
- param4 is a bool to send the packet
Usage
function cast(Caster, Target)
-- Add 50 hate to the target
AddHate(Caster, Target, 50, 1)
end
This is a simple taunt spell that adds 50 hate to the target.
Notes
If this is called from a spell script then the target/targets will be determined by the spell data(encounter AE, true AE, single target, etc...), the param is still required though.