Resource icon

Treasures of Events 0.9

Instructions for implementing:

You'll need to edit a few core ServUO files to add these events. First we'll start with the file:
Scripts\Services\PointsSystems\PointsSystem.cs

#1. You need to add a new entry for each event to the PointsType enum:

PointsType:
public enum PointsType
{
    None = -1,

    QueensLoyalty,
    VoidPool,
    DespiseCrystals,
    ShameCrystals,
    CasinoData,

    //City Trading
    CityTrading,

    // City Loyalty System
    Moonglow,
    Britain,
    Jhelom,
    Yew,
    Minoc,
    Trinsic,
    SkaraBrae,
    NewMagincia,
    Vesper,

    Blackthorn,
    CleanUpBritannia,
    ViceVsVirtue,

    TreasuresOfKotlCity,
    PVPArena,

    Khaldun,
    Doom,
    SorcerersDungeon,
    RisingTide,

    GauntletPoints,
    TOT,
    VAS,
    FellowshipData,
 
    TOFeudalLands,
    TearsOfTheIceDragon,
    TreasuresOfHythloth,
    TreasuresOfWildfire,
    TreasuresOfFeyWrath,
    TreasuresOfTheUndeadLords,
    TreasuresOfTheArchlich,
    TreasuresOfTheShatteredSanctum,
}

#2. Next, find the line with "public static FellowshipData FellowshipData { get; set; } and add the additional lines below for each event:

PointsSystem static references:
public static TreasuresOfTokuno TreasuresOfTokuno { get; set; }
public static VirtueArtifactsSystem VirtueArtifacts { get; set; }
public static FellowshipData FellowshipData { get; set; }
public static FeudalLandsData TreasuresOfTheFeudalLands { get; set; }
public static TearsOfTheIceDragonData TearsOfTheIceDragon { get; set; }
public static TreasuresOfHythlothData TreasuresOfHythloth { get; set; }
public static TreasuresOfWildfireData TreasuresOfWildfire { get; set; }
public static TreasuresOfFeyWrathData TreasuresOfFeyWrath { get; set; }
public static TreasuresOfTheUndeadLordsData TreasuresOfTheUndeadLords { get; set; }
public static TreasuresOfTheArchlichData TreasuresOfTheArchlich { get; set; }
public static TreasuresOfTheShatteredSanctumData TreasuresOfTheShatteredSanctum { get; set; }

#3. Finally,, right below step #2 is a Configure() method where you'll add the following initializations of each event:
Configure() method:
public static void Configure()
{
    EventSink.WorldSave += OnSave;
    EventSink.WorldLoad += OnLoad;
    EventSink.QuestComplete += CompleteQuest;
    EventSink.OnKilledBy += OnKilledBy;

    Systems = new List<PointsSystem>();

    QueensLoyalty = new QueensLoyalty();
    VoidPool = new VoidPool();
    DespiseCrystals = new DespiseCrystals();
    ShameCrystals = new ShameCrystals();
    CasinoData = new CasinoData();
    Blackthorn = new BlackthornData();
    CleanUpBritannia = new CleanUpBritanniaData();
    ViceVsVirtue = new ViceVsVirtueSystem();
    TreasuresOfKotlCity = new KotlCityData();

    CityLoyaltySystem.ConstructSystems();
    ArenaSystem = new PVPArenaSystem();
    Khaldun = new KhaldunData();
    TreasuresOfDoom = new DoomData();
    SorcerersDungeon = new SorcerersDungeonData();
    RisingTide = new RisingTide();
    DoomGauntlet = new DoomGauntlet();
    TreasuresOfTokuno = new TreasuresOfTokuno();
    VirtueArtifacts = new VirtueArtifactsSystem();
    FellowshipData = new FellowshipData();
    TreasuresOfTheFeudalLands = new FeudalLandsData();
    TearsOfTheIceDragon = new TearsOfTheIceDragonData();
    TreasuresOfHythloth = new TreasuresOfHythlothData();
    TreasuresOfWildfire = new TreasuresOfWildfireData();
    TreasuresOfFeyWrath = new TreasuresOfFeyWrathData();
    TreasuresOfTheUndeadLords = new TreasuresOfTheUndeadLordsData();
    TreasuresOfTheArchlich = new TreasuresOfTheArchlichData();
    TreasuresOfTheShatteredSanctum = new TreasuresOfTheShatteredSanctumData();
}

