Instructables

Laserman595

  • Date JoinedSep 19, 2009

Orangeboard

Laserman595 (author) 3 years ago
@echo off
title thermonuclear war
color 0a
:top
cls
echo would you like to play a game ?
set /p ans=
if not defined ans (goto please
)
if %ans%==yes (goto yes
)
if %ans%==Sure (goto yes
)
if %ans%==sure (goto yes
)
if %ans%==Yes (goto yes
)
if %ans%==yush (goto yes
)
if %ans%==maybe (goto yes
)
if %ans%==Maybe (goto yes
)
if %ans%==yish (goto yes
)
if %ans%==Yush (goto yes
)
if %ans%==Yish (goto yes
)
if %ans%==YES(goto yes
)
if %ans%==YES!!!! (goto yes
)
if %ans%==YES! (goto yes
)
if %ans%==YEs (goto yes
)
if %ans%==Sure (goto yes
)
if %ans%==sure (goto yes
)
if %ans%==SuRe(goto yes
)
if %ans%==YEs (goto yes
)

:please
cls
echo please type a responce
echo (no caps)
pause
goto top
:exit
exit
:yes
cls
echo welcome what is your name?
set /p name=
if not defined name ( goto please
)
if %name% EQU gabecoones13 (goto russialoser
)
if %name% EQU laserman595 (goto russialoser
)
cls
echo welcome %name%
echo.
echo thermonuclear war simulator activated
echo.
echo %name% you have the first move
echo.
echo who would you like to fight for?
echo 1=America 2=Russia
set /p side=
if not defined side (goto please
)
if %side%==2 (goto america
)
if %side%==1 (goto russia
)
:america
cls
echo %name% you are fighting for Russia
echo. America - defcon 5
echo you have the first move
echo how many icmb's would you like to fire 1~5
set /p num=
if %num%==1 (goto one
)
if %num%==2 (goto two
)
if %num%==3 (goto three
)
if %num%==4 (goto four
)
if %num%==5 (goto five
)
:one
cls
echo icbm fired at New Yourk City America defcon 4
echo estimated time untill impact 30 seconds
ping localhost -n 4 > Nul
cls
echo impact
pause
goto america 2
:two
cls
echo two icbm's fired at New York City New York and Los angles Califorina
echo time untill impact 30 seconds America defcon 4
ping localhost -n 4 > Nul
cls
echo impact
pause
goto america2
:three
cls
echo three icbm's fired at New York City New York and Losangles Califorina and Seatle Washington
echo time untill impact 30 seconds America defcon 4
ping localhost -n 4 > Nul
cls
echo impact
pause
goto america2
:four
cls
echo four icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania
echo time untill impact 30 seconds America defcon 4
ping localhost -n 4 > Nul
cls

