• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Cannot increase damage of distance weapons.

Thunder OT 8.0

New Member
Joined
Jan 24, 2014
Messages
16
Reaction score
0
I'm running an 8.0 XML-OT Server.

The distance weapon files looks like this:

In ITEMS.XML

Code:
    <item id="7368" article="an" name="assassin star">
        <attribute key="weight" value="200" />
        <attribute key="attack" value="65" />
        <attribute key="weaponType" value="distance"/>       
    </item>

In WEAPONS.XML

Code:
<distance id="7368" range="4" enabled="1" exhaustion="0" hitchance="96" script="assassinstar.lua"></distance>

In ASSASSINSTAR.LUA

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 10, 0)

local breakChance = 30 -- This is the % chance to break
function onUseWeapon(cid, var)
    if(math.random(100) <= breakChance) then
        doPlayerRemoveItem(cid,7368,1)
    end
    return doCombat(cid, combat, var)
end

I have tried to set the attack of assasin star to 100 etc, but nothing changed.
Then I tried to change:
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 10, 0)
to like setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 100, 0)

But nothing changed. Are there any other ways to edit this?

Thanks.

I noticed the damage on distance weapons is the same for them all.. no matter how high I set them to be.

Maybe I should try to script the distance weapons in another way? Please help :)
 
Last edited by a moderator:
I'll help you, moment.

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 0)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -300, 0, -600)

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

(^this will work, but you wont be able to reach higher dmg than 600. And it wont matter if you got 100 in distance fightning.)
 
Back
Top