Difference between revisions of "LUA:AddHate"

(LUA Functions: AddHate(): added 4th param)
 
Line 1: Line 1:
= LUA Functions: AddHate() =
+
{{LUAFunction
Adds hate to ''param2'' from ''param1''
+
|Name = AddHate
 
+
|Description = Adds hate to param2 from param1
 
+
|Param1 = Spawn
==== Syntax ====
+
|Param1Desc = is the
AddHate(param1, param2, param3, param4)
+
|Param2 = Spawn
 
+
|Param2Desc = is the  
 
+
|Param3 = sint32
==== Parameters ====
+
|Param3Desc = is the  
; Required - ''param1'' (Spawn), ''param2'' (Spawn), ''param3'' (sint32)
+
|Param4 = bool
: ''param1'' is the spawn that is adding hate
+
|Param4Desc = is the  
: ''param2'' is the spawn recieving the hate
+
|Example =
: ''param3'' is the amount of hate to add
 
: ''param4'' is a bool to send the packet
 
==== Usage ====
 
 
<pre>
 
<pre>
 
function cast(Caster, Target)
 
function cast(Caster, Target)
Line 20: Line 17:
 
end
 
end
 
</pre>
 
</pre>
 
+
|ExampleDesc = This is a simple taunt spell that adds 50 hate to the target.
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.
 
+
}}
== 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.
 

Latest revision as of 11:57, 30 January 2021


LUA:AllFunctions - AddHate

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


Adds hate to param2 from param1

Syntax

AddHate(param1, param2, param3, param4)

Parameters

Required - param1 (Spawn), param2 (Spawn), param3 (sint32), param4 (bool)
param1 is the
param2 is the
param3 is the
param4 is the


Example

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.