I had this script working before, but I lost it. I can't remember how it was done.
Here is a picture for example:
In this picture, I placed a crack sprite on the map after using an item.
What is supposed to happen next is if you step on it, it will damage you and the crack will disappear.
What is the problem?
The crack is not disappearing.
It may be so simple, I apologize, it's been a long day for, I can't seem to think straight.
If anyone knows how to do it, please help me out.
Here is the code I have so far.
(for transforming item, the reason why I have item.uid - 1 is because I thought it would remove it (similar to storageids)).
Thanks,
Evan
Here is a picture for example:
In this picture, I placed a crack sprite on the map after using an item.
What is supposed to happen next is if you step on it, it will damage you and the crack will disappear.
What is the problem?
The crack is not disappearing.
It may be so simple, I apologize, it's been a long day for, I can't seem to think straight.
If anyone knows how to do it, please help me out.
Here is the code I have so far.
(for transforming item, the reason why I have item.uid - 1 is because I thought it would remove it (similar to storageids)).
LUA:
function onStepIn(cid, item, pos)
if(item.itemid == 6299) then
if(isPlayer(cid)) then
doTargetCombatHealth(0, cid, COMBAT_PHYSICALDAMAGE, -100, -200, CONST_ME_FIREAREA)
doTransformItem(item.uid, item.uid - 1)
end
end
return true
end
Thanks,
Evan