I have this script.
and it is saying this error.
I want to make it so the pick breaks randomly as well. It doesn't work. I'm running TFS 0.3.6. Thank you. :ninja:
Lua:
function getStone(cid, toPosition)
local pick = {cid, 2553}
random_number = math.random(1,100)
doSendMagicEffect(toPosition,3)
if random_number>=95 and getCreaturePosition(cid) then
doCreateItem(cid, 2157, 1, toPosition)
elseif random_number<=94 and random_number>89 then
doCreateItem(cid, 1294, 1, toPosition)
elseif random_number<=88 and random_number>83 then
doCreateItem(cid, 2225, 1, toPosition)
elseif random_number<=82 and random_number>77 then
doCreateItem(cid, 2225, 1, toPosition)
elseif random_number<=75 and random_number>70 then
doRemoveItem(cid, pick.uid)
end
end
rocha = {3616, 1356, 1290, 1285}
function onUse(cid, item, frompos, itemEx, toPosition)
if isInArray(rocha, itemEx.itemid) == TRUE then
getStone(cid, toPosition)
elseif (itemEx.uid > 0 or itemEx.actionid > 0) and (itemEx.itemid == 354 or itemEx.itemid == 355) then
doTransformItem(itemEx.uid, 392)
doDecayItem(itemEx.uid)
doSendMagicEffect(toPosition, CONST_ME_POFF)
return TRUE
else
return FALSE
end
return TRUE
end
and it is saying this error.
[06/03/2010 02:29:47] [Error - Action Interface]
[06/03/2010 02:29:47] data/actions/scripts/tools/mining.luanUse
[06/03/2010 02:29:47] Description:
[06/03/2010 02:29:47] (luaDoRemoveItem) Item not found
I want to make it so the pick breaks randomly as well. It doesn't work. I'm running TFS 0.3.6. Thank you. :ninja: