Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Esse é o script do piggy bank
- SCRIPT BY CARONTE
- visite: tibiaking.com ]]
- --[[
- function onUse(cid, item, frompos, item2, topos)
- rand1 = math.random(1,100)
- rand2 = math.random(1,70)
- rand3 = math.random(1,15)
- local dinheiro = 5 -- Quantide de crystal coins que irá consumir
- local chancedequebrar = 0 -- porcentagem da chance de se quebrar, use 0 para não quebrar
- dinheiro = dinheiro * 10000
- if getPlayerMoney(cid) >= dinheiro then
- doPlayerRemoveMoney(cid, dinheiro)
- else
- doCreatureSay(cid, '~You need '..dinheiro..' golds to break it !!!~', TALKTYPE_ORANGE_1)
- doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
- return false
- end
- if rand1 <= 50 then
- doPlayerAddItem(cid,2148,rand1)
- doCreatureSay(cid, '~Holy Shit !!! only '..rand1..' golds, my mom will kill me~', TALKTYPE_ORANGE_1)
- doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_YELLOW)
- end
- if rand1 >= 51 and rand1 <= 70 then
- doPlayerAddItem(cid,2152,rand3)
- doCreatureSay(cid, '~Oh-oh '..rand3..' Platinum coins!, would i try again ?~', TALKTYPE_ORANGE_1)
- doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_BLUE)
- end
- if rand1 >= 90 then
- doPlayerAddItem(cid,2160,rand2)
- doCreatureSay(cid, '~Oh My God! :D '..rand2..' Crystal coins !!!', TALKTYPE_ORANGE_1)
- doSendMagicEffect(getCreaturePosition(cid), CONST_ME_WATERSPLASH)
- end
- if rand1 <= chancedequebrar then
- doPlayerAddMoney(cid, dinheiro)
- doTransformItem(item.uid,item.itemid+1)
- end
- return 1
- end
- ]]
- --[[ Esse é o script do piggy bank
- SCRIPT BY CARONTE
- visite: tibiaking.com ]]
- function onUse(cid, item, frompos, item2, topos)
- local chance = math.random(0,100)
- dinheiro = 10 -- Quantidade mÃnima para jogar
- dinheiro = dinheiro * 10000
- crystalparaapostar = dinheiro / 10000
- local pos = getPlayerPosition(cid)
- pos = {x= posx,y= posy,z= posz}
- --Verificar se tem crystals na--
- if getPlayerSlotItem(cid, CONST_SLOT_AMMO).itemid ~= 2160 then
- doCreatureSay(cid, 'You need crystal coins in your ammunition slot to play ! ', TALKTYPE_ORANGE_1)
- doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
- --Verificar quantidade de cystals no ammo slot :D
- elseif getPlayerSlotItem(cid, CONST_SLOT_AMMO).itemid == 2160 and getPlayerSlotItem(cid, CONST_SLOT_AMMO).type < 10 then
- doCreatureSay(cid, "You don't have "..crystalparaapostar.." crystal coins in the arrows slot to play", TALKTYPE_ORANGE_1)
- doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
- end
- if getPlayerSlotItem(cid, CONST_SLOT_AMMO).itemid == 2160 and getPlayerSlotItem(cid, CONST_SLOT_AMMO).type >= 10 then
- doCreatureSay(cid, 'Its time to play', TALKTYPE_ORANGE_1)
- --doSendMagicEffect(getCreaturePosition(cid), CONST_ME_CRAPS)
- if chance <= 50 then
- doPlayerAddItem(cid,2160,getPlayerSlotItem(cid, CONST_SLOT_AMMO).type)
- elseif chance >= 50 then
- doPlayerRemoveItem(cid,2160,getPlayerSlotItem(cid, CONST_SLOT_AMMO).type)
- --doSendDistanceShoot(frompos, topos, type)
- doSendMagicEffect(pos,1)
- end
- end
- return true
- end
Add Comment
Please, Sign In to add comment