• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action deleted thread

PHP:
local hota = 2343
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 2147 then 
        if doRemoveItem(itemEx.uid,2) == TRUE then
        doTransformItem(item.uid, hota)
        doSendMagicEffect(toPosition, 13)
end
else
doPlayerSendCancel(cid,"You cannot use this object.")
end
return TRUE
end

That should work also if I'm not wrong?

And it should be more secure :>
 
It's not like rl tibia.
It is. :) You must add in your items.xml

PHP:
	<item id="2342" article="a" name="helmet of the ancients">
		<attribute key="description" value="The gem of the helmet is burned out and should be replaced."/>
		<attribute key="weight" value="2760"/>
		<attribute key="armor" value="8"/>
		<attribute key="slotType" value="head"/>
	</item>
	<item id="2343" article="a" name="helmet of the ancients">
		<attribute key="description" value="The gem is glowing with power."/>
		<attribute key="weight" value="2760"/>
		<attribute key="armor" value="11"/>
		<attribute key="slotType" value="head"/>
		<attribute key="duration" value="1800"/>
		<attribute key="decayTo" value="2342"/>
	</item>
If you dont have it.
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 2147 then 
        if itemEx.type >= 2 then
                doRemoveItem(itemEx.uid,2)
                doTransformItem(item.uid, 2343)
                doSendMagicEffect(toPosition, 13)
        else
                doPlayerSendCancel(cid,"You cannot use this object.")
        end
else
        doPlayerSendCancel(cid,"You cannot use this object.")
end
return TRUE
end
for 0.3.4+
 
Back
Top