No categories assigned

LUA:ItemScripts

LUA - Item Scripts

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

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
Obtained

Obtained is called when the player gets an item

function obtained(Item, Player)
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