Now we'll move onto another file:
Scripts\Services\LootGeneration\RunicReforging\RunicReforging.cs

#4. We need to add new entries to the ReforgedSuffix enum as follows:
ReforgedSuffix enum:
public enum ReforgedSuffix
{
    None,
    Vitality,
    Sorcery,
    Haste,
    Wizadry,
    Quality,
    Vampire,
    Restoration,
    Defense,
    Fortune,
    Alchemy,
    Slaughter,
    Aegis,
    Blackthorn,
    Minax,
    Kotl,
    Khaldun,
    Doom,
    EnchantedOrigin,
    Fellowship,
    FeudalLands,
    TearsOfTheIceDragon,
    TreasuresOfHythloth,
    TreasuresOfWildfire,
    TreasuresOfFeyWrath,
    TreasuresOfTheUndeadLords,
    TreasuresOfTheArchlich,
    TreasuresOfTheShatteredSanctum,
}

#5. Next, we'll need to update the AddSuffixName(...) method as follows:
AddSuffixName():
public static void AddSuffixName(ObjectPropertyList list, ReforgedSuffix suffix, string name)
{
    if (suffix >= ReforgedSuffix.Blackthorn && suffix <= ReforgedSuffix.Fellowship)
    {
        list.Add(GetSuffixName(suffix), name);
        return;
    }
 
    //Only need to put an entry here if there's not a cliloc in the list above!
    if(suffix == ReforgedSuffix.TreasuresOfHythloth)
    {
        list.Add(1151758, String.Format(format: "{0}\t{1}", name, "Demonic Forces"));// ~1_ITEM~ of ~2_SUFFIX~
        return;
    }

    if(suffix == ReforgedSuffix.TreasuresOfFeyWrath)
    {
        list.Add(1151758, String.Format(format: "{0}\t{1}", name, "Fey Wrath"));// ~1_ITEM~ of ~2_SUFFIX~
        return;
    }

    if(suffix == ReforgedSuffix.TreasuresOfTheUndeadLords)
    {
        list.Add(1151758, String.Format(format: "{0}\t{1}", name, "The Three"));// ~1_ITEM~ of ~2_SUFFIX~
        return;
    }

    if(suffix == ReforgedSuffix.TreasuresOfTheArchlich)
    {
        list.Add(1151758, String.Format(format: "{0}\t{1}", name, "The Archlich"));// ~1_ITEM~ of ~2_SUFFIX~
        return;
    }
 
    if(suffix == ReforgedSuffix.FeudalLands)
    {
        list.Add(1151758, String.Format(format: "{0}\t{1}", name, "The Shogun"));// ~1_ITEM~ of ~2_SUFFIX~
        return;
    }

    if (suffix == ReforgedSuffix.TreasuresOfTheShatteredSanctum)
    {
        list.Add(1151758, String.Format(format: "{0}\t{1}", name, "The Shattered Sanctum"));// ~1_ITEM~ of ~2_SUFFIX~
        return;
    }

    //All others
    list.Add(1151758, String.Format(format: "{0}\t#{1}", name, GetSuffixName(suffix)));// ~1_ITEM~ of ~2_SUFFIX~
}

