Guest User

Untitled

a guest
Jan 3rd, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(x < 64)
  2. {
  3.     //Take this room name, convert the number to decimal, delete the integers from the name and finally substract 10 from the integer
  4.     thisroom = room_get_name(room);
  5.     thisroomdec = real(string_char_at(thisroom,9)) * 10 + real(string_char_at(thisroom, 10));
  6.     thisroom = string_delete(thisroom,9,2)
  7.     thisroomdec -= 10;
  8.    
  9.     //if the next room is smaller than 10, add a 0 before the string
  10.     if(thisroomdec < 10)
  11.     {
  12.         thisroom = string_insert(string(0),thisroom,9);
  13.         thisroom = string_insert(string(thisroomdec),thisroom,10);
  14.     }
  15.     else
  16.     {
  17.         thisroom = string_insert(string(thisroomdec),thisroom,9);
  18.     }
  19.     for(i = 0; i < 100; i += 1)
  20.     {
  21.         if(thisroom == string(room_get_name(i)))
  22.         {room_goto(i);}
  23.     }
  24. }
  25. if(x > (room_width - 64))
  26. {
  27.     //Take this room name, convert the number to decimal, delete the integers from the name and finally add 10 to the integer
  28.     thisroom = room_get_name(room);
  29.     thisroomdec = real(string_char_at(thisroom,9)) * 10 + real(string_char_at(thisroom, 10));
  30.     thisroom = string_delete(thisroom,9,2)
  31.     thisroomdec += 10;
  32.    
  33.     //if the next room is smaller than 10, add a 0 before the string
  34.     if(thisroomdec < 10)
  35.     {
  36.         thisroom = string_insert(string(0),thisroom,9);
  37.         thisroom = string_insert(string(thisroomdec),thisroom,10);
  38.     }
  39.     else
  40.     {
  41.         thisroom = string_insert(string(thisroomdec),thisroom,9);
  42.     }
  43.     for(i = 0; i < 100; i += 1)
  44.     {
  45.         if(thisroom == string(room_get_name(i)))
  46.         {room_goto(i);}
  47.     }
  48. }
  49. if(y < 128)
  50. {
  51.     //Take this room name, convert the number to decimal, delete the integers from the name and finally add 1 to the integer
  52.     thisroom = room_get_name(room);
  53.     thisroomdec = real(string_char_at(thisroom,9)) * 10 + real(string_char_at(thisroom, 10));
  54.     thisroom = string_delete(thisroom,9,2)
  55.     thisroomdec += 1;
  56.    
  57.     //if the next room is smaller than 10, add a 0 before the string
  58.     if(thisroomdec < 10)
  59.     {
  60.         thisroom = string_insert(string(0),thisroom,9);
  61.         thisroom = string_insert(string(thisroomdec),thisroom,10);
  62.     }
  63.     else
  64.     {
  65.         thisroom = string_insert(string(thisroomdec),thisroom,9);
  66.     }
  67.     for(i = 0; i < 100; i += 1)
  68.     {
  69.         if(thisroom == string(room_get_name(i)))
  70.         {room_goto(i);}
  71.     }
  72. }
  73. if(y > room_height - 128)
  74. {
  75.     //Take this room name, convert the number to decimal, delete the integers from the name and finally substract 1 from the integer
  76.     thisroom = room_get_name(room);
  77.     thisroomdec = real(string_char_at(thisroom,9)) * 10 + real(string_char_at(thisroom, 10));
  78.     thisroom = string_delete(thisroom,9,2)
  79.     thisroomdec -= 1;
  80.    
  81.     //if the next room is smaller than 10, add a 0 before the string
  82.     if(thisroomdec < 10)
  83.     {
  84.         thisroom = string_insert(string(0),thisroom,9);
  85.         thisroom = string_insert(string(thisroomdec),thisroom,10);
  86.     }
  87.     else
  88.     {
  89.         thisroom = string_insert(string(thisroomdec),thisroom,9);
  90.     }
  91.     for(i = 0; i < 100; i += 1)
  92.     {
  93.         if(thisroom == string(room_get_name(i)))
  94.         {room_goto(i);}
  95.     }
  96. }
Add Comment
Please, Sign In to add comment