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

Group Dungeon System 2.0 Beta

Instance/Raid Style Dungeon System

  1. Dpayne2841
    Hello ServUO Community,

    As everyone knows the access to RunUO scripts has become more difficult due to only being able to get them if you were a previous member. Which now you can't create a new account anymore. I've decided as I've noticed so have others to take on the task of picking up scripts/modification from RunUO and making them compatible with ServUO. For my first project is Group Dungeon System 1.5 a great system created by The Jedi. I want everyone to know that this system was not created by myself just edited by me to work with ServUO. I don't know if The Jedi is on ServUO if so, feel free to but in. Otherwise I will gladly take over keeping this script up to date and adding new features if I can. Here is a link to the original script posting

    Alright shall we...

    Group Dungeon System 2.0 Beta


    This system is designed to offer what some call "raid" style, or "instance" dungeons. The basic premise is that by adding a dungeon control stone, you can define the size of, max players allowed in, a location for players corpses to be moved to after death, global spawner respawn delays, and many more things for a dungeon. It will also begin clean and anew every time a new group enters. And, players have to be grouped to help each other in the dungeon. This allows you to actually design a dungeon that must be completed like a task by a group of friends in a linear fashion - rewarding them greatly for their overwhelming efforts - and have it not be exploitable or campable. Many people find themselves being able to make them more and more difficult than ever before.

    Here's how it works.
    1. Deco and spawn a dungeon (be mindful that the region is simply a square with the stone in the center. Make it so that the region is not accessable unless a teleporter is added somewhere.)
    2. Add the Dungeon Control Stone ([add GroupDungeonStone - [add groupd) in the very center of the dungeon. (it will be hidden)
    3. [Props the stone and change the name, size, max players, minimum skills (0 for disabled), maximum skills (66000 for disabled), and entrance locations. Make sure the entrance is NOT inside the dungeon itself. This is where players will be ejected.
    4. Double click the stone to update the region. The dungeon is now nearly complete. Notice any spawners in the region have had their respawn times reset to the value defined in the files. (the dungeon IS finished, but there is no way to get there!)
    5. Find a nice spot for a "portal" to your new dungeon. Make sure it is not actually IN the dungeon. Now [add GroupDungeonTeleporter - [add groupd (I like to add maybe "sparklies" above the port as well.) and set its teleport locations as usual to where you like in the dungeon.
    6. Do now the same thing you just did, but inside the dungeon, and use the GroupDungeonExit teleporter instead. Make sure it is pointing somewhere outside the dungeon. (Note: the exit is not required. Players can recall out or be teleported out automatically.)
    7. Important: [props the entrance teleporter and set the "Stone" to the dungeon control stone for your new dungeon.
    8. Optional: Add a DungeonDoor and make a key spawn somewhere that will unlock it! (set the keyvalue porties on both the door and the key to the same number) [add dungeondoor <southcw, southccw, northcw, northccw, eastcw, eastccw, westcw, westccw> With XMLSpawner, just put /ADD/<key/name/Dungeon Key/keyvalue/####> at the end of the beast name, and where #### is a unique number that matches its door.
    9. When in doubt, you can always double click the stone again to re-update the dungeon. (this will also respawn any and all mobs, so be careful!)

    And that should do it! Now a group of friends can group up and enter your new dungeon! It won't allow in any more players than you have defined, and when a group all dies, it will move their corpses (blessed by the way) to the "EntrancePoint" location defined on the stone. It also ejects groups that finished the dungeon. Note: I suggest not offering a way to resurrect inside the dungeon. This allows for the ejecting of a group that has wiped.

    Much of the power of this system comes in imagination and design. With systems such as XMLSpawner, you can literally design in depth dungeons laced with quests, bosses that have several "phases", all of which designed to be completed by a limited number of players!, and much more! (I like to use mobs with movement speeds that nearly match player speeds, making it so that they can not skip a "pull" I have placed for them. This lends back to the linear design I spoke of.)

    # Dungeon is only accessible via a dungeon portal.
    # For more than one person to enter a dungeon, they must be in a group.
    # The dungeon will reset every time a player enters an empty dungeon. This includes wiping any corpses or trash.
    # The dungeon limits the amount of players, and the minimum and/or maximum skills allowed to enter. It also can restrict pet entry.
    # Everything that dies in the dungeon stays dead, unless it is a specifically planned spawn.
    # A dead player can not exit the instance. He must either wait to be resurrected, or wait for the other players to die.
    # If all players in the instance die, they are teleported outside of the instance shortly after. Their corpses are also blessed and teleported as well as any pets they may have alive.
    # If all creatures in the instance die, the players are given 10 minutes to exit the dungeon by any means, or they will be teleported out.
    # This system protects against players logging out and back in in the dungeon.
    # Some doors in the dungeons are locked and require \"single use\" keys that are found somewhere inside and will remain unlocked until the dungeon resets.

    Customizable Features
    Open GroupDungeonRegion.cs and find this code:
    Code (C#):
    1.         private static TimeSpan m_RespawnDelay = TimeSpan.FromHours(3); // Default dungeon respawn timer is 3 hours.
    2.         private static TimeSpan m_RezTimer = TimeSpan.FromSeconds(30); //Default to kick the dead group is 30 seconds.
    3.         private static TimeSpan m_KickTimer = TimeSpan.FromMinutes(10); //Default to kick the winning group is 10 minutes.
    4.         private static bool m_UseRezTimer = true; //Default is to move the corpses. (true)
    5.         private static bool m_BlessCorpses = true; //Default is to bless the corpses of all dead players. (true)
    6.         private static bool m_UseGlobalRespawn = true; //Default is to set all spawners to the global spawn time. (true)
    7.         private static bool m_AllowPvP = false; //Default is pvp disabled. (false)
    These features can be modified and/or turned on/off.

    This code requires VERY MINOR distro modification. Due to the fact that logging in does not invoke the OnEnter() method for the dungeon region, in order to determine whether a player has logged into a dungeon, an addition must me made to the OnLogin() method of your playermobile.cs file.

    Drag the download into your customs folder first.

    Then open your playermobile.cs file, and find the OnLogin() method, like this:
    Code (C#):
    1.         private static void OnLogin( LoginEventArgs e )
    2.         {
    3.             Mobile from = e.Mobile;
    And then place the following code immediately after. (It has been marked in a seperate #region)
    Code (C#):
    1.           //Start Dungeon System
    2.             #region - Party Dungeon System Edits -
    4.             if (from.AccessLevel == AccessLevel.Player)
    5.             {
    6.                 Region reg = Region.Find(from.Location, from.Map);
    7.                 if (reg is GroupDungeonRegion)
    8.                 {
    9.                     GroupDungeonRegion dreg = (GroupDungeonRegion)reg;
    11.                     //dungeon full so kick
    12.                     if ( dreg.CountPlayers() > dreg.Stone.MaxPlayers)
    13.                     {
    14.                         from.SendMessage(34, "{0} is full right now. You are being teleported out.", dreg.Stone.DungeonName);
    15.                         Timer.DelayCall(TimeSpan.FromSeconds(5), new TimerStateCallback(Server.Regions.GroupDungeonRegion.KickCallBack), new object[] { from, dreg.Stone });
    16.                     }
    17.                     //dungeon empty so kick to allow for reset
    18.                     else if (dreg.CountPlayers() <= 1)
    19.                     {
    20.                         from.SendMessage(34, "You have logged into an empty dungeon. You are being teleported out.", dreg.Stone.DungeonName);
    21.                         Timer.DelayCall(TimeSpan.FromSeconds(5), new TimerStateCallback(Server.Regions.GroupDungeonRegion.KickCallBack), new object[] { from, dreg.Stone });
    22.                     }
    23.                     //not in the current party so kick
    24.                     else
    25.                     {
    26.                         ArrayList players = new ArrayList();
    27.                         bool isinparty = false;
    28.                         PlayerMobile pm = (PlayerMobile)from;
    29.                         Server.Engines.PartySystem.Party p = Server.Engines.PartySystem.Party.Get(from);
    31.                         foreach (Mobile mobs in dreg.Stone.GetMobilesInRange(dreg.Stone.Size))
    32.                         {
    33.                             if (mobs is PlayerMobile && mobs != pm)
    34.                                 players.Add(mobs); //grab one player inside
    35.                         }
    36.                         if (p != null)
    37.                         {
    38.                             foreach (Server.Engines.PartySystem.PartyMemberInfo pmem in p.Members) // check to see if anyone iside is in the party
    39.                             {
    40.                                 foreach (Mobile pmi in players)
    41.                                 {
    42.                                     if (pmi == pmem.Mobile)  //if the grabbed player inside is in the entering's party
    43.                                         isinparty = true;
    44.                                 }
    45.                             }
    46.                         }
    47.                         if (!isinparty)
    48.                         {
    49.                             from.SendMessage(34, "You must join the party inside to enter. You are being teleported out.");
    50.                             Timer.DelayCall(TimeSpan.FromSeconds(5), new TimerStateCallback(Server.Regions.GroupDungeonRegion.KickCallBack), new object[] { from, dreg.Stone });
    51.                         }
    52.                     }
    53.                 }
    54.             }
    56.             #endregion
    57.             //End Dungeon System
    To allow for XMLSpawner and/or PremiumSpawner usage, find this code in GroupDungeonRegion.cs:
    Code (C#):
    1.                     /*else if (s is XmlSpawner) //// comment out if XMLSpawner is not installed
    2.                     {
    3.                         XmlSpawner sp = (XmlSpawner)s;
    4.                         sp.MaxDelay = sp.MinDelay = m_RespawnDelay;
    5.                         sp.Respawn();
    6.                     }
    7.                     else if (s is PremiumSpawner) //// comment out if PremiumSpawner is not installed
    8.                     {
    9.                         PremiumSpawner sp = (PremiumSpawner)s;
    10.                         sp.MaxDelay = sp.MinDelay = m_RespawnDelay;
    11.                         sp.Respawn();
    12.                     }*/
    and uncomment as necessary.

    2.0 Beta
    Modified to work with ServUO

    Fixed a dungeon door key exploit.
    Added login checks to the dungeon region to prohibit an exploit.
    -Any player logging into an empty dungeon will be kicked.
    -Any player logging into a full dungeon will be kicked.
    -Any player logging into a dungeon occupied by a party other than his own will be kicked.
    Added party functionality.
    -Any player can enter an empty dungeon.
    -If a player tries to enter an occupied dungeon, it makes sure they are in the same group.
    Added pet functionality.
    -Pets are teleported along with their owner.
    -Added AllowPets boolean to each dungeon, restricting pet access via the teleporter.
    Fixed issue of dead players being stranded if all living players leave the dungeon.
    Fixed last bugs, polished the code, tested and tested, and repackaged.

    Alright now that all of that is out of the way. I also plan to do what he hoped for by creating an admin gump system and incorporate a afk penalty. If anyone else has anything else they think this system would benefit from let me know in the comments below.

    Also to let everyone know, if anyone has a system they have found from RunUO that they would like transferred over, modified, and kept up-to-date let me know as well in the comments below and I will see what I can do. :)