I'm working on a 8.54 Open Tibia Server using The Forgotten Server - Version 0.2.7 (Mystic Spirit).
I have created the following script:
Server\data\actions\scripts\tools\gutting fish.lua
Server\data\actions\actions.xml
When I use my kitchen knife on a fish it does nothing.
Maybe any of you can help me out?
Thanks in advance.
I have created the following script:
Server\data\actions\scripts\tools\gutting fish.lua
Code:
local fish = {2667}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray(fish, itemEx.itemid) == TRUE then
local rand = math.random(1, 10)
elseif 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
Server\data\actions\actions.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action itemid="2566" script="tools/gutting fish.lua"/>
</actions>
When I use my kitchen knife on a fish it does nothing.
Maybe any of you can help me out?
Thanks in advance.