• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Use Pick And...

Maniucza

~Lua~ Noob
Joined
Aug 2, 2009
Messages
86
Reaction score
6
Location
Poland / Rzeszów
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



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
 
Ey noobs, there's no difference between XML and SQL, it's script system, hello?
 
Back
Top Bottom