#6. Finally, in the GenerateRandomItem(...) function, we need to color our drops properly by adding the following:
GenerateRandomItem hue additions:
switch (suffix)
{
    case ReforgedSuffix.Minax: item.Hue = 1157; break;
    case ReforgedSuffix.Khaldun: item.Hue = 2745; break;
    case ReforgedSuffix.Kotl: item.Hue = 2591; break;
    case ReforgedSuffix.EnchantedOrigin: item.Hue = 1171; break;
    case ReforgedSuffix.Doom: item.Hue = 2301; break;
    case ReforgedSuffix.Fellowship: item.Hue = 2751; break;
    case ReforgedSuffix.FeudalLands: item.Hue = 2764; break;
    case ReforgedSuffix.TearsOfTheIceDragon: item.Hue = 1154; break;
    case ReforgedSuffix.TreasuresOfHythloth: item.Hue = 2753; break;
    case ReforgedSuffix.TreasuresOfWildfire: item.Hue = 2758; break;
    case ReforgedSuffix.TreasuresOfFeyWrath: item.Hue = 2755; break;
    case ReforgedSuffix.TreasuresOfTheUndeadLords: item.Hue = 2744; break;
    case ReforgedSuffix.TreasuresOfTheArchlich: item.Hue = 2702; break;
    case ReforgedSuffix.TreasuresOfTheShatteredSanctum: item.Hue = 2768; break;
}

The last core file we need to update is:
Scripts\Services\Seasonal Events\SeasonalEventSystem.cs

#7. First, we need to import our event namespaces at the top of the file as follows:
Namespace imports:
using Server;
using Server.Mobiles;
using Server.Gumps;
using Server.Misc;
using Server.Commands;
using Server.Engines.TreasuresOfDoom;
using Server.Engines.Khaldun;
using Server.Engines.SorcerersDungeon;
using Server.Engines.RisingTide;
using Server.Engines.Fellowship;
using Server.Engines.TreasuresOfTheFeudalLands;
using Server.Engines.TearsOfTheIceDragon;
using Server.Engines.TreasuresOfHythloth;
using Server.Engines.TreasuresOfWildfire;
using Server.Engines.TreasuresOfFeyWrath;
using Server.Engines.TreasuresOfTheUndeadLords;
using Server.Engines.TreasuresOfTheArchlich;
using Server.Engines.TreasuresOfTheShatteredSanctum;

#8. Finally, we need to add entries in the EventType enum as follows:
EventType enum:
public enum EventType
{
    TreasuresOfTokuno,
    VirtueArtifacts,
    TreasuresOfKotlCity,
    SorcerersDungeon,
    TreasuresOfDoom,
    TreasuresOfKhaldun,
    KrampusEncounter,
    RisingTide,
    Fellowship,
    TreasuresOfTheFeudalLands,
    TearsOfTheIceDragon,
    TreasuresOfHythloth,
    TreasuresOfWildfire,
    TreasuresOfFeyWrath,
    TreasuresOfTheUndeadLords,
    TreasuresOfTheArchlich,
    TreasuresOfTheShatteredSanctum,
}

#9. There's an additional file that I added:
Scripts\Items\Books\BookOfLore.cs

This is a new item that handles the pages of lore and the gumps to display them. Shazzy created the original BookOfLore file and I modified it to make it easier to add more to it. You can remove the "SherryTheMouse" entry in the Story enum at the top, you can also remove the 3 StoryDefinition(...) entries in the StoryDefinition[] Table, and the Story.SherryTheMouse entries from GetStoryName and GetAuthorName methods, as those were for a custom event on InsaneUO. Everything else should be a near pixel-perfect match to OSI pages of lore!

#10. I noticed that I left 2 custom logging lines in the TreasuresOf[event name]Data.cs files, usually around line 68. It begins with the line: if (CustomLogger.IsBeingMonitored(damager)) and then continues with CustomLogger.LogSpecial(...) on the next line. Those two lines can be removed entirely as they were just there to monitor drop rates/rolls and such initially.

I've probably missed something, so let me know what breaks and I'll add it to this list!

Other notes:
- You probably noticed that Treasures of the Shattered Sanctum is in many of those lists. It's in-progress and will be released here soon!
- Many of these events had overlapping items that were available in multiple events. If I already had that item from another event, I obviously did not need to duplicate it for the subsequent events so it can be found in whichever one I happened to code first. In a future version, I may move all the Items to a separate folder structure to consolidate them and make them easier to find. Also, certain items may have been part of core ServUO too.
- I believe I may have left in some custom additions, such as Pet Dyes and Hair Dyes that matched the particular hue for that event. They should be in the Items folders for each event, but you may need a base file for the PetDyes? I can't remember off the top of my head!

Active Shards

Donations

Total amount
$0.00
Goal
$500.00
Back