PHP:
function onUse(cid, item, frompos, item2, topos)
if frompos.x == 65535 then
doPlayerSendCancel(cid, "Put the metal on the anvil first.")
return 1
end
doSendMagicEffect(topos,2) -- puff
if item.itemid == 2225 then -- pice of iron
doTransformItem(item.uid,2088)
else
return 0
end
return 1
end
I want so you can only use this at X,Y,Z pos. not everywhere on the ground.