Postado Abril 4, 2019 6 anos ta curando life , quero que cure mana tfs 0.3.6 local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0) function onUseWeapon(cid, var) local skill = getPlayerSkill(cid,SKILL_AXE) -- Change this to the type of weapon you are using local mat = 0.085*0.5*50*skill+(getPlayerLevel(cid)/5) -- Change 50 to the attack of the weapon local min = 25 -- this means 5% minimum healing local max = 40 -- this means 15% maximum healing local addhealth = math.random((mat * (min/100)), (mat * (max/100))) if getPlayerLevel(cid) >= 5 then doCreatureAddHealth(cid, addhealth) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) doCombat(cid, combat, var) else doPlayerSendCancel(cid, 'You need level 20 to use this weapon.') end end +rep Editado Abril 4, 2019 6 anos por Ricardo Milos Otzero (veja o histórico de edições)
Postado Abril 4, 2019 6 anos Solução local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0) function onUseWeapon(cid, var) local skill = getPlayerSkill(cid,SKILL_AXE) -- Change this to the type of weapon you are using local mat = 0.085*0.5*50*skill+(getPlayerLevel(cid)/5) -- Change 50 to the attack of the weapon local min = 25 -- this means 5% minimum healing local max = 40 -- this means 15% maximum healing local addmana = math.random((mat * (min/100)), (mat * (max/100))) if getPlayerLevel(cid) >= 5 then doCreatureAddMana(cid, addmana) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) doCombat(cid, combat, var) else doPlayerSendCancel(cid, 'You need level 20 to use this weapon.') end end ╔══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ══════════════════════════╗ Te Ajudei? Rep + e ficamos Quits Precisando de ajuda? Discord: Yan Liima #3702 Programador Júnior de LUA, PHP e JavaScript Juntos somos lendas, separados somos Mitos! ╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝
Postado Abril 4, 2019 6 anos Autor 3 minutos atrás, Yan Liima disse: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0) function onUseWeapon(cid, var) local skill = getPlayerSkill(cid,SKILL_AXE) -- Change this to the type of weapon you are using local mat = 0.085*0.5*50*skill+(getPlayerLevel(cid)/5) -- Change 50 to the attack of the weapon local min = 25 -- this means 5% minimum healing local max = 40 -- this means 15% maximum healing local addmana = math.random((mat * (min/100)), (mat * (max/100))) if getPlayerLevel(cid) >= 5 then doCreatureAddMana(cid, addmana) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) doCombat(cid, combat, var) else doPlayerSendCancel(cid, 'You need level 20 to use this weapon.') end end valeu !
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.