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

Windows Hand axe on palmtree

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if(isInArray(JUNGLE_GRASS, itemEx.itemid)) then
                doTransformItem(itemEx.uid, itemEx.itemid - 1)
                doDecayItem(itemEx.uid)
                return true
        end

        if(isInArray(SPIDER_WEB, itemEx.itemid)) then
                doTransformItem(itemEx.uid, (itemEx.itemid + 6))
                doDecayItem(itemEx.uid)
                return true
        end

        if(isInArray(PALM_TREE, itemEx.itemid)) then
                doTransformItem(itemEx.uid, (itemEx.itemid + 6))
                doDecayItem(itemEx.uid)
                return true
        end

        if(isInArray(WILD_GROWTH, itemEx.itemid)) then
                doSendMagicEffect(toPosition, CONST_ME_POFF)
                doRemoveItem(itemEx.uid)
                return true
        end

        return destroyItem(cid, itemEx, toPosition)
end

If the palm is named PALM TREE in the items.xml, this will be the right script for it.

Otherwise you will have to change the name in the script yourself.
This will only destroy the palm, but if you want it to add a wood to the ground, use this function

Code:
doCreateItem(itemid, type/count, pos)
 
Back
Top