monitor file access
+ Reply to Thread
Results 1 to 5 of 5

Thread: txt game in cmd

  1. #1
    Join Date
    Apr 2008
    Posts
    20

    txt game in cmd

    Hey guys thanks for all that use have done for me. I wanted to know this time how to make something simple for a txt game i'm making. I wanted to no how to make it that for example when it says: Do you want to play (y/n) is there anyway for it to reconginze the y or the n for if u put y it starts the game and if u hit n it would close it. Thanks if use can help me and if not thanks anyway.

    -Dragon****0

  2. #2
    Join Date
    Sep 2006
    Posts
    1,649
    If you just want a simple game for the Command Line, look into [URL="http://en.wikipedia.org/wiki/Batch_file"]Windows batch files[/URL]
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  3. #3
    Join Date
    Apr 2008
    Posts
    20
    im running it through a batch file but is there anyway for it to recongize the letter or number typed in?

    -Dragon****0

  4. #4
    Join Date
    Sep 2006
    Posts
    1,649
    This site should help:

    [url]http://www.robvanderwoude.com/userinput.html[/url]
    "Workers of the world unite; you have nothing to lose but your chains." -Karl Marx

  5. #5
    Join Date
    Apr 2008
    Posts
    20
    I'm running into another problem and I can't find help anywhere else.

    here is my batch file code.

    @echo off
    c:
    cls
    Echo Are you ready to play Mafia Wars?
    pause >nul
    cls
    set /p y/n=(Y/N)-
    cls
    if %y/n%==n goto exit
    if %y/n%==y goto start
    :start
    Echo My Attack:0
    Echo My Defense:0
    Echo My *****:$200
    Echo My Lives:*
    Echo *.Fight a rivel mobster.
    Echo 2.Shop
    pause >nul
    set /p number==
    if %number%==* goto fight
    if %number%==2 goto shop

    :fight
    echo *.fight rival mobster *
    echo 2.fight rival mobster 2
    echo *.fight rival mobster *
    echo 4.fight rival mobster 4
    echo 5.fight rival mobster 5
    echo 6.fight rival mobster 6
    set /p number==Enter the number of which you want to fight-
    if %number%==* goto mobster*

    :shop
    :exit

    okay heres my question within the bold,underline,italics does the set /p (does this part that goes here does it have to be the same throw out them all?)==

+ Reply to Thread

Similar Threads

  1. game crack
    By duckiesarefun in forum General discussion
    Replies: 1
    Last Post: 10-30-2008, 08:35 AM
  2. C++ game help please
    By NewToC++ in forum Programming
    Replies: 0
    Last Post: 10-28-2008, 02:00 PM
  3. JavaScript Game Help
    By SyntaXmasteR in forum Programming
    Replies: 6
    Last Post: 08-24-2007, 06:00 PM
  4. @Game hacking
    By tsjarvis63 in forum Viruses and Trojans
    Replies: 3
    Last Post: 08-06-2007, 11:29 AM
  5. The best game
    By Bob_Haris in forum Internet Privacy
    Replies: 0
    Last Post: 01-16-2007, 12:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts