Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
  • Autor
  • Solução

Olá consegui achar um topico em outro Forum, que respondel a minha pergunta.

Respondida pelo [Limos] em 26 de NOV 2012.

 

Segue

Criar uma tag em Weapon.xml

 

Citar

    <!-- Dreadead Clever -->    
        <melee id="7419" level="50" unproperly="1" type="physical" event="script" value="hit2.lua">
        </melee>

e logo em seguida inserir o script Weapon.lua

 

Citar

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) >= 20 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
 

 

Meus Trabalhos:

 

*Spell Rajada de Flechas: http://migre.me/eI3aE

 

 

 

 

gif1705.gif

 

  • Respostas 18
  • Visualizações 2.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Ok... Vamos lá:   data/weapons/weapons.xml   Procure por uma tag referente ao item ID 7419.. encontrou? ótimo substitua ela por esta: XX <<-- Level necessário para usa

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.7k

Informação Importante

Confirmação de Termo