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

Making items

santrey

New Member
Joined
Feb 18, 2009
Messages
116
Reaction score
0
Hey, how do I make so one item is only for paladin, knights, sorcerers or druids? And how do I make a new staff/wand so druid and sorcerer can use?
 
Alright, im at school right now ..
But if you goto your server files
>data
>weapons
>weapoons.xml

From there, you'll see where to go.
:)
Make sure you get the item ID's right =)
 
What error did you get when it f***ed up?

And what exactly do you need? I can make you 1 so you can take it as example to make the rest. Tell me 1 armor and 1 weapon of the ones you want.

I got the error like "The movement.xml couldnt be loaded" same with weapons..xml and its hard to see because the text are alittle everywhere :/

Can you add me on MSN and show me?
[email protected]
 
I got the error like "The movement.xml couldnt be loaded" same with weapons..xml and its hard to see because the text are alittle everywhere :/

Can you add me on MSN and show me?
[email protected]

I dont use MSN, but Ill make you the examples here so you have an idea.

Lets say you want the "Plate Armor" to be only usable by Paladins and Knights of lvl 30+. And also you want the "Longsword" to be a wand and only usable by sorcerers and druids of lvl 10+.

· The plate armor:

  • Go to items.xml and find the itemID of it. It should be 2463.

  • Go to movements.xml and, first of all look for 2463 to see if it was already there, if it was then just modify the lines to your needs.

  • If it wasnt already there, then add this anywhere in that file:

    Code:
    	<movevent type="Equip" itemid="2463" slot="armor" level="30" event="function" value="onEquipItem">	
    		<vocation name="Paladin"/>
    		<vocation name="Royal Paladin" showInDescription="0"/>
    		<vocation name="Knight"/>
    		<vocation name="Elite Knight" showInDescription="0"/>
    	<movevent type="DeEquip" itemid="2463" slot="armor" event="function" value="onDeEquipItem"/>

    Thats it, remember it must be the Equip AND the DeEquip lines for it to work correctly.

· The "longsword" wand:

  • Go to items.xml and look for the "longsword", it should look like this:

    Code:
    	<item id="2397" article="a" name="longsword">
    		<attribute key="weight" value="4200"/>
    		<attribute key="defense" value="14"/>
    		<attribute key="attack" value="17"/>
    		<attribute key="weaponType" value="sword"/>
    	</item>

  • To make it a wand or rod, and lets say you want it named "longwand" to avoid confusions (lol) change it to this:

    Code:
    <item id="2397" article="a" name="longwand">
    		<attribute key="weight" value="4200"/>
    		<attribute key="weaponType" value="wand"/>
    		<attribute key="shootType" value="death"/>
    		<attribute key="range" value="4"/>
    	</item>

    (doesnt matter if you write wand or rod, it will be the same thing at the end, because this type is set at weapons.xml, not here)

    You can also set the values you wish for shootType and range.

    To know the available values for each item attribute you could use my tutorial for it (link is in my signature).

  • Now go to weapons.xml and again look for the itemID (2397) first to see if it was already there, if it was, either delete the line or modify it if you know how, otherwise just delete the lines containing that ID.

  • If it wasnt there, add this anywhere:

    Code:
    <wand id="2397" level="10" mana="5" min="30" max="45" type="death" event="function" value="default">
    		<vocation name="Sorcerer"/>
    		<vocation name="Druid"/>
    	</wand>

    (It will be a wand if you only put Sorcerer, or a rod if you only put Druid)

    Again you can change any values to your needs. "level" is the lvl required to use it, "mana" is the amount of mana it will spend at each shot, "min" is the minimum damage and "max" the maximum damage. "type" is the DAMAGE TYPE, unlike the shootType from items.xml which is just for "decoration".

That should work correctly. Now you can use the longsword as a wand called "longwand" only for sorcerers and druids of lvl 10+.

For any other item you need just repeat the same steps with the items you wish.

Cheers.

PS: I was writing while you made all those bumps + the PM you sent me. But you must know you're only allowed to "bump" your thread once per 24h, otherwise it will be spam and a moderator could delete it or warn/ban you.
 
This I added:

