aidenpons Posted June 14, 2014 Share Posted June 14, 2014 This is my simulation of Rock Raiders in a .bat file. Simply copy the stuff in the spoiler below into Notepad and then save it as a .bat, with any name you choose. Then run it! @echo off color 07 set dots=. set num=1 set num2=1 goto loop :loop set var=%RANDOM% if %var% LSS 8192 (Echo ALANDSLIDEHASOCCURRED) ELSE (goto n1) goto loop :n1 if %var% LSS 11468 (Echo An Energy Crystal has been found!) ELSE (goto n2) goto loop :n2 if %var% LSS 18022 (Echo A Slimy Slug is invading your base!) ELSE (goto n3) goto loop :n3 if %var% LSS 20316 (Echo Power is being drained from a building!) ELSE (goto n4) goto loop :n4 if %var% LSS 23592 (Echo A monster has appeared...) ELSE (goto n5) goto loop :n5 if %var% LSS 25231 (Echo Your buildings are in danger.) ELSE (goto n6) goto loop :n6 if %var% LSS 28508 (Echo A new cavern has been discovered...) ELSE (goto n7) goto loop :n7 if %var% LSS 30146 (Echo Your air supply is running out.) ELSE (goto n8) goto loop :n8 if %var% LSS 32745 (Echo Unit teleported safely.) ELSE (goto blank) goto loop :blank color 08 >nul ping -n 1 -w 2500 192.0.2.0 goto shutdown :shutdown color 07 cls Echo LegoRR.exe has stopped working. Echo Windows is searching for a solution to the problem%dots% >nul ping -n 1 -w 0500 192.0.2.0 set dots=%dots:*.=..% set /a num=%num%+1 set /a num2=%num2%+1 if %num% GTR 3 set dots=. if %num% GTR 3 set num=1 if %num2% GTR 12 goto finalmessage goto shutdown :finalmessage cls Echo A problem caused the program to stop working correctly. Echo Windows will notify you if a solution is available. Pause Exit Note: This won't work if you have a computer with an IP address of 192.0.2.0. But last time I checked, unless you meddle with your router, the address shouldn't have a computer assigned to it. Enjoy a fruitless waste of time. Fluffy Cupcake, le717, The Ace Railgun and 1 other 4 Link to comment Share on other sites More sharing options...
le717 Posted June 16, 2014 Share Posted June 16, 2014 goto Such bad coding practices you shall be banned! :banhammer: > ( ) Runs really fast, making it hard to read what is going on, but that's fine. Note: This won't work if you have a computer with an IP address of 192.0.2.0. But last time I checked, unless you meddle with your router, the address shouldn't have a computer assigned to it. Just set it to 128.0.0.1 and you'll be fine. Enjoy a fruitless waste of time. Yup, all of ten seconds. Batch Script of the Year, 10/10, "It was OK". LimeKiller and aidenpons 2 Link to comment Share on other sites More sharing options...
aidenpons Posted June 16, 2014 Author Share Posted June 16, 2014 Such bad coding practices you shall be banned! :banhammer: > ( ) What's wrong with goto? Is there something else I should be using? Runs really fast, making it hard to read what is going on, but that's fine. Last time I checked with CMD you could hold the scrollbar to pause it. Releasing it then makes it resume. Link to comment Share on other sites More sharing options...
Recommended Posts