Bukz

Match Server Menus Generator

Jul 27th, 2011
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.15 KB | None | 0 0
  1. // Match Servers Menu Generator by Bukz
  2.  
  3. // Fill in/add to the following aliases to modify the script:
  4. //
  5. //    matchMenuCategories
  6. //    matchMenuLocations
  7. //    matchMenuNames_* // * = 1 - NUMBER OF CATEGORIES
  8. //    matchMenuConnects_* // * = 1 - NUMBER OF CATEGORIES
  9. //
  10. // Then uncomment and edit the keybind below to give yourself easy
  11. // access to the Match Servers Main Menu. Or use the following command to view
  12. // it at anytime:
  13. //
  14. //    /showmenu "Match Servers Main"
  15. //
  16. // Notes:
  17. //
  18. //    The aliases that must be modified (listed above) MUST be in order with each
  19. //    other. (e.g. Item #1 of matchMenuCategories corresponds with Item #1 of
  20. //    matchMenuLocations and so on.)
  21. //
  22. //    To regenerate the Main Menu at anytime, execute the following command:
  23. //
  24. //    /genMatchMainMenu
  25. //
  26. //    To regerate the individual match server menus at anytime, execute
  27. //    the following command:
  28. //
  29. //    /genMatchMenus
  30. //
  31. // bind KEY [ showmenu "Match Servers Main" ]
  32.  
  33. matchMenuCategories = [
  34.   "B}"
  35.   "BC"
  36.   "Dratini"
  37.   "eQ"
  38.   "Mewtwo"
  39.   "MyS"
  40.   "oNe"
  41.   "legacy"
  42.   "TyD"
  43.   "Server of Justice"
  44.   "w00p"
  45.   "DES"
  46. ]
  47.  
  48. matchMenuLocations = [
  49.   "Kansas, US"
  50.   "UK"
  51.   "Central US"
  52.   "UK"
  53.   "California, US"
  54.   "GER"
  55.   "Asrv, GER"
  56.   "UK"
  57.   "NL"
  58.   "UK"
  59.   "UK"
  60.   "Portsmouth, UK"
  61. ]
  62.  
  63. // B}
  64. matchMenuNames_1 = [
  65.   "Bold"
  66.   "Dauntless"
  67. ]
  68.  
  69. matchMenuConnects_1 = [
  70.   "bcubed.pbclan.tk 1492"
  71.   "bcubed.pbclan.tk 1927"
  72. ]
  73.  
  74. // BC
  75. matchMenuNames_2 = [
  76.   "Match Server #1"
  77.   "Match Server #2"
  78. ]
  79.  
  80. matchMenuConnects_2 = [
  81.   "bcuk.pwnz.org 10004 match"
  82.   "bcuk.pwnz.org 10006 match"
  83. ]
  84.  
  85. // Dratini
  86. matchMenuNames_3 = [
  87.   "Dratini 7777"
  88.   "Dratini 8888"
  89. ]
  90.  
  91. matchMenuConnects_3 = [
  92.   "dratini.tk 7777 match"
  93.   "dratini.tk 8888 match"
  94. ]
  95.  
  96. // eQ
  97. matchMenuNames_4 = [
  98.  
  99. ]
  100.  
  101. matchMenuConnects_4 = [
  102.  
  103. ]
  104.  
  105. // Mewtwo
  106. matchMenuNames_5 = [
  107.   "Mewtwo 7777"
  108.   "Mewtwo 8888"
  109. ]
  110.  
  111. matchMenuConnects_5 = [
  112.   "mewtwo.tk 7777 match"
  113.   "mewtwo.tk 8888 match"
  114. ]
  115.  
  116. // MyS
  117. matchMenuNames_6 = [
  118.   "Match #1"
  119.   "Match #2"
  120.   "Match #3"
  121. ]
  122.  
  123. matchMenuConnects_6 = [
  124.   "mys.aa.am 21111 match"
  125.   "mys.aa.am 22222 match"
  126.   "mys.aa.am 23333 match"
  127. ]
  128.  
  129. // oNe
  130. matchMenuNames_7 = [
  131.   "oNe Asrv 8010"
  132.   "Elysian"
  133.   "Divine"
  134. ]
  135.  
  136. matchMenuConnects_7 = [
  137.   "one.asrv.tk 8010"
  138.   "o-n-e.tk 8888 match"
  139.   "o-n-e.tk 9999 match"
  140. ]
  141.  
  142. // legacy
  143. matchMenuNames_8 = [
  144.  
  145. ]
  146.  
  147. matchMenuConnects_8 = [
  148.  
  149. ]
  150.  
  151. // TyD
  152. matchMenuNames_9 = [
  153.  
  154. ]
  155.  
  156. matchMenuConnects_9 = [
  157.  
  158. ]
  159.  
  160. // Server of Justice
  161. matchMenuNames_10 = [
  162.  
  163. ]
  164.  
  165. matchMenuConnects_10 = [
  166.  
  167. ]
  168.  
  169. // w00p
  170. matchMenuNames_11 = [
  171.  
  172. ]
  173.  
  174. matchMenuConnects_11 = [
  175.  
  176. ]
  177.  
  178. // DES
  179. matchMenuNames_12 = [
  180.   "DES Match #1"
  181. ]
  182.  
  183. matchMenuConnects_12 = [
  184.   "ultrapenguin.co.uk 28790 match"
  185. ]
  186.  
  187. // Do not edit below.
  188.  
  189. matchNumMenus = (listlen $matchMenuCategories)
  190. if (! (checkalias spamConnect)) [ spamConnect = 0 ]
  191.  
  192. genMatchMainMenu = [
  193.   loop mml (listlen $matchMenuCategories) [
  194.     itemloc = (at $matchMenuLocations $mml)
  195.     menuitem (concat (at $matchMenuCategories $mml) (addpunct $itemloc 2)) (addpunct (concat showmenu (at $matchMenuCategories $mml)) 2)
  196.   ]
  197. ]
  198.  
  199. newmenu "Match Servers Main"
  200. genMatchMainMenu
  201. menuitem "" -1
  202. menuitem "Settings" [ showmenu "Match Servers Settings" ]
  203.  
  204. newmenu "Match Servers Settings"
  205. menuitemcheckbox "Spam Connect: " "$spamConnect" [ spamConnect = $arg1 ]
  206.  
  207. matchconnect = [
  208.   if $spamConnect [
  209.     tmpmatchconnect = (concat $arg1 $arg2 $arg3)
  210.     loop vi 3 [ sleep (* $vi 1000) [ say /connect $tmpmatchconnect ] ]
  211.     sleep 3100 [ connect (at $tmpmatchconnect 0) (at $tmpmatchconnect 1) (at $tmpmatchconnect 2) ]
  212.   ] [ connect $arg1 $arg2 $arg3 ]
  213. ]
  214.  
  215. genMatchMenu = [
  216.   newmenu (at $matchMenuCategories (- $arg1 1))
  217.   loop lli (listlen (getalias (format matchMenuNames_%1 $arg1))) [
  218.     itemname = (at (getalias (format matchMenuNames_%1 $arg1)) $lli)
  219.     tmpconnect = (at (getalias (format matchMenuConnects_%1 $arg1)) $lli)
  220.     menuitem $itemname (addpunct (concat matchconnect (at $tmpconnect 0) (at $tmpconnect 1) (at $tmpconnect 2)) 2)
  221.   ]
  222. ]
  223.  
  224. genMatchMenus = [
  225.   loop gmi $matchNumMenus [
  226.     genMatchMenu (+ $gmi 1)
  227.   ]
  228. ]
  229.  
  230. genMatchMenus
Advertisement
Add Comment
Please, Sign In to add comment