Ir para conteúdo

(Resolvido)SCRIPT COM DELAY NO MAGICEFFECT (HELP)


Ir para solução Resolvido por Jeanfersonsp,

Posts Recomendados

Postado

Testa assim

Kaguya.luaFetching info...

  Citar

                                ----------BY----------------
                                  -----FABIAN MARZAN------
                                 ---SCRIPTS FOR JUTSUS---
                                ----------------------------
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, 215)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.0, -4300, -1.0, -6500)

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


function Spelltest(cid) ---AQUI VC TROCA DO EFEITO
    if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
        local position = {x=getThingPosition(getCreatureTarget(cid)).x-1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}
        doSendMagicEffect(position, 149)
    end
end
function Spelltest2(cid)
    if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
        local position = {x=getThingPosition(getCreatureTarget(cid)).x, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}
        doSendMagicEffect(position, 149)
    end
end
function Spelltest3(cid)
    if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
        local position = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}
        doSendMagicEffect(position, 149)
    end
end

function onCastSpell(cid, var)
local waittime = 2.0 -- Tempo de exhaustion
local storage = 1 -- não mecha
if exhaustion.check(cid, storage) then
   doPlayerSendCancel(cid, "Usted esta cansado.")
doSendMagicEffect(getCreaturePosition(cid), 2)
    return false
end
local parameters = {cid = cid, var = var, combat1 = combat1 , combat2 = combat2 , combat3 = combat3}
for i = 1, 1 do
    addEvent(function()
        if isCreature(cid) then
            addEvent(Spelltest,100,cid) ---PRA USSAR EFEITO (E UM ADDEVENT, PRA CRIAR OUTRO EFEITO VC TEM Q CRIAR OUTRO COM OUTRO NOME)
            addEvent(Spelltest2,300,cid)----EJEMPLO (addEvent(Spelltest4,500,cid)
            addEvent(Spelltest3,500,cid)
        end
    end, 1 + ((i-1) * 650))
end
for i = 1, 1 do
    addEvent(function()
        if isCreature(cid) then
        addEvent(onCastSpell1, 100, parameters) ----TEMPO (100) E DELAY (1 milisegundo)
        
        end
    end, 1 + ((i-1) * 650))
end
exhaustion.set(cid, storage, waittime)
return true
end

Expand  

 

Postado (editado)
  Em 06/09/2020 em 23:27, Fabi Marzan disse:
Expand  

Consegui, muito obrigado!

  Em 06/09/2020 em 23:18, Jeanfersonsp disse:

 

troca > doSendMagicEffect({x= t_Pos.x, y = t_Pos.y+ajust[2], z = t_Pos.z}, effect)

por > doSendMagicEffect({x= t_Pos.x+ajust[1], y = t_Pos.y+ajust[2], z = t_Pos.z}, effect)

Expand  

Obrigado pela ajuda Jean!

  Em 06/09/2020 em 23:27, Fabi Marzan disse:
Expand  

Fabio, você teria um SCRIPT em que posso movimentar X,Y de uma DISTANCE EFFECT?

Quero colocar pra sair Efeitos Missle iguais ao mesmo tempo, porém em posições diferentes.

 

Exemplo:

 

EfeitosDistance.png

Editado por raphadoidera (veja o histórico de edições)
  • 2 weeks later...
Postado
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_TEAL)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.5, -15400, -1.5, -16500)


arr1 = {
	{3}
}

local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)


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

local function onCastSpell2(parameters)
    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)
end

local function onCastSpell3(parameters)
    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)
end

local function onCastSpell4(parameters)
    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)
end

function onCastSpell(cid, var)
local waittime = 3 -- Tempo de exhaustion
local storage = 3

if exhaustion.check(cid, storage) then
doPlayerSendCancel(cid, "Usted esta cansado.")
doSendMagicEffect(getCreaturePosition(cid), 2)
return false
end
local parameters = { cid = cid, var = var}
local target = getCreatureTarget(cid)  -- efeito no alvo
local pos = getCreaturePosition(target)
local poz = getCreaturePosition(cid) -- effeito no caster
addEvent(onCastSpell1, 150, parameters)
addEvent(doSendDistanceShoot, 100, {x = pos.x+4, y = pos.y, z = pos.z}, pos, 25)
addEvent(doSendMagicEffect, 50, {x = pos.x+5, y = pos.y+1, z = pos.z}, 737)
addEvent(doSendMagicEffect, 150, {x = pos.x+3, y = pos.y+2, z = pos.z}, 903)
addEvent(onCastSpell2, 600, parameters)
addEvent(doSendDistanceShoot, 550, {x = pos.x-3, y = pos.y, z = pos.z}, pos, 25)
addEvent(doSendMagicEffect, 500, {x = pos.x-4, y = pos.y+1, z = pos.z}, 737)
addEvent(doSendMagicEffect, 600, {x = pos.x+3, y = pos.y+2, z = pos.z}, 903)
addEvent(onCastSpell3, 1050, parameters)
addEvent(doSendDistanceShoot, 950, {x = pos.x+4, y = pos.y, z = pos.z}, pos, 25)
addEvent(doSendMagicEffect, 900, {x = pos.x+5, y = pos.y+1, z = pos.z}, 737)
addEvent(doSendMagicEffect, 1050, {x = pos.x+3, y = pos.y+2, z = pos.z}, 903)
addEvent(onCastSpell4, 1500, parameters)
addEvent(doSendDistanceShoot, 1450, {x = pos.x-3, y = pos.y, z = pos.z}, pos, 25)
addEvent(doSendMagicEffect, 1400, {x = pos.x-4, y = pos.y+1, z = pos.z}, 737)
addEvent(doSendMagicEffect, 1500, {x = pos.x+3, y = pos.y+2, z = pos.z}, 903)
exhaustion.set(cid, storage, waittime)
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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
  • Estatísticas dos Fóruns

    96.9k
    Tópicos
    519.6k
    Posts
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo