Ir para conteúdo
  • 0

[Resolvido] Modificação em SPELL


Akame

Pergunta

Olá, eu queria fazer uma modificação nesse script pra não só tomar dano. Quero que dano e deixe o player lento

Spoiler

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_BLACK)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -7, 2, -8, 3)

local combat2 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_BLACK)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -5, 2, -4, 3)

local combat3 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_BLACK)
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -2, 4, -6, 2)

local combat4 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_BLACK)
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(comba4, COMBAT_FORMULA_LEVELMAGIC, -3, 2, -4, 5)

arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 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
{0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)

local function onCastSpell1(parameters)
return isCreature(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)
end

local function onCastSpell2(parameters)
return isCreature(parameters.cid) and doCombat(parameters.cid, combat2, parameters.var)
end

local function onCastSpell3(parameters)
return isCreature(parameters.cid) and doCombat(parameters.cid, combat3, parameters.var)
end

local function onCastSpell4(parameters)
return isCreature(parameters.cid) and doCombat(parameters.cid, combat4, parameters.var)
end

function onCastSpell(cid, var)
local parameters = {cid = cid, var = var}
local posi = getCreaturePosition(cid)
---------------- explosion1 --------------------
addEvent(doSendMagicEffect, 10, {x = posi.x+2, y = posi.y, z = posi.z}, 111)
addEvent(doSendMagicEffect, 10, {x = posi.x+1, y = posi.y, z = posi.z}, 111)
addEvent(doSendMagicEffect, 10, {x = posi.x+1, y = posi.y+1, z = posi.z}, 111)
addEvent(doSendMagicEffect, 10, {x = posi.x+2, y = posi.y+1, z = posi.z}, 111)
---------------------------------------------------
addEvent(doSendMagicEffect, 100, {x = posi.x+3, y = posi.y+2, z = posi.z}, 108)
---------------- segundo tempo --------------------
addEvent(doSendMagicEffect, 650, {x = posi.x+3, y = posi.y+2, z = posi.z}, 108)
---------------- terceiro tempo --------------------
addEvent(doSendMagicEffect, 1200, {x = posi.x+3, y = posi.y+2, z = posi.z}, 108)
---------------- quarto tempo --------------------
addEvent(doSendMagicEffect, 1800, {x = posi.x+3, y = posi.y+2, z = posi.z}, 108)
---------------- quinto tempo --------------------
addEvent(doSendMagicEffect, 2200, {x = posi.x+3, y = posi.y+2, z = posi.z}, 108)
---------------- explosion --------------------
addEvent(doSendMagicEffect, 2600, {x = posi.x+2, y = posi.y, z = posi.z}, 111)
addEvent(doSendMagicEffect, 2600, {x = posi.x+1, y = posi.y, z = posi.z}, 111)
addEvent(doSendMagicEffect, 2600, {x = posi.x+1, y = posi.y+1, z = posi.z}, 111)
addEvent(doSendMagicEffect, 2600, {x = posi.x+2, y = posi.y+1, z = posi.z}, 111)
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 200, parameters)
addEvent(onCastSpell3, 300, parameters)
addEvent(onCastSpell4, 400, parameters)
return TRUE
end

 

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Só adicionar

20000 é o tempo em milissegundos, ou seja, a cada 1000 = 1s



local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, -0.9, 0, -0.9, 0)

 

 

setCombatCondition(combat1, condition)
setCombatCondition(combat2, condition)
setCombatCondition(combat3, condition)
setCombatCondition(combat4, condition)

Link para o comentário
Compartilhar em outros sites

  • 0
1 hora atrás, xSONYx disse:

Só adicionar

20000 é o tempo em milissegundos, ou seja, a cada 1000 = 1s

 

  Mostrar conteúdo oculto

 

 


local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, -0.9, 0, -0.9, 0)

 

 

setCombatCondition(combat1, condition)
setCombatCondition(combat2, condition)
setCombatCondition(combat3, condition)
setCombatCondition(combat4, condition)
 

 

 

Thanks!

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...