Bracketmaker

Status
Not open for further replies.

Mekkah

is a Super Moderatoris a Tutor Alumnusis a Site Staff Alumnusis a Live Chat Contributor Alumnusis a CAP Contributor Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
Super Moderator
#1
Here's another improvement on the bracketmaker. Due to common demand, the default separator is now line-breaks. There's some extra functionality you might appreciate: you can click the winner's names. Forum BBCode is also generated to go along with the bracket.

As usual, notify me of any bugs.
I wrote a Bracketmaker in mIRC script. It allows you to compile a list of participants in tournaments, and then it will randomly make pairings for you. So far it's kinda primitive with some kinks and errors, it should eventually become a full tournament manager, in which you can keep track of winners, make next rounds, round robin options, etcetera.

edit so I heard chaos is making one too...well use this one while it's not done yet!

Instructions for use:

1) Copy the code and put it in Notepad
2) Save the document as Bracketmaker.ini (or whatever name you prefer, as long as it's .ini) in your mIRC folder
3) Open mIRC
4) Press Alt+R to open your Remote script editor.
5) Go to File -> Load and load the .ini you just made
6) Click OK, then press F2 to begin!

Code:
[script]
n0=;Welcome to the Bracketmaker v1.1, made by Mekkah
n1=;This program allows you to create a list of people participating in a Single Elimiation Tournament
n2=;And create the brackets for this round
n3=
n4=;To add a name, type it in the edit box, then click Add
n5=;To remove one, select a name from the list, then click Remove
n6=;To edit a name in the list, select it, click edit, typ the new name in the box that appears, and click OK
n7=;To create the brackets, add all names to the list, and click "Create brackets"
n8=;You can edit the brackets manually for substituting and fixing errors
n9=
n10=;This is version 1.1 so it's fairly primitive. I'm planning on adding more, like next rounds, marking winners, etcetera.
n11=;Things you shouldn't do:
n12=;- only schedule one person
n13=;- clear the list when it's empty
n14=;- edit this code if you don't know what you're doing
n15=;- click "Create Brackets" when not done adding persons (all persons will be removed from the list)
n16=;This should eventually become a tournament manager
n17=
n18=;Have fun!
n19=;Use this whenever you want. When spreading, please give credit to me.
n20=;Mekkah (Smogon)
n21=
n22=;Version History: 
n23=;1.0 - First try-out with nothing cool
n24=;1.1 - Added an automatic BYE-maker - if there's one person left in the participant list, he will automatically be "paired" against "BYE".
n25=;This person is totally random.
n26=
n27=alias f2 { dialog -m bracketmaker bracketmaker }
n28=
n29=dialog bracketmaker {
n30=  title "Bracketmaker v1.0"
n31=  size -l -l 300 300
n32=  option dbu
n33=
n34=  text "Participants:", 1, 10 10 30 10
n35=  list 2, 10 20 80 250
n36=
n37=  button "Add", 3, 100 40 50 20
n38=  button "Remove", 4, 100 70 50 20
n39=  button "Edit", 5, 100 100 50 20
n40=
n41=  edit "(name)", 6, 100 20 50 10
n42=  button "Clear list", 7, 20 260 40 10
n43=
n44=  button "Create brackets", 8, 100 130 50 20
n45=
n46=  edit "(brackets)", 9, 160 20 100 250, multi, return
n47=  text "Match-ups:", 10, 160 10 35 10
n48=  text "0", 11, 42 10 10 10
n49=  text "0", 12, 192 10 10 10
n50=}
n51=
n52=;Add
n53=on *:dialog:bracketmaker:sclick:3: {
n54=  did -a bracketmaker 2 $did(bracketmaker,6)
n55=  did -o bracketmaker 11 1 $did(bracketmaker,2).lines
n56=}
n57=;Remove
n58=on *:dialog:bracketmaker:sclick:4: {
n59=  did -d bracketmaker 2 $selpart
n60=}
n61=;Edit
n62=on *:dialog:bracketmaker:sclick:5: {
n63=  did -o bracketmaker 2 $selpart $?="Sub this participant for?"
n64=}
n65=;Clear
n66=on *:dialog:bracketmaker:sclick:7: {
n67=  did -r bracketmaker 2 
n68=  did -o bracketmaker 1 0
n69=}
n70=;Create Brackets
n71=on *:dialog:bracketmaker:sclick:8: {
n72=  did -r bracketmaker 9
n73=  var %x $calc($did(bracketmaker,2).lines / 2)
n74=  var %n 1
n75=  while ( %n <= %x ) {
n76=
n77=    var %part-1 $randpart
n78=    if ( $did(bracketmaker,2,%lop) ) { did -d bracketmaker 2 %lop }
n79=
n80=    var %part-2 $randpart
n81=    if ( $did(bracketmaker,2,%lop) ) { did -d bracketmaker 2 %lop }
n82=
n83=    did -i bracketmaker 9 %n %part-1 vs %part-2
n84=    did -o bracketmaker 12 1 %n
n85=
n86=    inc %n
n87=  }
n88=  if ( $did(bracketmaker,2).lines == 1 ) { did -i bracketmaker 9 %n $randpart vs BYE }
n89=  did -o bracketmaker 12 1 %n
n90=  did -d bracketmaker 2 %lop
n91=}
n92=
n93=;$randpart will return a random participant on the list
n94=alias randpart {
n95=  set %lop $rand(1,$did(bracketmaker,2).lines)
n96=  return $did(bracketmaker,2,%lop).text
n97=}
n98=;$selpart will return the number of the selected participant on the list
n99=alias selpart {
n100=  return $did(bracketmaker,2).sel
n101=}
---
timw06 has a bracketmaker for your browser as well.

