Fire Element
Member
I wanted to put a chance this script:
Example:
90% chance = 10.000 ~~ 30.000gps
80% chance = 35.000 ~~ 50.000gps
etc...
Thanks!
Lua:
function onUse(cid, item, frompos, item2, topos)
local n = math.random(10, 100)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You received "..n.."0k.")
doPlayerAddItem(cid, 2160, n)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_GREEN)
doRemoveItem(item.uid, 1)
return true
end
Example:
90% chance = 10.000 ~~ 30.000gps
80% chance = 35.000 ~~ 50.000gps
etc...
Thanks!