1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Level System 3 - Rerelease 2.5

Levels XML

  1. Joshua
    Requirements:
    XMLSpawner
    Description of System
    This is a re release of the level System 3 that was popular with RunUo 2.2. The original release was a bit buggy and also required edits to playermobile which caused serialization errors periodically.

    Expansion of this system is NOT destructive to mobiles since the level information is handled via XML and not Playermobile. However upgrades to the xml attachment itself and changes to the serialization will cause existing attachments to break and be deleted, so just a heads up for those with production shards....

    If you know of any scripts that do not work, not readily available for current servuo distro or maybe need to be reworked, send me a message. I'm open to new projects all the time. As long as the script doesn't have an active maintainer I'm down to working with it.

    Working Features
    - Levels up when killing Creature
    - Level up Gump
    - Stat Distribution
    - Skill Point Distribution
    - Mount Based on Level
    - Bonus Stat On Level
    - Titles on Playerdoll
    - SkillCoins
    - Raise max level scroll
    - NPC and BaseCreature Levels
    - Turned off by Default Level Over toons head
    - Level Sheet Item to avoid players needing a command.
    - Level Gate ([props it to change its settings in game)
    - Option to Disable In-Game Skill Gain / stat gain mechanics for PlayerMobile
    - Low Level Bonus - Grant a bonus to toons below a defined level.
    - EXP Coin - Players can use, also has a command attached. [expaward
    - Level Vendors - up to level 250 .
    - Discount distro edit for Level Vendors.
    - Added Armor/weapon Examples of requiring level to use.
    - Added proper toggle to turn off EXP gained from killing.

    Configuration.cs file to control the system.
    ConfiguredSkills.cs to control the Level Handler options.
    - Included a copy of my titles.cs with the edits, open with Notepad ++


    Turning AdvancedExp to false in the configuration will cause the system to ignore the EXPTables.cs entirely and go based on stats. This part of the system still needs some adjusting but it does work.

    Not Working Features
    - Share EXP for party

    Current Issues (not likely to be resolved)
    - Over head Level disappears when skill title is activated.
    -Should be okay on server not using the Skill Title over toon.

    Misc Info
    I've moved the PlayerMobile Edits to an XML attachment, and changed all the references to PlayerMobile in regards to EXP, Levels to point at the attachment instead. Some distro edits cannot be helped for some features to work, I will continue to see if i can move the rest of this strictly to XML attachments instead of using distro edits so the system can for the most part be drop and go.

    I will offer what support I can for this as its not my creation nor do take credit for it, however the original resource as most of you know is no longer available for download at runuo.com..

    Update ExpTables.cs Based on Shard. Default Tables may not be complete for all creatures, it's easy enough to add them in.

    The system IS set to attach the XML attachment on login, just delete or turn off XMLPlayerLevelAttOnLogin.cs if that is not desired.

    Download and place folder in Customs Folder
    Please find the suggested Edits Below. They are considered suggested edits due to none of the edits below are required for the system to compile, they are only required for certain features of the system to actually work.

    Use command [getatt to see the attachments on creatures and items.


    PlayerMobile.cs Distro Edits
    Under
    Code (C#):
    1.         public override void GetProperties(ObjectPropertyList list)
    2.         {
    3.             base.GetProperties(list);

    Add under base.GetProperties
    Code (C#):
    1.             #region Player Level system
    2.             Configured cf = new Configured();
    3.             XMLPlayerLevelAtt xmlplayer = (XMLPlayerLevelAtt)XmlAttach.FindAttachment(this, typeof(XMLPlayerLevelAtt));
    4.             if (cf.LevelBelowToon && xmlplayer != null)
    5.             {
    6.                 string d = LevelCore.Display(this, new Configured());
    7.                 list.Add("<BASEFONT COLOR=#7FCAE7>Level: <BASEFONT COLOR=#17FF01>" + d);
    8.             }
    9.             #endregion


    Also in PlayerMobile, it SHOULD be there however if its not please add
    Code (C#):
    1. using Server.Engines.XmlSpawner2;
    To the list of systems being used at the top.

    Basecreature.cs Distro Edits
    Under
    Code (C#):
    1.         public override string ApplyNameSuffix( string suffix )
    2.         {
    Add
    Code (C#):
    1.             //Level System
    2.             Configured c = new Configured();
    3.             int cl = LevelCore.CreatureLevel(this, new Configured());
    4.             if (c.CreatureLevels)
    5.             {
    6.                     if (cl > 0)
    7.                     {
    8.                             if (suffix.Length == 0)
    9.                                 suffix = String.Concat(suffix, "(level " + cl + ")");
    10.                             else
    11.                                 suffix = String.Concat(suffix, " (level " + cl + ")");
    12.                     }
    13.             }
    14.  
    15.             //End Level System
    Under
    Code (C#):
    1.         public override void OnDamage( int amount, Mobile from, bool willKill )
    2.         {
    Add
    Code (C#):
    1. //Level System
    2.             Configured c = new Configured();
    3.             if (willKill && c.ExpGainFromKill == true)
    4.             LevelHandler.Set(from, this);
    5.             //End Level System
    BaseMount.cs Distro Edits
    Under
    Code (C#):
    1. public override void OnDoubleClick(Mobile from)
    Locate the below Code
    Code (C#):
    1. if (from.InRange(this, 1))
    2. {
    3.  
    Add the below so it looks like this

    Code (C#):
    1.             if (from.InRange(this, 1))
    2.             {
    3.                 //Level System
    4.                 if (!(Off.Enabled))
    5.                 {
    6.                     if (NeedLevel.MountCheck(from, this) == false)
    7.                         return;
    8.                 }
    9.                 //End Level System
    CraftItem.cs Distro Edits
    Locate this line
    Code (C#):
    1.  
    2. {
    3. from.AddToBackpack
    4. }
    5.  
    Should be somewhere under
    if ( item != null )
    and below - from.AddToBackpack section , add
    Code (C#):
    1.                    //Level System
    2.                     PlayerMobile pm = from as PlayerMobile;
    3.                     Configured c = new Configured();
    4.  
    5.                     double ch = GetSuccessChance(pm, typeRes, craftSystem, false, ref allRequiredSkills);
    6.                     double ex = GetExceptionalChance(craftSystem, ch, pm);
    7.  
    8.                     LevelCore.Craft(item, quality, ch, ex, pm, new Configured());
    9.                     //End Level System
    Titles.cs Distro Edits
    If your titles.cs looks vastly different then below, then carefully merge! Can also post your titles.cs here for help.

    Add the Service to top of file
    using Server.Engines.XmlSpawner2;

    Locate this Section: Should be around Line Number 277
    Code (C#):
    1.             if (Core.SA)
    2.             {
    3.                 if (beheld is PlayerMobile && ((PlayerMobile)beheld).PaperdollSkillTitle != null)
    4.                     title.Append(", ").Append(((PlayerMobile)beheld).PaperdollSkillTitle);
    5.                 else if (beheld is BaseVendor)
    6.                     title.AppendFormat(" {0}", customTitle);
    7.             }
    and Replace that whole section with the below

    Code (C#):
    1.             if (Core.SA)
    2.             {
    3.                 #region Level System
    4.                 PlayerMobile pm = beheld as PlayerMobile;
    5.                 XMLPlayerLevelAtt xmlplayer = (XMLPlayerLevelAtt)XmlAttach.FindAttachment(pm, typeof(XMLPlayerLevelAtt));
    6.                 Configured c = new Configured();
    7.  
    8.                 if (beheld is PlayerMobile && ((PlayerMobile)beheld).PaperdollSkillTitle != null)
    9.                 {
    10.                     if (c.PaperdollLevel)
    11.                     {
    12.                         string d = LevelCore.Display(pm, new Configured());
    13.                         title.Append(" - Level " + d + ", ").Append(((PlayerMobile)beheld).PaperdollSkillTitle);
    14.                     }
    15.                     else
    16.                         title.Append(", ").Append(((PlayerMobile)beheld).PaperdollSkillTitle);
    17.                 }
    18.                 else if (beheld is PlayerMobile && ((PlayerMobile)beheld).PaperdollSkillTitle == null)
    19.                 {
    20.                     string d = LevelCore.Display(pm, new Configured());
    21.                     if (c.PaperdollLevel)
    22.                     {
    23.                         if (pm.AccessLevel > AccessLevel.Player && c.StaffHasLevel)
    24.                         {
    25.                             title.Append(" - Level " + d);
    26.                         }
    27.                         else
    28.                         {
    29.                             if (pm.AccessLevel < AccessLevel.GameMaster)
    30.                             {
    31.                                 title.Append(" - Level " + d);
    32.                             }
    33.                         }
    34.    
    35.                     }
    36.                 }
    37.  
    38.                 else if (beheld is BaseVendor)
    39.                     title.AppendFormat(" {0}", customTitle);
    40.  
    41.  
    42.                 /*
    43.                 if (beheld is PlayerMobile && ((PlayerMobile)beheld).PaperdollSkillTitle != null)
    44.                     title.Append(", ").Append(((PlayerMobile)beheld).PaperdollSkillTitle);
    45.                 else if (beheld is BaseVendor)
    46.                     title.AppendFormat(" {0}", customTitle);
    47.                 */
    48.                 #endregion
    49.             }
    SkillCheck.cs Distro Edits
    This is required for the feature of disabling skill gain mechanics.

    Locate This Section
    Code (C#):
    1.         public static void Gain(Mobile from, Skill skill)
    2.         {
    Under the bracket, add this
    Code (C#):
    1.             /* Level System XML Edit*/
    2.             Configured c = new Configured();
    3.             if (c.DisableSkillGain == true && from is PlayerMobile)
    4.             {
    5.                 return;
    6.             }
    7.             /* End */
    BaseVendor.cs Distro Edits - for level vendor discount
    Locate the below section
    Code (C#):
    1.         public void UpdateBuyInfo()
    2.         {
    3.        

    Merge in the following, replacing can work but its usually best to merge just in case your basevendor doesn't match this.

    Code (C#):
    1.         public void UpdateBuyInfo()
    2.         {
    3.             #region Level Vendor Discount Edit
    4.             Configured c = new Configured();
    5.             Town town = Town.FromRegion(Region);
    6.             int priceScalar = GetPriceScalar();
    7.    
    8.             if (c.DiscountsForLevels == true)
    9.             {
    10.                 if (this is LevelVendor10     || this is LevelVendor20     || this is LevelVendor30     || this is LevelVendor40  ||
    11.                     this is LevelVendor50     || this is LevelVendor60     || this is LevelVendor70     || this is LevelVendor80  ||
    12.                     this is LevelVendor90    || this is LevelVendor100    || this is LevelVendor120    || this is LevelVendor140 ||
    13.                     this is LevelVendor160    || this is LevelVendor180    || this is LevelVendor200    || this is LevelVendor230 ||
    14.                     this is LevelVendor250)
    15.                 {
    16.                     priceScalar = (int)(priceScalar * 0.6);
    17.                 }
    18.             }
    19.             var buyinfo = (IBuyItemInfo[])m_ArmorBuyInfo.ToArray(typeof(IBuyItemInfo));
    20.             if (buyinfo != null)
    21.             {
    22.                 foreach (IBuyItemInfo info in buyinfo)
    23.                 {
    24.                     info.PriceScalar = priceScalar;
    25.                 }
    26.             }
    27.             #endregion
    28.         }
    Espcevan and Lena80 like this.

Recent Updates

  1. Feature Update
  2. Katana Update
  3. Update to levelgate

Recent Reviews

  1. eugenesa
    eugenesa
    5/5,
    Version: 2.1
    Thank you very much
    Level up script is really fun to use
  2. eugenesa
    eugenesa
    5/5,
    Version: 2/14/2019
    I'm using it too useful for my server.
    Thank you very much
  3. eugenesa
    eugenesa
    5/5,
    Version: 2-8-2019
    It's the system I really needed.
    Thank you.