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
- ]]
- function onUse(cid, item, frompos, item2, topos)
- local chance = math.random(1,2)
- dinheiro = 10 -- Quantidade mÃnima para jogar
- dinheiro = dinheiro * 10000
- crystalparaapostar = dinheiro / 10000
- if
- getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid ~= 2160 and getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid ~= 2160 then
- doCreatureSay(cid, 'You need money in your hand to play', TALKTYPE_ORANGE_1)
- elseif
- getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == 2160 and getPlayerSlotItem(cid, CONST_SLOT_LEFT).count < 10 then
- doCreatureSay(cid, 'You dont have '..crystalparaapostar..' crystal coins enough to play', TALKTYPE_ORANGE_1)
- elseif
- getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == 2160 and getPlayerSlotItem(cid, CONST_SLOT_RIGHT).count < 10 then
- doCreatureSay(cid, 'You dont have '..crystalparaapostar..' crystal coins enough to play', TALKTYPE_ORANGE_1)
- end
- if getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == 2160 and getPlayerSlotItem(cid, CONST_SLOT_LEFT).count >= 10 or getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == 2160 and getPlayerSlotItem(cid, CONST_SLOT_RIGHT).count >= 10 then
- doCreatureSay(cid, 'Its time to play', TALKTYPE_ORANGE_1)
- doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
- end
- return true
- end
- --[[ Esse é a continuação "
- if getPlayerSlotItem(cid, CONST_SLOT_LEFT) or getPlayerSlotItem(cid, CONST_SLOT_RIGHT) == ITEM_GOLD_COIN >= dinheiro then
- if chance == 1 then
- doPlayerRemoveMoney(cid, dinheiro)
- doCreatureSay(cid, 'Here is a gift to you', TALKTYPE_ORANGE_1)
- doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
- else chance == 2 then
- doPlayerAddMoney(cid, dinheiro * 2)
- doCreatureSay(cid, '~You need '..dinheiro..' golds to break it !!!~', TALKTYPE_ORANGE_1)
- end
- end
- return true
- end
- ]]
Advertisement
Add Comment
Please, Sign In to add comment