Advertisement
RoksasNunes

NewDiceOficial

Apr 20th, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onUse(cid, item, item2)
  2.  
  3. local cfg = {
  4.     listas = {
  5.         chance100 = {2494, 2492, 2646}, -- Demon Armor, DSA, Golden Boots
  6.         chance75 = {2400, 2472, 2470}, -- SOV, MPA, Golden Legs
  7.         chance50 = {2466, 2514, 2640}, -- Golden Armor, MMS, Soft Boots
  8.         chance30 = {2487, 2498, 2491}, -- Crown Armor, RH, Crown Helmet
  9.         chance10 = {4, 8, 10, 30, 50, 80}, -- Crystal coins (40k, 80k, 100k...)
  10.         }
  11.     }
  12.  
  13.     if getPlayerFreeCap(cid) < 150 then doPlayerSendCancel(cid, "Lack cap!") return true end
  14.  
  15.     if math.random(1, 100) <= 10 then
  16.         doPlayerAddItem(cid, 2160, cfg.listas.chance10[math.random(1, #cfg.listas.chance10)])
  17.             doCreatureSay(cid, "Rolled [Chance 10%]", TALKTYPE_ORANGE_1)
  18.     elseif math.random(1, 100) > 10 or math.random(1, 100) < 30 then
  19.         doPlayerAddItem(cid, cfg.listas.chance30[math.random(1, #cfg.listas.chance30)])
  20.             doCreatureSay(cid, "Rolled [Chance 30%]", TALKTYPE_ORANGE_1)
  21.     elseif math.random(1, 100) > 30 or math.random(1, 100) < 50 then
  22.         doPlayerAddItem(cid, cfg.listas.chance50[math.random(1, #cfg.listas.chance50)])
  23.             doCreatureSay(cid, "Rolled [Chance 50%]", TALKTYPE_ORANGE_1)
  24.     elseif math.random(1, 100) > 50 or math.random(1, 100) < 75 then
  25.         doPlayerAddItem(cid, cfg.listas.chance75[math.random(1, #cfg.listas.chance75)])
  26.             doCreatureSay(cid, "Rolled [Chance 75%]", TALKTYPE_ORANGE_1)
  27.     elseif math.random(1, 100) > 75 or math.random(1, 100) < 100 then
  28.         doPlayerAddItem(cid, cfg.listas.chance100[math.random(1, #cfg.listas.chance100)])
  29.             doCreatureSay(cid, "Rolled [Chance 100%]", TALKTYPE_ORANGE_1)
  30.         end
  31.        
  32.         doSendMagicEffect(getCreaturePosition(cid), 26)
  33.             doRemoveItem(item.uid, 1)
  34.                 return true
  35.             end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement