\data\talkactions\scripts\rollthedice.lua
---Life4mana-by Sky Hunter--- function onUse(cid, item, frompos, item2, topos) rand = math.random(1,6) if rand == 1 then doTransformItem(item.uid,5792) elseif rand == 2 then doTransformItem(item.uid,5793) elseif rand == 3 then doTransformItem(item.uid,5794) elseif rand == 4 then doTransformItem(item.uid,5795) elseif rand == 5 then doTransformItem(item.uid,5796) elseif rand == 6 then doTransformItem(item.uid,5797) end return 0 end
\data\actions\actions.xml
<action itemid="5792" script="rollthedice.lua" /> <action itemid="5793" script="rollthedice.lua" /> <action itemid="5794" script="rollthedice.lua" /> <action itemid="5795" script="rollthedice.lua" /> <action itemid="5796" script="rollthedice.lua" /> <action itemid="5797" script="rollthedice.lua" />