RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

(How-To)Weapon Information

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:

  • *.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.
 
R

Rainman

Guest
It also looks like Name is currently not working at the moment for weapons, so don't be alarmed if it doesn't work right.
 
A

AlejandroX

Guest
Chaos is full of love lately. Keep your distance everyone.
 

Pheyte

Wanderer
That's cool, good job :)


i have a question about weapon damage :
If we want that special weapon does more damage on some races (like fire weapon does double damage on waters human) where do we script it ?

in the weapond class ? or the races class ?
 
Top