Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!
I need a script for mines for example there are small stones and i can use a pick on them and when i use the pick on the stone i receive gold or somethings.
local t = {
chance = 25 -- 25%
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 1294 then
if t.chance <= math.random(1, 100) then
doPlayerAddItem(cid, 2148, math.random(1, 10))
doRemoveItem(itemEx.uid, 1)
doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
else
doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
end
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You can\'t mine this.')
end
return true
end
If you have other stuff within your pick.lua, you should add this somewhere:
Lua:
local t = {
chance = 25 -- 25%
}
if itemEx.itemid == 1294 then
if t.chance <= math.random(1, 100) then
doPlayerAddItem(cid, 2148, math.random(1, 10))
doRemoveItem(itemEx.uid, 1)
doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
else
doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
end
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You can\'t mine this.')
end