Jump to content
  • 0
Emooooo

AJUDA A ARRUMA ESSE SCRIP

Question

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 10, 10, 10, 10)


function onUseWeapon(cid, var)
    return doCombat(cid, combat, var)
end

 

 

 

QUERIA QUE ELE  ENCHE-SE A MANA DO PLAYER QUANDO TIVESSE BATENDO COM A ARMA QUE USA ESSE SCRIPT

MAS ELE TA ENCHENDO A MANA DO ALVO , NÃO DELE .

E QUE DESSE HIT NO ALVO DE FÍSICO .

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Fiz no celular então tá meio bagunçado , testa desta forma :

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 10, 10, 10, 10)

function onUseWeapon(cid, var)
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...