Advertisement
corpnewt

Insult Generator.bat

Nov 7th, 2016
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.10 KB | None | 0 0
  1. @echo off
  2. setlocal enableDelayedExpansion
  3.  
  4. REM First we set up our 3 arrays with our insults and keep track of
  5. REM how many insults per array we have.
  6.  
  7. set first[1]=Lazy
  8. set first[2]=Stupid
  9. set first[3]=Insecure
  10. set first[4]=Idiotic
  11. set first[5]=Slimy
  12. set first[6]=Slutty
  13. set first[7]=Smelly
  14. set first[8]=Pompous
  15. set first[9]=Communist
  16. set first[10]=Dicknose
  17. set first[11]=Pie-Eating
  18. set first[12]=Racist
  19. set first[13]=Elitist
  20. set first[14]=White Trash
  21. set first[15]=Drug-Loving
  22. set first[16]=Butterface
  23. set first[17]=Tone Deaf
  24. set first[18]=Ugly
  25. set first[19]=Creepy
  26.  
  27. set /a firstCount=19
  28.  
  29. set second[1]=Douche
  30. set second[2]=Ass
  31. set second[3]=Turd
  32. set second[4]=Rectum
  33. set second[5]=Butt
  34. set second[6]=Cock
  35. set second[7]=Shit
  36. set second[8]=Crotch
  37. set second[9]=Bitch
  38. set second[10]=Prick
  39. set second[11]=Slut
  40. set second[12]=Taint
  41. set second[13]=Fuck
  42. set second[14]=Dick
  43. set second[15]=Boner
  44. set second[16]=Shart
  45. set second[17]=Nut
  46. set second[18]=Sphincter
  47.  
  48. set /a secondCount=18
  49.  
  50. set third[1]=Pilot
  51. set third[2]=Canoe
  52. set third[3]=Captain
  53. set third[4]=Pirate
  54. set third[5]=Hammer
  55. set third[6]=Knob
  56. set third[7]=Box
  57. set third[8]=Jockey
  58. set third[9]=Nazi
  59. set third[10]=Waffle
  60. set third[11]=Goblin
  61. set third[12]=Blossum
  62. set third[13]=Biscuit
  63. set third[14]=Clown
  64. set third[15]=Socket
  65. set third[16]=Monster
  66. set third[17]=Hound
  67. set third[18]=Dragon
  68. set third[19]=Balloon
  69.  
  70. set /a thirdCount=19
  71.  
  72. :mainMenu
  73. cls
  74. REM Let's generate 3 random numbers, one for each category
  75. set /a firstRand=!RANDOM! * (!firstCount!-1) / 32768 + 1
  76. set /a secondRand=!RANDOM! * (!secondCount!-1) / 32768 + 1
  77. set /a thirdRand=!RANDOM! * (!thirdCount!-1) / 32768 + 1
  78.  
  79. REM Now we place our insults! Have at you!
  80. set aAn=a
  81. call :StartsWith "!first[%firstRand%]!" "A"
  82. if %errorLevel%==0 (
  83. set aAn=an
  84. )
  85. call :StartsWith "!first[%firstRand%]!" "E"
  86. if %errorLevel%==0 (
  87. set aAn=an
  88. )
  89. call :StartsWith "!first[%firstRand%]!" "I"
  90. if %errorLevel%==0 (
  91. set aAn=an
  92. )
  93. call :StartsWith "!first[%firstRand%]!" "O"
  94. if %errorLevel%==0 (
  95. set aAn=an
  96. )
  97. call :StartsWith "!first[%firstRand%]!" "U"
  98. if %errorLevel%==0 (
  99. set aAn=an
  100. )
  101.  
  102. echo.
  103. call :color 08 "You know what?"
  104. echo.
  105. echo.
  106. echo.
  107. echo.
  108. call :color 08 "You're nothing but !aAn! "
  109. call :color 0c "!first[%firstRand%]! !second[%secondRand%]! !third[%thirdRand%]!"
  110. call :color 08 ^^^^^^!
  111. echo.
  112. REM echo You know what? You're nothing but a^/an !first[%firstRand%]! !second[%secondRand%]! !third[%thirdRand%]!!
  113. echo.
  114. echo.
  115. echo.
  116. echo.
  117. echo.
  118. echo.
  119. echo.
  120. echo.
  121. echo.
  122. echo.
  123. echo.
  124. echo.
  125. echo.
  126. echo.
  127. echo.
  128. echo.
  129. echo.
  130. echo.
  131. call :cleanupColor
  132. pause
  133. goto mainMenu
  134.  
  135. :StartsWith text string
  136. SETLOCAL
  137. set "txt=%~1"
  138. set "str=%~2"
  139. if defined str call set "s=%str%%%txt:*%str%=%%"
  140. if /i "%txt%" NEQ "%s%" set=2>NUL
  141. EXIT /b
  142.  
  143. :color
  144. setlocal enableDelayedExpansion
  145. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  146.  
  147. :color Color Str [/n]
  148. setlocal
  149. set "s=%~2"
  150. call :colorVar %1 s %3
  151. exit /b
  152.  
  153. :colorVar Color StrVar [/n]
  154. if not defined DEL call :initColor
  155. setlocal enableDelayedExpansion
  156. pushd .
  157. ':
  158. cd \
  159. set "s=!%~2!"
  160. :: The single blank line within the following IN() clause is critical - DO NOT REMOVE
  161. for %%n in (^"^
  162.  
  163. ^") do (
  164. set "s=!s:\=%%~n\%%~n!"
  165. set "s=!s:/=%%~n/%%~n!"
  166. set "s=!s::=%%~n:%%~n!"
  167. )
  168. for /f delims^=^ eol^= %%s in ("!s!") do (
  169. if "!" equ "" setlocal disableDelayedExpansion
  170.  
  171. if %%s==\ (
  172. findstr /a:%~1 "." "\'" nul
  173. <nul set /p "=%DEL%%DEL%%DEL%"
  174. ) else if %%s==/ (
  175. findstr /a:%~1 "." "/.\'" nul
  176. <nul set /p "=%DEL%%DEL%%DEL%%DEL%%DEL%"
  177. ) else (
  178. >color.txt (echo %%s\..\')
  179. findstr /a:%~1 /f:color.txt "."
  180. <nul set /p "=%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%"
  181. )
  182. )
  183. if /i "%~3"=="/n" echo(
  184. popd
  185. exit /b
  186.  
  187.  
  188. :initColor
  189. for /f %%A in ('"prompt $H&for %%B in (1) do rem"') do set "DEL=%%A %%A"
  190. <nul >"%temp%\'" set /p "=."
  191. subst ': "%temp%" >nul
  192. exit /b
  193.  
  194.  
  195. :cleanupColor
  196. 2>nul del "%temp%\'"
  197. 2>nul del "%temp%\color.txt"
  198. >nul subst ': /d
  199. exit /b
  200.  
  201. :quit
  202. call :cleanupColor
  203. if EXIST "X" del /ah "X"
  204. if EXIST "X" del "X"
  205. exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement