RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 RC1] Raid Dungeons 1.6a Final

Lichtblitz

Sorceror
Vorspire;800523 said:
Do you think that generated maps should be anything above 0x7F (Internal) ?

That doesn't matter at all as long as the server is handling these numbers internally and not sendig them to the client.

e.g.:
The server has a raid instance as map 123 which is supposed to be a Trammel dungeon. As long as only the server is concerned the number 123 should be just fine and you should be able to cast it to the map-enumeration without any problems (at least I hope so). But in all packets the server sends he has to use the original map number for trammel which is 1 if I'm not mistaken.

EDIT: oh, wait... map is not only an enumeration. But the part with the numbers is still the same. The actual value isn't important.
 

Vorspire

Knight
I thought that the Map.<MapName> values were constants and not enumerations, I think the prototype design was with enumerations though. But I see what you mean, using Map.Register should be fine, as long as the Map ID parameters are within range :D
 

fcondon

Sorceror
I made an unused rectangle dungeon the home a my first instance. I have a problem though, when I place the stone and set it high enough to surround the entire thing, it also leaks onto the dungeons above and below it. But if i shorten the size, it wont cover the entire thing. Is there a way I can set the cords manually, or is it possible to use 2 stones and link them together for the same instance?
 

Kamron

Knight
If I get some time these couple of weeks, I will combine this script with my instance maps. The goal will be for the dungeons to be created on a new dynamic map, separate from the regular maps. Once a wipe occurs (whether the dungeon is finished, or everyone dies), the map is deleted.
Using template design, it is possible for staff to create a new map, design an area, and then create a template from it. This is the same technique I used for arena building in my automated tournament system.

The system will require core modifications, but nothing drastiic.

Anyone interested?
 

Vorspire

Knight
Sounds great, but I don't think it should be deleted on a wipe.. Imagine if you're at the last boss of the isntance and it messes up... then you gotta do it all again.. would really suck.

Dungeons should also have a cooldown so player's cant farm them all day long. A 24 hour "reset" would be sufficient as like WoW. For anything like raids, it's usually 5 days.
 

Lichtblitz

Sorceror
Kamron;801268 said:
Anyone interested?

I am. Since on our shard we are not using Felucca it always struck me a a nice tool to have a duplicated map for roleplaying events and that a group won't be disturbed by people going for a relaxing hunt. I'm very much interested in the whole map instance thing - not so much in the context of raids because I like players to be able to meet each other in the dungeons.
 

Vorspire

Knight
If that's the case, just edit your MapDefinitions.cs and create an exact copy of Felucca. You don't need to add the map name to the constant variable list in the core.

[Self Set Map [<MapID> | <MapName>]

For statements:

Code:
if( <MobileReference>.Map.ID == <MapID> )
{ }

if( <MobileReference>.Map.Name == <MapName> )
{ }
 

Kamron

Knight
There are a few more changes that need to be done for instance maps so that new Map objects can be created with more specialized features. Of course a cooldown can be coded into an instance map. Currently the map class is sealed, among other slightly annoying things.

Also keep in mind that if a map is dynamic (can be added/deleted/modified by any script at any time), then you must "cleanup" when the Map is deleted. Specifically, move/delete items and NPCs, and move players to a valid location/map. Of course none of this is very difficult, but it is easier when a new Map object is created.
 

Vorspire

Knight
Maybe the best possible solution would be to create an exact copy of the Map class from the core and rename it to InstanceMap and build around that with your edits, that way, everything can still be handled like a map, but technically would be on a seperate system, thus not interfering with the original map system?
 

Dreadfull

Sorceror
I am just wondering if anyone knows anything about my resurrection issue. since when a player dies in the dungeon they are stuck and don't get their body or anything. the counter stays at 30 and keeps counting 30 instead of counting down.
 

espcevan

Sorceror
Confused

Hey i saw this error in the posts but when i tried the fix u said it just gave me another error.



Code:
Errors:
 + New Folder/Raid Dungeon/Group Dungeons 1.7 Final/GroupDungeonRegion.cs:
    CS0508: Line 348: 'Server.Regions.GroupDungeonRegion.OnDeath(Server.Mobile)'
: return type must be 'void' to match overridden member 'Server.Region.OnDeath(Server.Mobile)'

The first error was this and i changed the bool to void like u said and got this error.....


Code:
Errors:
 + New Folder/Raid Dungeon/Group Dungeons 1.7 Final/GroupDungeonRegion.cs:
    CS0127: Line 393: Since 'Server.Regions.GroupDungeonRegion.OnDeath(Server.Mo
bile)' returns void, a return keyword must not be followed by an object expressi
on


This is the code that is giving me error.



Code:
        public override void OnDeath(Mobile m)
        {
            // Check to see if the dungeon has been cleared, then kick callback.
            if (m is BaseCreature)
            {
                int count = 0;
                foreach (Mobile m2 in m_Stone.GetMobilesInRange(m_Stone.Size))
                {
                    if (m2 is BaseCreature && m2 != m) // count living creatures
                        count++;
                }

                if (count <= 0) // All dead
                {
                    // find all players and invoke kick.
                    foreach (Mobile m2 in m_Stone.GetMobilesInRange(m_Stone.Size))
                    {
                        if (m2.Player) // call dungeon finish
                            Timer.DelayCall(TimeSpan.FromSeconds(5), new TimerStateCallback(DungeonCleared), new object[] { m2, m_Stone });
                    }
                }
            }

            // Check to see if the party has been cleared, then kick callback.
            else if (m is PlayerMobile)
            {
                int count = 0;
                foreach (Mobile m2 in m_Stone.GetMobilesInRange(m_Stone.Size))
                {
                    if (m2 is PlayerMobile && m2.Alive && m2 != m && (m2.AccessLevel == AccessLevel.Player)) // count living non-staff players
                        count++;
                }

                // find all players and invoke kick.
                
                if (count <= 0)
                {
                    foreach (Mobile m2 in m_Stone.GetMobilesInRange(m_Stone.Size))
                    {
                        if (m2 is PlayerMobile && m2.AccessLevel == AccessLevel.Player)
                            Timer.DelayCall(TimeSpan.FromSeconds(5), new TimerStateCallback(GroupWipe), new object[] { m2, m_Stone });
                    }
                }
            }

            [COLOR="Red"]return base.OnDeath(m);[/COLOR]
        }


The line in red is line 393. Ive been up al nite trying to figure this out and now I'm just frustrated. Please help.
 

Vorspire

Knight
iamjedi;693582 said:
You should be fine bu just removing the return line at the end: return this.OnDeath(m);
Hope that handles it!

That won't work either.

The OnDeath method needs a return type of VOID, but VOID is simply a keyword and not a type at all.
There are no object references associated with the VOID keyword, therefore you must return nothing, period.
The VOID keyword is unique in comparison with all other return type keywords.
A method requiring the VOID return type does not actually need a return statement at all, unless other specified arguments have been met and there is no use in executing further code in the method scope.

Code:
public override void OnDeath( Container c )
{
    base.OnDeath( c );

    if( c == null || c.Deleted )
        [COLOR="Red"]return;[/COLOR]

    c.AddItem( new Longsword( ) );
}
 

Devinc07

Sorceror
Vorspire;808600 said:
That won't work either.

The OnDeath method needs a return type of VOID, but VOID is simply a keyword and not a type at all.
There are no object references associated with the VOID keyword, therefore you must return nothing, period.
The VOID keyword is unique in comparison with all other return type keywords.
A method requiring the VOID return type does not actually need a return statement at all, unless other specified arguments have been met and there is no use in executing further code in the method scope.

Code:
public override void OnDeath( Container c )
{
    base.OnDeath( c );

    if( c == null || c.Deleted )
        [COLOR="Red"]return;[/COLOR]

    c.AddItem( new Longsword( ) );
}

so are you saying instead of having " return base.OnDeath(m); " it should return nothing as in this
}
return; // no base.OnDeath(m) after it?
}


EDIT: yeah works great now. thx for the great script and idea. gonna see what i can do with it on the shard. good job
 

m00er

Sorceror
Could someone help me edit this playermobile to meet this scripts criteria after the OnLogin. I've tried to make the edit, but I can't seem to grasp this task.
 

Attachments

  • PlayerMobile.cs
    102.4 KB · Views: 5

_Epila_

Sorceror
I'm having a problem when the dungeon respawns
when i double click the stone, my spawner spawns the monsters/items in a random location inside its range, but when some player enter the dungeon, this spawner spawn all monsters/items exactly at the spawn location

i got all my items stacked in the same spot when i need them to be in a ramdom location
 

m00er

Sorceror
After adding the raid 1.6 into my custom scripts folder, make the playermobile edit, I get this error:

RunUO - [www.runuo.com] Version 2.0, Build 3567.2838
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 64-bit processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ zxCustom/Group Dungeons 1.7 Final/GroupDungeonRegion.cs:
CS0508: Line 348: 'Server.Regions.GroupDungeonRegion.OnDeath(Server.Mobile)'
: return type must be 'void' to match overridden member 'Server.Region.OnDeath(S
erver.Mobile)'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Please, somebody lend me a hand at their earliest convenience, this is driving me insane and I really would love this script on my test/fun shard. :D Thank you
 

_Epila_

Sorceror
in your zxCustom/Group Dungeons 1.7 Final/GroupDungeonRegion.cs
find the OnDeath method, change the return type from bool to void, then remove the return line
 
Top