Resource icon

RaceWars 1.0

No permission to download
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.

Warning: I am actively going through all my XML scripts and tossing in null checks, however if you decide to remove the system, be sure to undo the suggested edits if you did them. Otherwise errors may be thrown.

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:
using Server.Engines.XmlSpawner2;
using Server.Regions;

Locate this line - Creates the at war feeling
Code:
        public static int MobileNotoriety(Mobile source, IDamageable damageable)
        {

In that section Add the below, at the bottom of the section so it looks like this.

C#:
            /* RaceWars Edit */
            RaceWarFactionsXML racewars = (RaceWarFactionsXML)XmlAttach.FindAttachment(source, typeof(RaceWarFactionsXML));
            if (racewars != null)
            {
                if (source is PlayerMobile && target is PlayerMobile)
                {
                    RaceWarFactionsXML racewars2 = (RaceWarFactionsXML)XmlAttach.FindAttachment(target, typeof(RaceWarFactionsXML));

                    if ( racewars.SubRaceXML != racewars2.SubRaceXML )
                    {      
                        if (source is PlayerMobile && source.Region.IsPartOf(typeof (TownRegion)))//maybe guarded region? a
                            return Notoriety.Innocent;
                        else
                            return Notoriety.Enemy;
                    }
                }
            /* End RaceWars Edit */
            }

            return Notoriety.Innocent;
        }



-----------Edits to PlayerMobile.cs-----------
Add if not already present in playermobile services

Code:
using Server.Engines.XmlSpawner2;

Locate this Line

Code:
        public override void GetProperties( ObjectPropertyList list )
        {

Under add this after
base.GetProperties( list );


Code:
            //Race Factions
            Mobile from = (Mobile)this;
            RaceWarsConfiguration rwc = new RaceWarsConfiguration();
            RaceWarFactionsXML racewars = (RaceWarFactionsXML)XmlAttach.FindAttachment(from, typeof(RaceWarFactionsXML));
            if ( this is PlayerMobile )
            {
                if (racewars != null && rwc.RaceBelowHead )
                {
                    if (racewars.SubRaceXML == SubRaceXML.GameMaster)
                    {
                        list.Add("<BASEFONT COLOR=#FBFF00>The One of Many<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.CaitSith)
                    {
                        list.Add("<BASEFONT COLOR=#FBFF00>Cait Sith<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.Elf)
                    {
                        list.Add("<BASEFONT COLOR=#7FD0F8>Elf<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.Gnome)
                    {
                        list.Add("<BASEFONT COLOR=#694D12>Gnome<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.Imp)
                    {
                        list.Add("<BASEFONT COLOR=#4D4C4B>Imp<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.Leprechaun)
                    {
                        list.Add("<BASEFONT COLOR=#7A9F9D>Leprechaun<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.Pooka)
                    {
                        list.Add("<BASEFONT COLOR=#A7EEB1>Pooka<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.Salamander)
                    {
                        list.Add("<BASEFONT COLOR=#FB6464>Salamander<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.Spriggan)
                    {
                        list.Add("<BASEFONT COLOR=#C6D6FF>Spriggan<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.Sylph)
                    {
                        list.Add("<BASEFONT COLOR=#60F055>Sylph<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.Undine)
                    {
                        list.Add("<BASEFONT COLOR=#307C6A>Undine<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.Human)
                    {
                        list.Add("<BASEFONT COLOR=#FCFCFC>Human<BASEFONT COLOR=#FFFFFF>");
                    }
                    else if (racewars.SubRaceXML == SubRaceXML.Gargoyle)
                    {
                        list.Add("<BASEFONT COLOR=#F214E7>Gargoyle<BASEFONT COLOR=#FFFFFF>");
                    }
                }
                else
                    return;
            }

-----------Edits to BaseVendor.cs-----------
Locate this Line

Code:
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:
        public void UpdateBuyInfo()
        {
            #region Race Wars Discount
            PlayerMobile pm = FocusMob as PlayerMobile;
            RaceWarsConfiguration rwc = new RaceWarsConfiguration();
            Town town = Town.FromRegion(Region);
            int priceScalar = GetPriceScalar();

            if (rwc.DiscountsForRace )
            {
                if (this is GargoyleRaceVendor || this is HumanRaceVendor || this is UndineRaceVendor || this is ElfRaceVendor
                || this is GnomeRaceVendor || this is ImpRaceVendor || this is LeprechaunRaceVendor || this is PookaRaceVendor
                || this is SalamanderRaceVendor || this is SprigganRaceVendor || this is SylphRaceVendor || this is CaitSithRaceVendor)
                {
                    priceScalar = (int)(priceScalar * 0.6);
                }
            }

            var buyinfo = (IBuyItemInfo[])m_ArmorBuyInfo.ToArray(typeof(IBuyItemInfo));

            if (buyinfo != null)
            {
                foreach (IBuyItemInfo info in buyinfo)
                {
                    info.PriceScalar = priceScalar;
                }
            }
            #endregion
        }
  • Like
Reactions: sahisahi
Author
Kamras
Downloads
54
Views
1,858
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from Kamras

Latest Updates

  1. Configuratin Update - Bad File

    Bad reference in config
  2. Readme

    Readme Update
  3. BeastWars - RaceWars Overhaul

    - Adjusted a lot of the code within the configuration files and the attachments. - Added...
  4. Adjusted

    - Added a Configuration system to control the races a little better. - Added some special...
Back