PHP:
	<!-- Donator items -->
	<movevent type="Equip" itemid="2358" slot="feet" event="function" value="onEquipItem"/>
	<movevent type="DeEquip" itemid="2358" slot="feet" event="function" value="onDeEquipItem"/>
        </movevent>
	<movevent type="Equip" itemid="2469" slot="legs" level="1" event="function" value="onEquipItem">	
		<vocation name="Knight"/>
		<vocation name="Elite Knight" showInDescription="0"/>
	<movevent type="DeEquip" itemid="2469" slot="legs" event="function" value="onDeEquipItem"/>
        </movevent>
	<movevent type="Equip" itemid="2496" slot="head" level="1" event="function" value="onEquipItem">	
		<vocation name="Knight"/>
		<vocation name="Elite Knight" showInDescription="0"/>
	<movevent type="DeEquip" itemid="2496" slot="head" event="function" value="onDeEquipItem"/>
        </movevent>
	<movevent type="Equip" itemid="2501" slot="head" level="1" event="function" value="onEquipItem">	
		<vocation name="Sorcerer"/>
		<vocation name="Master Sorcerer" showInDescription="0"/>
		<vocation name="Druid"/>
		<vocation name="Elder Druid" showInDescription="0"/>
	<movevent type="DeEquip" itemid="2501" slot="head" event="function" value="onDeEquipItem"/>
        </movevent>
	<movevent type="Equip" itemid="2506" slot="head" level="1" event="function" value="onEquipItem">	
		<vocation name="Paladin"/>
		<vocation name="Royal Paladin" showInDescription="0"/>
	<movevent type="DeEquip" itemid="2506" slot="head" event="function" value="onDeEquipItem"/>
        </movevent>
	<movevent type="Equip" itemid="2523" slot="shield" level="1" event="function" value="onEquipItem">	
		<vocation name="Knight"/>
		<vocation name="Elite Knight" showInDescription="0"/>
	<movevent type="DeEquip" itemid="2523" slot="shield" event="function" value="onDeEquipItem"/>
        </movevent>
	<movevent type="Equip" itemid="2648" slot="legs" level="1" event="function" value="onEquipItem">	
		<vocation name="Sorcerer"/>
		<vocation name="Master Sorcerer" showInDescription="0"/>
		<vocation name="Druid"/>
		<vocation name="Elder Druid" showInDescription="0"/>
	<movevent type="DeEquip" itemid="2648" slot="legs" event="function" value="onDeEquipItem"/>
        </movevent>
	<movevent type="Equip" itemid="2653" slot="armor" level="1" event="function" value="onEquipItem">	
		<vocation name="Knight"/>
		<vocation name="Elite Knight" showInDescription="0"/>
	<movevent type="DeEquip" itemid="2653" slot="armor" event="function" value="onDeEquipItem"/>
        </movevent>
	<movevent type="Equip" itemid="8821" slot="armor" level="1" event="function" value="onEquipItem">	
		<vocation name="Sorcerer"/>
		<vocation name="Master Sorcerer" showInDescription="0"/>
		<vocation name="Druid"/>
		<vocation name="Elder Druid" showInDescription="0"/>
	<movevent type="DeEquip" itemid="8821" slot="armor" event="function" value="onDeEquipItem"/>
        </movevent>
	<movevent type="Equip" itemid="8875" slot="armor" level="1" event="function" value="onEquipItem">	
		<vocation name="Paladin"/>
		<vocation name="Royal Paladin" showInDescription="0"/>
	<movevent type="DeEquip" itemid="8875" slot="armor" event="function" value="onDeEquipItem"/>
        </movevent>
	<movevent type="Equip" itemid="8923" slot="legs" level="1" event="function" value="onEquipItem">	
		<vocation name="Paladin"/>
		<vocation name="Royal Paladin" showInDescription="0"/>
	<movevent type="DeEquip" itemid="8923" slot="legs" event="function" value="onDeEquipItem"/>
        </movevent>
 
