Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cfg = {
- [2381] = {name = "Halberd", delay = 1000, xdmg = 25, element = CONDITION_FIRE},
- [2380] = {name = "Small Axe", delay = 1000, xdmg = 25, element = CONDITION_ENERGY},
- } -- delay = 1000 (1s) // xdmg = Dano Extra
- local combat = createCombatObject()
- setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
- setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
- setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 1)
- setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)
- function onUseWeapon(cid, var)
- weaponID = getPlayerWeapon(cid, true).itemid
- get = cfg[weaponID]
- if get then
- local condition = createConditionObject(get.element)
- setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
- addDamageCondition(condition, 1, get.delay, -get.xdmg)
- setCombatCondition(combat, condition)
- end
- return doCombat(cid, combat, var)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement