• 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 My Custom Wand Wont shoot (Just Melee attack) |TFS 1.3| |8.6|

chyssler

Member
Joined
May 8, 2012
Messages
41
Reaction score
6
Hello there, I have a problem about my Custom Wand, It keeps hitting like as if it was a "Fist"

I did find alot of topics about it but they are from like 2015, 2016 and yea.. different stuff.

tho I tried following their ways. and tried to make a spell for the wand, and applying it from actions to no avail..

I want the Wand to scale with my Normal Level as well, therefore " + level "

this is the TestingWand.lua:

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
function onGetFormulaValues(cid, level, maglevel)
    local min = math.floor(level / 5) + level * 2.8 + 60
    local max = math.floor(level / 5) + level * 3.8 + 70
    return -min * 2, -max * 2
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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

In Action.xml I added this:
<spells itemid="12679" script="attack/TestingWand.lua"/>

The Item is here:

<item id="12679" article="a" name="Testing Wand">
<attribute key="description" value="The energy of a radiant star is trapped inside its globe." />
<attribute key="weight" value="2500" />
<attribute key="weaponType" value="wand" />
<attribute key="shootType" value="energy" />
<attribute key="range" value="10" />
<attribute key="magiclevelpoints" value="25" />
</item>

Am I missing something? :D
Post automatically merged:

already I think i know the issue, I havent added the wand into Weapons.xml.. is that the problem here? xD
Post automatically merged:

Yep That was it. I solved it haha
 
Last edited:

Silba

is stephany, the josh wife
Premium User
Joined
Aug 22, 2013
Messages
366
Solutions
8
Reaction score
281
Not enough people solve their own posts and then tell us how they solved it.

Thank you :p😁
 
Top