GL1TCH3D

Box - icarus challenge

Jan 18th, 2016
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. @echo off
  2. title Icarus Challenge 2
  3. setlocal enabledelayedexpansion
  4. ::This script is based on assigning a variable to every position in the box
  5. ::m#1#2 #1 is the vertical assignment and #2 is the horizontal assignment
  6. for /l %%a in (0,1,10) do (
  7. for /l %%b in (0,1,20) do (
  8. set m%%a%%b=
  9. if "%%a" == "0" set m%%a%%b=#
  10. if "%%a" == "10" set m%%a%%b=#
  11. if "%%b" == "0" set m%%a%%b=#
  12. if "%%b" == "20" set m%%a%%b=#
  13. )
  14. )
  15.  
  16. set /p input= Please enter the text that you would like to see displayed in the box:
  17. for /l %%c in (0,1,200) do (
  18. if "!input:~%%c,1!"=="" set total=%%c &goto next1
  19. )
  20.  
  21. :next1
  22. if %total% GTR 18 goto multi
  23. set /a left=18 - %total%
  24. set /a end1=(%left%)/ 2
  25. set /a end2=18 - ((%left%) / 2)
  26. set /a temp=((%left% + 3) / 2 ) - 1
  27. if %end1% LSS %temp% set /a end1=%end1% + 1
  28. set text=%input%
  29.  
  30. for /l %%h in (0,1,%end1%) do (
  31. set text= !text!
  32. )
  33. set verti1=4
  34. set verti2=4
  35. set inputpos=0
  36. for /l %%d in (0,1,%end2%) do (
  37. set m%verti1%%%d=!input:~%%d,1!
  38. )
  39.  
  40.  
  41. :setvars
  42. for /l %%e in (0,1,%end2%) do (
  43. set m%verti1%%%e=!text:~%%e,1!
  44. )
  45. set m%verti1%0=#
  46. goto show
  47.  
  48.  
  49. :show
  50. for /l %%f in (0,1,10) do (
  51. for /l %%g in (0,1,20) do (
  52. set line%%f=!line%%f!!m%%f%%g!
  53. )
  54. echo !line%%f!
  55. )
  56.  
  57. pause
Advertisement
Add Comment
Please, Sign In to add comment