Thread: What kind of programs should I start writing?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Registered User
    Join Date
    Apr 2003
    Posts
    4
    Thanks for all the info!
    But i have one small qustion, or it may be a large question, depending on how you interpret it;
    How do I take input without using Cin?

    thanks

    [Edit]

    Here is some BASIC code I have writen:
    Code:
    ] spacedtokens on
    
    cls
    set console title to ""
    Print "To indicate class, type one of the following:"
    Print "Warrior (1)"
    Print "Warlock (2)"
    input class
    ' preliminary matters
    
    if class = 1 then life = 250
    if class = 1 then mana = 100
    
    if class = 2 then life = 100
    if class = 2 then mana = 310
    
    if class = 1 then classchar$ = "Warrior"
    if class = 2 then classchar$ = "Warlock"
    
    clvl = 1
    maxclvl = 99
    mlvl = 1
    maxmlvl = 97
    
    
    cls
    
    print "Life: ";
    print life
    
    print "Mana: ";
    print mana
    
    ' armor
    
    If armor = clothes then armdef = 12
    If armor = link mail then armdef = 24
    If armor = chain mail then armdef = 28
    If armor = plate mail then armdef = 36
    If armor = full plate mail then armdef = 43
    
    ' sheilds
    
    If sheild = buckler then shldef = 5
    If sheild = kite sheild then shldef = 12
    If sheild = luna then shldef = 22
    If sheild = pavis then shldef = 36
    
    ' helms
    
    If headgear = leather cap then heldef = 2
    If headgear = skull cap then heldef = 6
    If headgear = helm then heldef = 14
    If headgear = sallet then heldef = 21
    
    totaldef = armdef + shldef + heldef
    
    ' weapons
    
    If weapon = falchion then dmg = 2
    If weapon = bludgeon then dmg = 1
    If weapon = axe then dmg = 4
    If weapon = long sword then dmg = 8
    If weapon = serrated blade then dmg = 12
    If weapon = enchanted blade then dmg = 18
    
    chardmg = dmg + clvl
    
    ' Combat
    ' Sequences Operators
    
    if chardmg < monlife then
    mon = 1
    end if
    
    if chardmg > monlife then
    mon = 0
    end if
    
    
    'Level One : Escape
    
    for x = 1 to  5
    print ""
    next x
    
    print "                               Stage One : Escape"
    
    
    print "What is your name?"
    input name$
    
    cls
    
    print "Welcome, ";
    print name$;
    print ", the ";
    print classchar$;
    print ", ";
    print "to the castle of Leviathan. You must leave now. The king has gone insane and sends the hypnotiezed guards to kill you."
    
    wait 3
    
    cls
    
    print "Life: ";
    print life
    
    print "Mana: ";
    print mana
    
    print ""
    print ""
    print ""
    cls
    
    Battle:
    
    mdef = 21
    mlife = 100
    enemy$ = "crazed guard"
    
    
    print "An Enemy Approaches"
    print ""
    print "Enemy : ";
    print enemy$
    print "Life : ";
    print mlife
    print "Defense : ";
    print mdef
    
    print "You attacked the Crazed guard"
    
    weapon = falchion
    
    result = chardmg - monlife
    
    print "You attack with your weapon(falchion)"
    
    Print ""
    print ""
    print "Your opponent has ";
    print result;
    print " life left"
    
    print "Attack again?"
    input att$
    
    result2 = result - chardmg
    
    if att$ = "yes" then
       print "Your foe has ";
       print result2;
       print " ";
       print "life left"
    end if
    Last edited by Macabre; 04-12-2003 at 06:19 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Frequent Programs List in the Start Menu
    By patrick22 in forum Windows Programming
    Replies: 2
    Last Post: 04-21-2008, 08:04 PM
  2. Writing an article
    By jverkoey in forum Game Programming
    Replies: 24
    Last Post: 03-02-2003, 10:38 PM
  3. Who here programs for a living?
    By fastmonkey in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 12-27-2002, 04:52 PM
  4. Where to start?
    By Chizzlah in forum C++ Programming
    Replies: 4
    Last Post: 08-14-2002, 10:37 AM
  5. Where is a good place to start?!
    By bobthefish3 in forum Game Programming
    Replies: 1
    Last Post: 10-09-2001, 11:28 AM