ZeroLife
Initiate
Hi, I have been trying to make craftable level items for my shard using the level items feature built into XMLspawner2. I have been able to do it by creating a custom duplicate of each item and then adding those to my crafting gump. For example, this is my LevelAxe.cs. Its the same as the base Axe.cs with the addition of the XmlAttach line:
My question is, is there an easier way to do this? I am a noob to c# but I am trying my best to use these scripts to customize my shard.
Code:
using System;
using System.Collections.Generic;
using Server.Engines.Craft;
using Server.Engines.XmlSpawner2;
namespace Server.Items
{
[FlipableAttribute(0xF49, 0xF4a)]
public class LevelAxe : BaseAxe
{
[Constructable]
public LevelAxe()
: base(0xF49)
{
this.Weight = 4.0;
XmlAttach.AttachTo(this, new XmlLevelItem());
Name = "Level Axe";
}
public LevelAxe(Serial serial)
: base(serial)
{
}
public override WeaponAbility PrimaryAbility
{
get
{
return WeaponAbility.CrushingBlow;
}
}
public override WeaponAbility SecondaryAbility
{
get
{
return WeaponAbility.Dismount;
}
}
public override int AosStrengthReq
{
get
{
return 35;
}
}
public override int AosMinDamage
{
get
{
return 14;
}
}
public override int AosMaxDamage
{
get
{
return 17;
}
}
public override int AosSpeed
{
get
{
return 37;
}
}
public override float MlSpeed
{
get
{
return 3.00f;
}
}
public override int OldStrengthReq
{
get
{
return 35;
}
}
public override int OldMinDamage
{
get
{
return 6;
}
}
public override int OldMaxDamage
{
get
{
return 33;
}
}
public override int OldSpeed
{
get
{
return 37;
}
}
public override int InitMinHits
{
get
{
return 31;
}
}
public override int InitMaxHits
{
get
{
return 110;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
My question is, is there an easier way to do this? I am a noob to c# but I am trying my best to use these scripts to customize my shard.