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

Lua A little wand request

Darqneez

ShaC-Ohhhh
Joined
Dec 30, 2009
Messages
72
Reaction score
2
Location
Poland/Wroclaw
Can someone tell me how to make my wand hit minimum 550, max 800 like it is written in weapons.xml:
XML:
    <wand id="8927" level="150" mana="50" min="550" max="800" type="death" event="script" value="dark_staff.lua"> <!-- dark staff -->
        <vocation id="9"/>
        <vocation id="10"/>
	</wand>
But saving other values saved in my lua script:
LUA:
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, -60, -1.5, -70)


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

I know that I need to change this line
LUA:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -60, -1.5, -70)
but I don't know how, I am not very good at scripting and I don't know many tricks ;\
 
But it doesnt work -.- I have also posted my weapons.xml, where I wrote min and max dmg, but server doesnt read this line from weapons.xml:
XML:
 <wand id="8927" level="150" mana="50" min="550" max="800" type="death" event="script" value="dark_staff.lua"> <!-- dark staff -->
but this, from dark_staff.lua:
LUA:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -60, -1.5, -70)
My problem is that I want server to read damage written in xml file
 
You dont need a script for a wand.
I dont use any script, just put the weapons.xml and my wand works perfectly.
 
@Up: Okay, no idea how to do that sorry.
Weird that spiderOt doesnt know how to do that. I mean in his serv it is full of that kind of wands haha.
EDIT:
Oh he corrected it lol :p
 
Back
Top