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

Default question!

Alfred

New Member
Joined
Jan 30, 2008
Messages
136
Reaction score
0
Location
Halsmtad.... Sweden
Hello i was in my freinds ot server to check his home made wepons and spells.... i didnt found the scipts...
it just said "default"
where can i find the scripts???
example: <wand id="XXX" level="13" mana="3" min="13" max="25" type="ice" event="function" value="default">
Whete do i found Default!!!!11
 
Last edited:
"default" isn't a script its a function. To make a custom wand/rod just edit the item id, the damage type, and the min max damage in your weapons.xml

Then go into your items.xml and edit the item ids line
Here's an example for a crystal wand that shoots holy damage and has a range of 7 sqm:
PHP:
<item id="2184" article="a" name="crystal wand">
		<attribute key="weight" value="2800"/>
        <attribute key="description" value="This holy wand radiates huge ammount of light."/>
        <attribute key="weaponType" value="wand"/>
		<attribute key="shootType" value="holy"/>
        <attribute key="range" value="7"/>
    </item>
Your wand/rod should look similar to this, just edit the values.
 
weapons.xml ;
<wand id="XXX" level="13" mana="15" range="3" type="death" event="script" value="scriptname.lua">

Sample script: (data/weapons/scripts/scriptname.lua)
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -60, 0, -90)

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

Don't forget to add in items.xml, too ;>
 
Back
Top