Postado Abril 25, 2020 5 anos Quando uso a spell de paralyze no target, o target fica parado pra sempre. O tempo configurado na spell foi de 5 segundos, mas o player fica inifinamente paralizado, como posso resolver isso? Script da magia: Spoiler local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, 5000) setConditionParam(condition, CONDITION_PARAM_SPEED, -5000) function onCastSpell(cid, var) local target = getCreatureTarget(cid) local targetpos = getCreaturePosition(target) local efepos = {x=targetpos.x, y=targetpos.y, z=targetpos.z} local time = 5 -- tempo paralyzado if isPlayer(cid) and exhaustion.check(cid, 11560) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, 11560) .. " segundos para usar novamente.") return FALSE end local function No_Move_Target() if isCreature(target) then doCreatureSetNoMove(target, 0) end return TRUE end exhaustion.set(cid, 11560, 30) doCreatureSetNoMove(target, 1) doAddCondition(target, condition) doSendMagicEffect(efepos, 24) addEvent(No_Move_Target, time*1000) return TRUE end
Postado Abril 25, 2020 5 anos @MarkCharlotte Tenta assim: local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, 5000) setConditionParam(condition, CONDITION_PARAM_SPEED, -5000) function onCastSpell(cid, var) local target = getCreatureTarget(cid) local targetpos = getCreaturePosition(target) local efepos = {x=targetpos.x, y=targetpos.y, z=targetpos.z} local time = 5 -- tempo paralyzado if isPlayer(cid) and exhaustion.check(cid, 11560) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, 11560) .. " segundos para usar novamente.") return FALSE end exhaustion.set(cid, 11560, 30) doCreatureSetNoMove(target, 1) doAddCondition(target, condition) doSendMagicEffect(efepos, 24) addEvent(No_Move_Target, time*1000, target) return TRUE end local function No_Move_Target(target) if isCreature(target) then doCreatureSetNoMove(target, 0) end return TRUE end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.