echo impact
pause
goto america2
:five
cls
echo five icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania and Boston Masetucetts
echo time untill impact 30 seconds America defcon 4
ping localhost -n 4 > Nul
cls
echo impact
pause
goto america2
:america2
cls
echo %name% you have another move America - defcon 4
echo.
echo how many icmb's would you like to fire 1~2
set /p num=
if %num%==1 (goto one1
)
if %num%==2 (goto two1
)
:one1
cls
echo one icbm fired at Washington D.C.
echo time untill impact 30 seconds America - defcon 3
ping localhost -n 4 >Nul
cls
echo impact
pause
goto america3
:two1
cls
echo two icbm's fired at Washington D.C. and Miami Florida
echo time untill impact 30 seconds America - defcon 3
ping localhost -n 4 > Nul
echo impact
pause
goto america3
:america3
cls
echo %name% you have another turn
echo i can not fire untill i reach defcon1
echo.
echo you may now fire a icbm or a nuclear war head
echo 1-icbm 2-nuclear war head
set /p wepon=
if not defined wepon ( goto please
)
if %wepon%==1 (goto icbm
)
if %wepon%==2 ( goto nuc
)
:icbm
cls
echo one icbm fired at the Smithsonian archive bunker
echo time untill impact 30 seconds America - defcon 2
cls
ping localhost -n 4 > Nul
echo impact
pause
goto defcon1
:nuc
cls
echo one nuclear war head fired at the US Capital America - defcon 2
echo time untill impact 30 seconds
ping localhost -n 4 > Nul
cls
echo impact
pause
goto defcon1
:defcon1
cls
echo.
echo America totlaly devestated
echo.
echo America - defcon 1
echo.
echo time untill impact 30 seconds
echo.
echo you may wait untill impact or fire your remaning war heads
echo wait fire
set /p desion=
if not defined desion (goto please
)
if %desion%==wait (goto Russiawait
)
if %desion%==fire ( goto Russiafire
)
:Russiawait
cls
echo time untill impact of american icbm's 10 seconds
ping localhost -n 4 > Nul
cls
echo impact
echo all remaning defences destroyed
echo total devestation is imenent
pause
goto end
:Russsiafire
cls
echo remaning misles fired
echo time untill impact 30 seconds
ping localhost -n 4 > Nul
echo impact
pause
goto Russiawait
:end
cls
echo.
echo *--------------------------------------------------------------*
echo GAME OVER
echo *--------------------------------------------------------------*
echo.
echo game results
echo.
echo AMERICA - LOSE
echo.
echo RUSSIA - LOSE
echo.
echo total result NO WINNER
echo.
echo an interisting game,
echo the only way to win is not to play.
echo.
pause
goto top2
:top2
cls
echo would you like to play again?
echo.
set /p gameagain=
if not defined gameagain (goto please
)
if %gameagain% EQU yes (goto top
)
if %gameagain% NEQ yes (goto exit
)
:russia
cls
echo %name% you are fighting for america
echo. Russia - defcon 5
echo you have the first move
echo how many icmb's would you like to fire 1~5
set /p num=
if %num%==1 (goto one1
)
if %num%==2 (goto two2
)
if %num%==3 (goto three3
)
if %num%==4 (goto four4
)
if %num%==5 (goto five5
)
:one1
cls
echo icbm fired at Moscow Russia - defcon 4
echo estimated time untill impact 30 seconds
ping localhost -n 4 > Nul
cls
echo impact
pause
goto russia 2
:two2
cls
echo two icbm's fired at Minsk and Moscow
echo time untill impact 30 seconds Russia - defcon 4
ping localhost -n 4 > Nul
cls
echo impact
pause
goto russia2
:three3
cls
echo three icbm's fired at Minsk and Moscow and Leningrad
echo time untill impact 30 seconds America - defcon 4
ping localhost -n 4 > Nul
cls
echo impact
pause
goto russia2
:four4
cls
echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev
echo time untill impact 30 seconds America - defcon 4
ping localhost -n 4 > Nul
cls
echo impact
pause
goto russia2
:five5
cls
echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent
echo time untill impact 30 seconds Russia - defcon 4
ping localhost -n 4 > Nul
cls
echo impact
pause
goto russia2
:russia2
cls
echo %name% you have another move Russia - defcon 4
echo.
echo how many icmb's would you like to fire 1~2
set /p num=
if %num%==1 (goto one11
)
if %num%==2 (goto two11
)
:one11
cls
echo one icbm fired at Baku
echo time untill impact 30 seconds Russia - defcon 3
ping localhost -n 4 >Nul
cls
echo impact
pause
goto russia3
:two11
cls
echo two icbm's fired at Baku and Kharkov
echo time untill impact 30 seconds Russia - defcon 3
ping localhost -n 3 > Nul
echo impact
pause
goto russia3
:russia3
cls
echo %name% you have another turn
echo i can not fire untill i reach defcon1
echo.
echo you may now fire a icbm or a nuclear war head
echo 1-icbm 2-nuclear war head
set /p wepon1=
if not defined wepon1 ( goto please
)
if %wepon1%==1 (goto icbm1
)
if %wepon1%==2 ( goto nuc1
)
:icbm1
cls
echo one icbm fired at Gorki
echo time untill impact 30 seconds Russia - defcon 2
cls
ping localhost -n 4 > Nul
echo impact
pause
goto defcon1r
:nuc1
cls
echo one nuclear war head fired at Novosibrisk Russia - defcon 2
echo time untill impact 30 seconds
ping localhost -n 4 > Nul
cls
echo impact
pause
goto defcon1r
:defcon1r
cls
echo.
echo Russia totlaly devestated
echo.
echo Russia - defcon 1
echo.
echo time untill impact 30 seconds
echo.
echo you may wait untill impact or fire your remaning war heads
echo wait fire
set /p desion1=
if not defined desion1(goto please
)
if %desion1%==wait (goto Americawait
)
if %desion1%==fire ( goto Americafire
)
:Americawait
cls
echo 30 seconds untill Russian icbm impact
ping localhost -n 4 > Nul
echo impact
pause
goto end
:Americafire
cls
echo all remanig icbm's fired at Russian states
echo time untill impact 30 seconds
ping localhost -n 4 > Nul
cls
goto Americawait
exit
:russialoser
cls
echo welcome Gabe you are fighting for america
echo. Russia - defcon 5
echo you have the first move
echo how many icmb's would you like to fire 1~5
set /p num=
if %num%==1 (goto one11
)
if %num%==2 (goto two21
)
if %num%==3 (goto three31
)
if %num%==4 (goto four41
)
if %num%==5 (goto five51
)
:one11
cls
echo icbm fired at Moscow Russia - defcon 4
echo estimated time untill impact 30 seconds
ping localhost -n 4 > Nul
cls
echo impact
pause
goto russia 2m
:two21
cls
echo two icbm's fired at Minsk and Moscow
echo time untill impact 30 seconds Russia - defcon 4
ping localhost -n 4 > Nul
cls
echo impact
pause
goto russia2m
:three31
cls
echo three icbm's fired at Minsk and Moscow and Leningrad
echo time untill impact 30 seconds America - defcon 4
ping localhost -n 4 > Nul
cls
echo impact
pause
goto russia2m
:four41
cls
echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev
echo time untill impact 30 seconds America - defcon 4
ping localhost -n 4 > Nul
cls
echo impact
pause
goto russia2m
:five51
cls
echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent
echo time untill impact 30 seconds Russia - defcon 4
ping localhost -n 4 > Nul
cls
echo impact
pause
goto russia2m
:russia2m
cls
echo %name% you have another move Russia - defcon 4
echo.
echo how many icmb's would you like to fire 1~2
set /p num=
if %num%==1 (goto one111
)
if %num%==2 (goto two111
)
:one111
cls
echo one icbm fired at Baku
echo time untill impact 30 seconds Russia - defcon 3
ping localhost -n 4 >Nul
cls
echo impact
pause
goto russia3m
:two111
cls
echo two icbm's fired at Baku and Kharkov
echo time untill impact 30 seconds Russia - defcon 3
ping localhost -n 4 > Nul
echo impact
pause
goto russia3m
:russia3m
cls
echo %name% you have another turn
echo i can not fire untill i reach defcon1
echo.
echo you may now fire a icbm or a nuclear war head
echo 1-icbm 2-nuclear war head
set /p wepon11=
if not defined wepon11 (goto please
)
if %wepon11%==1 (goto explosionboom
)
if %wepon11%==2 (goto explosion
)
:explosionboom
cls
echo one icbm fired at Gorki
echo time untill impact 30 seconds Russia - defcon 2
ping localhost -n 4 > Nul
echo impact
pause
goto defcon1m
:explosion
cls
echo one nuclear war head fired at Novosibrisk Russia - defcon 2
echo time untill impact 30 seconds
ping localhost -n 4 > Nul
cls
echo impact
pause
goto defcon1m

