• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

sword & axe Distance Effect

kimokimo

Kimo
Joined
Jan 25, 2011
Messages
821
Solutions
6
Reaction score
154
GitHub
karimadnan
i wonder if i can make a sowrd attack with distance effect like exori hur and axe same but distance effect like exori hur with axe....


++REPP :)
 

Adorius Black

Intermediate OT User
Joined
Mar 31, 2020
Messages
247
Solutions
3
Reaction score
133
up

I have knife (sword fighting) with:
<attribute key="range" value="2" />
XML:
<item id="38632" article="a" name="little knife">
        <attribute key="range" value="2" />
        <attribute key="weight" value="500" />
        <attribute key="defense" value="0" />
        <attribute key="attack" value="23" />
        <attribute key="weaponType" value="sword" />
        <attribute key="attackspeed" value="400"/>
        <attribute key="skillSword" value="0"/>
</item>

but when i want to use
<attribute key="shootType" value="throwingknife" />
i cannot see distance effect...

When i use in weapons.xml
<distance id="38632" breakchance="0" unproperly="1" level="0" />
it works but i train distance fighting

how can i train sword fighting with
<attribute key="shootType" value="throwingknife" />
distance effect
 
Last edited:

Elgenady

Veteran OT User
Joined
Aug 5, 2011
Messages
1,625
Solutions
34
Reaction score
329
distance affect its support for wand and distance weapons only to do it with melee weapons you need.
first-way source edit the second way you can use script Lua for this weapon.
 

Adorius Black

Intermediate OT User
Joined
Mar 31, 2020
Messages
247
Solutions
3
Reaction score
133
data/weapons/scripts/example.lua
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
setCombatFormula(combat, COMBAT_FORMULA_SKILL , 0, 0, 1, 0)


function onUseWeapon(cid, var)
    return doCombat(cid, combat, var)
end
data/weapons/weapons.xml
XML:
<melee id="ITEMID" unproperly="1" level="0" script="example.lua" />

data/items/items.xml
XML:
<item id="ITEMID" article="a" name="Example Sword">
        <attribute key="range" value="2" />
        <attribute key="weight" value="1200" />
        <attribute key="attack" value="54" />
        <attribute key="weaponType" value="sword" /> 
</item>
data/movements/movements.xml
XML:
    <movevent event="Equip" itemid="ITEMID" level="0" slot="hand" function="onEquipItem">
        <vocation name="Rogue" />
        <vocation name="Toxic Rogue" showInDescription="0" />
    </movevent>
    <movevent event="DeEquip" itemid="ITEMID" slot="hand" function="onDeEquipItem" />

Preview
asaas.jpg
 
Last edited:
Top