Difference between revisions of "LUA:ItemScripts"

(Created page with "details to come")
 
Line 1: Line 1:
details to come
+
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
 +
 
 +
<pre>
 +
function cast(Item, Spawn)
 +
end
 +
</pre>
 +
== Destroyed ==
 +
Destroyed is called when the player destroys the item
 +
 
 +
<pre>
 +
function destroyed(Item, Spawn)
 +
end
 +
</pre>
 +
== Examined ==
 +
Examined is called when the player examines an item
 +
 
 +
<pre>
 +
function examined(Item, Spawn)
 +
end
 +
</pre>
 +
== Equipped ==
 +
Equipped is called when the player equips an item
 +
 
 +
<pre>
 +
function equipped(Item, Spawn)
 +
end
 +
</pre>
 +
== Proc ==
 +
Proc is called when the item proc is triggered
 +
 
 +
<pre>
 +
function proc(Item, Caster, Target, Type)
 +
end
 +
</pre>
 +
== Removed ==
 +
Removed is called when the item is removed from the player
 +
 
 +
<pre>
 +
function removed(Item, Spawn)
 +
end
 +
</pre>
 +
== Unequipped ==
 +
Unequipped is called when the player unequips an item
 +
 
 +
<pre>
 +
function unequipped(Item, Spawn)
 +
end
 +
</pre>
 +
== Used ==
 +
Used is called when the player uses an item
 +
 
 +
<pre>
 +
function used(Item, Spawn)
 +
end
 +
</pre>

Revision as of 21:32, 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