Difference between revisions of "LUA:ItemScripts"

Line 57: Line 57:
 
end
 
end
 
</pre>
 
</pre>
 +
 +
 +
[[LUA|Back to LUA]]

Revision as of 22:27, 27 December 2013

Item scripts will give items more uses then just stats. There are currently 8 events that will call the item script, food/drink consumption, destroyed, examined, equipped, proc, removed, unequipped, and used.

Cast

Cast is only used for food and drink when it is consumed, this is where you would cast the buff spell that the food or drink applies

function cast(Item, Spawn)
end

Destroyed

Destroyed is called when the player destroys the item

function destroyed(Item, Spawn)
end

Examined

Examined is called when the player examines an item

function examined(Item, Spawn)
end

Equipped

Equipped is called when the player equips an item

function equipped(Item, Spawn)
end

Proc

Proc is called when the item proc is triggered

function proc(Item, Caster, Target, Type)
end

Removed

Removed is called when the item is removed from the player

function removed(Item, Spawn)
end

Unequipped

Unequipped is called when the player unequips an item

function unequipped(Item, Spawn)
end

Used

Used is called when the player uses an item

function used(Item, Spawn)
end


Back to LUA