For this tutorial you will need:
-Visual C# 2010 Express
-MMOEmpire server v2, uploaded and edited by Drowlys.
-A brain

Let's begin.
0. Make sure the server is completely OFF.
1. Open up the solution in Visual C# by selecting the project file in the private server folder.
2. Navigate to db/data/additions.xml. Also open up dat20.xml.
3. Copy an object (item) from dat20.xml into additions.xml. Edit the stats, etc. This part should be pretty straight forward. You can also look at some other items and add in special abilities, etc.
4. Google "(decimal) to hex", replacing (decimal) with a number ID you think will be unique (start with about 5500 and go up). When you get the hex ID, search for it in both addtions.xml and dat20.xml. If there are no results, it is unique and you can use it. Put the hex code where it says "type=" at the top of the object.
5. Make sure you remember what the name of your item is so you can spawn it. The name is where it says "ID=" at the top of the object.
Here's an example of an object:
Code:
<Object type="0x15B5" id="Sword of Owlupus">
<Class>Equipment</Class>
<Item/>
<Texture>
<File>lofiObj5</File>
<Index>0x3b</Index>
</Texture>
<SlotType>1</SlotType>
<Tier>18</Tier>
<Description>A sword crafted from the bones of Owlupus.</Description>
<RateOfFire>2</RateOfFire>
<Sound>weapon/mithril_sword</Sound>
<Projectile>
<ObjectId>Blue Bolt</ObjectId>
<Speed>150</Speed>
<MinDamage>500</MinDamage>
<MaxDamage>750</MaxDamage>
<LifetimeMS>600</LifetimeMS>
</Projectile>
<BagType>4</BagType>
<FameBonus>20</FameBonus>
<OldSound>bladeSwing</OldSound>
</Object>
The item will have the following stats:
Code:
Type: Sword
Tier: 18
Name: Sword of Owlupus
ID: 5557
Damage: 500-750
Description: A sword crafted from the bones of Owlupus.
Rate of Fire: 200%
Fame Bonus: 20%
Lifetime of projectiles: 600 ms
Speed of projectiles: 150
Dropped in a white bag
Skysplitter sword texture
Blue bolt projectile texture
6. Save all.
7. Right click on db and rebuild.
8. Right click on wServer and rebuild.
9. Start up the server and join it. Spawn your item and have fun!
Optional: Add your item to a monster's drop tables!
1. Navigate to wServer/logic/db
2. Choose a monster to add your drop to (ex. "BehaviorDb.CubeGod" for Cube God). Lesser monsters are classified by region (ex. "BehaviorDb.Highlands" for monsters in the highlands), and miscellaneous in misc, etc.
3. Find the part where it sets the loot drops. For the Cube God it looks like this:
Code:
loot: new LootBehavior(LootDef.Empty,
Tuple.Create(100, new LootDef(0, 5, 0, 8,
Tuple.Create(0.05, (ILoot)new ItemLoot("Dirk of Cronus")), //5% de chance de loot Cronus
Tuple.Create(0.05, (ILoot)new ItemLoot("Amulet of Resurrection")), //5% de chance de loot Ammy
Tuple.Create(0.05, (ILoot)new TierLoot(11, ItemType.Weapon)),
Tuple.Create(0.05, (ILoot)new TierLoot(12, ItemType.Armor)),
Tuple.Create(0.05, (ILoot)new TierLoot(5, ItemType.Ring)),
Tuple.Create(1.0, (ILoot)new StatPotionsLoot(1, 2))
4. Copy one of the Tuple.Create lines, preferably one that has the name of the item in quotes, but it is not necessary.
5. If it says "TierLoot" before parenthesis, change it to "ItemLoot". Then add the name of your item into the parenthesis, with quotes. For example:
Code:
Tuple.Create(0.05, (ILoot)new ItemLoot("Sword of Owlupus")),
6. Edit the decimal number for the drop chance. It is a percentage. In my example, there is a 5% chance of a Cube God to drop a "Sword of Owlupus". For first test use 1.00 so it is a 100% chance your item will drop.
6 1/2. Remember to add the comma at the end of line, unless it is the last loot drop line! Notice how the stat potion loot line does not have the comma.
7. Save.
8. Rebuild wServer like before.
9. Run server and test it by killing the monster.
Have fun!