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

Magic level

Ific

New Member
Joined
Apr 14, 2009
Messages
209
Reaction score
0
Location
My Paradise
Anyone know how I can add an item who adds X ml when an player use that item?

Also I want, an item for delete frags.

Regards:thumbup:
 
Anyone know how I can add an item who adds X ml when an player use that item?

Also I want, an item for delete frags.

Regards:thumbup:

For the 1st request:

Lets say you want blue robe to add 20 magic lvls:

  • Find "blue robe" on items.xml, it should look like this:

    PHP:
    	<item id="2656" article="a" name="blue robe">
    		<attribute key="description" value="It is a magic robe."/>
    		<attribute key="weight" value="2200"/>
    		<attribute key="armor" value="11"/>
    		<attribute key="slotType" value="body"/>
    	</item>
  • Add this line:

    PHP:
    		<attribute key="MagicLevelPoints" value="20"/>

    So it would look like this:

    PHP:
    <item id="2656" article="a" name="blue robe">
    		<attribute key="description" value="It is a magic robe."/>
    		<attribute key="weight" value="2200"/>
    		<attribute key="armor" value="11"/>
    		<attribute key="slotType" value="body"/>
                    <attribute key="MagicLevelPoints" value="20"/>
    </item>

    That means that if you wear the blue robe you will have 20 MLs added. You could also instead of making MagicLevelPoints value="20", make MagicLevelPercent value="120" and that will increase your magic lvl by 20% when wearing. So if you have ML 10 it will be 12, etc.

  • Now go to data > movements > movements.xml and add this line anywhere:

    PHP:
    	<movevent type="Equip" itemid="2656" slot="armor" level="10" event="function" value="onEquipItem"> 	
    		<vocation name="Sorcerer"/>
    		<vocation name="Master Sorcerer" showInDescription="0"/>
    		<vocation name="Druid"/>
    		<vocation name="Elder Druid" showInDescription="0"/>
    	</movevent>
    	<movevent type="DeEquip" itemid="2656" slot="armor" event="function" value="onDeEquipItem"/>

    You have to do this with all items you put attributes to, so the server recognizes them and they will work. If you dont add to movements.xml, it wont work.

  • Save and Restart the server.

Should work. No idea bout your 2nd question though :/

Cheers.
 
Should work. No idea bout your 2nd question though :/

Said that at the end of my last post.

Again no idea but Im almost sure you need to do something to add a new function like "doPlayerRemoveFrag" or something like that, at least in TFS 0.3.2 I have nothing related to frags other than "getPlayerFrags", and I dont think you can remove frags using that one.

Keep bumping the thread up every 24h maybe you'll get someone who knows how to do this.

Only once per 24h otherwise it will be spam and your thread might get deleted, or you warned/banned.

Cheers.
 
Back
Top