- Joined
- Dec 26, 2013
- Messages
- 2,122
- Solutions
- 14
- Reaction score
- 1,516
- Location
- USA
- GitHub
- Codinablack
Hi Otland. I created a spell to conjure up a trap in the spot the player is standing and I can't figure out how to get this exact item to disappear after so many seconds using addEvent. I just want it to make sure if the trap was set or not that the trap does indeed disappear after so many seconds.
Here is the script:
Here is the script:
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
function onCastSpell(cid, var)
local creature = Creature(cid)
local pos = creature:getPosition()
doCreateItem(2579, 1, pos)
combat:execute(cid, var)
return true
end