• 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!

Help!

Dixter

Amateur Web Developer
Joined
Mar 31, 2009
Messages
660
Reaction score
11
Hi I got a script for a special attack on weapons, it works fine but i still don't know how to make the special attack hit more often, i made faster atk for vocs but i dont want the regular attack to be so fast so i will slow it down, i just want to know how to make this special attack hit more often heres the script:

---------------------------------------------------------------------------------------------------------------------
Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat1, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 49)
setCombatFormula(combat1, COMBAT_FORMULA_SKILL , 0, 0, 3.0, 0)






local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_SKILL , 0, 0, 1.1, 0)



local arr = {
{0, 0, 0, 0, 0, 0, 0, 0, 0,},
{0, 0, 0, 0, 0, 0, 0, 0, 0,},
{0, 0, 0, 0, 0, 0, 0, 0, 0,},
{0, 0, 0, 1, 1, 1, 0, 0, 0,},
{0, 0, 0, 1, 3, 1, 0, 0, 0,},
{0, 0, 0, 1, 1, 1, 0, 0, 0,},
{0, 0, 0, 0, 0, 0, 0, 0, 0,},
{0, 0, 0, 0, 0, 0, 0, 0, 0,},
{0, 0, 0, 0, 0, 0, 0, 0, 0,}

}

local area = createCombatArea(arr)
setCombatArea(combat1, area)



function onUseWeapon(cid, var)
pos = getPlayerPosition(cid)
swordskill = getPlayerSkill(cid,2)
rand = math.random(1,100)
if swordskill < 35 then
if rand >= 95 then
doSendAnimatedText(pos,"SuperNova",math.random(1,2 55))
return doCombat(cid, combat1, var)
else
doCombat(cid, combat2, var)
end
elseif swordskill >= 35 and swordskill < 55 then
if rand >= 53 then
doSendAnimatedText(pos,"SuperNova",math.random(1,2 55))
else
doCombat(cid, combat2, var)
end
elseif swordskill >= 55 and swordskill < 75 then
if rand >= 50 then
doSendAnimatedText(pos,"SuperNova",math.random(1,2 55))
return doCombat(cid, combat1, var)
else
doCombat(cid, combat2, var)
end
elseif swordskill >= 15 then
if rand >= 85 then
doSendAnimatedText(pos,"SuperNova",math.random(1,2 55))
return doCombat(cid, combat1, var)
else
doCombat(cid, combat2, var)
end
elseif swordskill >= 85 then
if rand >= 100 then
doSendAnimatedText(pos,"SuperNova",math.random(1,2 55))
return doCombat(cid, combat1, var)
else
doCombat(cid, combat2, var)
end 
end
end


---------------------------------------------------------------------------------------------------------------------

Thanks in advance

EDIT: I also want the weapon to have the attack that i set in items.xml, cuz when i make the attack in this script higher the REGULAR melee hits higher. I only want the special attack to hit a little higher and more often, but i dont want the regular melee to hit higher.
 
Last edited:
its easier to red this way because you dont hav to drag across. you can cuz on this ot they got special weapons and the beginner special weapons special attack hits faster. how would i be able to do it if not with the script? and how do i make the script damage work ONLY for the special attack damage, not the regular melee.
 
Its harder to read this way, trust me. Every member on the forums will tell you the same thing so just code wrap it.

And yeah I'm sure you can, post it in lua requests section.
 

Similar threads

Back
Top