bom , eu me basiei na action do change gold / platinum , nessa action que eu vou postar vc clica em 10 bolts , e eles viram 1 power bolt ( e vice-versa ) ... é algo legal pra se ter em um otserv , alem de ser diferente e bem simples =) , aki vai as actions :
crie um arquivo chamado bolt ( formato .lua ) em actions/scripts e coloque isso dentro :
function onUse(cid, item, frompos, item2, topos)if item.itemid == 3384 and item.type == 10 then
doRemoveItem(item.uid,item.type)
doPlayerAddItem(cid,3388,1)
doPlayerSendTextMessage(cid,22,"You have changed 10 bolts to 1 power bolt")
elseif item.itemid == 3384 and item.type < 10 then
doPlayerSendTextMessage(cid,22,"You have to got 10 bolts to change for power bolt")
end
end
agora crie um arquivo chamado powerbolt ( formato .lua ) em actions/scripts e coloque isso dentro :
function onUse(cid, item, frompos, item2, topos)if item.itemid == 3388 and item.type < 100 then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,3384,10)
doPlayerSendTextMessage(cid,22,"You have changed 1 power bolt to 10 bolts")
end
end
agora vá em actions.xml , abra com o bloco de notas e adicione 2 linhas :
<action itemid="3384" script="bolt.lua" /><action itemid="3388" script="powerbolt.lua" />
é isso , simples mais legal , comentem e dem idéias para aprimorar isso !
creditos: Wilson Kaupert