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

how to make a rod?

CheatsBCN

New Member
Joined
Mar 6, 2012
Messages
131
Reaction score
1
Hello i want to change the arcane staf for a kind of wand throwing sudden deaths, then i just tought copy paste the underwolrd rod but then i was looking to the damage that it should do but i dont see where i can make it more or less dmg


PHP:
	<item id="2453" article="an" name="arcane staff">
		<attribute key="description" value="It is filled with the dark hatred and rage of a tormented demonic being." />
		<attribute key="weight" value="2850" />
		<attribute key="weaponType" value="wand" />
		<attribute key="shootType" value="death" />
		<attribute key="range" value="3" />
	</item>
 
Which server do you use and how did the script I posted didn't work (errors, what happens, etc)? Because it's a basic wand script that should work on almost every server. Also you want it not level/magiclevel based but just only min/max?

urs didnt worked and didntgave me anyerror, its like the server dont get that u want him to use scripts, naano's worked on the sd throw but not on the dmg cus i want it to deal 100 to 150

tfs0.2.14
 
@CheatsBCN

It's finally working !

Lua:
-- Custom Wand/Rod by Nano --

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)

function onGetFormulaValues(cid)
	return -100, -150
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
 
function onUseWeapon(cid, var)
	return doCombat(cid, combat, var)
end

Rep if I helped ^_^
 
Last edited:
@CheatsBCN

It's finally working !

Lua:
-- Custom Wand/Rod by Nano --

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)

function onGetFormulaValues(cid)
	return -100, -150
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
 
function onUseWeapon(cid, var)
	return doCombat(cid, combat, var)
end

Rep if I helped ^_^

loooove u :D rep++


btw http://otland.net/f16/setcombatformula-how-do-parameters-work-169578/
 
Hm, my wand kinda works but when It only works when I stand next to the target and the Attack speed isn't the same as I set for other weapons. How do I change these things?

~Edit~

Okay now it doesn't shoot at all perfect lol

items.xml:

Code:
 <item id="7424" article="a" name="Death Staff">   
        <attribute key="weight" value="2300" />
        <attribute key="weaponType" value="wand" />
        <attribute key="shootType" value="death" />
        <attribute key="range" value="5" />
    </item>

weapons.xml:

Code:
<wand id="7424" mana="10" min="400" max="600" type="death" event="script" value="Wand of death.lua">
<vocation id="1"/>
<vocation id="5"/>
<vocation id="2"/>
<vocation id="6"/>
</wand>

And used this script:

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -20, -1.5, -40)

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

Any ideas what I did wrong?
 
Last edited by a moderator:
Worked thanks :)

In items.xml.
Code:
<attribute key="range" value="3" />
<attribute key="attackSpeed" value="1000" />
Hey, I kinda customized a Rod (Jester wand actually) everything is good but the only thing is, it doesn't deal dmg.

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -20, -1.5, -40)

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

Code:
<wand id="7958" mana="10" min="200" max="400" type="ice" event="script" value="Rod of frigo.lua">
<vocation id="2"/>
<vocation id="6"/>
</wand>

Code:
<item id="7958" article="a" name="Jester Rod">
        <attribute key="weight" value="725" />
        <attribute key="weaponType" value="wand" />
        <attribute key="shootType" value="ice" />
        <attribute key="range" value="5" />
        <attribute key="attackSpeed" value="800" />
    </item>

Why doesn't it deal dmg?

Thanks :p
 
Last edited by a moderator:
Back
Top