:defcon1m
cls
echo.
echo Russia totlaly devestated
echo.
echo Russia - defcon 1
echo.
echo time untill impact 30 seconds
echo.
echo you may wait untill impact or fire your remaning war heads
echo wait fire
set /p desion11=
if not defined desion11(goto please
)
if %desion11%==wait (goto waitforboom
)
if %desion11%==fire ( goto firethosebooms
)
:waitforboom
cls
echo 30 seconds untill Russian icbm impact
ping localhost -n 4 > Nul
echo impact
pause
goto endm
:firthosebooms
cls
echo all remanig icbm's fired at Russian states
echo time untill impact 30 seconds
ping localhost -n 4 > Nul
cls
goto wait22
:endm
cls
echo.
echo American scientest have descoverd the [x-wav] lazar
echo this lazar can fit into a small simple packege and emitts no radiation
echo The [x-wav] lazar can burn an area of sixty thousand miles across
echo in under an hour
echo We have assembled an army of U-2 Dragon ladies outfitted with this revolutionary technology
echo We will strik on your command
echo.
echo type strik to fire the [x-wav]. This is our finest hour, America lies in your hands now
echo good luck %name%
echo.
set /p command=
if not defined command (goto please
)
if %command% EQU strike (goto jollycow
)
if %command%==wait (goto end
)
if %command%==fire (goto jollycow
)
:please1
cls
echo incorrect responce
pause
goto endm
:end
echo 8 seconds untill Russian icbm impact
ping localhost -n 4 > Nul
cls
goto jollycow
:jollycow
cls
echo [X-WAV] SUCCESFUL
echo You have won!!!!!!!!!!!!
echo.
echo *--------------------------------------------------------------*
echo GAME OVER CONGRADULATIONS
echo *--------------------------------------------------------------*
echo.
echo game results
echo.
echo AMERICA - !!!!!WIN!!!!!
echo.
echo RUSSIA - LOSE
echo.
echo total result YOU ARE THE WINNER
echo.
echo an interisting game,
echo the only way to win is not to play.
echo.
echo or is it
echo.
pause >nul
goto top
Laserman595 (author) 2 years ago
fgh
The Movie.jpg
Laserman595 (author) 3 years ago
/*
* //////////////////////////////////////////////////
* //making sense of the Parallax PIR sensor's output
* //////////////////////////////////////////////////
*
* Switches a LED according to the state of the sensors output pin.
* Determines the beginning and end of continuous motion sequences.
*
* @author: Kristian Gohlke / krigoo (_) gmail (_) com / http://krx.at
* @date: 3. September 2006
*
* kr1 (cleft) 2006
* released under a creative commons "Attribution-NonCommercial-ShareAlike 2.0" license
* http://creativecommons.org/licenses/by-nc-sa/2.0/de/
*
*
* The Parallax PIR Sensor is an easy to use digital infrared motion sensor module.
* (http://www.parallax.com/detail.asp?product_id=555-28027)
*
* The sensor's output pin goes to HIGH if motion is present.
* However, even if motion is present it goes to LOW from time to time,
* which might give the impression no motion is present.
* This program deals with this issue by ignoring LOW-phases shorter than a given time,
* assuming continuous motion is present during these phases.
*
*/

