Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive

RunUO Post Archive The Archvie

Reply
 
Thread Tools Display Modes
Old 03-18-2004, 10:02 PM   #1 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default Challenge Game Revised [v1.4]

Summary:
[UPDATED to Version 1.4 (June 6, 2004)]

[Version 1.4]
Screw up in the RC0 playermobile. Had code in it that didn't belong there and would not compile. Don't need to redownload unless you got that error.
[Version 1.3]
This is a brand new Challenge Game then the previous one I had released on the old boards. The code is cleaner and there are far less bugs. In addition new features have been added and some removed. Everything, including the PlayerMobile, is in the zip file. Make sure to read the README.txt file. Enjoy

Description:
1v1 and 2v2 Challenge Game.

Installation:
-README.txt file included with steps on how to install.
-Remember to [prop the stones you add and set all the required info.
-The stones can be anywhere you want them. All are controled threw an arraylist that loads during system startup and is edited when any stone is removed or added. I Personally use a jailcell that way I can always check the status of them.

Version 1.3
[NEW]
-Opponent is no longer gray when the challenge ends.
-You are no longer red for a split second after getting teleported out of game.
-Bug fixed where if you were blue you would still get teleported to Buks Den after a crash or logout more than 5min.
-Bug fixed where if you logout for under 5mins or got disconnect the fight timer would not start back up.
-InternalTimer and Fight Timer moved to Challenge Stone. For some dumb reason I was creating a Fight Timer on each player. It's now 1 timer per stone.
-Bug fixed where every 5mins under 30min fight it would spam 30, 25,20 ectect for the entire minute.
-Added option to change length of dual per stone. just [Prop it. It's set in minutes.
-Fixed Internal timer so it now Stops once it hits zero and dosnt continue counting.
-Fixed FightTimer so you would not remain IsInChallenge == true; if a tied occured.
-Fixed PlayerMobile for RC0. I forgot to add in where if you are in a challenge you get KeepItemsOnDeath.

I think I fixed other small bugs also, but i don't remember.

Version 1.2
-Found bug that crashed server when mounted. It was due to Ethereal Mounts and is now fixed. Download new version and reinstall. Enjoy

Version 1.1

Other bug fixes:
-problem where the challenge ring was not saving Kills,fame,ect when server crash occured. I've move the ring out of the timer and is now its own item. This seems to have fixed the problem.

-In challengestone.cs and top of file. There are two logout positions set. One for over 5 murders and one for under. For under 5 murders it is set to Brit and for over its now set for Buc Den instead of also Brit. This is only used when server crashes. Any other time the locations are where the orginal challenge command was used.

-After server crash, the challenge ring was not removed! This has been fixed.

-Added into game that anyone being challenged has to have full health. This is so the game is not abused and people use it as a means of an excape.

-Forgot to return base for keepitemsondeath, so make you you update that in you PlayerMobile! Take a look at the code below [IN the new README.txt].

-Fixed error where stone would always say Not in Use.
Attached Files
File Type: zip ChallengeGame1.4.zip.zip (37.0 KB, 1700 views)
Clarke76 is offline   Reply With Quote
Old 03-18-2004, 11:19 PM   #2 (permalink)
 
Join Date: Jan 2004
Posts: 35
Send a message via AIM to kill_dragon5
Default

Awesome Clarke u really enjoy posting game scripts dont you But who cares they still own! And I wanna give you credit for cleaning up all that messy code. But thanx for another great game script!
kill_dragon5 is offline   Reply With Quote
Old 03-19-2004, 02:45 AM   #3 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default

hehe, sure do. Most of the scripts I release will probably be old ones I've done. Just cleaned up and in better form, code wise. I will be releasing my Hero/Evil system, SP style, in the near future, so be on the look out. I just need to go threw it and add in some extras and fix some known bugs. I'm also kidda waiting till RC 1 is released since there is major script editing going on.
Clarke76 is offline   Reply With Quote
Old 03-22-2004, 05:15 PM   #4 (permalink)
 
Join Date: Feb 2004
Location: Noneya, Beezwax
Age: 18
Posts: 39
Send a message via AIM to SPanky
Default

How exactly does this script work. Does it teleport the players somewhere to where they can fight away from other people and then teleport them back? I think I've seen the older version of this script and I loved it. Whenever you challenged someone, it would teleport the 1/2/3/4 of you to a rooftop in Britain, where a guy sat on a throne and counted down and said "fight" or something when it was time to begin. What I'm asking is: is this script pre-set or do I have to set where I want them to fight?
SPanky is offline   Reply With Quote
Old 03-23-2004, 01:13 AM   #5 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default

Quote:
Originally Posted by SPanky
How exactly does this script work. Does it teleport the players somewhere to where they can fight away from other people and then teleport them back? I think I've seen the older version of this script and I loved it. Whenever you challenged someone, it would teleport the 1/2/3/4 of you to a rooftop in Britain, where a guy sat on a throne and counted down and said "fight" or something when it was time to begin. What I'm asking is: is this script pre-set or do I have to set where I want them to fight?

You have to point the stone to the location you want them to fight. [props the stone and fill in the required info. After that your set to go.
Clarke76 is offline   Reply With Quote
Old 03-23-2004, 01:18 AM   #6 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default Important FYI

*Instructions edited with this:*

Quote:
-EDIT-
In challengestone.cs and top of file. There are two logout positions set. One for over 5 murders and one for under. You may want to edit these locations to your liking. I can't even remember where they are set. This code resets the stones and all players that were in a game after a server crash.
Clarke76 is offline   Reply With Quote
Old 03-23-2004, 08:02 PM   #7 (permalink)
Seven
Guest
 
Posts: n/a
Default

This has to be me
Code:
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
 - Error: Scripts\Custom\ChallengeGame\FinalGump.cs: CS0101: (line 15, column 15
) The namespace 'Server.Gumps' already contains a definition for 'FinalGump'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
  Reply With Quote
Old 03-26-2004, 02:43 AM   #8 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default

Quote:
Originally Posted by Seven
This has to be me
Code:
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
 - Error: Scripts\Custom\ChallengeGame\FinalGump.cs: CS0101: (line 15, column 15
) The namespace 'Server.Gumps' already contains a definition for 'FinalGump'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
Seven:

you have another gump named FinalGump. Switch one of the two to a different name and update the code that uses that to the new name.
Clarke76 is offline   Reply With Quote
Old 03-28-2004, 01:56 AM   #9 (permalink)
 
Join Date: Feb 2004
Location: Noneya, Beezwax
Age: 18
Posts: 39
Send a message via AIM to SPanky
Default Challenge Ring

I found out about a Challenge Ring or something, but I can't figure out how the h*ll to add it. Can somebody tell me the exact commands to add a 1v1 and 2v2 challenge ring?
SPanky is offline   Reply With Quote
Old 03-28-2004, 05:32 AM   #10 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default

Quote:
Originally Posted by SPanky
I found out about a Challenge Ring or something, but I can't figure out how the h*ll to add it. Can somebody tell me the exact commands to add a 1v1 and 2v2 challenge ring?
No need to worry about the challenge ring. It is automatically added when a challenge begins. This ring does certain stuff, like save short term murders, murders, fame, karma ect. The saved props are then transfered back to the mobile when the ring is deleted which is also automatically done by the script.

To get the game working, just add a ChallengeStone. [prop the stone, set it as a 1v1 or 2v2. Set all the other info, Map, Locations ect. It should automatically be active and your set. Now the players can use the challenge command and have some fun.

If you continue to have problems let me know.
Clarke76 is offline   Reply With Quote
Old 03-29-2004, 01:22 AM   #11 (permalink)
Seven
Guest
 
Posts: n/a
Default

OK anyone know the exact thing i put in my seralize/deseralize in playermobile.cs ?
I just need some help with this because whenever i do it before it throughs an exception with my playerbase then wipes them all

I think i'm doing it right..but not sure if I'm doing somthing wrong.
  Reply With Quote
Old 03-29-2004, 03:10 AM   #12 (permalink)
Forum Expert
 
Mortis's Avatar
 
Join Date: Oct 2002
Location: In My Cold Cell
Age: 44
Posts: 1,848
Default

Seven: deserialize it by case then make sure serialize is in same order.
__________________
I'm waiting in my cold cell when the bell begins to chime
Reflecting on my past life and it doesn't have much time.
Mortis is offline   Reply With Quote
Old 03-30-2004, 07:23 PM   #13 (permalink)
Seven
Guest
 
Posts: n/a
Default

So all i need to serialize/deserialize is : m_TempMount ?
  Reply With Quote
Old 03-30-2004, 10:03 PM   #14 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default

Quote:
Originally Posted by Seven
So all i need to serialize/deserialize is : m_TempMount ?
No these three vars need to be serialized/deserialized:

isinchal
canbechal
m_TempMount;
Clarke76 is offline   Reply With Quote
Old 03-30-2004, 10:44 PM   #15 (permalink)
Seven
Guest
 
Posts: n/a
Default

in that order so for example :
isinchal will be 17
canbechal will be 18
m_TempMount will be 19 ?

Sorry not so good at searlizing/deserializing the playermobile.cs don't want to screw up this time and loose my playerbase
  Reply With Quote
Old 03-31-2004, 01:50 AM   #16 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default

Quote:
Originally Posted by Seven
in that order so for example :
isinchal will be 17
canbechal will be 18
m_TempMount will be 19 ?

Sorry not so good at searlizing/deserializing the playermobile.cs don't want to screw up this time and loose my playerbase
Ok, try to explain this and not confuse you. In my playermobile, which is the default for Beta36. In order to add in the challenge game, I needed to switch it to version 15, up one from the orginal 14, in the serialize area. Right after the version, I added in my variables. Looks something like this.
Code:
base.Serialize( writer );
			
			writer.Write( (int) 15 ); // new version

			writer.Write( m_TempMount as BaseMount );
			writer.Write( (bool) isinchal );
			writer.Write( (bool) canbechal );
Thats all I had to do for my serializing. Now to deserialize it, You have to create a case for the version number, and deserialize it in the same exact order as the serialize, and then jump it to the next case. So it looks something like this.
Code:
public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			switch ( version )
			{
				case 15:
				{
					m_TempMount = (BaseMount) reader.ReadMobile();
					isinchal = reader.ReadBool();
					canbechal = reader.ReadBool();
					goto case 14;
				}
				case 14:
Hopefully you understand the concept a little better now. Let me know if you continue to have problems.
Clarke76 is offline   Reply With Quote
Old 03-31-2004, 06:43 PM   #17 (permalink)
Seven
Guest
 
Posts: n/a
Default

Thanks so much! It worked
  Reply With Quote
Old 04-01-2004, 12:00 PM   #18 (permalink)
Knows how OSI Devs feel.
 
infra001's Avatar
 
Join Date: Mar 2003
Posts: 202
Send a message via ICQ to infra001
Default

Here's an idea, add betting of gold on the challenges. That would make this a true challenge script :P
__________________
Defiance Shard - Lead Dev
http://www.defianceuo.com
uog://57CDCEDB5199EAA1D4EC060B8205728E
infra001 is offline   Reply With Quote
Old 04-01-2004, 06:45 PM   #19 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default

Quote:
Originally Posted by infra001
Here's an idea, add betting of gold on the challenges. That would make this a true challenge script :P
I probably will when I get the chance, right now I don't feel like messing with it and re-doing the gumps, cause I absolutely hate doing gumps! Maybe in the near future tho.
Clarke76 is offline   Reply With Quote
Old 04-01-2004, 06:52 PM   #20 (permalink)
Seven
Guest
 
Posts: n/a
Default

Clark is the server suppose to crash when someone challenges someone on a mount and they accept?
  Reply With Quote
Old 04-02-2004, 02:52 AM   #21 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default

Quote:
Originally Posted by Seven
Clark is the server suppose to crash when someone challenges someone on a mount and they accept?
The obvious answer to this question is....let me think...NO! lol, ill take a look at that. Thanks for letting me know. Get back to you on a fix soon!
Clarke76 is offline   Reply With Quote
Old 04-02-2004, 03:17 AM   #22 (permalink)
 
Join Date: Oct 2002
Age: 29
Posts: 393
Default

Seven:

Not sure why the server is crashing for you when a player is mounted and challenged. I looked over code and it looks fine, and then I tested and it didn't crash. I tried with 1 player mounted other not and both players mounted. Each worked fine with no crash. Maybe something else is going on? Do you have a crashlog? Try and give me some deatails...Thanks.
Clarke76 is offline   Reply With Quote
Old 04-02-2004, 02:30 PM   #23 (permalink)
 
Join Date: Mar 2003
Location: Winter Park, FL
Age: 25
Posts: 445
Send a message via ICQ to Gandalfjrs Send a message via AIM to Gandalfjrs
Default

clarke* -> ownage;
Gandalfjrs is offline   Reply With Quote
Old 04-02-2004, 10:18 PM   #24 (permalink)
Seven
Guest
 
Posts: n/a
Default

Hmm... Not sure what it is going onwith it then...
  Reply With Quote
Old 04-03-2004, 03:32 AM   #25 (permalink)
InnerStaff
Guest
 
Posts: n/a
Default

im getting same error i think it has to do with editing the case #;s
  Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5