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!

Fully Automated Tournament System

milt

Knight
Fully Automated Tournament System

That's right! It's finally out.

I've been working on this code for about a month or so, on and off. It's been a great learning experience and I just want to thank all of those that have helped me, or provided suggestions.

Ok, so the installation isn't that bad... After all, it edits NO distro scripts.


Description:
Well, the name pretty much says it all, it is a fully automated tournament system that has quite a bit of nice features. It comes with an arena (but you may also build your own) and it is a pretty easy setup. Options like 'Mages Only', 'Dexxers Only', 'Tanks Only', '7x Only', '5x Only', 'No Magic Weapons/Artifacts', 'No Potions', 'No Healing'... etc have all been added to the system for your enjoyment. Please note that this is only version 1.0.0... There will be plenty of releases after this, and they will be improving each time. The next full release (2.0.0) will have a very nice setup for the duels, and will include a gump that shows who will duel who, etc. Consider this something like a 'pre-release', because it has been tested as much as I myself can test it. I now need you guys to help me find problems, bugs, and suggestions!

Installation:
The installation is very simple.
  1. Unzip the package, and extract it to somewhere in your Scripts folder.
  2. Reboot server
  3. If you are using the tourney's default arena, do [add TourneyArena. If not, build your own before continuing
  4. Next, [add MasterTStone. It is suggested that you keep this stone hidden from players.
  5. [Props the MasterTStone and all the properties. Warning: Do not leave any blank! Here is what each property does:
    ArenaZ is the Z on which the duelists will be fighting.
    MapDest is simply the map where your arena resides.
    MinPlayers is how many players it will take to start the tourney when the funding system is being used. (later explained)
    SpectatorArea is where players will be teleported after their fight, recommended to be right outside of the dueling arena.
  6. Double click the MasterTStone, and click on the 'Set Region' button, then target the bounding box in which the duelists will fight. If you would like to see the region, go to the 'System Commands' gump and click the 'Show Duel Region' button. This will make an area affect around the arena for about 5 seconds.
  7. Set any other options necessary. It is recommended that you restrict certain spells and skills, such as Recall, Gate, etc. This can be done in the System Options gump, via the buttons called 'Restricted Spells' and 'Restricted Skills'.
  8. [Add TJoinBook and [Props it, and set the Link (which is the MasterTStone). This will be what players use to sign up for the tournament.
  9. If you plan on using the funding barrel, you will need to [Add TFundingBarrel, [Props it, set the link to the MasterTStone, and the FMax property to the amount it will take to start the tournament.
Known Issues:
Not really any, but one problem is that when a duelist dies, their loot will be added to their backpack. In doing so, the server is adding some sort of harmless, invisible item to the pack. This is nothing to worry about, as the server will automatically clean this up. I would have fixed it, had I had the time. It will be fixed in the next release.

Stuff to Know:
If you are using the funding barrel, this is what will happen: When the funding barrel has reached the set amount, moongates will be spawned at each towns bank to the spectator area of the tournament. A timer will then be started for 20 minutes. After 20 minutes, if there is enough players (value set on MasterTStone), the tournament will begin, and the moongates will be despawned. You can set the moongate options via the gump on the MasterTStone.

The system is currently coded so that the two duelists for each round are picked the second before the duel, thus this version can not have a gump to show who will be fighting who. The next full release will be coded a lot differently, and will have this feature. Like I said earlier, I can only test this to the best of my ability. I hope that there are no major exploits and bugs, but if you get them, my full support will be given to fix them, etc.

It is also recommended that (sheesh a lot of recommendations!) you make it so that the spectator area can not cast spells and do harm, etc. This can make interference with duels, and can be unfair. To do this, simple grab a copy of ASayre8's Custom Regions in a Box script (if you don't already have it, shame on you ;) ), and set it up accordingly.

Ok, so what if you don't want to use the funding barrel? Simple! When you would like signups to begin, you can spawn the moongates to the tournament area in the System Commands gump. Then players can use the Join Book to join the tournament. When you have all the players you want, go to the MasterTStone and then the System Commands gump. Click Start the Tourney and it will begin.

It is currently set up so the winner gets a 'Tourney Ticket'. You may modify this accordingly, or you can let players trade them in for prizes, etc.

Can't remember anything else to tell you guys... I'm tired. All I can say is pop it in and give it a try. Just be sure to set everything else up, or you can cause some problems.

Merry Christmas RunUO Community!
 

Attachments

  • Milt's Auto Tourney System v.1.0.3.zip
    33.1 KB · Views: 1,599

milt

Knight
*UPDATE - Dec 25, 2005*
Fixed a bug in the OnDisconnect method that may cause server to crash.
I had just added this feature today so I guess I forgot to look over it well. Sorry.
*/UPDATE*

*UPDATE - Dec 26, 2005*
Fixed a minor bug in the OnDeath method that some people with auto-res kill systems or similar system may encounter. This hotfix may not be needed, but is recommended.
*/UPDATE*

*UPDATE - Dec 28, 2005*
Fixed a bug with the funding barrels. If you use them, I recommend this update, otherwise you will be fine. Also, I made it so that you can't click the 'Start Tourney' button if there is not at least 3 players signed up.
*/UPDATE*
 

Ryan_2005

Wanderer
Humm so its kinda like the Challenge system but ALOT better hehe (Thanks bro i run a pvp shard and my players 1v1 all the time and this is Super players love it THANKS!)
 

Newbiepdo

Sorceror
Added this to my server directory, restarted shard, went upstairs to piss, came back to a server that had crashed 6 times. Never added any of these items IN GAME yet.

Code:
Server Crash Report
===================

Operating System: Microsoft Windows NT 5.1.2600.0
.NET Framework: 1.1.4322.2032
Time: 12/25/2005 9:57:09 PM
Mobiles: 20490
Items: 381416
Clients:
- Count: 6


Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Items.MasterTStone.OnDisconnect(DisconnectedEventArgs e)
   at Server.DisconnectedEventHandler.Invoke(DisconnectedEventArgs e)
   at Server.Mobile.set_NetState(NetState value)
   at Server.Network.NetState.ProcessDisposedQueue()
   at Server.Core.Main(String[] args)
 

milt

Knight
Run the server in debug mode for me and then re-post it.

*EDIT* - I looked through the code and fixed it, but if you could still post me a debug crash log so I may make sure that was the problem, I would appreciate it. Thanks.

New version is posted, sorry for any incoveniances.
 

Gehrig12

Wanderer
Great script!!!

Here are some issues I ran into:

Custom Regions in a Box is a must as the loser leaves the arena without any hit points, which cause an acidental res kill by the other player during a melee fight when both popped out to the same place.

After the fight the "attacker" is still flagged gray to everyone.

I could mount my ethy during a fight.

Clicking "Start Tourney" without anyone signed up locks up the server.

All in all the script is great, you did an outstanding job! :D
 

milt

Knight
Gehrig12 said:
Great script!!!

Here are some issues I ran into:

Custom Regions in a Box is a must as the loser leaves the arena without any hit points, which cause an acidental res kill by the other player during a melee fight when both popped out to the same place.

After the fight the "attacker" is still flagged gray to everyone.

I could mount my ethy during a fight.

Clicking "Start Tourney" without anyone signed up locks up the server.

All in all the script is great, you did an outstanding job! :D

Yes, this first version you need to use custom regions in a box.

As for the combatant issue and flagging, I was pretty sure that I set those back, I'll have to look into that.

The reason you can mount your ethereal is because you are staff, players cannot.

Why would you click 'Start Tourney' without anyone? The reason I left some things out like that is because it would be obvious not to do something in that nature. I realize you were probably trying to find bugs, so thanks for that tidbit.

I mostly coded it so if you use it properly, and the way it is supposed to be used, it will work just fine. Gotta look out for yourself :)
 

Gehrig12

Wanderer
Why would you click 'Start Tourney' without anyone?

I did this because I wasn't familar with the program and thought I needed to to allow people to sign up.

The reason you can mount your ethereal is because you are staff, players cannot.

I was on a player account at the time.

But I agree, it definently gets the job done. :)
 

milt

Knight
Hmm, that is weird. The code does the check for accesslevel, and I have tested it before. It might be an AOS thing, I'll have to look into that one buddy.
 

Asmir3

Sorceror
This is a really great script but one suggetion i have is that you should make so it tele the person who won to different place like the location you set for the winner.
Thank you for taking your time to code something like this its really good i test it my self!!!!!!!
 

Joeku

Lord
I get to post your first crash report! I feel so proud :D
Server Crash Report
===================
RunUO Version 1.0.0, Build 36918
Operating System: Microsoft Windows NT 5.1.2600.0
.NET Framework: 1.1.4322.573
Time: 12/26/2005 4:00:46 AM
Mobiles: 3
Items: 385
Clients:
- Count: 1
+ 127.0.0.1: (account = ******) (mobile = 0x1 'demo')
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Items.MasterTStone.OnDisconnect(DisconnectedEventArgs e)
at Server.DisconnectedEventHandler.Invoke(DisconnectedEventArgs e)
at Server.Mobile.set_NetState(NetState value)
at Server.Network.NetState.ProcessDisposedQueue()
at Server.Core.Main(String[] args)
I don't know what happened, I wasn't inside a tournament or anything. I was testing out a different script (in-game) and when I logged off, that error happened. I haven't gotten any other errors like it, so I'm not exactly sure how it happened. Anywho, better find a fix quick!
 

Pyro-Tech

Knight
Another Crash Log for ya....

Code:
Server Crash Report
===================

RunUO Version 1.0.0, Build 36918
Operating System: Microsoft Windows NT 5.1.2600.0
.NET Framework: 1.1.4322.2032
Time: 12/26/2005 3:34:48 AM
Mobiles: 13661
Items: 134827
Clients:
- Count: 1
+ 127.0.0.1: (account = ******) (mobile = 0x92F 'Pyro-Tech')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Items.MasterTStone.LetThemDuel() in d:\Run UO Server\Scripts\Custom\New Scripts\Systems\Milt's Auto Tourney System\Items\MasterTStone.cs:line 560
   at Server.Items.InternalTimer.OnTick() in d:\Run UO Server\Scripts\Custom\New Scripts\Systems\Milt's Auto Tourney System\Items\WallOfStoneEast.cs:line 88
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)

Kinda same thing....was working on a new help gump (testing) and it threw a fit..

it seems nice, but i will try it after some of the bugs get worked out....keep up the good work Milt
 

Falafel

Wanderer
milt, can u fix all these stupid crashes? i have server 100+ online, it will be not good when it crashes.

up\\

here some arrors - i di all that you tell me in the instalation, but when i press START TOURNAMENT button - servers STUCK...


ok i get it... its forbidden to star server without tsome one.. okay.


MILT - a have a question... CAN I translate all the language ib script to other languages (hebrew, russian, arabic), all your credits and copyrights will be saved.
 

Gehrig12

Wanderer
when i press START TOURNAMENT button - servers STUCK...
I ran into this if no one was signed up for the tourney, if people have signed up you should be ok.

System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Items.MasterTStone.OnDisconnect(Disconnecte dEventArgs e)
at Server.DisconnectedEventHandler.Invoke(Disconnecte dEventArgs e)
at Server.Mobile.set_NetState(NetState value)
at Server.Network.NetState.ProcessDisposedQueue()
at Server.Core.Main(String[] args)

Sounds like you are running the first version. Milt fixed the OnDisconnect crash problem. Try dowloading the scripts again.
 
Top