Ir para conteúdo

Featured Replies

Postado

Qual servidor ou website você utiliza como base? 

8.60

 

 

 

Rapaziada, eu preciso de um SCRIPT que eu consiga colocar Delay no Magic Effect da Skill.
Exemplo: Caso eu queira usar um Efeito Igual para uma Skill só, porém que eles saiam em tempos diferentes.

 

Tentei de algumas formas, só que não funcionou.. se alguém puder ajudar com o Script, ficaria grato!

 

 

Editado por raphadoidera (veja o histórico de edições)

Resolvido por Jeanfersonsp

Ir para solução
  • Respostas 13
  • Visualizações 1.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • vc n especificou onde iria sair o segundo efeito, entao fiz de dois modos.     function targetEffect(cid, effect, ajust) -- efeito sai no target if isCreature(cid) and isCreature(getC

  • local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -130.2, 1, -140.2, 1) function target

  • Repete esta linha addEvent(targetEffect, 1000, cid, 419, {2,0})   --addEvent(targetEffect, 1000(TEMPO EM MILÉSIMOS PARA EFEITO), cid, 419(NUMERO DO EFEITO), {2,0}(AJUSTAR X E Y))

Posted Images

Postado
  • Solução

vc n especificou onde iria sair o segundo efeito, entao fiz de dois modos.

 

 

function targetEffect(cid, effect, ajust) -- efeito sai no target
if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
local t_Pos = getCreaturePosition(getCreatureTarget(cid))
doSendMagicEffect({x= t_Pos.x+ajust[1], y = t_Pos.y+ajust[2], z = t_Pos.z}, effect)
end
end

 

addEvent(targetEffect, 2000, cid, 169, {0,0})


function cidEffect(cid, effect, ajust) -- efeito sai em min
if isCreature(cid) then
local t_Pos = getCreaturePosition(cid)
doSendMagicEffect({x= t_Pos.x+ajust[1], y = t_Pos.y+ajust[2], z = t_Pos.z}, effect)
end
end

addEvent(cidEffect, 2000, cid, 169, {0,0})

Editado por Jeanfersonsp (veja o histórico de edições)

Postado
  • Autor
Agora, Jeanfersonsp disse:

vc n especificou onde iria sair o segundo efeito, entao fiz de dois modos.

 

 

function targetEffect(cid, effect, ajust) -- efeito sai no target
if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
local t_Pos = getCreaturePosition(getCreatureTarget(cid))
doSendMagicEffect({x= t_Pos.x+ajust[1], y = t_Pos.y+ajust[2], z = t_Pos.z}, effect)
end
end

 

addEvent(targetEffect, 2000, cid, 169, {0,0})


function cidEffect(cid, effect, ajust) -- efeito sai em min
if isCreature(cid) then
local t_Pos = getCreaturePosition(cid)
doSendMagicEffect({x= t_Pos.x+ajust[1], y = t_Pos.y+ajust[2], z = t_Pos.z}, effect)
end
end

addEvent(cidEffect, 2000, cid, 169, {0,0})

Jean agradeço desde já, pela atenção. Comecei a pouco tempo mexer com scripts, então teria como você completar?

OBS: Quero que o EFEITO 419 saia 2x na mesma skill, porém o primeiro um pouco a esquerda no caso (x+1) e o segundo um pouco a direita (x+2)

OBS²: Não sei se esse é o SCRIPT certo para isso, mas se não for, e você puder colocar ficaria grato!

OBS³: O efeito deve sair no TARGET
 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -130.2, 1, -140.2, 1)

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

if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
return false
end
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 419) - Efeito que quero o delay
exhaustion.set(cid, storage, waittime)
return doCombat(cid, combat, var)
end

Editado por raphadoidera (veja o histórico de edições)

Postado

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -130.2, 1, -140.2, 1)


function targetEffect(cid, effect, ajust) -- efeito sai no target
if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
local t_Pos = getCreaturePosition(getCreatureTarget(cid))
doSendMagicEffect({x= t_Pos.x+ajust[1], y = t_Pos.y+ajust[2], z = t_Pos.z}, effect)
end
end

local delay = 1000 -- tempo para o segundo efeito,  em milésimos

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

if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
return false
end
targetEffect(cid, 419, {1,0})
addEvent(targetEffect, delay, cid, 419, {2,0})
exhaustion.set(cid, storage, waittime)
return doCombat(cid, combat, var)
end

Postado
  • Autor
Agora, Jeanfersonsp disse:

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -130.2, 1, -140.2, 1)


function targetEffect(cid, effect, ajust) -- efeito sai no target
if isCreature(cid) and isCreature(getCreatureTarget(cid)) then
local t_Pos = getCreaturePosition(getCreatureTarget(cid))
doSendMagicEffect({x= t_Pos.x+ajust[1], y = t_Pos.y+ajust[2], z = t_Pos.z}, effect)
end
end

local delay = 1000 -- tempo para o segundo efeito,  em milésimos

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

if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
return false
end
targetEffect(cid, 419, {1,0})
addEvent(targetEffect, delay, cid, 419, {2,0})
exhaustion.set(cid, storage, waittime)
return doCombat(cid, combat, var)
end

Jean, e se eu fosse criar 7 Efeitos, como seria? Porque ai tem que colocar position2\DoSendMagicEffect1 não é?

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.6k

Informação Importante

Confirmação de Termo