Maniucza
~Lua~ Noob
Hi you have to make a script that is on this when we use the pick
the crystal that we have a chance of 1 to 50 that we will get a small diamond
the crystal that we have a chance of 1 to 50 that we will get a small diamond
PHP:
function onUse(cid, item, frompos, item2, topos)
local chance = math.random(1,50)
local chance2 = math.random(1,50)
local id = 1852 -- ID Diamond
if (chance == chance2) then
doPlayerAddItem(cid,id,1)
doPlayerSendTextMessage(cid,19,"You got a diamond.")
else
doPlayerSendCancel(cid,"Unfortunately, you did not.")
end
end