warriorfrog
Active Member
- Joined
- Jul 29, 2015
- Messages
- 334
- Reaction score
- 35
I have a script to count MW time, but if a player use machete to remove MWILD, the time dont stop, any here know how to fix it?
wild growth rune.lua
wild growth rune.lua
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1499)
function countPos(cid, pos, tempo)
if tempo > 0 then
doSendAnimatedText(pos, tempo, TEXTCOLOR_YELLOW)
addEvent(countPos, 1000, cid, pos, tempo-1)
else
doSendMagicEffect(pos, 2)
end
end
function onCastSpell(cid, var)
countPos(cid, var.pos, 45)
doCreatureSay(cid, 'WALL', TALKTYPE_ORANGE_1)
doCombat(cid, combat, var)
doPlayerRemoveItem(cid, 2269, 1)
end