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

Custom wand does fist

dixers

Owner of an OT
Joined
May 22, 2010
Messages
22
Reaction score
1
My new cool custom wand refuses to shoot, instead it does fist damage and I have no idea what is wrong since im not that good at .lua

Wand:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_[COLOR="Blue"]HOLYDAMAGE[/COLOR])
setCombatParam(combat, COMBAT_PARAM_EFFECT, [COLOR="YellowGreen"][B]1024[/B][/COLOR])
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, [COLOR="Red"][COLOR="Red"]-1.5, -60, -1.5, -70[/COLOR][/COLOR])

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

Weapon:
Code:
        <wand id="7429" level="10" mana="15" min="250" max="500" type="holy" event="script" value="custom_wand.lua"> <!-- Custom wand -->
    <vocation id="1"/>
    <vocation id="2"/>
    <vocation id="5" showInDescription="0"/>
    <vocation id="6" showInDescription="0"/>
Items:
Code:
    <item id="7429" article="a" name="custom wand">
        <attribute key="weight" value="2900" />
        <attribute key="weaponType" value="wand" />
        <attribute key="shootType" value="holy" />
        <attribute key="range" value="8" />
    </item>
 
My new cool custom wand refuses to shoot, instead it does fist damage and I have no idea what is wrong since im not that good at .lua

Wand:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_[COLOR="Blue"]HOLYDAMAGE[/COLOR])
setCombatParam(combat, COMBAT_PARAM_EFFECT, [COLOR="YellowGreen"][B]1024[/B][/COLOR])
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, [COLOR="Red"][COLOR="Red"]-1.5, -60, -1.5, -70[/COLOR][/COLOR])

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

Weapon:
Code:
        <wand id="7429" level="10" mana="15" min="250" max="500" type="holy" event="script" value="custom_wand.lua"> <!-- Custom wand -->
    <vocation id="1"/>
    <vocation id="2"/>
    <vocation id="5" showInDescription="0"/>
    <vocation id="6" showInDescription="0"/>
Items:
Code:
    <item id="7429" article="a" name="custom wand">
        <attribute key="weight" value="2900" />
        <attribute key="weaponType" value="wand" />
        <attribute key="shootType" value="holy" />
        <attribute key="range" value="8" />
    </item>
I hope that when you copied the script you knew the colors wasnt ment to be there, right? This is how it should look.

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, HOLY)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -60, -1.5, -70)

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