Advertisement
cgrunwald

Untitled

Sep 19th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 10.69 KB | None | 0 0
  1. <DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Hoon - Tal - Ees</title>
  6. <SCRIPT LANGUAGE="JavaScript">
  7. function checkIt(evt) {
  8.     evt = (evt) ? evt : window.event;
  9.     var charCode = (evt.which) ? evt.which : evt.keyCode;
  10.         if (charCode > 31 && (charCode < 48 || charCode > 57)) {
  11.                 status = "This field accepts numbers only.";
  12.                     return false;
  13.         }
  14.     status = "";
  15.     return true;
  16. }
  17. </SCRIPT>
  18. </head>
  19. <body>
  20.  
  21. <h1><font style="font-family: Verdana,Arial;">Toribash 3/4 Person Replay Generator</font></h1>
  22.                     <br /> <br />
  23.                     <font style="font-family: Verdana,Arial;">
  24.                     Before I begin, please understand that this will only generate the file contents of a replay file. This <b>does not</b> allow you to play online with 3/4 players. To edit the replay in-game, play the replay in Toribash, then quickly hit the <b>E</b> button. This will take you into edit mode, which will then allow you to do whatever the hell you please. Enjoy.
  25.                     </font>  <br /><br />
  26.                              <table style="width: 688px; border: 0; padding: 0; margin-bottom: 6px;">
  27.                                  <tr>
  28.                                     <td style="border-width: 1px 1px 1px 1px; border-style: solid; border-color: #000000; text-align: left; padding: 0 2px 2px 2px; background-color: #FFFFFF;">
  29.                                         <span style="font-family: Verdana,Arial; font-size: 10px; color: #000000; font-weight: normal; padding: 2px;">
  30.                                             Toribash  
  31.                                         </span>
  32.                                         <span style="font-family: Verdana,Arial; font-size: 13px; color: #000000; font-weight: bold;">
  33.                                             3/4 Person Replay Generator
  34.                                         </span>
  35.                                     </td>
  36.                                 </tr>
  37.                                 <tr>
  38.                                     <td style="border-width: 1px 1px 1px 1px; border-style: solid; border-color: #000000; text-align: left; padding: 4px; background-color: #FFFFFF; font-family: Arial,Verdana; font-size: 13px; color: #000000; font-weight: normal;">
  39.                                    
  40.                                      <?php
  41. if (isset($_GET['people'])) {
  42.     echo '<i>Below, you will find the contents of the replay file generated. To access the replay from your Toribash client, simply create a new file in your Toribash/replay folder called threefour.rpl or something along those lines. Paste the text below in, and save. After that, you should be able to use the replay in the Toribash client.';
  43.     $people = $_GET['people'];
  44.     $mf = $_GET['mf'];
  45.     $tf = $_GET['tf'];
  46.     $flags = $_GET['flags'];
  47.     $ed = $_GET['ed'];
  48.     $selfdamage = $_GET['selfdamage'];
  49.     $sumo = $_GET['sumo'];
  50.     $mod = $_GET['mod'];
  51.     $dojosize = $_GET['dojosize'];
  52.     $dmthresh = $_GET['dmthresh'];
  53.     $fracturethresh = $_GET['fracturethresh'];
  54.     $eh = $_GET['eh'];
  55.     $er = $_GET['er'];
  56.     $es = $_GET['es'];
  57.     $dqtimeout = $_GET['dqtimeout'];
  58.     $dojotype = $_GET['dojotype'];
  59.     $gravityx = $_GET['gravityx'];
  60.     $gravityy = $_GET['gravityy'];
  61.     $gravityz = $_GET['gravityz'];
  62.     $dqflag = $_GET['dqflag'];
  63.     $playera = $_GET['player1'];
  64.     $playerb = $_GET['player2'];
  65.     $playerc = $_GET['player3'];
  66.                                                                                                
  67.     if ($people=="three")
  68.     {
  69.         $numplay = 3;
  70.         $newgame = 'NEWGAME 0;'.$mf.' '.$tf.' 0 0 0 '.$flags.' '.$ed.' '.$selfdamage.' '.$sumo.' '.$mod.' 0 '.$dojosize.' '.$dmthresh.' '.$fracturethresh.' '.$eh.' 0 1 0 '.$numplay.' '.$er.' 0 '.$es.' '.$dqtimeout.' 0 '.$dojotype.' '.$gravityx.' '.$gravityy.' '.$gravityz.' '.$dqflag.' 0';
  71. $txtout = '#!/usr/bin/toribash
  72. #made with junts replay gen
  73. VERSION 10
  74. FIGHTNAME 0; FourPlayer
  75. BOUT 0; '.$playera.'
  76. BOUT 1; '.$playerb.'
  77. BOUT 2; '.$playerc.'
  78. AUTHOR 0; Juntalis
  79. ENGAGE 0; 3.000000 9.000000 0.000000 0 0 0
  80. ENGAGE 1; -3.000000 3.500000 0.000000 0 0 180
  81. ENGAGE 2; -3.000000 9.000000 0.000000 0 0 0
  82. '.$newgame.'
  83. ';
  84.     }
  85.     elseif ($people=="four")
  86.     {
  87.     $numplay = 4;
  88.     $newgame = 'NEWGAME 0;'.$mf.' '.$tf.' 0 0 0 '.$flags.' '.$ed.' '.$selfdamage.' '.$sumo.' '.$mod.' 0 '.$dojosize.' '.$dmthresh.' '.$fracturethresh.' '.$eh.' 0 1 0 '.$numplay.' '.$er.' 0 '.$es.' '.$dqtimeout.' 0 '.$dojotype.' '.$gravityx.' '.$gravityy.' '.$gravityz.' '.$dqflag.' 0';
  89.     $playerd = $_GET['player4'];
  90. $txtout = '#!/usr/bin/toribash
  91. #made with junts replay gen
  92. VERSION 10
  93. FIGHTNAME 0; FourPlayer
  94. BOUT 0; '.$playera.'
  95. BOUT 1; '.$playerb.'
  96. BOUT 2; '.$playerc.'
  97. BOUT 3; '.$playerd.'
  98. AUTHOR 0; Juntalis
  99. ENGAGE 0; 3.000000 9.000000 0.000000 0 0 0
  100. ENGAGE 1; -3.000000 3.500000 0.000000 0 0 180
  101. ENGAGE 2; -3.000000 9.000000 0.000000 0 0 0
  102. ENGAGE 3; 3.000000 3.500000 0.000000 0 0 180
  103. '.$newgame.'
  104. ';
  105.                                                                                                                                                                                                        
  106.                                                                                                                                                                                                                 }
  107.                                                                                                                                                                                                                     echo '<br /><br /><center><textarea cols="50" rows="10" readonly="readonly">'.$txtout.'</textarea>';
  108. }
  109. else
  110. {
  111. echo "                                  <form name=\"mainform\"\">\n";
  112. echo "                                          <i>Please note, I did very little debugging, so if you intentionally put in incorrect values and end up with a corrupt or otherwise flawed replay, that's your own fault.</i><br />\n";
  113. echo "                                          <input type=\"radio\" value=\"three\" name=\"people\" OnFocus=\"mainform.player4.disabled=true\" checked>&nbsp;Three People<br />\n";
  114. echo "                                          <input type=\"radio\" value=\"four\" name=\"people\" OnFocus=\"mainform.player4.disabled=false\">&nbsp;Four People<br /><br />\n";
  115. echo "\n";
  116. echo "                                          \n";
  117. echo "                                          Player 1: <input type=\"text\" size=\"12\" maxlength=\"25\" name=\"player1\" value=\"Tori\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  118. echo "                                          Player 2: <input type=\"text\" size=\"12\" maxlength=\"25\" name=\"player2\" value=\"Uke\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  119. echo "                                          Player 3: <input type=\"text\" size=\"12\" maxlength=\"25\" name=\"player3\" value=\"Player3\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  120. echo "                                          Player 4: <input type=\"text\" size=\"12\" maxlength=\"25\" name=\"player4\" value=\"Player4\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\" disabled><br /><br />\n";
  121. echo "                                          \n";
  122. echo "                                          Match Frames:<br /> <input type=\"text\" name=\"mf\" size=\"8\" maxlength=\"4\" value=\"500\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  123. echo "                                          Turn Frames:<br /> <input type=\"text\" name=\"tf\" size=\"8\" maxlength=\"4\" value=\"10\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  124. echo "\n";
  125. echo "                                          Mod:<br /> <input type=\"text\" name=\"mod\" size=\"8\" maxlength=\"25\" value=\"classic\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  126. echo "                                          Flags:<br /> <input type=\"text\" name=\"flags\" size=\"2\" maxlength=\"2\" value=\"0\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  127. echo "                                          Self-Damage:<br />  <input type=\"text\" name=\"selfdamage\" size=\"1\" maxlength=\"1\" value=\"0\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  128. echo "                                          \n";
  129. echo "                                          Engage Distance:<br /> <input type=\"text\" name=\"ed\" size=\"8\" maxlength=\"8\" value=\"100\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  130. echo "                                          Engage Height:<br /> <input type=\"text\" name=\"eh\" size=\"8\" maxlength=\"8\" value=\"0\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  131. echo "\n";
  132. echo "                                          Engage Rotation:<br /> <input type=\"text\" name=\"er\" size=\"8\" maxlength=\"15\" value=\"0\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  133. echo "                                          Engage Space:<br /> <input type=\"text\" name=\"es\" size=\"8\" maxlength=\"15\" value=\"0\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  134. echo "                                          Sumo Mode (0 means wrists and ankles DQ. 1 means they don't): <br /> <input type=\"text\" name=\"sumo\" size=\"1\" maxlength=\"1\" value=\"1\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  135. echo "                                          Dojo Type:<br /> <input type=\"text\" name=\"dojotype\" size=\"1\" maxlength=\"1\" value=\"0\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  136. echo "                                          Dojo Size:<br /> <input type=\"text\" name=\"dojosize\" size=\"8\" maxlength=\"15\" value=\"0\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  137. echo "\n";
  138. echo "                                          DQ Flag:<br /> <input type=\"text\" name=\"dqflag\" size=\"1\" maxlength=\"1\" value=\"0\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  139. echo "                                          DQ Timeout:<br /> <input type=\"text\" name=\"dqtimeout\" size=\"8\" maxlength=\"8\" value=\"0\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  140. echo "                                          Dismember Threshold:<br /> <input type=\"text\" name=\"dmthresh\" size=\"8\" maxlength=\"8\" value=\"100\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  141. echo "                                          Fracture Threshold:<br /> <input type=\"text\" name=\"fracturethresh\" size=\"8\" maxlength=\"8\" value=\"0\" onKeyPress=\"return checkIt(event)\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br />\n";
  142. echo "                                          Gravity (X,Y,Z):<br /> <input type=\"text\" name=\"gravityx\" size=\"3\" maxlength=\"15\" value=\"0\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"> <input type=\"text\" name=\"gravityy\" size=\"3\" maxlength=\"15\" value=\"0\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"> <input type=\"text\" name=\"gravityz\" size=\"3\" maxlength=\"15\" value=\"-9.820000\" onfocus=\"if(this.value == this.defaultValue) this.value = ''\"><br /><br />\n";
  143. echo "\n";
  144. echo "                                          <input type=\"submit\" size=\"8\" value=\"Generate\"><br /><br />\n";
  145. echo "                                      </form>\n";
  146. }
  147. ?>
  148.  
  149.                                    
  150.                                     <br /><br />
  151.                                     </td>
  152.                                 </tr>
  153.                             </table>
  154.                     <p />
  155.                <div class="clear"></div>
  156.                
  157.                </div>
  158.                <!-- End Left Column -->
  159.                
  160.          </div>    
  161.          <!-- End Faux Columns -->
  162.          
  163.    </div>
  164.    <!-- End Wrapper -->
  165.  
  166. </body>
  167. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement