Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 33.05 KB | None | 0 0
  1. @echo off
  2. if "%1" == "/del" goto Del
  3. IF EXIST echoon.txt set echoon=defined
  4. IF DEFINED dontLoadLogo cls & goto boot
  5. echo.                                                                          
  6. echo.                                                                          
  7. echo.                  `.-:--`     ::                                          
  8. echo.                -so/-..-/oo   ss                         `d                
  9. echo.               +y`        `   ss .-::.      `.-:/:.     .:N----    
  10. echo.              -N`             sd+:...+y`           y-   .:N----    
  11. echo.              /h              sh      oo           :h    `m        
  12. echo.              :m              so      /s    :o/::. +m    `m          
  13. echo.              `d/             so      /s   .d`    :+m    `m          
  14. echo.               `s+.`    `-+   so      /s   .d.   `:om     h:```      
  15. echo.                 .//+++///.   /:      -/    -++++/-`o     `:///      
  16. echo.                                                                          
  17. echo.                    `m         `:://:-     .::/:::`   +.:////.      
  18. echo.                    `m        `s`    -+   .s`    .s   ys.   .s-      
  19. echo.                    `m        o.      y   o.      y   y:     :y      
  20. echo.                    `m        +.      y   /-      h   y/     /s      
  21. echo.                    `N.       `o-   `+/    o/   -o-   ys:` `:s`      
  22. echo.                     /::::::-   --:::.      `-::.`    y..///-`      
  23. echo.                                                     y.            
  24. echo.                                                     -`  
  25. echo.  
  26. :boot
  27. chcp 65001 >nul
  28. if "%1" == "/echoon" @echo on
  29. title L O A D I N G . . .
  30. set startSet=%time%
  31. set d=DEFIN^ED
  32. IF NOT %D% cl^s set cl^s=cl^s
  33. if "%1" == "/echoon" set cls=  
  34. IF %D% echoon @echo on
  35. setlocal enabledelayedexpansion
  36. ::MakeVar
  37. IF NOT DEFINED dontLoadLogo color 8f
  38. if "%1" == "/noob" set noobStartup=true & set 1= & goto Restart
  39. IF %D% noobStartup set noobStartup= & goto Help
  40. IF NOT %D% loopTag set loopTag=loop
  41. IF %loopTag% == loop set loop=
  42. IF %loopTag% == loop set loopOn=true
  43. IF %loopTag% == dontLoop set loop=::
  44. IF %loopTag% == dontLoop set loopOff=true & set dontLoop=true
  45. IF NOT %D% buildName set buildName=McW10
  46. IF %buildName% == twitcord set Twitcord=& set Dmmode=true
  47. IF %buildname% == McW10 set Twitcord=::
  48. IF %buildName% == twitcord set name=DmLoop
  49. IF NOT %D% name set name=ChatLoop
  50. IF NOT %d% MainDir set MainDir=%cd%
  51. set Build=15
  52. set filename=%~n0%~x0
  53. set ver=1.0.2 Beta
  54. set lineUp=1
  55. set numIncrease=1
  56. set numDecrease=300
  57. set api-event=RandomStartupClass & call APIs.bat
  58. ::Check for Files.
  59. IF NOT EXIST data goto createFiles
  60. cd %MainDir%
  61. IF EXIST stop.bat del stop.bat
  62. IF EXIST GuiStop.vbs del GuiStop.vbs
  63. IF EXIST options mkdir data
  64. IF EXIST options move options data\options
  65. IF EXIST presets move presets data\presets
  66. cd %MainDir%\Data\Presets\
  67. dir /b /ad "%MainDir%\Data\Presets\*" | >nul findstr "^" && (set presetExist=true) || (set presetExist=)
  68. cd %MainDir%
  69. ::Check for /edit tag
  70. if "%1" == "/edit" goto EditMah
  71. ::Backup directories.
  72. IF NOT %d% backupDone IF EXIST ExecBackup.bat call ExecBackup.bat
  73. ::Prompt loading page
  74. set dontEchoDaLoadRn=true
  75. goto RandomPreset    
  76. :RandomPreset
  77. ::Load random preset
  78. IF NOT "%presetExist%" == "true" goto SkipRandomPreset
  79. cd %MainDir%\Data\Presets\
  80. setlocal EnableDelayedExpansion
  81. set root=%MainDir%\Data\presets
  82. for /f %%d in ('dir /b /a:d "%root%" ^| find /c /v ""') do set count=%%d
  83. set /a num=%RANDOM% %% %count%
  84. for /f "skip=%num% tokens=*" %%d in ('dir /b /a:d "%root%"') do (
  85.   set RandomPreset=%%~fd\
  86.   goto SkipFixAttempt
  87. )
  88. IF %D% CLS %cls% %cls% & set dontLoadLogo=true & goto Restart
  89. IF NOT %D% CLS set dontLoadLogo=true & goto Restart
  90. :SkipFixAttempt
  91. cd %RandomPreset%
  92. set RandomPreset=%Cd%
  93. for /f "delims=\" %%a in ("%RandomPreset%") do set RandomPreset=%%~nxa
  94. cd %MainDir%
  95. IF %D% loadRandom set presetName=%randompreset%& goto PresetSetup
  96. :SkipRandomPreset
  97. cd data
  98. cd options
  99. ::Load default presets
  100. IF %D% presetToLoad goto Options
  101. type options.txt | findstr default_preset >output2.txt
  102. set /p default_preset=<output2.txt
  103. set default_preset=%default_preset%
  104. del output*.*
  105. set default_preset=%default_preset:default_preset: =%
  106. set altOldDefaultPreset=%default_preset%
  107. IF "%default_preset%" == "none" goto Options
  108. IF NOT "%presetExist%" == "true" set noDefPresetExist=true & goto Options
  109. IF "%default_Preset%" == "none " set default_preset=none
  110. IF "%default_Preset%" == "none" set default_preset=none
  111. IF NOT "%default_preset%" == "none" set defaultPreset=true
  112. set oldDefaultPreset=%default_preset%&set DontDo2=::
  113. IF "%default_preset%" == "none" set DontDo2=:: & set defPresetName=%default_preset%
  114. IF EXIST "%mainDir%\data\presets\%default_Preset%" set Yes2=true
  115. IF NOT EXIST "%mainDir%\data\presets\%default_Preset%" set errorWithDef=true
  116. IF NOT "%yes2%" == "true" set DontDo2=::
  117. IF "%yes2%" == "true" set DontDo2=
  118. %DontDo2%IF NOT "%default_preset%" == "none" set Wait=1
  119. %DontDo2%IF NOT "%default_preset%" == "none" goto PresetSetup
  120. IF NOT "%default_preset%" == "none" set NotFoundPreset=true
  121. IF %D% defPresetName set default_preset=None
  122. :Options
  123. ::Pre-Init Options
  124. cd %MainDir%
  125. IF NOT EXIST data\options\options.txt goto createFiles
  126. cd data
  127. cd Options
  128. ::Init
  129. ::Write file options to file
  130. type options.txt | findstr debug_mode >debug.txt
  131. type options.txt | findstr tags >tags.txt
  132. type options.txt | findstr default_delay >defaultDelay.txt
  133. type options.txt | findstr wait_time >timeWait.txt
  134. type options.txt | findstr old_build_number >oldBuildNumber.txt
  135. type options.txt | findstr build_numbers >buildNumbers.txt
  136. ::Read a set variables.
  137. set /p debugCheck=<debug.txt
  138. set /p tags=<tags.txt
  139. set /p default_delay=<defaultDelay.txt
  140. set /p wait_time=<timeWait.txt
  141. set /p updateCheck=<oldBuildNumber.txt
  142. set /p buildNumber=<buildNumbers.txt
  143. ::Post-init
  144. IF "%debugCheck%" == "debug_mode: true" set debug=true& set debugState=true
  145. IF "%debugCheck%" == "debug_mode: false" set debug=& set debugStart=false
  146. IF "%buildNumber%" == "build_numbers: false" set blank=::
  147. IF "%buildNumber%" == "build_numbers: true" set blank=
  148. IF "%tags%" == "tags: true" set tags=true
  149. IF "%tags%" == "tags: false" set tags=
  150. ::Less complicated stuff
  151. set default_delay=%default_delay:~14%
  152. set default_delay=%default_delay: =%
  153. set wait_time=%wait_time:wait_time: =%
  154. set wait_time=%wait_time: =%
  155. set updateCheck=%updateCheck:old_build_number: =%
  156. IF %build% gtr %updateCheck% goto update
  157. ::Enable/Disable BuildNumbers
  158. %blank%cd %MainDir%\data
  159. %blank%IF NOT EXIST buildNum.txt echo.0 > buildNum.txt
  160. %blank%set /p buildNum=<buildNum.txt
  161. %blank%set /a buildNum=%buildNum%+1
  162. %blank%echo %buildNum% > buildNum.txt
  163. %Blank%cd %MainDir%\data\options
  164. IF NOT %d% buildNum set buildNum=%build%
  165. IF %D% dontEchLoad set wait=1
  166. IF NOT %D% dontEchLoad set wait=2
  167. rename options.txt options.old &del *.txt &rename options.old options.txt
  168. ::Check for preset start value
  169. ::Code is not working, removed for temp
  170. ::if "%1:~0,7%" == "/preset" set presetToLoad=%1:~9,-1% & goto PresetSetup
  171. ::doWait
  172. cd %MainDir%
  173. IF NOT %d% presetName title %name% ^| Preset: None ^| Version: %ver% ^| Build %buildNum%
  174. IF %d% presetName title %name% ^| Preset: %presetName% ^| Version: %ver% ^| Build %buildNum%
  175. :Menu
  176. %cls%
  177. set startEnd=%time%
  178. color 0f
  179. ::CHECK SCRIPTS
  180. IF NOT %D% PresetExist set PresetOpt=
  181. IF %D% dontEchoDaLoadRn set dontEchoDaLoadRn=
  182. IF %D% VarStart set VarStart=
  183. IF NOT "%CD%" == "%MainDir%" cd %MainDir%
  184. IF "%PresetName%" == " " set presetName=
  185. IF "%PresetName%" == "" set presetName=
  186. IF NOT %D% debugState set debugState=false
  187. ::END
  188. %cls%
  189. IF NOT %D% moreOpt echo.%PrmtMsg%
  190. IF NOT %D% moreOpt echo.
  191. IF NOT %D% moreOpt echo.Type ^[Enter^] to create a ChatL^oop.
  192. IF NOT %D% moreOpt IF %D% presetExist echo.Or load a pre-existing ChatLoop like maybe %randomPreset%??
  193. IF NOT %D% moreOpt IF %D% presetExist echo.
  194. echo.Beta:
  195. echo.Type "random" to load random preset
  196. IF %D% loopOn echo.Type "loop" to toggle on/off, it's on right now
  197. IF %D% loopOff echo.Type "loop" to toggle on/off, it's off right now
  198. IF %D% dmMode echo.Type "dm" to toggle dm mode, it's on right now(twitter/discord)
  199. IF NOT %D% dmMode echo.Type "dm" to toggle dm mode, it's off right now(twitter/discord)
  200. IF %D% presetExist IF %D% presetName IF %D% dontEchoLoad echo.To run the default preset(%presetName%) type "def" or "default"
  201. IF %D% presetOpt IF %D% moreOpt echo.
  202. IF %D% presetOpt IF %D% moreOpt echo Presets Options:
  203. IF %D% presetOpt IF %D% moreOpt echo.To view presets type "view" or "preset-list"
  204. IF %D% presetOpt IF %D% moreOpt echo.To edit presets type "edit"
  205. IF %D% presetOpt IF %D% moreOpt echo.To delete presets type "del" or "delete"
  206. IF %D% presetOpt IF %D% moreOpt echo.And... To rename presets type "rename"
  207. IF %D% moreOpt echo.
  208. IF %D% moreOpt echo.Other Options:
  209. IF %D% moreOpt echo.To restart %name% type "restart"
  210. IF %D% moreOpt echo.To restart McW10 type "relog"
  211. IF %D% moreOpt echo.And if you are really confused, type "help"
  212. IF %D% tags echo.
  213. IF %D% tags echo.Tags:
  214. IF %D% tags echo.%buildName%; %loopTag%; build: %build%; %presetname%; %filename%; debug: %debugState%; delay: %default_delay%;
  215. IF %D% tags echo.default_preset: %default_preset%; wait_time: %wait_time%; numDecrease: %numDecrease%; numIncrease: %numINcrease%
  216. IF %D% tags echo.Started in: %MainDir%
  217. IF NOT %D% moreOpt echo.
  218. IF NOT %D% moreOpt echo.Type "more" to show More Options.
  219. echo.
  220. ::FOR ERRORS ONLY
  221. IF NOT %D% errorWithDef IF %D% notFoundPreset echo.ERROR: Failed to find the preset "%notFoundPreset%".
  222. IF %D% errorWithDef IF %D% notFoundPreset echo.ERROR: Failed to find the default preset "%oldDefaultPreset%".
  223. IF %D% noDefPresetExist echo.ERROR: Couldn't find the default preset "%altOldDefaultPreset%", also 0 exist. .-.
  224. IF %D% defaultPresetNotDefined echo.ERROR: No default preset set, to select a default preset edit options.txt
  225. IF %D% loopAlreadyOff echo.ERROR: Loop is already off.
  226. IF %D% loopAlreadyOn echo.ERROR: Loop is already on.
  227. IF %D% dmAlreadyOn echo.ERROR: DM mode is already on.
  228. IF EXIST ^%SystemDrive^% rmdir ^%SystemDrive^%
  229. IF %D% dmAlreadyOff echo.ERROR: McW10 mode is already on.
  230. set loopAlreadyOff=& set loopAlreadyOn=& set dmModeAlreadyOff=& set dmModeAlreadyOn=& set notFoundPreset=& set noDefPresetExist=& set errorWithDef=& set VarStart=& set dismiss=& set defaultPresetNotDefined=
  231. ::END FOR ERRORS
  232. set /p varStart=:
  233. IF NOT %D% varStart goto Editor
  234. IF "%varStart:~0,3%" == "dec" set numDecrease=%varStart:~4,9999%& set dismiss=true
  235. IF "%varStart:~0,3%" == "inc" set numIncrease=%varStart:~4,9999%& set dismiss=true
  236. IF "%varStart%" == "relog" goto restartMcw10
  237. IF "%varStart%" == "less" set MoreOpt= & %v%
  238. IF "%varStart%" == "random" set loadRandom=true & goto RandomPreset
  239. IF "%varStart%" == "restart" goto Restart
  240. IF "%varStart%" == "rename" goto renamePreset
  241. IF "%varStart%" == "view" goto viewPreset
  242. IF "%varStart%" == "update-beta" start http:\\bit.ly/chatLoopBetaBuild
  243. IF "%varStart%" == "update-stable" start http:\\bit.ly/chatLoopBuild
  244. IF "%varStart%" == "more" set moreOpt=true & set PresetOpt=true & set Tags=& goto Menu
  245. IF "%varStart%" == "preset-list" goto viewPreset
  246. IF "%varStart%" == "help" goto help
  247. IF "%varStart%" == "dm" goto DmToggle
  248. IF "%varStart:~0,1%" == "b" set b=%VarStart:~2,99999999999999%
  249. IF "%varStart%" == "edit" goto editPreset
  250. IF "%varStart%" == "delete" goto deletePreset
  251. IF "%varStart%" == "loop" goto loopToggle
  252. IF %d% DontEchoLoad IF "%varStart%" == "def" goto delay
  253. IF %d% DontEchoLoad IF "%varStart%" == "default" goto delay
  254. IF "%varStart:~0,3%" == "def" set defaultPresetNotDefined=true & set dismiss=true
  255. IF NOT %D% dmMode IF "%varStart%" == "dm" set buildname=twitcord
  256. IF NOT %D% dmMode IF "%varStart%" == "dm" set buildname=twitcord
  257. ::DEV
  258. IF "%varStart%" == "cls" set cls=
  259. IF "%varStart%" == "echoon" set EchoOn=true & @echo on
  260. IF "%varStart%" == "menu" goto Menu
  261. IF NOT %D% dismiss IF NOT EXIST "Data\Presets\%varStart%" set InvalidPresetName=true & set notFoundPreset=%varStart%& set presetName= &goto Menu
  262. IF NOT %D% dismiss IF %d% varStart set DontEchoLoad=& goto PresetSetup
  263. goto Menu
  264. :LoopToggle
  265. if %loopTag% == dontLoop set loopTag=loop& set DontLoadLogo=true & goto Restart
  266. if %loopTag% == loop set loopTag=dontLoop& set DontLoadLogo=true & goto Restart
  267. :DmToggle
  268. IF %buildname% == McW10 set buildname=twitcord& set name=&goto Restart
  269. IF %buildname% == twitcord set buildname=McW10& set name=&goto Restart
  270. :Editor
  271. IF %d% s1 goto WipeDefPreset
  272. %cls%
  273. ::Leave title blank
  274. title
  275. set presetname=None
  276. color 8f
  277. set presetIsUsed=
  278. mode con cols=71 lines=20
  279. echo.███████████████████████████████████████████████████████████████████████
  280. echo.███████████████████████████████████████████████████████████████████████
  281. echo.███████████████████████▌                        ▐██████████████████████
  282. echo.███████████████████████   Hit ^[Enter^] to start   ██████████████████████
  283. echo.███████████████████████▌                        ▐██████████████████████
  284. echo.███████████████████████████████████████████████████████████████████████
  285. echo.                                                                      
  286. echo.But:                                                                  
  287. echo.                                                                      
  288. echo.1^) You can only edit the current line of text.                        
  289. echo.                                                                      
  290. echo.2^) When you are done, just leave the line blank, and hit enter.        
  291. echo.                                                                      
  292. echo.3^) Put ^^ before any of these symbols:                                  
  293. echo.                                                                      
  294. echo.          ^|  ^<  ^>  ^(  ^)                                                
  295. echo.                                                                      
  296. echo.                                                                      
  297. echo.                                                                      
  298. echo.                                                                      
  299. pause >nul
  300. IF %d% debug echo.Build Number: %buildNum%
  301. IF %D% cls mode con: cols=98 lines=22
  302. IF %d% debug echo.Window: cols=98 lines=22
  303. color 8f
  304. echo.██████████████████████████████████████████████████████████████████████████████████████████████████
  305. echo.████████████████████████████████████████▌                  ▐██████████████████████████████████████
  306. echo.████████████████████████████████████████     Text below     ██████████████████████████████████████
  307. echo.████████████████████████████████████████▌                  ▐██████████████████████████████████████
  308. echo.██████████████████████████████████████████████████████████████████████████████████████████████████
  309. :NumInc1
  310. set numInc1=1
  311. set numDec1=0
  312. :backer1
  313. set /p s%numInc1%=
  314. IF NOT %d% s%numInc1% set LastNum=%numDec1% & goto Delay
  315. set /a NumInc1=%NumInc1%+1
  316. set /a NumDec1=%NumDec1%+1
  317. goto Backer1
  318. :PresetSetup
  319. IF %d% presetToLoad set presetName=%presetToLoad% & goto SkipCheckDef
  320. IF %D% varStart set presetname=%VarStart%
  321. IF %D% loadRandom set presetname=%randomPreset%
  322. IF NOT %D% dontEchoDaLoadRn echo.Loading..
  323. IF %D% presetName set default_preset= & set LoadedPreset=true & set DontEchoLoad= & goto SkipCheckDef
  324. IF %d% defaultPreset set defaultPreset= &set presetName=%default_preset% &set DontEchoLoad=true & set defPreset=true
  325. :SkipCheckDef
  326. IF NOT %d% presetName IF NOT EXIST "%MainDir%\Data\Presets\%default_preset%\" set presetname=None &goto Options
  327. IF %D% presetToLoad IF NOT EXIST "%MainDir%\data\presets\%PresetName%" goto Err502
  328. set presetIsUsed=true
  329. cd %MainDir%
  330. cd data
  331. cd Presets
  332. cd %PresetName%
  333. for %%* in (.) do set presetname=%%~nx*
  334. IF NOT %D% dontEchoDaLoadRn title %name% ^| Preset: %Presetname% ^| Version: %ver% ^| Build %buildNum%
  335. set NumIncrease3=1
  336. set NumDecrease3=0
  337. :loadMoreLines
  338. IF EXIST %numINcrease3%.txt set /p s%numIncrease3%=<%numIncrease3%.txt & set LastNum=%numIncrease3%
  339. IF NOT DEFINED s%numIncrease3% set /a Lastnum=%lastnum%-1 & goto loadFinished
  340. IF %D% cls IF NOT %D% DontEchoLoad cls
  341. IF NOT %D% DontEchoLoad echo.Loaded line: %numIncrease3%
  342. set /a NumIncrease3=%numIncrease3%+1
  343. set /a NumDecrease3=%numDecrease3%+1
  344. goto loadMoreLines
  345. :loadFinished
  346. cd %MainDir%
  347. IF %D% varStart goto Delay
  348. IF NOT %D% loadRandom IF %d% defPreset set defPreset= & goto Options
  349. :Delay
  350. %cls%
  351. echo.Servers typically have a chat cooldown, and since having
  352. echo."Wait between messages!" in your chat is annoying,
  353. echo.delay should be added between one message and another.
  354. echo.
  355. echo.If you want to use the default delay^(%default_delay%^) hit ^[Enter^]
  356. echo.Or type the delay you want, for example on Cookie Build use 2300
  357. echo.
  358. echo.Delay is measured in millieseconds.
  359. echo.1 second = 1000ms
  360. echo.
  361. set /p Delay=Delay(ms):
  362. IF NOT %d% DELAY set delay=%default_delay%
  363. IF NOT %d% presetName set presetName=None
  364. title %name% ^| Preset: %presetname% ^| Version: %ver% ^| Build %buildNum%
  365. IF %d% presetIsUsed goto startPostChat
  366. color 0f
  367. IF %D% cls mode con cols=80 lines=20
  368. title %name% ^| Preset: %Presetname% ^| Version: %ver% ^| Build %buildNum%
  369. IF %d% firstRun echo.
  370. IF %d% firstRun echo.Y = Yes ^| N = No
  371. choice /C YN /m "Would you like to create a preset out of that?(Save the %name%)"
  372. IF %ERRORLEVEL% == 1 goto presetMake
  373. IF %ERRORLEVEL% == 2 goto Startpostchat
  374. :startPostChat
  375. %cls%
  376. choice /C YN /m "Would you like to /tell a player instead?"
  377. IF %ERRORLEVEL% == 1 goto Tell
  378. IF %ERRORLEVEL% == 2 goto PromptStart
  379. :promptStart
  380. %cls%
  381. echo.Hit ^[Enter^] key when, you are ready to start %name%.
  382. echo.You will then have %wait_time% seconds to be at the chat box.
  383. pause >nul
  384. title %name%
  385. cd %MainDir%
  386. goto CreateFiles2
  387. :Cr8Done
  388. start GuiStop.vbs
  389. timeout /t %wait_time% >nul
  390. %cls%
  391. cd %MainDir%
  392. echo Set WshShell = WScript.CreateObject("WScript.Shell") >spam.vbs
  393. IF %d% enterKeyPress echo.WshShell.SendKeys "{ENTER}">> spam.vbs
  394. echo WScript.Sleep %delay%>> spam.vbs
  395. IF %d% enterKeyPress echo.WshShell.SendKeys "{ENTER}">> spam.vbs
  396. %twitcord%echo.WshShell.SendKeys "{ENTER}">> spam.vbs
  397. %twitcord%echo.WshShell.SendKeys "{ENTER}">> spam.vbs
  398. %twitcord%echo.WshShell.SendKeys "{ENTER}">> spam.vbs
  399. echo.WshShell.SendKeys ("^+A")>> spam.vbs
  400. echo.WshShell.SendKeys ("{DEL}")>> spam.vbs
  401. set looping=::
  402. echo WshShell.SendKeys ("^v") >> spam.vbs
  403. echo.%b%%s1% |clip
  404. :c
  405. set /a lineUp=%lineUp%+1
  406. if %lineUp% GTR %LastNum% set lineUp=1& set loopWarn=define
  407. IF %d% dontLoop IF %D% loopWarn taskkill /f /im wscript.exe & start %filename% /del & exit
  408. echo.!%b%s%lineUp%!|clip
  409. set /a numIncrease=%NumIncrease%+1
  410. set /a numDecrease=%numDecrease%-1
  411. cscript //nologo spam.vbs & goto C
  412. :presetMake
  413. %cls%
  414. echo.And you want to call the preset?
  415. set /p makePresetName=Name:
  416. cd data
  417. cd Presets
  418. IF EXIST "%makePresetName%" goto presetAlreadyExist
  419. :rewriteItThen
  420. mkdir "%makePresetName%"
  421. cd "%makePresetName%"
  422. IF NOT %D% numUpToWrite set numUptoWrite=1
  423. echo.Saving...
  424. :loopPresetWrite
  425. IF NOT %D% s%numUpToWrite% %cls% & goto Startpostchat
  426. IF %d% s%numUpToWrite% echo !s%numUpToWrite%!> %numUpToWrite%.txt
  427. set /a numUpToWrite=%numUpToWrite%+1 & goto loopPresetWrite
  428. ::Deprecated PRESET-EDIT METHOD. Still used by edit preset, idk how tbh
  429. ::Rewrite this crap \/\/\/\/\/\/\/ please, I can't understand ONE SINGLE word. Also @Brain, can you comment shit more often?
  430. ::Thanks <3
  431. echo.WARNING: Attempted to use deprecated preset-write method. & pause
  432. :echoShit
  433. IF NOT %D% numUppy set numUppy=1
  434. IF %d% s%numUppy% echo !s%numUppy%!> %numUppy%.txt
  435. IF NOT %d% s%numUppy% set dontDoThisPlzFamTysm=::
  436. set /a numUppy=%NumUppy%+1
  437. %dontDoThisPlzFamTysm%goto EchoShit
  438. IF %D% editPresetFunc goto Chunky1
  439. set makePresetName=%presetName%
  440. IF NOT %d% presetName title %name% ^| Preset: None ^| Version: %ver% ^| Build %buildNum%
  441. IF %d% presetName title %name% ^| Preset: %presetName% ^| Version: %ver% ^| Build %buildNum%
  442. :Chunky1
  443. set editPresetFunc=
  444. for %%* in (.) do set presetname=%%~nx*
  445. set NumIncrease5=0
  446. :GoBackLawl5
  447. set /a numIncrease5=%numIncrease5%+1
  448. echo.Loading Lines: %NumIncrease5%
  449. %cls%
  450. IF NOT EXIST %numIncrease5%.txt goto DoneLawl5
  451. IF EXIST %numIncrease5%.txt set /p b%numIncrease5%=<%numIncrease5%.txt
  452. goto GoBackLawl5
  453. :DoneLawl5
  454. goto EndChunky1
  455. :Chunky2
  456. @echo on
  457. set numIncrease4=1
  458. for %%* in (.) do set presetname=%%~nx*
  459. :GoBackLawl4
  460. set /a numIncrease4=%numIncrease4%+1
  461. IF NOT EXIST %numIncrease4%.txt set avaLine=%numIncrease4%
  462. IF %d% avaLine goto EndAva
  463. echo.Checking Lines: %NumIncrease4%
  464. %cls%
  465. goto GOBackLawl4
  466. :DoneLawl4
  467. IF NOT %d% avaLine set avaLine=overLap &goto EndAva
  468. :tell
  469. %cls%
  470. echo.Who do you want to /tell?
  471. set /p ign=Username:
  472. set b=/tell %ign%
  473. set enterKeyPress=true
  474. goto promptStart
  475. :ViewPreset
  476. %cls%
  477. cd data
  478. cd Presets
  479. echo.
  480. echo.Current Pre-sets:
  481. dir /b
  482. cd ..
  483. echo.
  484. echo.Press any key to return to main menu
  485. pause >nul
  486. goto Menu
  487. :RenamePreset
  488. %cls%
  489. cd Data
  490. cd Presets\%PresetName%
  491. echo.
  492. echo.Current Pre-sets:
  493. dir /b
  494. echo.
  495. echo.Do you want to rename any?
  496. echo.
  497. echo.Y = Yes ^| N = No
  498. choice /C YN
  499. IF %ERRORLEVEL% == 1 goto doRenamePreset
  500. IF %ERRORLEVEL% == 2 goto Menu
  501. :doRenamePreset
  502. echo.Which one do you want to rename?
  503. echo.
  504. IF %d% invalidRename echo.The name you entered is invalid. &echo. &set invalidRename=
  505. set /p renameFrom=Name:
  506. IF NOT EXIST "%renameFrom%" set InvalidRename=true &goto doRenamePreset
  507. %cls%
  508. echo.And you want to rename it to?
  509. echo.
  510. set /p renameTo=Name:
  511. %cls%
  512. echo.Okay so you want to rename %renameFrom% to %renameTo% correct?
  513. choice /C YN
  514. IF %ERRORLEVEL% == 1 echo.
  515. IF %ERRORLEVEL% == 2 goto RenamePreset
  516. rename "%renameFrom%" "%renameTo%"
  517. %cls%
  518. echo.Done
  519. echo.
  520. echo.Press any key to return to main menu
  521. pause >nul
  522. goto Menu
  523. :deletePreset
  524. %cls%
  525. cd Data
  526. cd Presets
  527. echo.
  528. echo.Current Pre-sets:
  529. dir /b
  530. echo.
  531. :TryAgainDel
  532. echo.Which one do you want to remove?
  533. echo.
  534. set /p removePreset=Name:
  535. IF NOT EXIST "%removePreset%" echo.The pre-set you entered does not exist &goto TryAgainDel
  536. %cls%
  537. echo.You want to remove %removePreset% right?
  538. echo.
  539. choice /C YN
  540. IF %ERRORLEVEL% == 1 type nul
  541. IF %ERRORLEVEL% == 2 goto deletePreset
  542. rmdir /q /s "%removePreset%"
  543. IF EXIST "%removePreset%" echo.Failed to remove pre-set
  544. IF NOT EXIST "%removePreset%" echo.Succesfully removed pre-set
  545. %cls%
  546. cd ..
  547. echo.Hit any key to return to main menu.
  548. pause >nul
  549. goto Menu
  550. :editPreset
  551. %cls%
  552. cd data
  553. cd Presets
  554. echo.
  555. echo.Current Pre-sets:
  556. dir /b
  557. echo.
  558. echo.Type the name you want to edit.
  559. set /p editName=Name:
  560. IF NOT EXIST "%editName%" goto editPreset
  561. cd ..
  562. cd ..
  563. echo %editName% > namePreset.txt
  564. start %filename% /edit
  565. exit
  566. :EditMah
  567. title %name% Editor ^| %editName%
  568. set /p editName=<namePreset.txt
  569. set editName=%editName%
  570. del NamePreset.txt
  571. cd Data
  572. cd Presets
  573. cd %editName%
  574. goto echoShit
  575. :EndChunky1
  576. IF NOT %D% numUppy2 set numUppy2=1
  577. IF %d% b%numUppy2% echo.%numUppy2%: !b%numUppy2%!
  578. IF NOT %d% b%numUppy2% set numUppyCancel2=::
  579. set /a numUppy2=%numUppy2%+1
  580. %numUppyCancel2%goto EndChunky1
  581. echo.Type the line number you want to edit.
  582. echo.If you just want to add a line type "add"
  583. echo.If you just want to delete a line type "delete"
  584. set /p numEdit=:
  585. if %numEdit% == add goto Chunky2
  586. if %numEdit% == delete goto DelLine
  587. set /p oldValue=<%numEdit%.txt
  588. %cls%
  589. set errorlevel=
  590. echo.Change
  591. echo.%OldValue%
  592. echo.To:
  593. set /p valueNew=:
  594. echo %valueNew%> %numedit%.txt
  595. pause
  596. echo.Succesfully, edited line: %numEdit%. &echo.Hit any key to restart &pause >nul &goto Restart
  597. :DelLine
  598. set /p delLine=Line Number:
  599. del %delLine%.txt
  600. echo.Done & pause & goto Restart
  601. :EndAva
  602. echo.What should this new line say?
  603. set /p addLine=:
  604. echo %addLine%> %avaLine%.txt
  605. IF EXIST output2.txt del output2.txt
  606. IF EXIST lastnum.txt del lastnum.txt
  607. echo.Succesfully, added line: %avaLine%. &echo.Hit any key to restart &pause >nul &goto Restart
  608. :Restart
  609. cd %MainDir%
  610. IF %D% username echo %username%> username.txt
  611. IF %D% DontLoadLogo echo %DontLoadLogo%> dontLoadLogo.txt
  612. IF %D% loopTag echo %loopTag%> loopTag.txt
  613. IF EXIST %filename% echo %filename%> filename.txt
  614. IF NOT EXIST %filename% exit
  615. IF %D% name echo %name%> name.txt
  616. IF %D% buildName echo %buildName%> buildName.txt
  617. for /f "delims==" %%a in ('set') do set %%a=
  618. set d=DEF^INED
  619. set Path=C:\WINDOWS\system32;C:\WINDOWS;
  620. set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.BAT
  621. set SystemRoot=C:\WINDOWS
  622. set ComSpec=C:\WINDOWS\system32\cmd.exe
  623. IF EXIST dontloadlogo.txt set /p dontloadlogo=<dontloadlogo.txt
  624. IF EXIST username.txt set /p username=<username.txt
  625. IF EXIST filename.txt set /p filename=<filename.txt
  626. IF EXIST buildName.txt set /p buildName=<buildName.txt
  627. IF EXIST loopTag.txt set /p loopTag=<loopTag.txt
  628. IF EXIST name.txt set /p name=<name.txt
  629. IF %D% filename set filename=%filename%
  630. IF %D% name set name=%name%
  631. IF %D% dontLoadLogo set dontLoadLogo=%dontLoadLogo%
  632. IF %D% loopTagset loopTag=%loopTag%
  633. IF %D% username set username=%Username%
  634. IF %D% buildname set buildName=%buildName%
  635. IF EXIST username.txt del username.txt
  636. IF EXIST name.txt del name.txt
  637. IF EXIST loopTag.txt del looptag.txt
  638. IF EXIST dontloadlogo.txt del dontloadlogo.txt
  639. IF EXIST tags.txt del tags.txt
  640. IF EXIST filename.txt del filename.txt
  641. IF EXIST buildname.txt del buildName.txt
  642. call %filename%
  643. :help
  644. set c=%time:~0,2%
  645. IF "%c%" == " 0" set t1=12&set pmam=AM
  646. IF "%c%" == " 1" set t1=1&set pmam=AM
  647. IF "%c%" == " 2" set t1=2&set pmam=AM
  648. IF "%c%" == " 3" set t1=3&set pmam=AM
  649. IF "%c%" == " 4" set t1=4&set pmam=AM
  650. IF "%c%" == " 5" set t1=5&set pmam=AM
  651. IF "%c%" == " 6" set t1=6&set pmam=AM
  652. IF "%c%" == " 7" set t1=7&set pmam=AM
  653. IF "%c%" == " 8" set t1=8&set pmam=AM
  654. IF "%c%" == " 9" set t1=9&set pmam=AM
  655. IF "%c%" == "10" set t1=10&set pmam=AM
  656. IF "%c%" == "11" set t1=11&set pmam=AM
  657. IF "%c%" == "12" set t1=12&set pmam=PM
  658. IF "%c%" == "13" set t1=1&set pmam=PM
  659. IF "%c%" == "14" set t1=2&set pmam=PM
  660. IF "%c%" == "15" set t1=3&set pmam=PM
  661. IF "%c%" == "16" set t1=4&set pmam=PM
  662. IF "%c%" == "17" set t1=5&set pmam=PM
  663. IF "%c%" == "18" set t1=6&set pmam=PM
  664. IF "%c%" == "19" set t1=7&set pmam=PM
  665. IF "%c%" == "20" set t1=8&set pmam=PM
  666. IF "%c%" == "21" set t1=9&set pmam=PM
  667. IF "%c%" == "22" set t1=10&set pmam=PM
  668. IF "%c%" == "23" set t1=11&set pmam=PM
  669. set TheTime=%t1%:%time:~3,2% %pmam%
  670. %cls%
  671. color 0f
  672. title %name% ^| Help
  673. echo.What is a %name%?
  674. echo.
  675. echo.%name% - automated chat messages.
  676. echo.Loop chat messages in chat, for example:
  677. echo.At %TheTime% you say "Let it go, let it go"
  678. echo.Then right after at %TheTime% you say "Can't hold it back anymore"
  679. echo.
  680. echo.
  681. echo.Pre-set(Or preset)
  682. echo.Save %name%s, in files.
  683. echo.
  684. echo.Want to see more?
  685. choice /C YN
  686. :: 2 - y | 1 - n
  687. IF %ERRORLEVEL% == 1 goto HelpOpt
  688. IF %ERRORLEVEL% == 2 type nul
  689. :helpoptdone
  690. echo.Hit any key to return to main menu.
  691. pause >nul
  692. IF %d% noobStartup set firstRun=true
  693. IF %d% noobStartup set noobStartup= &goto Menu
  694. :createFiles
  695. ::If the main variables are NOT set, just exit ;-;
  696. IF NOT %d% MainDir echo.Error: Variable MainDir was not set and caused an enexpeted issue >Error.log &exit
  697. ::Make a folder to store data
  698. IF NOT EXIST data mkdir Data
  699. ::Go into that data folder
  700. cd data
  701. ::If the folder "options" dooesnt exist, make it
  702. IF NOT EXIST options mkdir options
  703. cd options
  704. echo.debug_mode: false>options.txt
  705. echo.default_delay: 0 >>options.txt
  706. echo.build_numbers: false>>options.txt
  707. echo.old_build_number: %build%>>options.txt
  708. echo.wait_time: 5 >>options.txt
  709. echo.default_preset: none>>options.txt
  710. echo.tags: false>>options.txt
  711. cd %MainDir%\data
  712. set noobStartup=true
  713. mkdir presets
  714. cd %MainDir%
  715. start %filename% /noob
  716. exit
  717. :presetAlreadyExist
  718. %cls%
  719. choice /c YN /m "Do you want to overwrite %makePresetName%"
  720. :: 1 - y | 2 - n
  721. ::TRUST ME IM CORRECT THIS TIME! 2 = cd .. &and just start postChat
  722. ::1 is Let's DO WHAT we ARE here to DO
  723. IF %ERRORLEVEL% == 2 cd .. &goto Startpostchat
  724. IF %ERRORLEVEL% == 1 goto OverwritePreset
  725. :OverwritePreset
  726. cd %makePresetName%
  727. del *.*
  728. cd ..
  729. rmdir /q /s %makePresetName%
  730. IF %d% debug timeout 4
  731. goto rewriteItThen
  732. :restartMcW10
  733. taskkill /f /im Minecraft.Windows.exe
  734. %cls%
  735. timeout 2 >nul
  736. echo.Waiting for Minecraft to start...
  737. timeout 1 >nul
  738. start Minecraft:
  739. goto Menu
  740. :Update
  741. %cls%
  742. echo.Updated!
  743. echo.
  744. echo.Tags can be enabled ^& disabled in options.
  745. echo.
  746. echo.
  747. echo.
  748. echo.
  749. echo.
  750. echo.
  751. echo.
  752. echo.
  753. echo.Hit any key when your done reading.
  754. echo.
  755. :updateSettings
  756. IF %d% debug @echo on
  757. cd %MainDir%
  758. cd data
  759. cd Options
  760. type options.txt | findstr debug_mode >output1.txt
  761. set /p debugCheck=<output1.txt
  762. set DebugCheck=%DebugCheck%
  763. type options.txt | findstr default_delay >output2.txt
  764. set /p delayCheck=<output2.txt
  765. set delaycheck=%delaycheck%
  766. type options.txt | findstr build_numbers >output3.txt
  767. set /p buildNumber=<output3.txt
  768. set buildNumber=%buildNumber%
  769. type options.txt | findstr wait_time >output4.txt
  770. set /p waitTime=<output4.txt
  771. set waitTime=%waitTime%
  772. type options.txt | findstr default_preset >output5.txt
  773. set /p defaultPreset=<output5.txt
  774. set defaultPreset=%defaultPreset%
  775. type options.txt | findstr tags >output6.txt
  776. set /p tags=<output6.txt
  777. set tags=%tags%
  778. IF NOT %d% debugCheck set debugCheck=debug_mode: false
  779. IF NOT %d% delayCheck set delayCheck=default_delay: 0
  780. IF NOT %d% buildNumber set buildNumber=build_numbers: false
  781. IF NOT %d% defaultPreset set defaultPreset=default_preset: none
  782. IF "%defaultPreset%" == "true" set defaultPreset=default_preset: none
  783. IF NOT %d% waitTime set waitTime=wait_time: 7
  784. IF NOT %d% waitTime set waitTime=wait_time: 7
  785. IF NOT %d% tags set waitTime=tags: false
  786. echo.%debugCheck%>options.txt
  787. echo.%delayCheck%>>options.txt
  788. echo.%buildNumber%>>options.txt
  789. echo.%defaultPreset%>>options.txt
  790. echo.old_build_number: %build%>>options.txt
  791. echo.%waitTime% >>options.txt
  792. echo.%tags% >>options.txt
  793. del output*.txt
  794. IF %d% debug pause
  795. IF %d% debug @echo off
  796. pause >nul
  797. goto Restart
  798. :HelpOpt
  799. cd %MainDir%
  800. %cls%
  801. echo.debug_mode - Simply just gives more details about what
  802. echo.is happening, what folder it is in, etc.
  803. echo.
  804. echo.default_delay - Lets you edit the default delay between
  805. echo.A part of a %name% and another.
  806. echo.
  807. echo.build_numbers - Helps differentiate one instance from
  808. echo.another - Not really needed
  809. echo.
  810. echo.old_build_number - Used to detect updates,
  811. echo.so don't edit it unless you want to see the changelog again.
  812. echo.
  813. echo.wait_time - The time to wait before starting the
  814. echo.%name%^(Don't confuse with default_delay^)
  815. echo.
  816. echo.default_preset - Default preset that gets loaded.
  817. echo.
  818. echo.tags - Options, dont loop state, and other info.
  819. echo.
  820. echo.Hit any key to go back.
  821. pause >nul
  822. goto Menu
  823. :createFiles2
  824. cd %MainDir%
  825. echo.@echo off > stop.bat
  826. echo.mode con COLS=15 lines=1 >> stop.bat
  827. echo.taskkill /f /im cscript.exe >>stop.bat
  828. echo.TASKKILL /FI "WINDOWTITLE eq %name% %PROCCESID%">>stop.bat
  829. echo.del Spam.vbs>>stop.bat
  830. echo.del GuiStop.vbs>>stop.bat
  831. echo.start %filename% /del ^& exit>>stop.bat
  832. echo set WshShell = WScript.CreateObject("WScript.Shell")> GuiStop.vbs
  833. echo result=Msgbox("When you want to stop %name%, hit ok",vbOKOnly, "")>> GuiStop.vbs
  834. echo If result = "1" then WSHShell.Run("Stop.bat")>> GuiStop.vbs
  835. IF DEFINED doExitAfter exit
  836. goto Cr8Done
  837. :WipeDefPreset
  838. set doNumInc=0
  839. set LastNum=
  840. :DoWipe
  841. set /a doNumInc=%doNumInc%+1
  842. IF NOT %d% s%doNumInc% goto Editor
  843. set s%doNumInc%=
  844. goto DoWipe
  845. :Del
  846. del Stop.bat
  847. IF EXIST %%SystemDrive%% rmdir %%SystemDrive%%
  848. IF EXIST _avast_ rmdir _avast_
  849. exit
  850. :Err502
  851. ::502????? 502 Is an error which can occur when the user specifies to start a non-exi^sting preset, specifacally w/ cmd for example "start ChatLoop.bat /preset:"non-existing preset"
  852. echo.Failed to find specified preset, %presetToLoad% & pause & goto Restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement