Ir para conteúdo

Featured Replies

Postado
-----DISCORD:SoyFabi#5938
local combat = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) --180(red), 70(blue), 156(brown), 215(white), 145(red 2), 95(lightblue)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.0, -1000, -1.0, -1000)
-------------------
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
-------------------
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) --180(red), 70(blue), 156(brown), 215(white), 145(red 2), 95(lightblue)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.0, -1000, -1.0, -1000)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 22) -- Missile
-------------------
local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end
-------------------
local function Effect(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 216)
end
local function Effect_two(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 2, z = pos.z}, 217)
end
local function Effect_three(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 2, y = pos.y + 2, z = pos.z}, 218)
end
local function Effect_four(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 2, y = pos.y + 1, z = pos.z}, 219)
end
local function Effect_five(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 220)
end
local function Effect_six(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 2, y = pos.y + 1, z = pos.z}, 223)
end
local function Effect_seven(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 222)
end
local function Effect_eight(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 221)
end
function onCastSpell(cid, var)
local exhausted = 1 -- Time of exhaustion.
local storage = 17002 -- Storage for combo for each spell.
if exhaustion.check(cid, storage) then
doPlayerSendCancel(cid, "You are exhausted.")
doSendMagicEffect(getCreaturePosition(cid), 2)
    return false
end
local parameters = {cid = cid, var = var, combat1 = combat1 , combat2 = combat2}
addEvent(onCastSpell2, 100, parameters)
addEvent(onCastSpell1, 300, parameters)
addEvent(onCastSpell1, 400, parameters)
addEvent(onCastSpell1, 500, parameters)
addEvent(onCastSpell1, 600, parameters)
addEvent(onCastSpell1, 700, parameters)
addEvent(onCastSpell1, 800, parameters)
local config = {
                hit = 1, -- Veces que dara un hit.
                time = 100, -- tiempo que saldra la magia.
				time2 = 300, -- tiempo que saldra la magia.
				time3 = 400, -- tiempo que saldra la magia.
				time4 = 500, -- tiempo que saldra la magia.
				time5 = 600, -- tiempo que saldra la magia.
				time6 = 700, -- tiempo que saldra la magia.
				time7 = 800, -- tiempo que saldra la magia.
				time8 = 900, -- tiempo que saldra la magia.
                configtarget = getCreatureTarget(cid), --- No borre (es importante para que salga las magias).				
}
for a = 1, config.hit do
addEvent(Effect, config.time * a, cid, config.configtarget)
addEvent(Effect_two, config.time2 * a, cid, config.configtarget)	
addEvent(Effect_three, config.time3 * a, cid, config.configtarget)	
addEvent(Effect_four, config.time4 * a, cid, config.configtarget)	
addEvent(Effect_five, config.time5 * a, cid, config.configtarget)	
addEvent(Effect_six, config.time6 * a, cid, config.configtarget)	
addEvent(Effect_seven, config.time7 * a, cid, config.configtarget)	
addEvent(Effect_eight, config.time8 * a, cid, config.configtarget)					
end

		
exhaustion.set(cid, storage, exhausted)
return doCombat(cid, combat, var)
end
---DISCORD:SoyFabi#5938

Editei o script que o Fabi mandou ai, agora ta certinho mas precisa fazer as alterações no object builder, lembra de colocar em parametros de cada sprite x16 e y16 caso seu server seja topdown. Muda tbm o script, coloca suas configs pois testei no meu server aqui! Se for isso ai deixa Rep+ para ele lá em cima

  • Respostas 11
  • Visualizações 1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Fabi Marzan
    Fabi Marzan

    -----DISCORD:SoyFabi#5938 local combat = createCombatObject() local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, 215) --180(red), 70(blue), 156(brown), 215(white), 145

  • Fabi Marzan
    Fabi Marzan

    Desculpe, eu havia deletado algumas linhas pensando que elas funcionam da mesma maneira. Edite os scripts de uma maneira melhor.   -----DISCORD:SoyFabi#5938 local combat_one = createComb

  • *** o feitiço funcionaria da seguinte forma, o lançador lançaria uma bola de energia e, em sequência, o alvo levaria 8 acertos com 8 efeitos diferentes, cada acerto 1 efeito diferente em sequência

Posted Images

Postado
  • Autor
Em 16/06/2022 em 20:07, Nother disse:

