shovel script
my problem is if have some splash on target id, my shovel no work. how can i fix this?
LUA:
function onUse(player, item, fromPosition, target, toPosition)
local tile = Tile(toPosition)
if not tile then
return false
end
if not target:isItem() then
return false
end
if target:getId() == 231 then
target:getPosition():sendMagicEffect(3)
return true
elseif target:getId() == 593 then
target:transform(594, 1)
target:decay()
doRelocate(target:getPosition(), target:getPosition():moveRel(0,0,1))
return true
else
return false
end
return true
end
my problem is if have some splash on target id, my shovel no work. how can i fix this?