Ir para conteúdo

Featured Replies

Postado

weapons.xml : 

<melee id="2392" range="1" enabled="1" exhaustion="0" hitchance="100" script="lifesteal/life1.lua"></melee>

 

 

Script:

 

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_SWORD) -- 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 = 5 -- this means 5% minimum healing
local max = 15 -- this means 15% maximum healing
local addhealth = math.random((mat * (min/100)), (mat * (max/100)))
 
if getPlayerLevel(cid) >= 20 then
doCreatureAddHealth(cid, addhealth)
doSendAnimatedText(getPlayerPosition(cid),"+"..addhealth.."", TEXTCOLOR_GREEN)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) 
doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, 'You need level 20 to use this weapon.')
end
end

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo