w actions.xml dodajemy linijke:
<action itemid="ID ITEMA" script="box.lua"/>
do data/actions dodajemy:
function onUse(cid, item, frompos, item2, topos) rand = math.random(1,5) if item.itemid == 2156 then if rand == 1 then doPlayerSendTextMessage(cid,22,"Thanks for donate") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), 96) doPlayerAddItem(cid, 2443, 1) elseif rand == 2 then doPlayerSendTextMessage(cid,22,"Thanks for donate") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), 96) doPlayerAddItem(cid, 2412, 1) elseif rand == 3 then doPlayerSendTextMessage(cid,22,"Thanks for donate") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), 96) doPlayerAddItem(cid, 2425, 1) elseif rand == 4 then doPlayerSendTextMessage(cid,22,"Thanks for donate") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), 96) doPlayerAddItem(cid, 2390, 1) else doPlayerSendTextMessage(cid,22,"Thanks for donate") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), 96) doPlayerAddItem(cid, 2411, 1) end return end end