Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. mode 60,10
  3. color 0f
  4. echo.
  5. echo.
  6. :: vamos cantando!! "100 garrafas de cerveja no muro, 100 garrafas!
  7. :: Se uam garrafa cair no chão, quantas ficarão?
  8. :: 99 garrafas no muro, 99 garrafas! se uma garrafa cair no chão, quantas ficarão?..."
  9.  
  10. if "%1"=="" goto Out_ro
  11. if "%1"=="Todo_mundo" goto Todo_mundo
  12. :inner
  13. for %%a in ( 9 8 7 6 5 4 3 2 1 0 ) do call %~nx0 Todo_mundo %2 %%a
  14. goto end
  15. :Out_ro
  16. for %%a in ( 9 8 7 6 5 4 3 2 1 0 ) do call %~nx0 inner %%a
  17. goto end
  18. :Todo_mundo
  19. set num=%2%3
  20. set Gara_fa=garrafas
  21. if "%num%"=="99" set Nume_ro=noventa e nove
  22. if "%num%"=="19" set Nume_ro=dezenove
  23. if "%num%"=="09" set Nume_ro=nove
  24. if "%num%"=="99" call :maquina "Tinhamos cem garrafas de cerveja encima do muro" &call :maquina "Caiu uma no chão" &goto pula_prim
  25. if "%2"=="0" set num=%3
  26. if "%num%"=="1" set Gara_fa=garrafa
  27. if "%num%"=="0" goto ult_tima
  28.  
  29. call :maquina "%Nume_ro% %Gara_fa% de cerveja encima do muro"
  30. echo.
  31. :pula_prim
  32. :: call :maquina "%Nume_ro% %Gara_fa%"
  33. echo.
  34. call :maquina "Nós temos %Nume_ro% %Gara_fa% de cerveja encima do muro"
  35. if not "%num%"=="1" call :maquina "Vixi.... caiu mais uma garrafa"&call :maquina "Quantas sobraram ?"
  36. echo.
  37. if "%num%"=="1" call :maquina "Se alguem derrubá-la quantas ficam ?"
  38. :ult_tima
  39. if "%num%"=="0" call :maquina "não tem mais garrafas de cerveja no muro"
  40. if "%num%"=="0" del /Q /s "ef.vbs" >nul&goto end
  41. if "%2"=="9" set Nume_roi=noventa
  42. if "%2"=="8" set Nume_roi=oitenta
  43. if "%2"=="7" set Nume_roi=setenta
  44. if "%2"=="6" set Nume_roi=secenta
  45. if "%2"=="5" set Nume_roi=cinquenta
  46. if "%2"=="4" set Nume_roi=quarenta
  47. if "%2"=="3" set Nume_roi=trinta
  48. if "%2"=="2" set Nume_roi=vinte
  49. if "%2"=="1" set Nume_roi=
  50. if "%2"=="0" set Nume_roi=
  51. if not "%2"=="1" goto seg_casa
  52. if "%3%"=="9" set Nume_roi=dezoito
  53. if "%3%"=="8" set Nume_roi=dezesete
  54. if "%3%"=="7" set Nume_roi=dezeseis
  55. if "%3%"=="6" set Nume_roi=quinze
  56. if "%3%"=="5" set Nume_roi=quatorze
  57. if "%3%"=="4" set Nume_roi=treze
  58. if "%3%"=="3" set Nume_roi=doze
  59. if "%3%"=="2" set Nume_roi=onze
  60. if "%3%"=="1" set Nume_roi=dez
  61. set Nu_me=
  62. goto Mostra_num
  63. :seg_casa
  64. if "%3"=="0" set Nu_me=nove
  65. if "%3"=="9" set Nu_me=oito
  66. if "%3"=="8" set Nu_me=sete
  67. if "%3"=="7" set Nu_me=seis
  68. if "%3"=="6" set Nu_me=cinco
  69. if "%3"=="5" set Nu_me=quatro
  70. if "%3"=="4" set Nu_me=trez
  71. if "%3"=="3" set Nu_me=duas
  72. if "%3"=="2" goto Ultima_casa
  73. if "%3"=="1" set Nu_me=
  74. if not "%3"=="0" goto Mostra_num
  75. if "%2"=="9" set Nume_roi=oitenta
  76. if "%2"=="8" set Nume_roi=setenta
  77. if "%2"=="7" set Nume_roi=secenta
  78. if "%2"=="6" set Nume_roi=cinquenta
  79. if "%2"=="5" set Nume_roi=quarenta
  80. if "%2"=="4" set Nume_roi=trinta
  81. if "%2"=="3" set Nume_roi=vinte
  82. if "%2"=="2" set Nume_roi=
  83. if "%2"=="1" set Nume_roi=
  84. goto Mostra_num
  85. :Ultima_casa
  86. if not "%2"=="0" set Nu_me=uma
  87. if "%2"=="0" set Nu_me=mais uma
  88. :Mostra_num
  89. if "%2"=="0" goto Pula_Intro
  90. if "%2"=="1" goto Pula_Intro
  91. if "%3"=="0" set Nume_roi=%Nume_roi% e
  92. if "%3"=="9" set Nume_roi=%Nume_roi% e
  93. if "%3"=="8" set Nume_roi=%Nume_roi% e
  94. if "%3"=="7" set Nume_roi=%Nume_roi% e
  95. if "%3"=="6" set Nume_roi=%Nume_roi% e
  96. if "%3"=="5" set Nume_roi=%Nume_roi% e
  97. if "%3"=="4" set Nume_roi=%Nume_roi% e
  98. if "%3"=="3" set Nume_roi=%Nume_roi% e
  99. if "%3"=="2" set Nume_roi=%Nume_roi% e
  100.  
  101. :Pula_Intro
  102. set Nume_ro=%Nume_roi%%Nu_me%
  103. cls
  104.  
  105. :end
  106. ping -n 1 localhost >nul
  107. goto:eof
  108.  
  109. :maquina
  110. set txt=%~1
  111. (
  112. echo On Error Resume Next
  113. echo dim txt
  114. echo txt="%txt%"
  115. echo for i=1 to len(txt^)
  116. echo  wscript.sleep 10
  117. echo  wscript.StdOut.Write mid(txt,i,1^)
  118. echo next
  119. echo wscript.echo " "
  120. )>ef.vbs
  121. cscript /nologo "ef.vbs"
  122. goto:eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement