entre nos eu coloquei pung bank nuss bebado plx
+ um script do otfans
creditos:kullobe huckler
é o cofrinho podendo guarda gps
nele
e depois pegar
só pode guardar de 100 em 100 gp
naum testei por isso falei o qeu entendi
ai vai o script
destroy.lua
function onUse(cid, item, frompos, item2, topos)qs = getPlayerStorageValue(cid,5010)
if item.itemid == 2114 then
if doPlayerRemoveItem(cid,2152,1) == 1 then
if qs == -1 then
setPlayerStorageValue(cid,5010,0)
elseif qs ~= -1 then
setPlayerStorageValue(cid,5010,qs+100)
qs5 = getPlayerStorageValue(cid,5010)
qs6 = qs
doPlayerSendTextMessage(cid,21,'You have deposited 100 gp. You now have '.. qs6 ..' gp.')
end
elseif doPlayerRemoveItem(cid,2152,1) == 0 then
doPlayerSendTextMessage(cid,21,'You need at least 100 gp to deposit!')
end
elseif item.itemid >= 2376 and item.itemid <= 2454 and item2.itemid == 2114 then
doTransformItem(item2.uid,item2.itemid+1)
if qs > 100 and qs <= 10000 then
qs2 = qs-100
doPlayerSendTextMessage(cid,21,'You have taken out '.. qs2 ..' gp.')
qs3 = qs / 100
doPlayerAddItem(cid,2152,qs3-1)
end
setPlayerStorageValue(cid,5010,0)
else
if (item2.itemid >= 3805 and item2.itemid <= 3810) or
(item2.itemid >= 1646 and item2.itemid <= 1661) or
(item2.itemid >= 1666 and item2.itemid <= 1677) or
(item2.itemid >= 3813 and item2.itemid <= 3820) or
(item2.itemid >= 1714 and item2.itemid <= 1717) or
(item2.itemid >= 1724 and item2.itemid <= 1737) or
(item2.itemid == 1738 or item2.itemid == 1739 or item2.itemid == 1741) or
(item2.itemid >= 1750 and item2.itemid <= 1753) or
(item2.itemid >= 2080 and item2.itemid <= 2085) or
(item2.itemid >= 2116 and item2.itemid <= 2119) or
(item2.itemid >= 2581 and item2.itemid <= 2588) or
(item2.itemid == 2095 or item2.itemid == 2098 or item2.itemid == 2101 or item2.itemid == 2104 or item2.itemid == 2105 or item2.itemid == 1775 or item2.itemid == 2602 or item2.itemid == 1619 or item2.itemid == 2064) or
(item2.itemid >= 1614 and item2.itemid <= 1616) then
doRemoveItem(item2.uid,1)
doSendMagicEffect(topos,2)
else
doPlayerSendTextMessage(cid,21,'You must use this on a piggy bank or furniture.')
return 1
end
return 1
end
return 1
end
e em actions.xml
<action itemid="2114" script="trans_inc.lua" /> --pig bank--<action itemid="2114" script="destroy.lua" /> --pig bank--
é isso
flws
comentem