I'm working on a 8.54 Open Tibia Server using The Forgotten Server - Version 0.2.7 (Mystic Spirit).
I've made the following action script:
But I have the following problem. when I use this on just 1 fish, it works perfectly but when I use it on a stack of fish then the whole stack will disappear instead of just 1 fish.
Anyone knows how to fix this?
Thanks in advance.
I've made the following action script:
Code:
local fish = {2667}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray(fish, itemEx.itemid) == TRUE then
local rand = math.random(1, 10)
if rand < 8 then
doTransformItem(itemEx.uid, 2240)
doPlayerAddItem(cid, 2668, 1)
doCreatureSay(cid, "You successfully gutted the fish and collected some fillet.", TALKTYPE_ORANGE_1)
else
doTransformItem(itemEx.uid, 2240)
doCreatureSay(cid, "You gutted the fish but failed to get some fillet.", TALKTYPE_ORANGE_1)
end
end
end
But I have the following problem. when I use this on just 1 fish, it works perfectly but when I use it on a stack of fish then the whole stack will disappear instead of just 1 fish.
Anyone knows how to fix this?
Thanks in advance.