Resource icon

Equipment level requirements 2020-02-02

No permission to download
A setting similar to the current online game

First, we need the serbo level system & Colored Equipment Names v0.57.2


Then, edit our baseweapon, basejewel.cs, basearmor.cs

Find Code
public override void GetProperties(ObjectPropertyList list)
Add to
BaseJewel.cs:
int values = ItemNameHue.JewelItemProps.CheckJewel(this);
            int levelvalue = values/7;
           
            if (levelvalue != null)
            {
                //list.Add(1153213, levelvalue.ToString());
                list.Add("<BASEFONT COLOR=#FF00FF>Level Need:{0}<BASEFONT COLOR=#FFFFFF>", levelvalue.ToString());
            }
BaseArmor.cs:
int values = ItemNameHue.ArmorItemProps.CheckArmor(this);
            int levelvalue = values/7;
           
            if (levelvalue != null)
            {
                //list.Add(1153213, levelvalue.ToString());
                list.Add("<BASEFONT COLOR=#FF00FF>Level Need:{0}<BASEFONT COLOR=#FFFFFF>", levelvalue.ToString());
            }
BaseWeapon.cs:
int values = ItemNameHue.WeaponItemProps.CheckWeapon(this);
            int levelvalue = values/9;
           
            if (levelvalue != null)
            {
                //list.Add(1153213, levelvalue.ToString());
                list.Add("<BASEFONT COLOR=#FF00FF>Level Need:{0}<BASEFONT COLOR=#FFFFFF>", levelvalue.ToString());
            }
Find Code

C#:
public override bool CanEquip(Mobile from)
        {
             if (from.IsPlayer())
            {
Add to
BaseArmor.cs:
public override bool CanEquip(Mobile from)
        {
            if (!Ethics.Ethic.CheckEquip(from, this))
                return false;

            if (from.IsPlayer())
            {
                int values = ItemNameHue.ArmorItemProps.CheckArmor(this);
                int levelvalue = values/7;
                PlayerMobile pm = (PlayerMobile)from;
               
                if (pm.Level < levelvalue)
                {
                    pm.SendMessage("Insufficient level, unable to equip.");
                    return false;
                }
BaseJewel.cs:
public override bool CanEquip(Mobile from)
        {
            if (BlessedBy != null && BlessedBy != from)
            {
                from.SendLocalizedMessage(1075277); // That item is blessed by another player.
                return false;
            }

            if (from.IsPlayer())
            {
                int values = ItemNameHue.JewelItemProps.CheckJewel(this);
                int levelvalue = values/7;
                PlayerMobile pm = (PlayerMobile)from;
               
                if (pm.Level < levelvalue)
                {
                    pm.SendMessage("Insufficient level, unable to equip.");
                    return false;
                }
BaseWeapon.cs:
public override bool CanEquip(Mobile from)
        {
          
if (!Ethic.CheckEquip(from, this))
            {
                return false;
            }

            if (from.IsPlayer())
            {
                int values = ItemNameHue.WeaponItemProps.CheckWeapon(this);
                int levelvalue = values/9;
                PlayerMobile pm = (PlayerMobile)from;
               
                if (pm.Level < levelvalue)
                {
                    pm.SendMessage("Insufficient level, unable to equip.");
                    return false;
                }
Author
13440130
Downloads
20
Views
452
First release
Last update
Rating
0.00 star(s) 0 ratings