Postado Março 13, 2018 7 anos Autor pegou nao =/ Spoiler local acombat = createCombatObject() local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 4) function onGetFormulaValues(cid, level, maglevel) min = -(level*10.2) max = -(level*10.2) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local arr = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0} } local area = createCombatArea(arr) setCombatArea(acombat, area) function onTargetTile(cid, pos) rand = math.random(1 ,8) if rand == 1 then npos = {x = pos.x + 3, y = pos.y, z = pos.z} elseif rand == 2 then npos = {x = pos.x - 3, y = pos.y, z = pos.z} elseif rand == 3 then npos = {x = pos.x, y = pos.y + 3, z = pos.z} elseif rand == 4 then npos = {x = pos.x, y = pos.y - 3, z = pos.z} elseif rand == 5 then npos = {x = pos.x - 3, y = pos.y + 3, z = pos.z} elseif rand == 6 then npos = {x = pos.x + 3, y = pos.y + 3, z = pos.z} elseif rand == 7 then npos = {x = pos.x - 3, y = pos.y - 3, z = pos.z} elseif rand == 8 then npos = {x = pos.x + 3, y = pos.y - 3, z = pos.z} end doSendDistanceShoot(npos, pos, 3) doCombat(cid,combat,positionToVariant(pos)) end setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) if exhaustion.get(cid, 3305) then doPlayerSendCancel(cid, 'Wait '.. exhaustion.get(cid, 150) ..' seconds, before using this spell again.') return false end exhaustion.set(cid, 3305, 10) return doCombat(cid, acombat, var) end Editado Março 13, 2018 7 anos por poko360 (veja o histórico de edições)
Postado Março 13, 2018 7 anos 2 minutos atrás, poko360 disse: pegou nao =/ Me manda como ficou o script. Nós somos aquilo que fazemos repetidamente. Excelência, não é um modo de agir, mas um hábito. Aristóteles
Postado Março 13, 2018 7 anos Autor eu mandei ali em cima no edit consegui, a "aspa" tava errada, tinha uma 'aspa' so obg man, REP+ Spoiler local config = { storage = 3305, -- storage que salva o delay da magia time = 10, -- tempo que deve esperar para usar a magia em segundos } local acombat = createCombatObject() local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 4) function onGetFormulaValues(cid, level, maglevel) min = -(level*10.2) max = -(level*10.2) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local arr = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0} } local area = createCombatArea(arr) setCombatArea(acombat, area) function onTargetTile(cid, pos) rand = math.random(1 ,8) if rand == 1 then npos = {x = pos.x + 3, y = pos.y, z = pos.z} elseif rand == 2 then npos = {x = pos.x - 3, y = pos.y, z = pos.z} elseif rand == 3 then npos = {x = pos.x, y = pos.y + 3, z = pos.z} elseif rand == 4 then npos = {x = pos.x, y = pos.y - 3, z = pos.z} elseif rand == 5 then npos = {x = pos.x - 3, y = pos.y + 3, z = pos.z} elseif rand == 6 then npos = {x = pos.x + 3, y = pos.y + 3, z = pos.z} elseif rand == 7 then npos = {x = pos.x - 3, y = pos.y - 3, z = pos.z} elseif rand == 8 then npos = {x = pos.x + 3, y = pos.y - 3, z = pos.z} end doSendDistanceShoot(npos, pos, 3) doCombat(cid,combat,positionToVariant(pos)) end setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) if exhaustion.get(cid, 3305) then doSendMagicEffect(getCreaturePosition(cid),2) doCreatureSay(cid, "Wait "..getPlayerStorageValue(cid, config.storage) - os.time().." seconds, before using this spell again", TALKTYPE_ORANGE_1) doPlayerSendCancel(cid, "Wait "..getPlayerStorageValue(cid, config.storage) - os.time().." seconds, before using this spell again.") return true end exhaustion.set(cid, 3305, 10) return doCombat(cid, acombat, var) end
Postado Março 13, 2018 7 anos Autor EDIT: CONSEGUI!! deixa, obg pela ajuda Editado Março 13, 2018 7 anos por poko360 (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.