1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  1. Joshua
    Requirements:
    XmlSpawner
    Description of System
    This is a Race War system I put together. Was bored one night and wanted to have some race fun but no race scripts (that i liked) were readily available so I tossed this together. It handles 19 races with one entry for None and one entry for GameMasters.

    Upcoming Changes
    There are a lot of features that do not yet exist for this system that have already been developed, they are being re worked now from my side project.

    Important Note.. Even though it can handle 19 races, it's only currently configured to use 8 races (included in the beasttoken gump as well).

    The XML attachment for this system does attach on login. Can change this is the Configuration file to false if that is not desired.

    The below Edits are only suggested edits. They are not required for the system to compile. They are required however for certain features of the system to work.

    This is not a Core Edit, everything is drop and go friendly except for some minor distro edits for features.

    Features Include
    - Discounts for races to their own vendor
    - All out war between all races
    - Overhead Race name
    - Races are only able to buy from their own vendors.
    (doesn't include normal town and public vendors, just the specific ones that may hold special items for each race)

    - BeastToken to facilitate changing between races.
    - Configuration script to control the system
    - Specialized Skills for each race. *can eliminate the need for power scrolls*

    - Description for each race for the RaceToken Gump still needs to be updated, a control will be added for it.

    Also to note, if you want a 'faction' system that isn't distro this is also a good ground script to do that, scripting knowledge required.

    Once again the below edit IS optional...
    -----------Edits to Notoriety.cs-----------
    Add to the Top for Services Used if not already there

    Code (C#):
    1. using Server.Engines.XmlSpawner2;
    2. using Server.Regions;
    Locate this line - Creates the at war feeling
    Code (C#):
    1.         public static int MobileNotoriety(Mobile source, IDamageable damageable)
    2.         {
    In that section Add the below, towards the bottom.

    Code (C#):
    1.             /* RaceWars Edit */
    2.             RaceWarFactionsXML racewars = (RaceWarFactionsXML)XmlAttach.FindAttachment(source, typeof(RaceWarFactionsXML));
    3.             if (racewars != null)
    4.             {
    5.                 if (source is PlayerMobile && target is PlayerMobile && racewars.SubRaceXML!=racewars.SubRaceXML )
    6.                 {        
    7.                     if (source is PlayerMobile && source.Region.IsPartOf(typeof (TownRegion)))//maybe guarded region? a
    8.                         return Notoriety.Innocent;
    9.                     else
    10.                         return Notoriety.Enemy;
    11.                 }
    12.             /* End RaceWars Edit */
    -----------Edits to PlayerMobile.cs-----------
    Add if not already present in playermobile services

    Code (C#):
    1. using Server.Engines.XmlSpawner2;
    Locate this Line

    Code (C#):
    1.         public override void GetProperties( ObjectPropertyList list )
    2.         {

    Under add this after
    base.GetProperties( list );

    Code (C#):
    1.             //Race Factions
    2.             Mobile from = (Mobile)this;
    3.             RaceWarsConfiguration rwc = new RaceWarsConfiguration();
    4.             RaceWarFactionsXML racewars = (RaceWarFactionsXML)XmlAttach.FindAttachment(from, typeof(RaceWarFactionsXML));
    5.             if ( this is PlayerMobile )
    6.             {
    7.                 if (racewars != null && rwc.RaceBelowHead )
    8.                 {
    9.                     if (racewars.SubRaceXML == SubRaceXML.GameMaster)
    10.                     {
    11.                         list.Add("<BASEFONT COLOR=#FBFF00>The One of Many<BASEFONT COLOR=#FFFFFF>");
    12.                     }
    13.                     else if (racewars.SubRaceXML == SubRaceXML.CaitSith)
    14.                     {
    15.                         list.Add("<BASEFONT COLOR=#FBFF00>Cait Sith<BASEFONT COLOR=#FFFFFF>");
    16.                     }
    17.                     else if (racewars.SubRaceXML == SubRaceXML.Elf)
    18.                     {
    19.                         list.Add("<BASEFONT COLOR=#7FD0F8>Elf<BASEFONT COLOR=#FFFFFF>");
    20.                     }
    21.                     else if (racewars.SubRaceXML == SubRaceXML.Gnome)
    22.                     {
    23.                         list.Add("<BASEFONT COLOR=#694D12>Gnome<BASEFONT COLOR=#FFFFFF>");
    24.                     }
    25.                     else if (racewars.SubRaceXML == SubRaceXML.Imp)
    26.                     {
    27.                         list.Add("<BASEFONT COLOR=#4D4C4B>Imp<BASEFONT COLOR=#FFFFFF>");
    28.                     }
    29.                     else if (racewars.SubRaceXML == SubRaceXML.Leprechaun)
    30.                     {
    31.                         list.Add("<BASEFONT COLOR=#7A9F9D>Leprechaun<BASEFONT COLOR=#FFFFFF>");
    32.                     }
    33.                     else if (racewars.SubRaceXML == SubRaceXML.Pooka)
    34.                     {
    35.                         list.Add("<BASEFONT COLOR=#A7EEB1>Pooka<BASEFONT COLOR=#FFFFFF>");
    36.                     }
    37.                     else if (racewars.SubRaceXML == SubRaceXML.Salamander)
    38.                     {
    39.                         list.Add("<BASEFONT COLOR=#FB6464>Salamander<BASEFONT COLOR=#FFFFFF>");
    40.                     }
    41.                     else if (racewars.SubRaceXML == SubRaceXML.Spriggan)
    42.                     {
    43.                         list.Add("<BASEFONT COLOR=#C6D6FF>Spriggan<BASEFONT COLOR=#FFFFFF>");
    44.                     }
    45.                     else if (racewars.SubRaceXML == SubRaceXML.Sylph)
    46.                     {
    47.                         list.Add("<BASEFONT COLOR=#60F055>Sylph<BASEFONT COLOR=#FFFFFF>");
    48.                     }
    49.                     else if (racewars.SubRaceXML == SubRaceXML.Undine)
    50.                     {
    51.                         list.Add("<BASEFONT COLOR=#307C6A>Undine<BASEFONT COLOR=#FFFFFF>");
    52.                     }
    53.                     else if (racewars.SubRaceXML == SubRaceXML.Human)
    54.                     {
    55.                         list.Add("<BASEFONT COLOR=#FCFCFC>Human<BASEFONT COLOR=#FFFFFF>");
    56.                     }
    57.                     else if (racewars.SubRaceXML == SubRaceXML.Gargoyle)
    58.                     {
    59.                         list.Add("<BASEFONT COLOR=#F214E7>Gargoyle<BASEFONT COLOR=#FFFFFF>");
    60.                     }
    61.                 }
    62.                 else
    63.                     return;
    64.             }
    65.  
    -----------Edits to BaseVendor.cs-----------
    Locate this Line

    Code (C#):
    1. public void UpdateBuyInfo()
    Replace the whole section with the below
    NOTE: Depending on what version BaseVendor.cs you have
    you may need to do a Manual merge! Replacing could break something.

    Code (C#):
    1.         public void UpdateBuyInfo()
    2.         {
    3.             #region Race Wars Discount
    4.             PlayerMobile pm = FocusMob as PlayerMobile;
    5.             RaceWarsConfiguration rwc = new RaceWarsConfiguration();
    6.             Town town = Town.FromRegion(Region);
    7.             int priceScalar = GetPriceScalar();
    8.  
    9.             if (rwc.DiscountsForRace )
    10.             {
    11.                 if (this is GargoyleRaceVendor || this is HumanRaceVendor || this is UndineRaceVendor || this is ElfRaceVendor
    12.                 || this is GnomeRaceVendor || this is ImpRaceVendor || this is LeprechaunRaceVendor || this is PookaRaceVendor
    13.                 || this is SalamanderRaceVendor || this is SprigganRaceVendor || this is SylphRaceVendor || this is CaitSithRaceVendor)
    14.                 {
    15.                     priceScalar = (int)(priceScalar * 0.6);
    16.                 }
    17.             }
    18.  
    19.             var buyinfo = (IBuyItemInfo[])m_ArmorBuyInfo.ToArray(typeof(IBuyItemInfo));
    20.  
    21.             if (buyinfo != null)
    22.             {
    23.                 foreach (IBuyItemInfo info in buyinfo)
    24.                 {
    25.                     info.PriceScalar = priceScalar;
    26.                 }
    27.             }
    28.             #endregion
    29.         }
    sahisahi likes this.

Recent Reviews

  1. TheDoc
    TheDoc
    5/5,
    Version: 2019-01-08
    Really nice script and author was very helpful. Recommended!