R
Rainman
Guest
(How-To)Weapon Information
If your new to RunUO or C# you might be intrested in some values for Weapons. Try this:
[code:1]
using System;
using Server.Network;
using Server.Items;
namespace Server.Scripts.Weapons
{
public class LuckyGloves : BaseWeapon
{
[Constructable]
public LuckyGloves() : base( 10, 23, 27, 0x145, 0x147, 1, SkillName.Wrestling, WeaponType.Bashing, WeaponAnimation.Wrestle, 0x13c6, Layer.TwoHanded )
{
Name = "lucky gloves";
Weight = 1.0;
Hue = 0x258;
}
public LuckyGloves( Serial serial ) : base( serial )
{
}
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();
}
}
}
[/code:1]
The variables you will need to know the most are:
[code:1]
base( 10, 23, 27, 0x145, 0x147, 1, SkillName.Wrestling, WeaponType.Bashing, WeaponAnimation.Wrestle, 0x13c6, Layer.TwoHanded )
[/code:1]
The 10 is minimum damage.
The 23 is maximum damage.
The 27 is weapon speed.
The 0x145 is hit sound.
The 0x147 is miss sound.
The 1 is weapon range.
SkillName.* is the Skill used for gain\calc.
WeaponType.* is the type of damage done. The types are:
If your new to RunUO or C# you might be intrested in some values for Weapons. Try this:
[code:1]
using System;
using Server.Network;
using Server.Items;
namespace Server.Scripts.Weapons
{
public class LuckyGloves : BaseWeapon
{
[Constructable]
public LuckyGloves() : base( 10, 23, 27, 0x145, 0x147, 1, SkillName.Wrestling, WeaponType.Bashing, WeaponAnimation.Wrestle, 0x13c6, Layer.TwoHanded )
{
Name = "lucky gloves";
Weight = 1.0;
Hue = 0x258;
}
public LuckyGloves( Serial serial ) : base( serial )
{
}
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();
}
}
}
[/code:1]
The variables you will need to know the most are:
[code:1]
base( 10, 23, 27, 0x145, 0x147, 1, SkillName.Wrestling, WeaponType.Bashing, WeaponAnimation.Wrestle, 0x13c6, Layer.TwoHanded )
[/code:1]
The 10 is minimum damage.
The 23 is maximum damage.
The 27 is weapon speed.
The 0x145 is hit sound.
The 0x147 is miss sound.
The 1 is weapon range.
SkillName.* is the Skill used for gain\calc.
WeaponType.* is the type of damage done. The types are:
*.Axe
*.Slashing
*.Staff
*.Bashing
*.Piercing
*.Polearm
*.Ranged
*.Fists
[/list:u]
WeaponAnimation.* is the type of swing animation shown. The types are:
*.Slash1H
*.Pierce1H
*.Bash1H
*.Bash2H
*.Slash2H
*.Pierce2H
*.ShootBow
*.ShootXBow
*.Wrestle
[/list:u]
The 0x13c6 is the actual weapon.
Layer.* is the layer the item is placed on. The types are:
*.Invalid
*.OneHanded
*.TwoHanded
*.Shoes
*.Pants
*.Shirt
*.Helm
*.Gloves
*.Ring
*.Neck
*.Waist
*.InnerTorso
*.Bracelet,
*.MiddleTorso,
*.Earrings
*.Arms
*.Cloak
*.OuterTorso
*.OuterLegs
*.InnerLegs
[/list:u]
Everything else should be simple enough to figure out.