Ir para conteúdo

Featured Replies

Postado

estou querendo fazer uma spell em que o alvo apenas possa se mover porém nao consigo fazer com que:  local exhaust = createConditionObject(CONDITION_EXHAUST)    funcione

 

nesse script da tudo certo menos o exhausted, estou querendo testar a condition.

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_STUN)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
 
function onGetFormulaValues(cid, level, skill, attack, factor)
    local skillTotal, levelTotal = skill + attack * 3, level / 5 * 3
    return -(skillTotal / 5 + levelTotal), -(skillTotal / 4 + levelTotal)
end
 
t1 = 1000
t2 = 2000
 
function effect(cid)
if not isCreature(cid) then
return false
end
    local targ = getCreatureTarget(cid)
if not isCreature(targ) then
return false
end
    doSendMagicEffect(getThingPos(targ), CONST_ME_SLEEP)
end
 
local paralyze = createConditionObject(CONDITION_PARALYZE)
setConditionParam(paralyze, CONDITION_PARAM_TICKS, 2000)
 
local muted = createConditionObject(CONDITION_MUTED)
setConditionParam(muted, CONDITION_PARAM_TICKS, 2000)
 
local pacified = createConditionObject(CONDITION_PACIFIED)
setConditionParam(pacified, CONDITION_PARAM_TICKS, 1000)
 
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 200000)
 
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

local function doCreatureChangeSpeed(cid, speed)
if not isCreature(cid) then
return false
end
doChangeSpeed(cid, speed)
return true
end

function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
if not isCreature(target) then
return false
end
local speed = getCreatureSpeed(target)
local selfspeed = getCreatureSpeed(target)
local pos = getThingPos(target)
    doChangeSpeed(cid, 5000)
    doSteerCreature(cid, pos)
    doChangeSpeed(target, -speed)
    doAddCondition(target, paralyze)
    doAddCondition(target, muted)
    doAddCondition(target, pacified)
    doAddCondition(target, exhaust)
    addEvent(doCreatureChangeSpeed, 2000, target, speed)
    addEvent(doCreatureChangeSpeed, 1000, cid, -5000)    
    addEvent(effect,t1,cid)
    addEvent(effect,t2,cid)
    return doCombat(cid, combat, var)
end

 

 

alguem sabe como resolver, ou se esse erro só esta dando aqui

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo