Scripting
Script Structure
onUse(player, item, fromPosition, target, toPosition, isHotkey)
Example
<!-- Registration for the script below -->
<action itemid="2148" script="change_gold.lua" />-- data/actions/scripts/change_gold.lua
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getName() == "Delusion" then
item:transform(2160)
return true
end
return false -- Anybody who is not me will not be able to use the item!
endLast updated