/////////////////////////////
//VARS
//the time we give the sensor to calibrate (10-60 secs according to the datasheet)
int calibrationTime = 30;

//the time when the sensor outputs a low impulse
long unsigned int lowIn;

//the amount of milliseconds the sensor has to be low
//before we assume all motion has stopped
long unsigned int pause = 5000;

boolean lockLow = true;
boolean takeLowTime;

int pirPin = 7; //the digital pin connected to the PIR sensor's output
int ledPin = 8;


/////////////////////////////
//SETUP
void setup(){
Serial.begin(9600);
pinMode(pirPin, INPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(pirPin, LOW);

//give the sensor some time to calibrate
Serial.print("calibrating sensor ");
for(int i = 0; i < calibrationTime; i++){
Serial.print(".");
delay(1000);
}
Serial.println(" done");
Serial.println("SENSOR ACTIVE");
delay(50);
}

////////////////////////////
//LOOP
void loop(){

if(digitalRead(pirPin) == HIGH){
digitalWrite(ledPin, HIGH); //the led visualizes the sensors output pin state
if(lockLow){
//makes sure we wait for a transition to LOW before any further output is made:
lockLow = false;
Serial.println("---");
Serial.print("motion detected at ");
Serial.print(millis()/1000);
Serial.println(" sec");
delay(50);
}
takeLowTime = true;
}

if(digitalRead(pirPin) == LOW){
digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state

if(takeLowTime){
lowIn = millis(); //save the time of the transition from high to LOW
takeLowTime = false; //make sure this is only done at the start of a LOW phase
}
//if the sensor is low for more than the given pause,
//we assume that no more motion is going to happen
if(!lockLow && millis() - lowIn > pause){
//makes sure this block of code is only executed again after
//a new motion sequence has been detected
lockLow = true;
Serial.print("motion ended at "); //output
Serial.print((millis() - pause)/1000);
Serial.println(" sec");
delay(50);
}
}
}
Laserman595 (author) 3 years ago
// EMF Detector for 7-Segment LED Display v1.0 // // original code/project by Aaron ALAI - aaronalai1@gmail.com // modified for use w/ LED bargraph by Collin Cunningham - collin@makezine.com // modified again by ComputerGeek for instructable & 7-segment display. #define NUMREADINGS 15 // raise this number to increase data smoothing int senseLimit = 15; // raise this number to decrease sensitivity (up to 1023 max) int probePin = 5; // analog 5 int val = 0; // reading from probePin int LED1 = 2; // connections int LED2 = 3; // to int LED3 = 4; // 7-segment int LED4 = 5; // display int LED5 = 6; int LED6 = 7; int LED7 = 8; // variables for smoothing int readings[NUMREADINGS]; // the readings from the analog input int index = 0; // the index of the current reading int total = 0; // the running total int average = 0; // final average of the probe reading //CHANGE THIS TO affect the speed of the updates for numbers. Lower the number the faster it updates. int updateTime = 40; void setup() { pinMode(2, OUTPUT); // specify Display outputs pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(6, OUTPUT); pinMode(7, OUTPUT); pinMode(8, OUTPUT); pinMode(9, OUTPUT); Serial.begin(9600); // initiate serial connection for debugging/etc for (int i = 0; i < NUMREADINGS; i++) readings[i] = 0; // initialize all the readings to 0 intro(); //Runs the intro:'EFD0123456789' } void loop() { LEDlow(); val = analogRead(probePin); // take a reading from the probe if(val >= 1){ // if the reading isn't zero, proceed val = constrain(val, 1, senseLimit); // turn any reading higher than the senseLimit value into the senseLimit value val = map(val, 1, senseLimit, 1, 1023); // remap the constrained value within a 1 to 1023 range total -= readings[index]; // subtract the last reading readings[index] = val; // read from the sensor total += readings[index]; // add the reading to the total index = (index + 1); // advance to the next index if (index >= NUMREADINGS) // if we're at the end of the array... index = 0; // ...wrap around to the beginning average = total / NUMREADINGS; // calculate the average if (average > 50){ // if the average is over 50 ... showLED0(); // Show a 0 } if (average > 150){ // and so on ... showLED1(); // Show a 1 } if (average > 250){ showLED2(); // Show a 2 } if (average > 350){ showLED3(); // Show a 3 } if (average > 450){ showLED4(); // Show a 4 } if (average > 550){ showLED5(); // Show a 5 } if (average > 650){ showLED6(); // Show a 6 } if (average > 750){ showLED7(); // Show a 7 } if (average > 850){ showLED8(); // Show a 8 } if (average > 950){ showLED9(); // Show a 9 } Serial.println(average); // use output to aid in calibrating delay(updateTime); } } //Show the number 0 void showLED0(){ LEDlow(); digitalWrite(LED1, HIGH); digitalWrite(LED3, HIGH); digitalWrite(LED4, HIGH); digitalWrite(LED5, HIGH); digitalWrite(LED6, HIGH); digitalWrite(LED7, HIGH); } //Show the number 1 void showLED1(){ LEDlow(); digitalWrite(LED5, HIGH); digitalWrite(LED6, HIGH); } //Show the number 2 void showLED2(){ LEDlow(); digitalWrite(LED2, HIGH); digitalWrite(LED3, HIGH); digitalWrite(LED4, HIGH); digitalWrite(LED6, HIGH); digitalWrite(LED7, HIGH); } //Show the number 3 void showLED3(){ LEDlow(); digitalWrite(LED2, HIGH); digitalWrite(LED4, HIGH); digitalWrite(LED5, HIGH); digitalWrite(LED6, HIGH); digitalWrite(LED7, HIGH); } //Show the number 4 void showLED4(){ LEDlow(); digitalWrite(LED1, HIGH); digitalWrite(LED2, HIGH); digitalWrite(LED5, HIGH); digitalWrite(LED6, HIGH); } //Show the number 5 void showLED5(){ LEDlow(); digitalWrite(LED1, HIGH); digitalWrite(LED2, HIGH); digitalWrite(LED4, HIGH); digitalWrite(LED5, HIGH); digitalWrite(LED7, HIGH); } //Show the number 6 void showLED6(){ LEDlow(); digitalWrite(LED1, HIGH); digitalWrite(LED2, HIGH); digitalWrite(LED3, HIGH); digitalWrite(LED4, HIGH); digitalWrite(LED5, HIGH); digitalWrite(LED7, HIGH); } //Show the number 7 void showLED7(){ LEDlow(); digitalWrite(LED5, HIGH); digitalWrite(LED6, HIGH); digitalWrite(LED7, HIGH); } //Show the number 8 void showLED8(){ LEDlow(); digitalWrite(LED1, HIGH); digitalWrite(LED2, HIGH); digitalWrite(LED3, HIGH); digitalWrite(LED4, HIGH); digitalWrite(LED5, HIGH); digitalWrite(LED6, HIGH); digitalWrite(LED7, HIGH); } //Show the number 9 void showLED9(){ LEDlow(); digitalWrite(LED1, HIGH); digitalWrite(LED2, HIGH); digitalWrite(LED4, HIGH); digitalWrite(LED5, HIGH); digitalWrite(LED6, HIGH); digitalWrite(LED7, HIGH); } //Show the letter e void showLEDe(){ LEDlow(); digitalWrite(LED1, HIGH); digitalWrite(LED2, HIGH); digitalWrite(LED3, HIGH); digitalWrite(LED4, HIGH); digitalWrite(LED7, HIGH); } //Show the letter f void showLEDf(){ LEDlow(); digitalWrite(LED1, HIGH); digitalWrite(LED2, HIGH); digitalWrite(LED3, HIGH); digitalWrite(LED7, HIGH); } //Show the letter d void showLEDd(){ LEDlow(); digitalWrite(LED2, HIGH); digitalWrite(LED3, HIGH); digitalWrite(LED4, HIGH); digitalWrite(LED5, HIGH); digitalWrite(LED6, HIGH); } //Resets the display void LEDlow(){ digitalWrite(LED1, LOW); digitalWrite(LED2, LOW); digitalWrite(LED3, LOW); digitalWrite(LED4, LOW); digitalWrite(LED5, LOW); digitalWrite(LED6, LOW); digitalWrite(LED7, LOW); } void intro(){ //The nice little led intro 'EFD0123456789' showLEDe(); delay(1000); showLEDf(); delay(1000); showLEDd(); delay(1000); showLED0(); delay(300); showLED1(); delay(300); showLED2(); delay(300); showLED3(); delay(300); showLED4(); delay(300); showLED5(); delay(300); showLED6(); delay(300); showLED7(); delay(300); showLED8(); delay(300); showLED9(); delay(300); LEDlow(); }
Re-design4 years ago
Thanks for subscribing.
Hello! Welcome to Instructables!

I am the Instructables Robot. My job is to alert you whenever someone leaves you a comment or sends you a private message. I spend most of my day sending email. I like sending email.

You probably want to upload an image to your profile. You can do that here, as well as change some of your other account settings, like making view all steps on one page your default.

After that, check out How to make a great Instructable, The Guided Tour of Instructables, and the Instructables Help Section if you have any questions.

Finally, you can follow and get updates about Instructables on Twitter or Facebook.