Postado Junho 27, 2022 3 anos Solução 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 = createCombatObject() setCombatParam(combat_one, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat_one, COMBAT_PARAM_DISTANCEEFFECT, 5) --/ Spell With Missile. setCombatParam(combat_one, COMBAT_PARAM_HITCOLOR, 210) --/ 180(red), 70(blue), 156(brown), 215(white), 145(red 2), 95(lightblue) setCombatFormula(combat_one, COMBAT_FORMULA_LEVELMAGIC, -1.0, -5500, -1.0, -6500) -----------------------> local combat_two = createCombatObject() setCombatParam(combat_two, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat_two, COMBAT_PARAM_HITCOLOR, 210) setCombatFormula(combat_two, COMBAT_FORMULA_LEVELMAGIC, -1.0, -8500, -1.0, -9500) -----------------------> function Spell_one(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_two(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_three(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_four(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_five(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_six(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_seven(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end function Spell_eight(cid, target) if isCreature(cid) and isCreature(target) then local pos = getCreaturePosition(target) doSendMagicEffect({x = pos.x + 0, y = pos.y + 0, z = pos.z}, 295) end end ----------> function onCastSpell(cid, var) local exhaustion_time = 5 --/ Time of Exhaustion. local storage = 3 --/ Storage for combo for each spell. if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "You are exhausted, wait a few seconds.") doSendMagicEffect(getCreaturePosition(cid), 2) return false end local config = { hit = 1, --/ Hits time1 = 100, --/ Delay for each function. time2 = 300, time3 = 500, time4 = 700, time5 = 900, time6 = 1100, time7 = 1300, time8 = 1500, configtarget = getCreatureTarget(cid), } -- Effects -- for f = 1, config.hit do addEvent(Spell_one, config.time1 * f, cid, config.configtarget) addEvent(Spell_two, config.time2 * f, cid, config.configtarget) addEvent(Spell_three, config.time3 * f, cid, config.configtarget) addEvent(Spell_four, config.time4 * f, cid, config.configtarget) addEvent(Spell_five, config.time5 * f, cid, config.configtarget) addEvent(Spell_six, config.time6 * f, cid, config.configtarget) addEvent(Spell_seven, config.time7 * f, cid, config.configtarget) addEvent(Spell_eight, config.time8 * f, cid, config.configtarget) -- Combat -- for i = 1, 8 do addEvent(function() doCombat(cid, combat_two, var) end, 100 + ((i-1) * 200)) end end doCombat(cid, combat_one, var) exhaustion.set(cid, storage, exhaustion_time) return true end
Postado Junho 28, 2022 3 anos Autor 12 horas atrás, LeoTK disse: @DonaTello testa ai eu estou meio enferrujado mas acredito que vá resolver teu problema OBS: Não testei Mostrar conteúdo oculto -----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 Não funcionou maninho, o colega de baixo conseguiu resolver, tmj. obrigado a todos que tentaram ajudar @Fabi Marzan funcionou meu brother, obrigado. Editado Junho 28, 2022 3 anos por DonaTello (veja o histórico de edições)
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.