I made this script as a request, I liked the idea myself, so incase other people want it too.
Weapons.xml
Weapon.lua
Weapons.xml
XML:
<melee id="xxxx" level="20" unproperly="1" event="script" value="weapon.lua"/>
Weapon.lua
Lua:
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 chance = math.random(1,10)
if chance == 1 then
doCombat(cid, combat, var)
addEvent(doCombat, 400, cid, combat, var)
doSendAnimatedText(getPlayerPosition(cid),"Doublehit", TEXTCOLOR_RED)
else
doCombat(cid, combat, var)
end
return true
end
Last edited: