Advertisement
tcl1

[Batch] Batchopolis

Nov 16th, 2013
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 12.28 KB | None | 0 0
  1. @echo off
  2. cls
  3. goto misc
  4. title Batchopolis
  5. :fix
  6. title Batchopolis - Fixing...
  7. color 0a
  8. cls
  9. set version=1.0.0
  10. set op1=Location Options
  11. set op2=Vehicle Settings
  12. set op3=House Options
  13. set op4=Exit Game
  14. set op5=Reset Game
  15. set op6=Saving and Loading
  16. set op7=Upgrading and Downgrading (UNAVAILABLE)
  17. REM op7 is unavailable for now.
  18. set news=A vehicle crash has been reported at Batchopolis Blvd, North.
  19. set vehicle1=Sedan (regular)
  20. set vehicle2=Sedan (coupe)
  21. set vehicle3=Convertible
  22. set vehicle4=Sports Car
  23. set vehicle5=Bus
  24. set vehicle6=Taxi
  25. set vehicle7=Truck
  26. set vehicle8=Cruise Helicopter
  27. set vehicle9=Jet
  28. set loc1=Batchopolis Blvd, North
  29. set loc2=Batchopolis Blvd, South
  30. set loc3=Interstate 959 and Batchopolis Blvd Intersection
  31. set loc4=Value Lake Blvd
  32. set job1=Taxi Driver
  33. set job2=Cashier
  34. set job3=Town Mayor
  35. set job4=Police Officer
  36. set h1=Lock House Doors
  37. set h2=Unlock House Doors
  38. set h3=Sell House
  39. set houseOwned=No
  40. set houseLocked=No
  41. echo ---------------------
  42. echo Fixing Batchopolis...
  43. echo ---------------------
  44. timeout /t 1 /nobreak >nul
  45. title %title%
  46. goto city
  47. :misc
  48. set job=Unemployed
  49. set currentloc=Batchopolis Tourist Center
  50. set currentvehicle=None
  51. set /a cash+=10000
  52. set version=1.0.0
  53. set op1=Location Options
  54. set op2=Vehicle Settings
  55. set op3=House Options
  56. set op4=Exit Game
  57. set op5=Reset Game
  58. set op6=Saving and Loading
  59. set op7=Upgrading and Downgrading (UNAVAILABLE)
  60. REM op7 is unavailable for now.
  61. set news=A vehicle crash has been reported at Batchopolis Blvd, North.
  62. set vehicle1=Sedan (regular)
  63. set vehicle2=Sedan (coupe)
  64. set vehicle3=Convertible
  65. set vehicle4=Sports Car
  66. set vehicle5=Bus
  67. set vehicle6=Taxi
  68. set vehicle7=Truck
  69. set vehicle8=Cruise Helicopter
  70. set vehicle9=Jet
  71. set loc1=Batchopolis Blvd, North
  72. set loc2=Batchopolis Blvd, South
  73. set loc3=Interstate 959 and Batchopolis Blvd Intersection
  74. set loc4=Value Lake Blvd
  75. set job1=Taxi Driver
  76. set job2=Cashier
  77. set job3=Town Mayor
  78. set job4=Police Officer
  79. set h1=Lock House Doors
  80. set h2=Unlock House Doors
  81. set h3=Sell House
  82. set houseOwned=No
  83. set houseLocked=No
  84. goto nameget
  85. :savegame
  86. cls
  87. echo ----
  88. echo Options
  89. echo ----
  90. echo 1. [Save Game]
  91. echo 2. [Load Game]
  92. echo 3. [Delete Game]
  93. echo 4. [Return to menu]
  94. choice /c 1234 /n
  95. if %errorlevel%==1 goto savefunc
  96. if %errorlevel%==2 goto loadfunc
  97. if %errorlevel%==3 goto delfunc
  98. if %errorlevel%==4 goto city
  99. :savefunc
  100. cls
  101. echo Saving game...
  102. timeout /t 1 /nobreak >nul
  103. cls
  104. echo ::Game saved at %time% %date% >>BatchopolisSaveDataFile.bat
  105. cls
  106. echo set name=%name% >>BatchopolisSaveDataFile.bat
  107. cls
  108. echo set /a cash=0 >>BatchopolisSaveDataFile.bat
  109. cls
  110. echo set /a cash+=%cash% >>BatchopolisSaveDataFile.bat
  111. cls
  112. echo set currentvehicle=%currentvehicle% >>BatchopolisSaveDataFile.bat
  113. cls
  114. echo set job=%job% >>BatchopolisSaveDataFile.bat
  115. cls
  116. echo set news=%news% >>BatchopolisSaveDataFile.bat
  117. cls
  118. echo set currentlocation=%currentlocation% >>BatchopolisSaveDataFile.bat
  119. timeout /t 1 /nobreak >nul
  120. echo Game saved!
  121. timeout /t 1 /nobreak >nul
  122. goto savegame
  123. :loadfunc
  124. cls
  125. if exist BatchopolisSaveDataFile.bat echo Loading saved game... & timeout /t 1 /nobreak >nul & call BatchopolisSaveDataFile.bat & cls & echo Game loaded! & timeout /t 1 /nobreak >nul & goto savegame
  126. if not exist BatchopolisSaveDataFile.bat echo No save data has been saved. & timeout /t 1 /nobreak >nul & cls & goto savegame
  127. goto savegame
  128. :delfunc
  129. cls
  130. if exist BatchopolisSaveDataFile.bat del BatchopolisSaveDataFile.bat & echo Game save data deleted. & timeout /t 1 /nobreak >nul & cls & goto savegame
  131. if not exist BatchopolisSaveDataFile.bat echo No save data has been saved. & timeout /t 1 /nobreak >nul & cls & goto savegame
  132. goto savegame
  133. :confirmexit
  134. cls
  135. echo Goodbye, %name%
  136. timeout /t 1 /nobreak >nul
  137. exit
  138. :nameget
  139. echo ----
  140. echo Enter your name.
  141. echo ----
  142. set /p name=
  143. :intro
  144. cls
  145. title Batchopolis
  146. echo ------------------------
  147. echo ^|WELCOME TO BATCHOPOLIS^|
  148. echo ^|    [1.0.1]           ^|
  149. echo ------------------------
  150. timeout /t 1 /nobreak >nul
  151. goto city
  152. :city
  153. title Batchopolis
  154. cls
  155. color 0b
  156. echo ----
  157. echo Options
  158. echo ----
  159. echo 1. [%op1%]
  160. echo ----
  161. echo Takes you to a certain location.
  162. echo ----
  163. echo 2. [%op2%]
  164. echo ----
  165. echo This is where you purchase vehicles.
  166. echo ----
  167. echo 3. [%op3%]
  168. echo ----
  169. echo This is where you can lock your house, or buy a house, or sell it.
  170. echo ----
  171. echo 4. [%op4%]
  172. echo ----
  173. echo Exits the game.
  174. echo ----
  175. echo 5. [%op5%]
  176. echo ----
  177. echo Resets the game.
  178. echo ----
  179. echo 6. [%op6%]
  180. echo ----
  181. echo This is where you can delete, load or save game files.
  182. echo ----
  183. echo Stats
  184. echo ----
  185. echo %name%
  186. echo ----
  187. echo Cash: $%cash%
  188. echo Car: %currentvehicle%
  189. echo Location: %currentloc%
  190. echo Job: %job%
  191. echo ----
  192. echo News: %news%
  193. echo ----
  194. choice /c 1234567 /n
  195. if %errorlevel%==1 goto script1
  196. if %errorlevel%==2 goto script2
  197. if %errorlevel%==3 goto script3
  198. if %errorlevel%==4 goto confirmexit
  199. if %errorlevel%==5 goto script5
  200. if %errorlevel%==6 goto savegame
  201. if %errorlevel%==7 goto fix
  202. :script1
  203. REM Script 1: Location settings
  204. cls
  205. echo ----
  206. echo Available locations:
  207. echo ----
  208. echo 1. [%loc1%]
  209. echo 2. [%loc2%]
  210. echo 3. [%loc3%]
  211. echo 4. [%loc4%]
  212. echo ----
  213. choice /c 1234 /n
  214. if %errorlevel%==1 goto blvdnorth
  215. if %errorlevel%==2 goto blvdsouth
  216. if %errorlevel%==3 goto interstate
  217. if %errorlevel%==4 goto valuelake
  218. :script2
  219. REM Script 2: Vehicle settings
  220. cls
  221. echo ----
  222. echo Vehicles
  223. echo ----
  224. echo 1. [%vehicle1%]
  225. echo 2. [%vehicle2%]
  226. echo 3. [%vehicle3%]
  227. echo 4. [%vehicle4%]
  228. echo 5. [%vehicle5%]
  229. echo 6. [%vehicle6%]
  230. echo 7. [%vehicle7%]
  231. echo 8. [%vehicle8%]
  232. echo 9. [%vehicle9%]
  233. echo ----
  234. echo E. [Exit]
  235. echo ----
  236. echo Current Vehicle: %currentvehicle%
  237. echo Cash: $%cash%
  238. echo ----
  239. choice /c 123456789E /n
  240. if %errorlevel%==1 goto v1
  241. if %errorlevel%==2 goto v2
  242. if %errorlevel%==3 goto v3
  243. if %errorlevel%==4 goto v4
  244. if %errorlevel%==5 goto v5
  245. if %errorlevel%==6 goto v6
  246. if %errorlevel%==7 goto v7
  247. if %errorlevel%==8 goto v8
  248. if %errorlevel%==9 goto v9
  249. if %errorlevel%==10 goto city
  250. :v1
  251. REM Vehicle 1.
  252. cls
  253. echo ---
  254. echo Sedan (regular)
  255. echo ---
  256. echo Cost: $150
  257. echo ---
  258. echo 1. Purchase ^| 2. Cancel
  259. choice /c 12 /n
  260. if %errorlevel%==1 goto purchasechk
  261. if %errorlevel%==2 goto script2
  262. :purchasechk
  263. if not %cash%==0 goto pur1
  264. REM Checks if the user has more then $0.
  265. if %cash%==0 goto notenoughcash
  266. REM Checks if the user has exactly $0.
  267. :notenoughcash
  268. REM Only for purchasing vehicles.
  269. cls
  270. echo You do not have enough cash!
  271. timeout /t 1 /nobreak >nul
  272. goto script2
  273. :pur1
  274. cls
  275. set /a cash-=150
  276. set currentvehicle=Sedan (regular)
  277. echo Vehicle Purchased: %vehicle1%
  278. timeout /t 1 /nobreak >nul
  279. goto script2
  280. :v2
  281. REM Vehicle 2.
  282. cls
  283. echo ---
  284. echo Sedan (coupe)
  285. echo ---
  286. echo Cost: $150
  287. echo ---
  288. echo 1. Purchase ^| 2. Cancel
  289. choice /c 12 /n
  290. if %errorlevel%==1 goto purchasechk2
  291. if %errorlevel%==2 goto script2
  292. :purchasechk2
  293. cls
  294. if not %cash%==0 goto pur2
  295. REM Checks if the user has more then $0.
  296. if %cash%==0 goto notenoughcash
  297. REM Checks if the user has exactly $0.
  298. :pur2
  299. cls
  300. set /a cash-=150
  301. set currentvehicle=Sedan (coupe)
  302. echo Vehicle Purchased: %vehicle2%
  303. timeout /t 1 /nobreak >nul
  304. goto script2
  305. :v3
  306. REM Vehicle 3.
  307. cls
  308. echo ---
  309. echo Convertible
  310. echo ---
  311. echo Cost: $300
  312. echo ---
  313. echo 1. Purchase ^| 2. Cancel
  314. choice /c 12 /n
  315. if %errorlevel%==1 goto purchasechk3
  316. if %errorlevel%==2 goto script2
  317. :purchasechk3
  318. cls
  319. if not %cash%==0 goto pur3
  320. REM Checks if the user has more then $0.
  321. if %cash%==0 goto notenoughcash
  322. REM Checks if the user has exactly $0.
  323. :pur3
  324. cls
  325. set /a cash-=300
  326. set currentvehicle=Convertible
  327. echo Vehicle Purchased: %vehicle3%
  328. timeout /t 1 /nobreak >nul
  329. goto script2
  330. :v4
  331. cls
  332. echo ---
  333. echo Sports Car
  334. echo ---
  335. echo Cost: $550
  336. echo ---
  337. echo 1. Purchase ^| 2. Cancel
  338. choice /c 12 /n
  339. if %errorlevel%==1 goto purchasechk4
  340. if %errorlevel%==2 goto script2
  341. :purchasechk4
  342. cls
  343. if not %cash%==0 goto pur4
  344. REM Checks if the user has more then $0.
  345. if %cash%==0 goto notenoughcash
  346. REM Checks if the user has exactly $0.
  347. :pur4
  348. cls
  349. set /a cash-=550
  350. set currentvehicle=Sports Car
  351. echo Vehicle Purchased: %vehicle4%
  352. timeout /t 1 /nobreak >nul
  353. goto script2
  354. :v5
  355. cls
  356. echo ---
  357. echo Bus
  358. echo ---
  359. echo Cost: $300
  360. echo ---
  361. echo 1. Purchase ^| 2. Cancel
  362. choice /c 12 /n
  363. if %errorlevel%==1 goto purchasechk5
  364. if %errorlevel%==2 goto script2
  365. :purchasechk5
  366. if not %cash%==0 goto pur5
  367. REM Checks if the user has more then $0.
  368. if %cash%==0 goto notenoughcash
  369. REM Checks if the user has exactly $0.
  370. :pur5
  371. cls
  372. set /a cash-=300
  373. set currentvehicle=Bus
  374. echo Vehicle Purchased: %vehicle5%
  375. timeout /t 1 /nobreak >nul
  376. goto script2
  377. :v6
  378. cls
  379. echo ---
  380. echo Taxi
  381. echo ---
  382. echo Cost: $150
  383. echo ---
  384. echo 1. Purchase ^| 2. Cancel
  385. choice /c 12 /n
  386. if %errorlevel%==1 goto purchasechk6
  387. if %errorlevel%==2 goto script2
  388. :purchasechk6
  389. if not %cash%==0 goto pur6
  390. REM Checks if the user has more then $0.
  391. if %cash%==0 goto notenoughcash
  392. REM Checks if the user has exactly $0.
  393. :pur6
  394. cls
  395. set /a cash-=150
  396. set currentvehicle=Taxi
  397. echo Vehicle Purchased: %vehicle6%
  398. timeout /t 1 /nobreak >nul
  399. goto script2
  400. :v7
  401. cls
  402. echo ---
  403. echo Truck
  404. echo ---
  405. echo Cost: $200
  406. echo ---
  407. echo 1. Purchase ^| 2. Cancel
  408. choice /c 12 /n
  409. if %errorlevel%==1 goto purchasechk7
  410. if %errorlevel%==2 goto script2
  411. :purchasechk7
  412. if not %cash%==0 goto pur7
  413. REM Checks if the user has more then $0.
  414. if %cash%==0 goto notenoughcash
  415. REM Checks if the user has exactly $0.
  416. :pur7
  417. cls
  418. set /a cash-=200
  419. set currentvehicle=Truck
  420. echo Vehicle Purchased: %vehicle7%
  421. timeout /t 1 /nobreak >nul
  422. goto script2
  423. :v8
  424. cls
  425. echo ---
  426. echo Cruise Helicopter
  427. echo ---
  428. echo Cost: $1500
  429. echo ---
  430. echo 1. Purchase ^| 2. Cancel
  431. choice /c 12 /n
  432. if %errorlevel%==1 goto purchasechk8
  433. if %errorlevel%==2 goto script2
  434. :purchasechk8
  435. if not %cash%==0 goto pur8
  436. REM Checks if the user has more then $0.
  437. if %cash%==0 goto notenoughcash
  438. REM Checks if the user has exactly $0.
  439. :pur8
  440. cls
  441. set /a cash-=1000
  442. set currentvehicle=Cruise Helicopter
  443. echo Vehicle Purchased: %vehicle8%
  444. timeout /t 1 /nobreak >nul
  445. goto script2
  446. :v9
  447. cls
  448. echo ---
  449. echo Jet
  450. echo ---
  451. echo Cost: $2000
  452. echo ---
  453. echo 1. Purchase ^| 2. Cancel
  454. choice /c 12 /n
  455. if %errorlevel%==1 goto purchasechk9
  456. if %errorlevel%==2 goto script2
  457. :purchasechk9
  458. if not %cash%==0 goto pur9
  459. REM Checks if the user has more then $0.
  460. if %cash%==0 goto notenoughcash
  461. REM Checks if the user has exactly $0.
  462. :pur9
  463. cls
  464. set /a cash-=2000
  465. set currentvehicle=Jet
  466. echo Vehicle Purchased: %vehicle9%
  467. timeout /t 1 /nobreak >nul
  468. goto script2
  469. :: ---------------
  470. :blvdnorth
  471. cls
  472. set currentlocation=Batchopolis Blvd, North
  473. echo You are heading to: %loc1%
  474. timeout /t 1 /nobreak >nul
  475. cls
  476. echo ----
  477. echo Current Location: %currentlocation% ^| Current Vehicle: %currentvehicle%
  478. echo ----
  479. echo %name%
  480. echo Cash: $%cash%
  481. echo Car: %currentvehicle%
  482. echo Location: %currentlocation%
  483. echo Job: %job%
  484. echo ----
  485. echo Press J to get a list of jobs to do
  486. echo Press A to go to another location
  487. echo ----
  488. choice /c JA /n
  489. if %errorlevel%==1 goto jobs1
  490. if %errorlevel%==2 goto script2
  491. :jobs1
  492. cls
  493. echo ----
  494. echo Jobs
  495. echo ----
  496. echo 1. [%job1%]
  497. echo 2. [%job2%]
  498. echo 3. [%job3%]
  499. echo 4. [%job4%]
  500. echo ----
  501. choice /c 1234 /n
  502. if %errorlevel%==1 goto j1
  503. if %errorlevel%==2 goto j2
  504. if %errorlevel%==3 goto j3
  505. if %errorlevel%==4 goto j4
  506. :j1
  507. cls
  508. set job=Taxi Driver
  509. echo You now work as a taxi driver!
  510. echo Press P to go back to the main menu or press J to get more jobs.
  511. choice /c PJ /n
  512. if %errorlevel%==1 goto city
  513. if %errorlevel%==2 goto jobs1
  514. :script3
  515. cls
  516. echo ----
  517. echo House Locked: %houseLocked%
  518. echo House Owned: %houseOwned%
  519. echo ----
  520. echo Options
  521. echo ----
  522. echo 1. [%h1%]
  523. echo 2. [%h2%]
  524. echo 3. [%h3%]
  525. echo ----
  526. choice /c 1234 /n
  527. if %errorlevel%==1 goto lock
  528. if %errorlevel%==2 goto unlock
  529. if %errorlevel%==3 goto sellhouse
  530. :lock
  531. if not %houseOwned% equ Yes goto lockfull
  532. if %houseOwned% equ No goto cannot
  533. :unlock
  534. if not %houseOwned% equ Yes goto unlockfull
  535. if %houseOwned% equ No goto cannot
  536. :sellhouse
  537. if not %houseOwned% equ Yes goto sellhousefull
  538. if %houseOwned% equ No goto cannot
  539. :lockfull
  540. set houseLocked=Yes
  541. goto script3
  542. :unlockfull
  543. set houseLocked=No
  544. goto script3
  545. :sellhousefull
  546. set houseLocked=No
  547. set houseOwned=No
  548. goto script3
  549. :cannot
  550. cls
  551. echo You do not own a house.
  552. timeout /t 1 /nobreak >nul
  553. goto script3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement