Advertisement
A-zu-ra

nene

Jan 14th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// Test menu control and variables (create event 1)
  2.  
  3. /* testmenu values (selection values)
  4. 0 - main
  5.     0 - info display
  6.     1 - account create test
  7. 1 - info display
  8. 2 - account create test
  9. */
  10.  
  11. randomize();
  12.  
  13. testmenu = 0;
  14. selection = 0;
  15.  
  16. /* account create values
  17. 0 - input login name (up to 8 characters)
  18. 1 - input display name
  19. 2 - input password
  20. 3 - re-input password
  21. 4 - password success
  22.  
  23. errors
  24. 5 - blank login name
  25. 6 - existing login name
  26. 7 - blacklisted login name
  27. 8 - blank display name
  28. 9 - existing display name
  29. 10 - blacklisted display name
  30. 11 - non-matching password re-enter
  31. */
  32. acctcreate = 0;
  33. attempt = 0;        // Recycle on acctlogin
  34. selectx = 0;        // Recycle on acctlogin
  35. selecty = 0;        // Recycle on acctlogin
  36. xwidth = 7;         // Recycle on acctlogin
  37. yheight = 4;        // Recycle on acctlogin
  38. newlogin = "";
  39. newdisp = "";
  40. newpass = "";
  41. passver = "";
  42. actives = "";
  43. retrytimer = 0;     // For account creation
  44.  
  45. /* account login values
  46. 0 - input login name (up to 8 characters)
  47. 1 - input password
  48. 2 - password success
  49.  
  50. errors
  51. 3 - blank login name
  52. 4 - login does not exist
  53. 5 - password failure
  54. */
  55. acctlogin = 0;      // Recycle variables above from registration
  56. loginname = "";
  57. logindisp = "";
  58. loginpass = "";
  59. retrytimer2 = 0;
  60.  
  61. retrytime = 180;    // Change this value to raise or lower period before retrying.
  62.  
  63. loginchar = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.";  // Login name only accepts capitals and a period
  64. dispcap = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";     // Display name can accept capitals, lowercase, numbers, and select symbols
  65. displow = "abcdefghijklmnopqrstuvwxyz";     // Shop name also uses the same character range as display name
  66. dispsym = "0123456789 !?+-*/%&@$.,:~^_()";
  67. dispchar = dispcap + displow + dispsym;
  68.  
  69. testcats[3] = "ACCOUNT LOGIN TEST";
  70. testcats[2] = "ACCOUNT NAME DISPLAY TEST";
  71. testcats[1] = "ACCOUNT CREATION TEST";
  72. testcats[0] = "INFORMATION DISPLAY TEST";
  73.  
  74. p1_up = vk_up;
  75. p1_down = vk_down;
  76. p1_left = vk_left;
  77. p1_right = vk_right;
  78. p1_but1 = ord('Z');
  79. p1_but2 = ord('X');
  80. p1_but3 = ord('C');
  81. p1_start = ord('1');
  82.  
  83. /// Information parsing and display variables (create event 2)
  84.  
  85. globalvar sectsep, subsectsep, normalsep;
  86.  
  87. letterheight = string_height("F");
  88. spacing = 24;
  89.  
  90. //testfile = file_text_open_write("acct.txt");
  91.  
  92. teststring = "acctid;signin`display`password`playcount;time_solobs`time_solobp:time_coopbst`time_coopbs1`time_coopbs2`time_coopbpn;rival1id`rival2id`rival3id";
  93. mainstring = "0000-0000;JOHTOKEN`Aru Azumaya`SJSU Game Dev Club`0120210`123;12345678900`8`1:12345678900`8`6172839450`6172839450`1`DDRKirbyISQ;1111-1111`2222-2222`3333-3333";
  94.  
  95. // file_text_write_string(testfile, mainstring);
  96. //file_text_close(testfile);
  97.  
  98. sectsep = ";";
  99. subsectsep = ":";
  100. normalsep = "`";
  101.  
  102. sectioncount = string_count(sectsep, mainstring);
  103. show_debug_message("debug section count: " + string(sectioncount));
  104. section[3] = token_parse_string(mainstring, sectsep, 3); // Rival IDs
  105. section[2] = token_parse_string(mainstring, sectsep, 2); // Best scores and placement on machine leaderboard
  106. subsect[1] = token_parse_string(section[2], subsectsep, 1); // Co-op bests
  107. subsect[0] = token_parse_string(section[2], subsectsep, 0); // Solo bests
  108. section[1] = token_parse_string(mainstring, sectsep, 1); // Login name, display name, home machine, password, and play count
  109. section[0] = token_parse_string(mainstring, sectsep, 0); // Account ID
  110.  
  111. // Information will be stored in a 2D array; first digit is order of information while second digit is for player
  112. info[0,0] = string(section[0]);                             // Account ID (####-####)
  113.  
  114. info[1,0] = token_parse_string(section[1], normalsep, 0);   // Login name (up to 8 characters, ALL CAPS and a period accepted)
  115. info[2,0] = token_parse_string(section[1], normalsep, 1);   // Display name (up to 12 characters, capitals and lowercase accepted as well as select symbols)
  116. info[3,0] = token_parse_string(section[1], normalsep, 2);   // Home cabinet (up to 20 characters, set by the machine owner)
  117. info[4,0] = token_parse_string(section[1], normalsep, 3);   // Password (7 inputs out of 3 buttons)
  118. info[5,0] = token_parse_string(section[1], normalsep, 4);   // Play count
  119.  
  120. info[6,0] = token_parse_string(subsect[0], normalsep, 0);   // Solo best score
  121. info[7,0] = token_parse_string(subsect[0], normalsep, 1);   // Solo highest shift
  122. info[8,0] = token_parse_string(subsect[0], normalsep, 2);   // Solo highest placement in local leaderboards
  123.  
  124. info[9,0] = token_parse_string(subsect[1], normalsep, 0);   // Co-op best overall score
  125. info[10,0] = token_parse_string(subsect[1], normalsep, 1);  // Co-op highest shift
  126. info[11,0] = token_parse_string(subsect[1], normalsep, 2);  // Co-op account holder score
  127. info[12,0] = token_parse_string(subsect[1], normalsep, 3);  // Co-op partner score
  128. info[13,0] = token_parse_string(subsect[1], normalsep, 4);  // Co-op highest placement in local leaderboards
  129. info[14,0] = token_parse_string(subsect[1], normalsep, 5);  // Co-op partner name
  130.  
  131. info[15,0] = token_parse_string(section[3], normalsep, 0);  // Rival 1 ID
  132. info[16,0] = token_parse_string(section[3], normalsep, 1);  // Rival 2 ID
  133. info[17,0] = token_parse_string(section[3], normalsep, 2);  // Rival 3 ID
  134.  
  135. /// Adding used names to a variable list on boot (create event 3)
  136.  
  137. acctfile = file_text_open_read("acct.txt");
  138. loginlist = "";
  139. displist = "";
  140. blacklist = "shit`shyt`shyte`fuck`fack`dick`penis`cunt`bitch`cock`piss`pussy`asshole`arse`fag`bastard`slut`douche`cum`nakadashi`nakadasi`manko`manco`chinchin`tintin`chintin`tinchin`chinko`tinko`paizuri`futanari`oppai`unko`tits`titties`anal";
  141.  
  142. while (!file_text_eof(acctfile)) {
  143.     var oneacct = token_parse_string(file_text_read_string(acctfile), sectsep, 1);
  144.     loginlist += token_parse_string(oneacct, normalsep, 0) + normalsep;
  145.     displist += token_parse_string(oneacct, normalsep, 1) + normalsep;
  146.    
  147.     file_text_readln(acctfile);
  148. }
  149. loginlist = string_delete(loginlist, string_length(loginlist), 1);
  150. displist = string_delete(displist, string_length(displist), 1);
  151.  
  152. file_text_close(acctfile);
  153. show_debug_message("Player count: " + string(string_count(normalsep, loginlist)));
  154.  
  155.  
  156.  
  157. /// Menu control (step event)
  158.  
  159. switch(testmenu) {
  160.     case 0:
  161.         if keyboard_check_pressed(p1_up)   {if (selection == 0) {selection = array_length_1d(testcats) - 1;} else {selection--;}}
  162.         if keyboard_check_pressed(p1_down) {if (selection == array_length_1d(testcats) - 1) {selection = 0;} else {selection++;}}
  163.         if keyboard_check_pressed(p1_but1) {
  164.             switch(selection) {
  165.                 case 0:
  166.                     selection = 0;
  167.                     testmenu = 1;
  168.                     break;
  169.                 case 1:
  170.                     selection = 0;
  171.                     testmenu = 2;
  172.                     acctcreate = 0;
  173.                     attempt = 0;
  174.                     selectx = 0;
  175.                     selecty = 0;
  176.                     xwidth = 7;
  177.                     yheight = 4;
  178.                     newlogin = "";
  179.                     newdisp = "";
  180.                     newpass = "";
  181.                     passver = "";
  182.                     actives = loginchar;
  183.                     break;
  184.                 case 2:
  185.                     selection = 0;
  186.                     testmenu = 3;
  187.                     break;
  188.                 case 3:
  189.                     selection = 0;
  190.                     testmenu = 4;
  191.                     acctlogin = 0;
  192.                     attempt = 0
  193.                     selectx = 0;
  194.                     selecty = 0;
  195.                     xwidth = 7;
  196.                     yheight = 4;
  197.                     loginname = "";
  198.                     logindisp = "";
  199.                     loginpass = "";
  200.                     actives = loginchar;
  201.                     break;
  202.             }
  203.         }
  204.         break;
  205.     case 1: case 3:
  206.         if keyboard_check_pressed(p1_start) {selection = 0; testmenu = 0;}
  207.         break;
  208.     case 2:
  209.         if keyboard_check_pressed(p1_left)  {if (selectx == 0) {selectx = xwidth - 1;} else {selectx--;}}
  210.         if keyboard_check_pressed(p1_right) {if (selectx == xwidth - 1) {selectx = 0} else {selectx++;}}
  211.         if keyboard_check_pressed(p1_up)    {if (selecty == 0) {selecty = yheight - 1;} else {selecty--;}}
  212.         if keyboard_check_pressed(p1_down)  {if (selecty == yheight - 1) {selecty = 0} else {selecty++;}}
  213.         switch(acctcreate) {
  214.             /* acctcreate steps
  215.                 0 - login name
  216.                 1 - display name
  217.                 2 - password
  218.                 3 - re-enter password
  219.                 4 - password success
  220.            
  221.             errors
  222.                 5 - blank login name
  223.                 6 - existing login name
  224.                 7 - blacklisted login name
  225.                 8 - blank display name
  226.                 9 - existing display name
  227.                 10 - blacklisted display name
  228.                 11 - non-matching password re-enter
  229.             */
  230.             case 0:
  231.                 if keyboard_check_pressed(p1_but1)  {
  232.                     if (string_length(newlogin) < MAXLOGIN) {
  233.                         newlogin += string_char_at(actives, ((xwidth * selecty) + selectx) + 1);
  234.                     }
  235.                     if (selectx == xwidth - 1) && (selecty == yheight - 1) {
  236.                         if (string_length(newlogin) == 0) {acctcreate = 5;}
  237.                         else {
  238.                             var count;
  239.                             var compare;
  240.                             count = 0;
  241.                             compare = "";
  242.                             while(count < string_count(normalsep, loginlist) + 1) {
  243.                                 compare = string_replace(newlogin, token_parse_string(loginlist, normalsep, count), "NG");
  244.                                 if (compare == "NG") {acctcreate = 6; break;} else {count++;}
  245.                             }
  246.                             count = 0;
  247.                             compare = "";
  248.                             while(count < string_count(normalsep, blacklist) + 1) {
  249.                                 compare = string(string_count(token_parse_string(blacklist, normalsep, count), string_lower(newlogin)));
  250.                                 if (compare != "0") {acctcreate = 7; break;} else {count++;}
  251.                             }
  252.                            
  253.                             if (compare = "0") {
  254.                                 acctcreate = 1;
  255.                                 attempt = 0;
  256.                                 xwidth = 13;
  257.                                 yheight = 7;
  258.                                 selectx = 0;
  259.                                 selecty = 0;
  260.                                 actives = dispchar;
  261.                             }
  262.                         }
  263.                     }
  264.                 }
  265.                 if keyboard_check_pressed(p1_but2)  {
  266.                     if (string_length(newlogin) > 0) {newlogin = string_delete(newlogin, string_length(newlogin), 1);}
  267.                 }
  268.                 break;
  269.             case 1:
  270.                 if keyboard_check_pressed(p1_but1)  {
  271.                     if (string_length(newdisp) < MAXDISP) {
  272.                         newdisp += string_char_at(actives, ((xwidth * selecty) + selectx) + 1);
  273.                     }
  274.                     if (selectx == xwidth - 1) && (selecty == yheight - 1) {
  275.                         if (string_length(newdisp) == 0) {acctcreate = 8;}
  276.                         else {
  277.                             var count;
  278.                             var compare;
  279.                             count = 0;
  280.                             compare = "";
  281.                             while(count < string_count(normalsep, displist) + 1) {
  282.                                 compare = string_replace(newdisp, token_parse_string(displist, normalsep, count), "NG");
  283.                                 if (compare == "NG") {acctcreate = 9; break;} else {count++;}
  284.                             }
  285.                             count = 0;
  286.                             compare = "";
  287.                             while(count < string_count(normalsep, blacklist) + 1) {
  288.                                 compare = string(string_count(token_parse_string(blacklist, normalsep, count), string_lower(newdisp)));
  289.                                 if (compare != "0") {acctcreate = 10; break;} else {count++;}
  290.                             }
  291.                            
  292.                             if (compare == "0") {
  293.                                 acctcreate = 2;
  294.                                 attempt = 0;
  295.                                 xwidth = 0;
  296.                                 yheight = 0;
  297.                                 selectx = 0;
  298.                                 selecty = 0;
  299.                                 actives = "";
  300.                             }
  301.                         }
  302.                     }
  303.                 }
  304.                 if keyboard_check_pressed(p1_but2)  {
  305.                     if (string_length(newdisp) > 0) {newdisp = string_delete(newdisp, string_length(newdisp), 1);}
  306.                 }
  307.                 break;
  308.             case 2:
  309.                 if (string_length(newpass) < PASSLENGTH) {
  310.                     if keyboard_check_pressed(p1_but1) {newpass += "0";}
  311.                     if keyboard_check_pressed(p1_but2) {newpass += "1";}
  312.                     if keyboard_check_pressed(p1_but3) {newpass += "2";}
  313.                 }
  314.                 if (string_length(newpass) = PASSLENGTH) {acctcreate = 3;}
  315.                 break;
  316.             case 3:
  317.                 if (string_length(passver) < PASSLENGTH) {
  318.                     if keyboard_check_pressed(p1_but1) {passver += "0";}
  319.                     if keyboard_check_pressed(p1_but2) {passver += "1";}
  320.                     if keyboard_check_pressed(p1_but3) {passver += "2";}
  321.                 }
  322.                 if (string_length(passver) = PASSLENGTH) {
  323.                     passver = string_replace(newpass, passver, "OK");
  324.                     if (passver == "OK") {
  325.                         var access;
  326.                         access = file_text_open_append("acct.txt");
  327.                         file_text_writeln(access);
  328.                         file_text_write_string(access, "0000-0000" + sectsep);
  329.                         file_text_write_string(access, newlogin + normalsep);
  330.                         file_text_write_string(access, newdisp + normalsep);
  331.                         file_text_write_string(access, "A-zu-ra Games" + normalsep);
  332.                         file_text_write_string(access, newpass + normalsep);
  333.                         file_text_write_string(access, "0" + sectsep);
  334.                         file_text_write_string(access, string(irandom(100000000) * 10) + normalsep);
  335.                         file_text_write_string(access, string(irandom(7) + 1) + normalsep);
  336.                         file_text_write_string(access, "0" + subsectsep);
  337.                         file_text_write_string(access, string(irandom(100000000) * 10) + normalsep);
  338.                         file_text_write_string(access, string(irandom(7) + 1) + normalsep);
  339.                         file_text_write_string(access, "0" + normalsep);
  340.                         file_text_write_string(access, "0" + normalsep);
  341.                         file_text_write_string(access, "0" + normalsep);
  342.                         file_text_write_string(access, "azuraroom" + sectsep);
  343.                         file_text_write_string(access, "0000-0000" + normalsep);
  344.                         file_text_write_string(access, "0000-0000" + normalsep);
  345.                         file_text_write_string(access, "0000-0000");
  346.                         file_text_close(access);
  347.                         loginlist += normalsep + newlogin;
  348.                         displist += normalsep + newdisp;
  349.                         acctcreate = 4;
  350.                     }
  351.                     else {acctcreate = 11;}
  352.                 }
  353.                 break;
  354.             case 4:
  355.                 if keyboard_check_pressed(p1_start) {testmenu = 0;}
  356.                 break;
  357.         }
  358.         break;
  359.     case 4:
  360.         if keyboard_check_pressed(p1_left)  {if (selectx == 0) {selectx = xwidth - 1;} else {selectx--;}}
  361.         if keyboard_check_pressed(p1_right) {if (selectx == xwidth - 1) {selectx = 0} else {selectx++;}}
  362.         if keyboard_check_pressed(p1_up)    {if (selecty == 0) {selecty = yheight - 1;} else {selecty--;}}
  363.         if keyboard_check_pressed(p1_down)  {if (selecty == yheight - 1) {selecty = 0} else {selecty++;}}
  364.         break;
  365. }
  366.  
  367. if (acctcreate > 4) {
  368.     retrytimer++
  369.     if (retrytimer > retrytime) {
  370.         attempt++;
  371.         retrytimer = 0;
  372.         if (attempt < 3) {
  373.             switch(acctcreate) {
  374.                 case 5: case 6: case 7:
  375.                     newlogin = "";
  376.                     selectx = 0;
  377.                     selecty = 0;
  378.                     acctcreate = 0;
  379.                     break;
  380.                 case 8: case 9: case 10:
  381.                     newdisp = "";
  382.                     selectx = 0;
  383.                     selecty = 0;
  384.                     acctcreate = 1;
  385.                     break;
  386.                 case 11:
  387.                     newpass = "";
  388.                     passver = "";
  389.                     acctcreate = 2;
  390.                     break;
  391.             }
  392.         }
  393.         else {
  394.             acctcreate = 0;
  395.             testmenu = 0;
  396.         }
  397.     }
  398. }
  399.  
  400.  
  401.  
  402. /// Plain drawing thing (draw event)
  403.  
  404. draw_set_quick(f_system, c_white, fa_left);
  405. draw_text(TESTBORDER, room_height - letterheight - TESTBORDER, "FPS: " + string_format(1000000 / delta_time, 2, 4));
  406.  
  407. switch(testmenu) {
  408.     case 0:
  409.         draw_set_halign(fa_left);
  410.         draw_text((room_width / 3) - TESTBORDER, TESTBORDER + (spacing * (2 + selection)), ">");
  411.         for(i = 0; i < array_length_1d(testcats); i++) {
  412.             draw_text((room_width / 3), TESTBORDER + (spacing * (2 + i)), testcats[i]);
  413.         }
  414.         break;
  415.     case 1:
  416.         draw_set_halign(fa_left);
  417.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 2), info[0,0]);
  418.        
  419.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 4), info[1,0]);
  420.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 5), info[2,0]);
  421.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 6), info[3,0]);
  422.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 7), info[4,0]);
  423.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 8), info[5,0]);
  424.        
  425.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 10), info[6,0]);
  426.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 11), info[7,0]);
  427.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 12), info[8,0]);
  428.        
  429.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 14), info[9,0]);
  430.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 15), info[10,0]);
  431.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 16), info[11,0]);
  432.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 17), info[12,0]);
  433.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 18), info[13,0]);
  434.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 19), info[14,0]);
  435.        
  436.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 21), info[15,0]);
  437.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 22), info[16,0]);
  438.         draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 23), info[17,0]);
  439.        
  440.         draw_set_halign(fa_right);
  441.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 2), "Account ID");
  442.        
  443.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 4), "Login Name");
  444.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 5), "Display Name");
  445.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 6), "Registered Location");
  446.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 7), "Password");
  447.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 8), "Play Count");
  448.        
  449.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 10), "Best Score [Solo]");
  450.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 11), "Highest Shift [Solo]");
  451.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 12), "Local Ranking [Solo]");
  452.        
  453.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 14), "Best Total Score [Co-op]");
  454.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 15), "Highest Shift [Co-op]");
  455.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 16), "Account Score [Co-op]");
  456.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 17), "Partner Score [Co-op]");
  457.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 18), "Local Ranking [Co-op]");
  458.         draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 19), "Partner's Display Name [Co-op]");
  459.        
  460.        draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 21), "Rival 1 ID");
  461.        draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 22), "Rival 2 ID");
  462.        draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 23), "Rival 3 ID");
  463.        break;
  464.    case 2:
  465.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 4), "Login Name");
  466.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 5), newlogin);
  467.        
  468.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 7), "Display Name");
  469.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 8), newdisp);
  470.        
  471.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 10), "Password");
  472.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 11), newpass);
  473.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 12), passver);
  474.    
  475.        draw_set_halign(fa_center);
  476.        switch(acctcreate) {
  477.            case 0: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Please enter your login name."); break;
  478.            case 1: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Please enter your display name."); break;
  479.            case 2: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Please enter your password."); break;
  480.            case 3: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Please re-enter your password."); break;
  481.            case 4: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Passwords match. New account created."); break;
  482.            case 5: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Login name cannot be blank."); break;
  483.            case 6: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Login name already exists with that name."); break;
  484.            case 7: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Inappropriate content cannot be used in the login name."); break;
  485.            case 8: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Display name cannot be blank."); break;
  486.            case 9: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Display name already exists with that name."); break;
  487.            case 10: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Inappropriate content cannot be used in the display name."); break;
  488.            case 11: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Passwords do not match."); break;
  489.        }
  490.        
  491.        for(i = 0; i < yheight; i++) {
  492.            for(j = 0; j < xwidth; j++) {
  493.                draw_text((room_width / 3) - (spacing * (floor(xwidth / 2) - j)), TESTBORDER + (spacing * (4 + i)), string_char_at(actives, ((xwidth * i) + j) + 1));
  494.            }
  495.        }
  496.        
  497.        draw_set_color(c_yellow);
  498.        draw_text((room_width / 3) - (spacing * (floor(xwidth / 2) - selectx)), TESTBORDER + (spacing * (4 + selecty)), string_char_at(actives, ((xwidth * selecty) + selectx) + 1));
  499.        break;
  500.    case 3:
  501.        draw_set_halign(fa_left);
  502.        draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * 2), "Display Name");
  503.        
  504.        draw_set_halign(fa_right);
  505.        draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * 2), "Login Name");
  506.        
  507.        var count;
  508.        count = 0;
  509.        while(count < string_count(normalsep, loginlist) + 1) {
  510.            draw_set_halign(fa_left);
  511.            draw_text(SCREENCENTERX + TESTBORDER, TESTBORDER + (spacing * (3 + count)), token_parse_string(displist, normalsep, count));
  512.  
  513.            draw_set_halign(fa_right);
  514.            draw_text(SCREENCENTERX - TESTBORDER, TESTBORDER + (spacing * (3 + count)), token_parse_string(loginlist, normalsep, count));
  515.            count++;
  516.        }
  517.        
  518.        /* draw_set_halign(fa_left);
  519.        draw_text(TESTBORDER, TESTBORDER + (spacing * 2), "Login name string");
  520.        draw_text(TESTBORDER, TESTBORDER + (spacing * 3), loginlist);
  521.        
  522.        draw_text(TESTBORDER, TESTBORDER + (spacing * 5), "Display name string");
  523.        draw_text(TESTBORDER, TESTBORDER + (spacing * 6), displist); */
  524.        break;
  525.    case 4:
  526.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 4), "Login Name");
  527.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 5), newlogin);
  528.        
  529.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 7), "Display Name");
  530.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 8), newdisp);
  531.        
  532.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 10), "Password");
  533.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 11), newpass);
  534.        draw_text((room_width * (3/5)) + TESTBORDER, TESTBORDER + (spacing * 12), passver);
  535.    
  536.        draw_set_halign(fa_center);
  537.        switch(acctlogin) {
  538.            case 0: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Please enter your login name."); break;
  539.            case 1: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Please enter your password."); break;
  540.            case 2: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Passwords match. Account details in " + testcats[0]); break;
  541.            case 3: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Login name cannot be blank."); break;
  542.            case 4: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Login name does not exist."); break;
  543.            case 5: draw_text(SCREENCENTERX, TESTBORDER + (spacing * 2), "Passwords is incorrect."); break;
  544.        }
  545.        
  546.        for(i = 0; i < yheight; i++) {
  547.            for(j = 0; j < xwidth; j++) {
  548.                draw_text((room_width / 3) - (spacing * (floor(xwidth / 2) - j)), TESTBORDER + (spacing * (4 + i)), string_char_at(actives, ((xwidth * i) + j) + 1));
  549.            }
  550.        }
  551.        
  552.        draw_set_color(c_yellow);
  553.        draw_text((room_width / 3) - (spacing * (floor(xwidth / 2) - selectx)), TESTBORDER + (spacing * (4 + selecty)), string_char_at(actives, ((xwidth * selecty) + selectx) + 1));
  554.        break;
  555. }
  556.  
  557. draw_set_halign(fa_center);
  558. draw_set_color(c_white);
  559. var testbottom = room_height - TESTBORDER - letterheight;
  560.  
  561. switch(testmenu) {
  562.    case 0:
  563.        draw_text(SCREENCENTERX, TESTBORDER, "TEST MODE");
  564.        draw_text(SCREENCENTERX, testbottom - spacing, "1P JOYSTICK = SELECT");
  565.        draw_text(SCREENCENTERX, testbottom, "1P BUTTON 1 = DECIDE");
  566.        break;
  567.    case 1:
  568.        draw_text(SCREENCENTERX, TESTBORDER, testcats[0]);
  569.        draw_text(SCREENCENTERX, testbottom, "1P START = BACK TO MAIN MENU");
  570.        break;
  571.    case 2:
  572.        draw_text(SCREENCENTERX, TESTBORDER, testcats[1]);
  573.        switch(acctcreate) {
  574.            case 0: case 1: case 5: case 6: case 7: case 8: case 9: case 10:
  575.                draw_text(SCREENCENTERX, testbottom - spacing, "1P JOYSTICK = SELECT");
  576.                draw_text(SCREENCENTERX, testbottom, "1P BUTTON 1 = DECIDE");
  577.                break;
  578.            case 2: case 3: case 11:
  579.                draw_text(SCREENCENTERX, testbottom, "1P BUTTON 1, 2, 3 = PASSWORD INPUT");
  580.                break;
  581.            case 4:
  582.                draw_text(SCREENCENTERX, testbottom, "1P START = BACK TO MAIN MENU");
  583.                break
  584.        }
  585.        break;
  586.    case 3:
  587.        draw_text(SCREENCENTERX, TESTBORDER, testcats[2]);
  588.        draw_text(SCREENCENTERX, testbottom, "1P START = BACK TO MAIN MENU");
  589.        break;
  590.    case 4:
  591.        draw_text(SCREENCENTERX, TESTBORDER, testcats[3]);
  592.        switch(acctcreate) {
  593.            case 0: case 1: case 5: case 6: case 7: case 8: case 9: case 10:
  594.                draw_text(SCREENCENTERX, testbottom - spacing, "1P JOYSTICK = SELECT");
  595.                draw_text(SCREENCENTERX, testbottom, "1P BUTTON 1 = DECIDE");
  596.                break;
  597.            case 2: case 3: case 11:
  598.                draw_text(SCREENCENTERX, testbottom, "1P BUTTON 1, 2, 3 = PASSWORD INPUT");
  599.                break;
  600.            case 4:
  601.                draw_text(SCREENCENTERX, testbottom, "1P START = BACK TO MAIN MENU");
  602.                break
  603.        }
  604.        break;
  605. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement