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!

Capture the Flag and Double Domination games (Updated)

bean56

Wanderer
The timer is set for 30 seconds. Just look for
Code:
private class DeathTimer : Timer
		{
			public static TimeSpan DeathDelay =  TimeSpan.FromSeconds( 30 );
in ctfgame.cs and change the 30 to 10 or something. That should do the trick.
 

lobokala

Wanderer
Why client 3D crash when my players are behind waypoints in DD game?

when the waypoint hue change, 3D client crash, how i can fix it?
 

bean56

Wanderer
lobokala said:
Why client 3D crash when my players are behind waypoints in DD game?
Cause the 3d client sucks big time. I don't know, I don't use DD. You could try changing the colors.
 

DarkJustin

Wanderer
bean thank you so much for all your help. i really do appreciate the way that you don't have any qualms about helping us... n00b coders. it's really appreciated. as I look through where i should have seen some of the tweaks .... it allows me to learn. thanks sooo much. :cool:
 

bean56

Wanderer
DarkJustin said:
bean thank you so much for all your help. i really do appreciate the way that you don't have any qualms about helping us... n00b coders. it's really appreciated. as I look through where i should have seen some of the tweaks .... it allows me to learn. thanks sooo much. :cool:
No problem man. Time is the only issue and the fact that i'm really sick doesn't help much. :(
 

bean56

Wanderer
Sorry for the double post

I had some players play ctf and for some reason some of them had some backpacks of theirs from the game full of ctf stuff in their bank. I think at least some of them were still not movable too. I'll be looking into this hopefully tomorrow before I go away for the weekend again. If you have any ideas how this may be happening, let me know. Thx.
 

ditmar

Wanderer
bean56 said:
I had some players play ctf and for some reason some of them had some backpacks of theirs from the game full of ctf stuff in their bank. I think at least some of them were still not movable too. I'll be looking into this hopefully tomorrow before I go away for the weekend again. If you have any ideas how this may be happening, let me know. Thx.

I think what you should do is when they click the joinstone their current backpack gets put in the internal map and everything they wore in a little bag in the backpack (also when they are holding something). The problem is with full banks, people will lose items because of that.

Then when they want to quit they will have to use a stone to actually get out of the game-area, everything they have on can be safely deleted, backpack removed and the one from the internal map gets put back. No clue how to script it tho.
 

bean56

Wanderer
ditmar said:
I think what you should do is when they click the joinstone their current backpack gets put in the internal map and everything they wore in a little bag in the backpack (also when they are holding something). The problem is with full banks, people will lose items because of that.

Then when they want to quit they will have to use a stone to actually get out of the game-area, everything they have on can be safely deleted, backpack removed and the one from the internal map gets put back. No clue how to script it tho.
I don't think putting their bag in the internal map would work. How would they get it back? You would have to keep track of it somehow in the scripts. I'm sure there's a check for a full bank that I can put in, I'll have to try to find it though. If their bank is full then I can maybe deny them from joining or I can drop it on the ground, not sure what other choices their are. Also right now it puts all their stuff they are wearing in their backpack, but it may be a bit more convient to put it in a bag first. They already leave through a gate that kills them so they lose all their ctf stuff and not fame. I am going to add a check to see if they are in the game so they can't use help to leave. On my particular server it will suffice to check their map and deny them help. I'm leaving now, ttfn.
 

Girl

Wanderer
Am I the only one having a problem with players no longer being able to log out of UO correctly or being able to actually exit the game properly once they have played CTF? I tested it on my server and my players dont log out correctly, in fact hours later after they have logged, their characters are still there. and long after they've left the game area, if I use command [startgame on the stone, the players in the previous game will die and be sent to the game area.

Is there something I am missing? Maybe a command? Any help is appreciated, thanks =)
 

bean56

Wanderer
Girl said:
Am I the only one having a problem with players no longer being able to log out of UO correctly or being able to actually exit the game properly once they have played CTF? I tested it on my server and my players dont log out correctly, in fact hours later after they have logged, their characters are still there. and long after they've left the game area, if I use command [startgame on the stone, the players in the previous game will die and be sent to the game area.

Is there something I am missing? Maybe a command? Any help is appreciated, thanks =)
My guess would have to be that maybe you missed something. Are they all leaving through a leavegate? Are you sure you ended the game? Did you try [endgame? I know I did a restart once with [startgame false and only 2 out of the 4 players died and rejoined the same teams. I thought it was quite odd, but I haven't tested the game much since i'm out of town.
 

bean56

Wanderer
Sorry again for the double post

First off here is a crash I got
crash said:
Mobiles: 15382
Items: 176192
Clients:
- Count: 4

Exception:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Server.Items.CTFGame.StartGame(Boolean resetTeams)
at Server.Items.CTFGame.StartGame_Target(Mobile from, Object o,
Bia: Object state)
at Server.SimpleStateTarget.OnTarget(Mobile from, Object targeted)
at Server.Targeting.Target.Invoke(Mobile from, Object targeted)
at Server.Network.PacketHandlers.TargetResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
I looked at it and I figured somehow it must think there are 3 teams or there are more people on a team than there really are, but that doesn't seem to be the case. Says there are 2 teams and I checked the flags and they had the right member count too so I have no idea what's up with that crash except the game was running and I did [startgame true and bam. I don't think it has anything to do with my changes as far as I can tell. Also in case anyone is wondering I think the backpack problem was the way it restarted the game with the players already in it took their backpack and put it in their bank. Either way I put in a little protection like this. Your edited part should look something like
Code:
if( from.FindItemOnLayer( Layer.OuterTorso) != null )
						from.Backpack.DropItem( from.FindItemOnLayer( Layer.OuterTorso) );
					if( from.FindItemOnLayer( Layer.OuterLegs) != null )
						from.Backpack.DropItem( from.FindItemOnLayer( Layer.OuterLegs) );

					bool firstjoin = true;
					if( from.Backpack != null)
					{
						Item[] robes = from.Backpack.FindItemsByType( typeof( CTFRobe ) );
						for(int i=0;i<robes.Length;i++)
							firstjoin = false;
						if ( firstjoin )
						{
							from.Backpack.Movable = true;
							from.BankBox.AddItem( from.Backpack );

							Backpack pack = new Backpack();
							pack.Movable = false;

							from.AddItem( pack );
						}
					}
				}
				//check if they are mounted and dismount them
				IMount mount = from.Mount;
				if ( mount != null )
					mount.Rider = null;

EDIT
ok now I got this crash
Exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Server.Items.StartTimer.OnTick()
at Server.Timer.Slice()
at Server.Core.Main(String[] args)
This was when I did endgame first and then after the 30 second limit it crashed.

Also you may want to change helpgump.cs to look like this
Code:
if ( from.Region is Server.Regions.Jail )
					{
						from.SendLocalizedMessage( 1041530, "", 0x35 ); // You'll need a better jailbreak plan then that!
					}
					else if( from.Region is Server.Regions.GameRegion)
					{
						from.SendMessage( "Nice try..." );
					}
					else if ( from.CanUseStuckMenu() && from.Region.CanUseStuckMenu( from ) && !CheckCombat( from ) && !from.Frozen && !from.Criminal && from.Kills < 5 )
					{
						StuckMenu menu = new StuckMenu( from, from, true );

						menu.BeginClose();

						from.SendGump( menu );
					}
That will prevent players from using the stuck help when they are in the game region.
 

Girl

Wanderer
Another question =)

Any way for this game to be made to run on it's own? That way no staff member has to be present and the players can have fun all they want? Let me know if you're willing to help, thanks =)
 

bean56

Wanderer
Girl said:
Any way for this game to be made to run on it's own? That way no staff member has to be present and the players can have fun all they want? Let me know if you're willing to help, thanks =)
um sure, I would just set the time to like 999999 hours and turn off getting points for killing people and such and make the points win thing like 99999999.
 

AdMiN Akuma

Wanderer
Any Way To Delete All Items Other Then Spellbook?

Hey, I was just wondering if it was possible for the ethereals to be deleted as well when they enter ctf. Because staff and players on my server do not like CTF with ethereals. If theres anyway anyone can help me I'd greatly appreciate it.

Thanks,
Admin Akuma
New Scripter
 

DarkJustin

Wanderer
AdMiN Akuma said:
Hey, I was just wondering if it was possible for the ethereals to be deleted as well when they enter ctf. Because staff and players on my server do not like CTF with ethereals. If theres anyway anyone can help me I'd greatly appreciate it.

Thanks,
Admin Akuma
New Scripter

Alright... we had that issue too--but with the prexisting coding we put the...

Code:
	//check if they are mounted and dismount them
		IMount mount = from.Mount;
		if ( mount != null )
		mount.Rider = null;

Above the place where the script pulls off all of your armor. And pack items. And it seems to work well... If you don't move this section then it'll just knock the person off their mount and the ethy will be in pack. But if you move it under the armor/pack check but before the actual banking check it'll work perfectly for you.
 

DarkJustin

Wanderer
Alrgiht we've found a few bugs:

If you do [endgame it'll kick all the players out--BUT it kicks them to a random fel location 0,0,0 or something like that. (is there a way to set where the location would be... because the game never really ends until they go through a game gate thing... we could make a prize room this way... it'd be sweet) And that isn't so bad... but the real issue is when we get them back into the real game mode... they are later transported back to the CTF game and they loose everything that isn't inusred--because the game still thinks that they are in the game...

If we do [startgame true after 30 seconds the shard restarts... whats up with this?

What to do?
 

bean56

Wanderer
DarkJustin said:
Alright... we had that issue too--but with the prexisting coding we put the...

Code:
	//check if they are mounted and dismount them
		IMount mount = from.Mount;
		if ( mount != null )
		mount.Rider = null;

Above the place where the script pulls off all of your armor. And pack items. And it seems to work well... If you don't move this section then it'll just knock the person off their mount and the ethy will be in pack. But if you move it under the armor/pack check but before the actual banking check it'll work perfectly for you.
Yes, I did that also, but forgot to post an update.

If you do [endgame it'll kick all the players out--BUT it kicks them to a random fel location 0,0,0 or something like that. (is there a way to set where the location would be... because the game never really ends until they go through a game gate thing... we could make a prize room this way... it'd be sweet) And that isn't so bad... but the real issue is when we get them back into the real game mode... they are later transported back to the CTF game and they loose everything that isn't inusred--because the game still thinks that they are in the game...

If we do [startgame true after 30 seconds the shard restarts... whats up with this?

When you do [endgame it sends them to there teams location. You haven't set the location if it's doing that. Also if you haven't set the location then everytime they die they should go to 0,0,0 . If you're setting the location and it's still doing that then you screwed something up. If you do [startgame true, the server crashes. I already pointed that out. I can't figure out exactly how to fix it.
 

bean56

Wanderer
No idea, I was hoping zippy would get back to us, but he is taking a while....which is understandable.
 
Top