Resource icon

Equipment level requirements 2020-02-02

Author
13440130
Downloads
36
Views
2,095
First release
Last update
Rating
0.00 star(s) 0 ratings
No permission to download Join the discussion

More resources from 13440130

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;
                }
  • ]T05XN86(@1AZ~)1KKI9RZP.png
    ]T05XN86(@1AZ~)1KKI9RZP.png
    348.6 KB · Views: 158
  • ~5({L1J9DTH_IYX31R{_)14.png
    ~5({L1J9DTH_IYX31R{_)14.png
    228.9 KB · Views: 167
  • 7)`9]AAG4V{28BOKIDYN~94.png
    7)`9]AAG4V{28BOKIDYN~94.png
    236.4 KB · Views: 148
  • Like
Reactions: vali

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back