• 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!

Solved Tool script does not work.

Exoltes

Novia OTserv Developer
Joined
Jul 2, 2009
Messages
563
Reaction score
47
Location
Belgium
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
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.
 
Back
Top