-----DISCORD:SoyFabi#5938
local combat = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) --180(red), 70(blue), 156(brown), 215(white), 145(red 2), 95(lightblue)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.0, -1000, -1.0, -1000)
-------------------
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
-------------------
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) --180(red), 70(blue), 156(brown), 215(white), 145(red 2), 95(lightblue)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.0, -1000, -1.0, -1000)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 22) -- Missile
-------------------
local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end
-------------------
local function Effect(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 216)
end
local function Effect_two(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 2, z = pos.z}, 217)
end
local function Effect_three(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 2, y = pos.y + 2, z = pos.z}, 218)
end
local function Effect_four(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 2, y = pos.y + 1, z = pos.z}, 219)
end
local function Effect_five(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 220)
end
local function Effect_six(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 2, y = pos.y + 1, z = pos.z}, 223)
end
local function Effect_seven(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 222)
end
local function Effect_eight(cid, target)
local pos = getCreaturePosition(target)
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 221)
end
function onCastSpell(cid, var)
local exhausted = 1 -- Time of exhaustion.
local storage = 17002 -- Storage for combo for each spell.
if exhaustion.check(cid, storage) then
doPlayerSendCancel(cid, "You are exhausted.")
doSendMagicEffect(getCreaturePosition(cid), 2)
    return false
end
local parameters = {cid = cid, var = var, combat1 = combat1 , combat2 = combat2}
addEvent(onCastSpell2, 100, parameters)
addEvent(onCastSpell1, 300, parameters)
addEvent(onCastSpell1, 400, parameters)
addEvent(onCastSpell1, 500, parameters)
addEvent(onCastSpell1, 600, parameters)
addEvent(onCastSpell1, 700, parameters)
addEvent(onCastSpell1, 800, parameters)
local config = {
                hit = 1, -- Veces que dara un hit.
                time = 100, -- tiempo que saldra la magia.
				time2 = 300, -- tiempo que saldra la magia.
				time3 = 400, -- tiempo que saldra la magia.
				time4 = 500, -- tiempo que saldra la magia.
				time5 = 600, -- tiempo que saldra la magia.
				time6 = 700, -- tiempo que saldra la magia.
				time7 = 800, -- tiempo que saldra la magia.
				time8 = 900, -- tiempo que saldra la magia.
                configtarget = getCreatureTarget(cid), --- No borre (es importante para que salga las magias).				
}
for a = 1, config.hit do
addEvent(Effect, config.time * a, cid, config.configtarget)
addEvent(Effect_two, config.time2 * a, cid, config.configtarget)	
addEvent(Effect_three, config.time3 * a, cid, config.configtarget)	
addEvent(Effect_four, config.time4 * a, cid, config.configtarget)	
addEvent(Effect_five, config.time5 * a, cid, config.configtarget)	
addEvent(Effect_six, config.time6 * a, cid, config.configtarget)	
addEvent(Effect_seven, config.time7 * a, cid, config.configtarget)	
addEvent(Effect_eight, config.time8 * a, cid, config.configtarget)					
end

		
exhaustion.set(cid, storage, exhausted)
return doCombat(cid, combat, var)
end
---DISCORD:SoyFabi#5938

Editei o script que o Fabi mandou ai, agora ta certinho mas precisa fazer as alterações no object builder, lembra de colocar em parametros de cada sprite x16 e y16 caso seu server seja topdown. Muda tbm o script, coloca suas configs pois testei no meu server aqui! Se for isso ai deixa Rep+ para ele lá em cima

desculpe a demora pra responder, estava sem computador. 

image.thumb.png.e03eee432e067dd862ef8d3f98efa61a.pngestá tudo certo, porém está com esse erro.

Postado
Em 24/06/2022 em 00:22, DonaTello disse:

desculpe a demora pra responder, estava sem computador. 

image.thumb.png.e03eee432e067dd862ef8d3f98efa61a.pngestá tudo certo, porém está com esse erro.

Aqui foi normal quando eu fiz, me manda o arquivo da forma que vc editou e como está no spells.xml

Postado
  • Autor
6 horas atrás, Nother disse:

Aqui foi normal quando eu fiz, me manda o arquivo da forma que vc editou e como está no spells.xml

Você testou matando 1 bixo ? esse erro que mandei acima só aparece ao matar 1 target.  O scripts ta igual o teu. so copiei e colei pra testar.

Postado

@DonaTello testa ai eu estou meio enferrujado mas acredito que vá resolver teu problema

OBS: Não testei


 

