591 B
591 B
Function: GetTempVariable(spawn, var)
Description: Get a temporary variable of the Spawn
Parameters:
spawn
(Spawn) - Spawn object representingspawn
.var
(string) - Stringvar
.
Returns: Depending on the SetTempVariable type the return type will vary.
Example:
-- From ItemScripts/awellspringcubleash.lua
function used(Item, Player)
target = GetTarget(Player)
if GetName(target) == 'a wellspring cub' and GetTempVariable(Player, "cub") == nil then
if not IsInCombat(target) then
CastEntityCommand(Player, target, 1278, "Leash")
end