• 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 Machete usage, Wild Growth not decay's (target:transform(0))

War-Ots

New Member
Joined
Feb 17, 2016
Messages
29
Reaction score
2
Hello!

I am fixing a bug in my PVP-E server where wild growth can not be cutted by a machete for some reason I had this script:
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
   if target.itemid == 2782 then
        target:transform(2781)
        target:decay()
       return true
   end
   return destroyItem(player, target, toPosition)
end

and I did this one here:
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
   if target.itemid == 2782 then
        target:transform(2781)
        target:decay()
       return true
   end
   if target.itemid == 1499 then -- wild growth ID
        target:transform(0)
        target:decay()
       return true
   end
   return destroyItem(player, target, toPosition)
end

For some reason this is not working with target:transform(0), when I use for example target:transform(2148) (gold coin id) it successfully transform the wild growth into a gold coin.

PS:When I let stay transform: (0) nothing really happens, not even the famouse message "you cannot use this object."


Any Idea what I am doing wrong?
 
Last edited:
Back
Top