• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Twice attack Item.

medium

New Member
Joined
Nov 2, 2011
Messages
54
Reaction score
0
Hi.

I want crate a Sword which attack double.
But i dont know how i can start.

Please help me.
 
Do you mean like a chance to get a double hit?
Code:
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
 
Back
Top