skdlamaza
New Member
- Joined
- Jun 18, 2013
- Messages
- 15
- Reaction score
- 2
Hello i was making a script and im having this trouble...
i want the item came back from the transformed item "3811" to the first one in this case 2708 after some time... but the item now doesnt transform on 3811 and it goes directly to the 2708. no errors on console.
the decay only works on item created by the rme editor. the rest of the script is working i just got this issue when i add the decay line " doDecayItem(itemEx.uid) "
Action script !
-------------------------------------------------------------------------------
local exito = 80
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 2708 then
if math.random(100) <= exito then
doPlayerAddItem(cid,5901,1)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You get some wood from the tree.")
doSendMagicEffect(getThingPos(item.uid), CONST_ME_MAGIC_GREEN)
doTransformItem(itemEx.uid, 3811)
doDecayItem(itemEx.uid)
return TRUE
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Axe has broken.")
doSendMagicEffect(getThingPos(item.uid), CONST_ME_BLOCKHIT)
doRemoveItem(item.uid)
end
return TRUE
end
return FALSE
end
-------------------------------------------------------------------------------------------
item.xml
<item id="3811" article="a" name="tree stump" >
<attribute key="decayTo" value="2708" />
<attribute key="duration" value="300" />
</item>
i want the item came back from the transformed item "3811" to the first one in this case 2708 after some time... but the item now doesnt transform on 3811 and it goes directly to the 2708. no errors on console.
the decay only works on item created by the rme editor. the rest of the script is working i just got this issue when i add the decay line " doDecayItem(itemEx.uid) "
Action script !
-------------------------------------------------------------------------------
local exito = 80
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 2708 then
if math.random(100) <= exito then
doPlayerAddItem(cid,5901,1)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You get some wood from the tree.")
doSendMagicEffect(getThingPos(item.uid), CONST_ME_MAGIC_GREEN)
doTransformItem(itemEx.uid, 3811)
doDecayItem(itemEx.uid)
return TRUE
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Axe has broken.")
doSendMagicEffect(getThingPos(item.uid), CONST_ME_BLOCKHIT)
doRemoveItem(item.uid)
end
return TRUE
end
return FALSE
end
-------------------------------------------------------------------------------------------
item.xml
<item id="3811" article="a" name="tree stump" >
<attribute key="decayTo" value="2708" />
<attribute key="duration" value="300" />
</item>
Last edited: