Resource icon

Group Dungeon System 2.0 Beta

No permission to download
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
http://www.runuo.com/community/threads/runuo-2-0-rc1-group-dungeon-system-1-0.72255/

Alright shall we...

Group Dungeon System 2.0 Beta

Summary

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.)

Features
# 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:
        private static TimeSpan m_RespawnDelay = TimeSpan.FromHours(3); // Default dungeon respawn timer is 3 hours.
        private static TimeSpan m_RezTimer = TimeSpan.FromSeconds(30); //Default to kick the dead group is 30 seconds.
        private static TimeSpan m_KickTimer = TimeSpan.FromMinutes(10); //Default to kick the winning group is 10 minutes.
        private static bool m_UseRezTimer = true; //Default is to move the corpses. (true)
        private static bool m_BlessCorpses = true; //Default is to bless the corpses of all dead players. (true)
        private static bool m_UseGlobalRespawn = true; //Default is to set all spawners to the global spawn time. (true)
        private static bool m_AllowPvP = false; //Default is pvp disabled. (false)
These features can be modified and/or turned on/off.

Installation
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:
        private static void OnLogin( LoginEventArgs e )
        {
            Mobile from = e.Mobile;
And then place the following code immediately after. (It has been marked in a seperate #region)
Code:
          //Start Dungeon System
            #region - Party Dungeon System Edits -
              
            if (from.AccessLevel == AccessLevel.Player)
            {
                Region reg = Region.Find(from.Location, from.Map);
                if (reg is GroupDungeonRegion)
                {
                    GroupDungeonRegion dreg = (GroupDungeonRegion)reg;

                    //dungeon full so kick
                    if ( dreg.CountPlayers() > dreg.Stone.MaxPlayers)
                    {
                        from.SendMessage(34, "{0} is full right now. You are being teleported out.", dreg.Stone.DungeonName);
                        Timer.DelayCall(TimeSpan.FromSeconds(5), new TimerStateCallback(Server.Regions.GroupDungeonRegion.KickCallBack), new object[] { from, dreg.Stone });
                    }
                    //dungeon empty so kick to allow for reset
                    else if (dreg.CountPlayers() <= 1)
                    {
                        from.SendMessage(34, "You have logged into an empty dungeon. You are being teleported out.", dreg.Stone.DungeonName);
                        Timer.DelayCall(TimeSpan.FromSeconds(5), new TimerStateCallback(Server.Regions.GroupDungeonRegion.KickCallBack), new object[] { from, dreg.Stone });
                    }
                    //not in the current party so kick
                    else
                    {
                        ArrayList players = new ArrayList();
                        bool isinparty = false;
                        PlayerMobile pm = (PlayerMobile)from;
                        Server.Engines.PartySystem.Party p = Server.Engines.PartySystem.Party.Get(from);
                                  
                        foreach (Mobile mobs in dreg.Stone.GetMobilesInRange(dreg.Stone.Size))
                        {
                            if (mobs is PlayerMobile && mobs != pm)
                                players.Add(mobs); //grab one player inside
                        }
                        if (p != null)
                        {
                            foreach (Server.Engines.PartySystem.PartyMemberInfo pmem in p.Members) // check to see if anyone iside is in the party
                            {
                                foreach (Mobile pmi in players)
                                {
                                    if (pmi == pmem.Mobile)  //if the grabbed player inside is in the entering's party
                                        isinparty = true;
                                }
                            }
                        }
                        if (!isinparty)
                        {
                            from.SendMessage(34, "You must join the party inside to enter. You are being teleported out.");
                            Timer.DelayCall(TimeSpan.FromSeconds(5), new TimerStateCallback(Server.Regions.GroupDungeonRegion.KickCallBack), new object[] { from, dreg.Stone });
                        }
                    }
                }
            }

            #endregion
            //End Dungeon System
To allow for XMLSpawner and/or PremiumSpawner usage, find this code in GroupDungeonRegion.cs:
Code:
                    /*else if (s is XmlSpawner) //// comment out if XMLSpawner is not installed
                    {
                        XmlSpawner sp = (XmlSpawner)s;
                        sp.MaxDelay = sp.MinDelay = m_RespawnDelay;
                        sp.Respawn();
                    }
                    else if (s is PremiumSpawner) //// comment out if PremiumSpawner is not installed
                    {
                        PremiumSpawner sp = (PremiumSpawner)s;
                        sp.MaxDelay = sp.MinDelay = m_RespawnDelay;
                        sp.Respawn();
                    }*/
and uncomment as necessary.

Changelog
2.0 Beta
Modified to work with ServUO

1.5
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.
1.4
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.
1.3
Added pet functionality.
-Pets are teleported along with their owner.
-Added AllowPets boolean to each dungeon, restricting pet access via the teleporter.
1.2.2
Fixed issue of dead players being stranded if all living players leave the dungeon.
1.2
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. :)

-Dpayne2841-
  • Like
Reactions: drakkar
Author
Crowthelas
Downloads
167
Views
2,421
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Crowthelas

Back