Postado Junho 3, 2019 6 anos Em 03/06/2019 em 14:15, marcot disse: @Kevin Araujo, As cores do dano de uma skill são definidos conforme o TIPO DE DAMAGE da skill, que provavelmente está setada para COMBAT_PHYSICALDAMAGE. Alguns outros exemplos de tipos e suas cores aproximadas seriam: COMBAT_FIREDAMAGE COMBAT_ICEDAMAGE COMBAT_ENERGYDAMAGE COMBAT_HOLYDAMAGE E só relembrando que isso pode influenciar em imunidades contra atributos em monstros, como um Fire Elemental não tomar dano para Fire Damage. É possivel mudar a cor sem alterar o tipo de dano. @Kevin Araujo adiciona essa linha abaixo de onde está definido o tipo de dano. setCombatParam(combat, COMBAT_PARAM_HITCOLOR, 15) O valor 15 você altera para a cor que quiser, as cores estão definidas na lib 000-constant.lua. Editado Junho 3, 2019 6 anos por WooX (veja o histórico de edições) Nós somos aquilo que fazemos repetidamente. Excelência, não é um modo de agir, mas um hábito. Aristóteles
Postado Junho 3, 2019 6 anos Autor Mas e quando a script for assim: @WooX Mostrar conteúdo oculto local config = { efeitoTele = 14, -- efeito q ira aparacer a cada teleport. efeitoDamage = 14, -- efeito q ira aparecer ao hitar no alvo hits = 3, -- quantos hits vai dar delay = 500, -- intervalo de tempo a cada hit min = 175, -- dano minimo max = 175, -- dano maximo damage = COMBAT_ICEDAMAGE -- tipo do dano } function isWalkable(pos, creature, pz, proj) -- nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function getPosDirs(p, dir) -- mkalo return dir == 1 and {x=p.x-1, y=p.y, z=p.z} or dir == 2 and {x=p.x-1, y=p.y+1, z=p.z} or dir == 3 and {x=p.x, y=p.y+1, z=p.z} or dir == 4 and {x=p.x+1, y=p.y+1, z=p.z} or dir == 5 and {x=p.x+1, y=p.y, z=p.z} or dir == 6 and {x=p.x+1, y=p.y-1, z=p.z} or dir == 7 and {x=p.x, y=p.y-1, z=p.z} or dir == 8 and {x=p.x-1, y=p.y-1, z=p.z} end function validPos(pos) tb = {} for i = 1, 8 do newpos = getPosDirs(pos, i) if isWalkable(newpos) then table.insert(tb, newpos) end end table.insert(tb, pos) return tb end spell = { start = function (cid, target, markpos, hits) if not isCreature(cid) then return true end if not isCreature(target) or hits < 1 then doTeleportThing(cid, markpos) doSendMagicEffect(getThingPos(cid), config.efeitoTele) return true end posAv = validPos(getThingPos(target)) rand = #posAv == 1 and 1 or #posAv - 1 doSendMagicEffect(getThingPos(cid), config.efeitoTele) doTeleportThing(cid, posAv[math.random(1, rand)]) doAreaCombatHealth(cid, config.damage, getThingPos(target), 0, -config.min, -config.max, config.efeitoDamage) addEvent(spell.start, config.delay, cid, target, markpos, hits - 1) end } function onCastSpell(cid) local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} target = getCreatureTarget(cid) if target then spell.start(cid, target, getThingPos(cid), config.hits) doSendMagicEffect(position1, 138) end return true end
Postado Junho 3, 2019 6 anos Em 03/06/2019 em 18:42, Kevin Araujo disse: Mas e quando a script for assim: @WooX Mostrar conteúdo oculto Mostrar conteúdo oculto local config = { efeitoTele = 14, -- efeito q ira aparacer a cada teleport. efeitoDamage = 14, -- efeito q ira aparecer ao hitar no alvo hits = 3, -- quantos hits vai dar delay = 500, -- intervalo de tempo a cada hit min = 175, -- dano minimo max = 175, -- dano maximo damage = COMBAT_ICEDAMAGE -- tipo do dano } function isWalkable(pos, creature, pz, proj) -- nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function getPosDirs(p, dir) -- mkalo return dir == 1 and {x=p.x-1, y=p.y, z=p.z} or dir == 2 and {x=p.x-1, y=p.y+1, z=p.z} or dir == 3 and {x=p.x, y=p.y+1, z=p.z} or dir == 4 and {x=p.x+1, y=p.y+1, z=p.z} or dir == 5 and {x=p.x+1, y=p.y, z=p.z} or dir == 6 and {x=p.x+1, y=p.y-1, z=p.z} or dir == 7 and {x=p.x, y=p.y-1, z=p.z} or dir == 8 and {x=p.x-1, y=p.y-1, z=p.z} end function validPos(pos) tb = {} for i = 1, 8 do newpos = getPosDirs(pos, i) if isWalkable(newpos) then table.insert(tb, newpos) end end table.insert(tb, pos) return tb end spell = { start = function (cid, target, markpos, hits) if not isCreature(cid) then return true end if not isCreature(target) or hits < 1 then doTeleportThing(cid, markpos) doSendMagicEffect(getThingPos(cid), config.efeitoTele) return true end posAv = validPos(getThingPos(target)) rand = #posAv == 1 and 1 or #posAv - 1 doSendMagicEffect(getThingPos(cid), config.efeitoTele) doTeleportThing(cid, posAv[math.random(1, rand)]) doAreaCombatHealth(cid, config.damage, getThingPos(target), 0, -config.min, -config.max, config.efeitoDamage) addEvent(spell.start, config.delay, cid, target, markpos, hits - 1) end } function onCastSpell(cid) local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} target = getCreatureTarget(cid) if target then spell.start(cid, target, getThingPos(cid), config.hits) doSendMagicEffect(position1, 138) end return true end Nesse caso teria que refazer a spell, não acredito que tenha como alterar a cor do dano na função doAreaCombatHealth. Nós somos aquilo que fazemos repetidamente. Excelência, não é um modo de agir, mas um hábito. Aristóteles
Postado Junho 3, 2019 6 anos Autor Entendi, será que tem como alterar a da regeneração em narutibia e a de chakra rest tmb ? Pq tentei dessa forma aí e n foi...
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.