http://dl.dropbox.com/u/187499/Bracketmaker/bm.html

I can't honestly remember when I made this but I found it when I was looking for stuff to put on my shiny new smogon space. It's a fully Javascript randomiser that will generate the matches for you in a format ready for cut/paste to threads.

Enjoy!

If you want to download it to use offline remember to grap bm.js in the same directory as well.


I've done some more work on the bracketmaker recently, it is now

# faster (no more timeouts in firefox)
# works as expected in all versions of Internet Explorer
# has less bugs
# gives byes automatically if you have a few less players than required

You can access the new version on the link above.


---
I just finished an improvement of timw06's old bracketmaker. It needed one for a few reasons:
  • I didn't like entering each name manually, so I simplified the process. You can separate player names any way you want; the default is ", " or a comma and a space. You can also separate by line (line breaks).
  • eval()s are used when they don't need to be. I removed them all.
Tell me if there are any bugs (I can't test on IE).
 

Jackal

I'm not retarded I'm Canadian it's different
is a Tournament Director Alumnusis a Site Staff Alumnusis a Super Moderator Alumnusis a Contributor Alumnusis a Battle Server Moderator Alumnus
#6
rofl tbh I did the whole paper slips thing for the entire world cup. Now for my next tournament I won't have too :P!
 

Hill

ticking away, the moments that make up a dull day
is a Past WCoP Champion
#7
I assign a number for each participant/team and then use random.org custom sequence generally.

But that might work too, i'll test it later.
 

Mekkah

is a Super Moderatoris a Tutor Alumnusis a Site Staff Alumnusis a Live Chat Contributor Alumnusis a CAP Contributor Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
Super Moderator
#16
Black Leather Jacket said:
Just curious about how you learned to do this, I'm trying to learn more about programming/computers and anything I can read up on would be most helpful.


-Thank you.
mIRC programming is pretty much about looking stuff up in the Help File every time you need a new sort of Identifier ($), command or mode. I learned it via simple Dutch guides, but I assume there's quite a few English ones out there too. mIRC itself has a pretty good Help file either way with examples and stuff, so I recommend you just use that.
 

gene

(* ̄(エ) ̄*)
is a Tournament Director Alumnusis a Site Staff Alumnusis a Forum Moderator Alumnusis a Live Chat Contributor Alumnusis a Battle Server Moderator Alumnusis a Past SPL and WCoP Champion
#23
sticking this. I don't know why it wasn't a sticky in the past. This will be helpful to anyone running a tournament.
 

Mekkah

is a Super Moderatoris a Tutor Alumnusis a Site Staff Alumnusis a Live Chat Contributor Alumnusis a CAP Contributor Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
Super Moderator
#24
I might work on this somewhere in the future to let it do what I promised if demand is high enough. The question is, is demand high?
 
Status
Not open for further replies.