Spoiler



-----DISCORD:SoyFabi#5938
local combat = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) --180(red), 70(blue), 156(brown), 215(white), 145(red 2), 95(lightblue)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.0, -1000, -1.0, -1000)
-------------------
local function onCastSpell1(parameters)
if not isPlayer(parameters.cid) then return true end
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
-------------------
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, COLOR_YELLOW) --180(red), 70(blue), 156(brown), 215(white), 145(red 2), 95(lightblue)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.0, -1000, -1.0, -1000)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 22) -- Missile
-------------------
local function onCastSpell2(parameters)
if not isPlayer(parameters.cid) then return true end
doCombat(parameters.cid, parameters.combat2, parameters.var)
end
-------------------
local function Effect(cid, target)
local pos = getCreaturePosition(target)
  	if not isCreature(parameters.cid) then return true end
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 216)
end
local function Effect_two(cid, target)
local pos = getCreaturePosition(target)
  	if not isCreature(parameters.cid) then return true end
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 2, z = pos.z}, 217)
end
local function Effect_three(cid, target)
local pos = getCreaturePosition(target)
  	if not isCreature(parameters.cid) then return true end
	doSendMagicEffect({x = pos.x + 2, y = pos.y + 2, z = pos.z}, 218)
end
local function Effect_four(cid, target)
local pos = getCreaturePosition(target)
  	if not isCreature(parameters.cid) then return true end
	doSendMagicEffect({x = pos.x + 2, y = pos.y + 1, z = pos.z}, 219)
end
local function Effect_five(cid, target)
local pos = getCreaturePosition(target)
  	if not isCreature(parameters.cid) then return true end
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 220)
end
local function Effect_six(cid, target)
local pos = getCreaturePosition(target)
  	if not isCreature(parameters.cid) then return true end
	doSendMagicEffect({x = pos.x + 2, y = pos.y + 1, z = pos.z}, 223)
end
local function Effect_seven(cid, target)
local pos = getCreaturePosition(target)
  	if not isCreature(parameters.cid) then return true end
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 222)
end
local function Effect_eight(cid, target)
local pos = getCreaturePosition(target)
  	if not isCreature(parameters.cid) then return true end
	doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 221)
end
function onCastSpell(cid, var)
local exhausted = 1 -- Time of exhaustion.
local storage = 17002 -- Storage for combo for each spell.
if exhaustion.check(cid, storage) then
doPlayerSendCancel(cid, "You are exhausted.")
doSendMagicEffect(getCreaturePosition(cid), 2)
    return false
end
local parameters = {cid = cid, var = var, combat1 = combat1 , combat2 = combat2}
addEvent(onCastSpell2, 100, parameters)
addEvent(onCastSpell1, 300, parameters)
addEvent(onCastSpell1, 400, parameters)
addEvent(onCastSpell1, 500, parameters)
addEvent(onCastSpell1, 600, parameters)
addEvent(onCastSpell1, 700, parameters)
addEvent(onCastSpell1, 800, parameters)
local config = {
                hit = 1, -- Veces que dara un hit.
                time = 100, -- tiempo que saldra la magia.
				time2 = 300, -- tiempo que saldra la magia.
				time3 = 400, -- tiempo que saldra la magia.
				time4 = 500, -- tiempo que saldra la magia.
				time5 = 600, -- tiempo que saldra la magia.
				time6 = 700, -- tiempo que saldra la magia.
				time7 = 800, -- tiempo que saldra la magia.
				time8 = 900, -- tiempo que saldra la magia.
                configtarget = getCreatureTarget(cid), --- No borre (es importante para que salga las magias).				
}
for a = 1, config.hit do
addEvent(Effect, config.time * a, cid, config.configtarget)
addEvent(Effect_two, config.time2 * a, cid, config.configtarget)	
addEvent(Effect_three, config.time3 * a, cid, config.configtarget)	
addEvent(Effect_four, config.time4 * a, cid, config.configtarget)	
addEvent(Effect_five, config.time5 * a, cid, config.configtarget)	
addEvent(Effect_six, config.time6 * a, cid, config.configtarget)	
addEvent(Effect_seven, config.time7 * a, cid, config.configtarget)	
addEvent(Effect_eight, config.time8 * a, cid, config.configtarget)					
end

		
exhaustion.set(cid, storage, exhausted)
return doCombat(cid, combat, var)
end
---DISCORD:SoyFabi#5938


 

 

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo