Hello otland I have just found a script for tfs 0.4 but I need help with 2 stuff...
1. is it possible to add there a exhaust for using?
2. it seems like the % system does not work as it should? I just did put 1 there but im always possible to get a scarb coins for some reasons
here the script ( tfs 0.4 )
1. is it possible to add there a exhaust for using?
2. it seems like the % system does not work as it should? I just did put 1 there but im always possible to get a scarb coins for some reasons
here the script ( tfs 0.4 )
LUA:
local t = {
chance = 1 -- 25%
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 10700 then
if t.chance <= math.random(1, 10) then
doPlayerAddItem(cid, 2159, 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