Postado Setembro 25, 2019 5 anos @kido omega local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local area = createCombatArea({ {0, 0, 0}, {0, 3, 0}, {0, 0, 0} }) setCombatArea(combat, area) function onUseWeapon(cid, var) local target = getThingPosition(getCreatureTarget(cid)) local pos = {x=target.x+0, y=target.y+0, z=target.z+0} doSendMagicEffect(pos, 136) local target2 = getCreatureTarget(cid) local NumberOfHits = 1 local value = getCreatureMaxMana(target2)*0.20 -- 0.20 representa a 20% da mana total do seu target local restoremana = "false" if isMonster(target2)then return false end for x=1,NumberOfHits do if isPlayer(target) then doCreatureAddMana(target, -value) if restoremana == "true" then doCreatureAddMana(cid, value) end end end return doCombat(cid, combat, var) end
Postado Setembro 25, 2019 5 anos Autor 44 minutos atrás, Celulose disse: @kido omega local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local area = createCombatArea({ {0, 0, 0}, {0, 3, 0}, {0, 0, 0} }) setCombatArea(combat, area) function onUseWeapon(cid, var) local target = getThingPosition(getCreatureTarget(cid)) local pos = {x=target.x+0, y=target.y+0, z=target.z+0} doSendMagicEffect(pos, 136) local target2 = getCreatureTarget(cid) local NumberOfHits = 1 local value = getCreatureMaxMana(target2)*0.20 -- 0.20 representa a 20% da mana total do seu target local restoremana = "false" if isMonster(target2)then return false end for x=1,NumberOfHits do if isPlayer(target) then doCreatureAddMana(target, -value) if restoremana == "true" then doCreatureAddMana(cid, value) end end end return doCombat(cid, combat, var) end vou fazse o teste deu 1 hora atrás, Celulose disse: @kido omega local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local area = createCombatArea({ {0, 0, 0}, {0, 3, 0}, {0, 0, 0} }) setCombatArea(combat, area) function onUseWeapon(cid, var) local target = getThingPosition(getCreatureTarget(cid)) local pos = {x=target.x+0, y=target.y+0, z=target.z+0} doSendMagicEffect(pos, 136) local target2 = getCreatureTarget(cid) local NumberOfHits = 1 local value = getCreatureMaxMana(target2)*0.20 -- 0.20 representa a 20% da mana total do seu target local restoremana = "false" if isMonster(target2)then return false end for x=1,NumberOfHits do if isPlayer(target) then doCreatureAddMana(target, -value) if restoremana == "true" then doCreatureAddMana(cid, value) end end end return doCombat(cid, combat, var) end esta dando dano mais nn da em criatura(tbm nn suga mana)
Postado Setembro 26, 2019 5 anos @kido omega local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local area = createCombatArea({ {0, 0, 0}, {0, 3, 0}, {0, 0, 0} }) setCombatArea(combat, area) function onUseWeapon(cid, var) local target = getThingPosition(getCreatureTarget(cid)) local pos = {x=target.x+0, y=target.y+0, z=target.z+0} doSendMagicEffect(pos, 136) local NumberOfHits = 1 local value = getCreatureMaxMana(target2)*0.20 -- 0.20 representa a 20% da mana total do seu target local restoremana = "false" for x=1,NumberOfHits do if isPlayer(target) then doCreatureAddMana(target, -value) if restoremana == "true" then doCreatureAddMana(cid, value) end end end return doCombat(cid, combat, var) end
Postado Setembro 26, 2019 5 anos Autor 8 horas atrás, Celulose disse: @kido omega local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local area = createCombatArea({ {0, 0, 0}, {0, 3, 0}, {0, 0, 0} }) setCombatArea(combat, area) function onUseWeapon(cid, var) local target = getThingPosition(getCreatureTarget(cid)) local pos = {x=target.x+0, y=target.y+0, z=target.z+0} doSendMagicEffect(pos, 136) local NumberOfHits = 1 local value = getCreatureMaxMana(target2)*0.20 -- 0.20 representa a 20% da mana total do seu target local restoremana = "false" for x=1,NumberOfHits do if isPlayer(target) then doCreatureAddMana(target, -value) if restoremana == "true" then doCreatureAddMana(cid, value) end end end return doCombat(cid, combat, var) end @Celulose nn funcionou agora somente solta o effect nn da dano nem suga mana
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.