The problem is that you added a "</movevent>" when you should it, here you can see it
PHP:
 <!-- Donator items -->
    <movevent type="Equip" itemid="2358" slot="feet" event="function" value="onEquipItem"/>
    <movevent type="DeEquip" itemid="2358" slot="feet" event="function" value="onDeEquipItem"/>
        </movevent> <<<<< This is your Error
    <movevent type="Equip" itemid="2469" slot="legs" level="1" event="function" value="onEquipItem">    
        <vocation name="Knight"/>
        <vocation name="Elite Knight" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2469" slot="legs" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2496" slot="head" level="1" event="function" value="onEquipItem">    
        <vocation name="Knight"/>
        <vocation name="Elite Knight" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2496" slot="head" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2501" slot="head" level="1" event="function" value="onEquipItem">    
        <vocation name="Sorcerer"/>
        <vocation name="Master Sorcerer" showInDescription="0"/>
        <vocation name="Druid"/>
        <vocation name="Elder Druid" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2501" slot="head" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2506" slot="head" level="1" event="function" value="onEquipItem">    
        <vocation name="Paladin"/>
        <vocation name="Royal Paladin" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2506" slot="head" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2523" slot="shield" level="1" event="function" value="onEquipItem">    
        <vocation name="Knight"/>
        <vocation name="Elite Knight" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2523" slot="shield" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2648" slot="legs" level="1" event="function" value="onEquipItem">    
        <vocation name="Sorcerer"/>
        <vocation name="Master Sorcerer" showInDescription="0"/>
        <vocation name="Druid"/>
        <vocation name="Elder Druid" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2648" slot="legs" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2653" slot="armor" level="1" event="function" value="onEquipItem">    
        <vocation name="Knight"/>
        <vocation name="Elite Knight" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2653" slot="armor" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="8821" slot="armor" level="1" event="function" value="onEquipItem">    
        <vocation name="Sorcerer"/>
        <vocation name="Master Sorcerer" showInDescription="0"/>
        <vocation name="Druid"/>
        <vocation name="Elder Druid" showInDescription="0"/>
    <movevent type="DeEquip" itemid="8821" slot="armor" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="8875" slot="armor" level="1" event="function" value="onEquipItem">    
        <vocation name="Paladin"/>
        <vocation name="Royal Paladin" showInDescription="0"/>
    <movevent type="DeEquip" itemid="8875" slot="armor" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="8923" slot="legs" level="1" event="function" value="onEquipItem">    
        <vocation name="Paladin"/>
        <vocation name="Royal Paladin" showInDescription="0"/>
    <movevent type="DeEquip" itemid="8923" slot="legs" event="function" value="onDeEquipItem"/>
        </movevent>

Just delete it and it should be like this

PHP:
<!-- Donator items -->
    <movevent type="Equip" itemid="2358" slot="feet" event="function" value="onEquipItem"/>
    <movevent type="DeEquip" itemid="2358" slot="feet" event="function" value="onDeEquipItem"/>
    <movevent type="Equip" itemid="2469" slot="legs" level="1" event="function" value="onEquipItem">    
        <vocation name="Knight"/>
        <vocation name="Elite Knight" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2469" slot="legs" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2496" slot="head" level="1" event="function" value="onEquipItem">    
        <vocation name="Knight"/>
        <vocation name="Elite Knight" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2496" slot="head" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2501" slot="head" level="1" event="function" value="onEquipItem">    
        <vocation name="Sorcerer"/>
        <vocation name="Master Sorcerer" showInDescription="0"/>
        <vocation name="Druid"/>
        <vocation name="Elder Druid" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2501" slot="head" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2506" slot="head" level="1" event="function" value="onEquipItem">    
        <vocation name="Paladin"/>
        <vocation name="Royal Paladin" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2506" slot="head" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2523" slot="shield" level="1" event="function" value="onEquipItem">    
        <vocation name="Knight"/>
        <vocation name="Elite Knight" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2523" slot="shield" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2648" slot="legs" level="1" event="function" value="onEquipItem">    
        <vocation name="Sorcerer"/>
        <vocation name="Master Sorcerer" showInDescription="0"/>
        <vocation name="Druid"/>
        <vocation name="Elder Druid" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2648" slot="legs" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="2653" slot="armor" level="1" event="function" value="onEquipItem">    
        <vocation name="Knight"/>
        <vocation name="Elite Knight" showInDescription="0"/>
    <movevent type="DeEquip" itemid="2653" slot="armor" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="8821" slot="armor" level="1" event="function" value="onEquipItem">    
        <vocation name="Sorcerer"/>
        <vocation name="Master Sorcerer" showInDescription="0"/>
        <vocation name="Druid"/>
        <vocation name="Elder Druid" showInDescription="0"/>
    <movevent type="DeEquip" itemid="8821" slot="armor" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="8875" slot="armor" level="1" event="function" value="onEquipItem">    
        <vocation name="Paladin"/>
        <vocation name="Royal Paladin" showInDescription="0"/>
    <movevent type="DeEquip" itemid="8875" slot="armor" event="function" value="onDeEquipItem"/>
        </movevent>
    <movevent type="Equip" itemid="8923" slot="legs" level="1" event="function" value="onEquipItem">    
        <vocation name="Paladin"/>
        <vocation name="Royal Paladin" showInDescription="0"/>
    <movevent type="DeEquip" itemid="8923" slot="legs" event="function" value="onDeEquipItem"/>
        </movevent>

That should do it
 
Back
Top