TGC Codebase Backup



TEXT RPG 80.7% DONE *Read Description before playing* by Anonymous Coder

22nd Feb 2009 17:26
Summary

an awesome rpg with no pictures. type help() while ingame to find out how to play.



Description

an awesome text rpg with 3 weapons,6 stats, and 3 enemies. i know it doesnt sound good, but it took forever and im only 10 so here ya go.



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    rem  |---------------------------|
 rem |TEXT RPG made by John      |
 rem |---------------------------|
 name$ = "NoName"
 a$ = "TypeHere"
 print "ghjghg"
 gold = 0
 exp = 0
 hp = 10
 expmax = 100
 hpmax = 10
 level = 1
 attack = 1
 wep$ = "<None>"
 wepd = 0
 do
 input "aTypeHere>";cammand$
 print "acammand> ";cammand$
 if cammand$ = "help()"
 print "acammand help() for help."
 print "acammand clear() to clear screen."
 print "atype in cammands to do stuff."
 print "atype in comment() to make a comment."
 print "atype in code() to enter in codes."
 print "atype in note() to type a note."
 print "atype in fortune() then a yes/no question for your fortune."
 print "atype in name() then your name to change your name."
 print "atype in trade() then  you will trade in exp to level up."
 print "acammands: blacksmith,fight1,2,and 3,attack,train-hp,train-attack,stats and bar."
 endif
 if cammand$ = "comment()"
 input "a";a$
 endif
 if cammand$ = "code()"
 input "aCode-  ";a$
 if a$ = "richweston" then exp = 10000
 if a$ = "richstick" then gold = 10000
 if a$ = "b.y.o.b." then hpmax = 10000
 if a$ = "system of a down" then wep$ = "Lightning Axe"
 if a$ = "system of a down" then wepd = 100
 if a$ = "sloomingbla" then attack = 100
 if a$ = "moneybags" then gold = 10000
 if a$ = "poopray622"
 enemy$ = "Poop"
 enemyattack = 0
 enemyvalue = 200
 enemyhp = 5000
 turn$ = "aYour Turn"
 print "aEnemy Name: ";enemy$
 print "aEnemy Hp: ";enemyhp
 print "aEnemy Attack: ";enemyattack
 print "aTurn: ";turn$
 print "aPrize: ";enemyvalue
 endif
 endif
 if cammand$ = "note()"
 cls
 print "asdas"
 input "a>";a$
 endif
 if cammand$ = "train-hp"
 print "to train hp its 40 dollars. say yes or no to buy."
 input "ayes/no>";a$
 if a$ = "yes" and gold > 39 then hpmax = hpmax + rnd(5)
 if a$ = "yes" and gold > 39 then gold = gold - 40
 if a$ = "yes" and gold > 39 then print "aYou now have more max health."
 if a$ = "yes" and gold < 40 then print "aNot enough money."
 if a$ = "no" then print "alrighty then. see ya later."
 endif
 if cammand$ = "train-attack"
 print "to train attack its 80 dollars. say yes or no to buy."
 input "ayes/no>";a$
 if a$ = "yes" and gold > 79 then attack = attack + 1
 if a$ = "yes" and gold > 79 then gold = gold - 40
 if a$ = "yes" and gold > 79 then print "aYou now have more attack."
 if a$ = "yes" and gold < 80 then print "aNot enough money."
 if a$ = "no" then print "alrighty then. see ya later."
 endif
 if cammand$ = "blacksmith"
 print "aWelcome to the blacksmith.say the name of the weapon to buy. say go home to go home."
 print "adagger: 1 damage. 10 gold."
 print "arusty sword: 3 damage. 50 gold."
 print "asword: 5 damage. 70 gold."
 input "aNameofWeapon>";a$
 if a$ = "dagger" and gold > 9 then wep$ = "Dagger"
 if a$ = "dagger" and gold > 9 then wepd = 1
  if a$ = "dagger" and gold > 9 then print "aYou now have a Dagger!"
 if a$ = "dagger" and gold > 9 then gold = gold - 10
 if a$ = "dagger" and gold < 10 then print "aNot enough money."
 if a$ = "rusty sword" and gold > 49 then wep$ = "Rusty Sword"
 if a$ = "rusty sword" and gold > 49 then wepd = 3
  if a$ = "rusty sword" and gold > 49 then print "aYou now have a Rusty Sword!"
 if a$ = "rusty sword" and gold > 49 then gold = gold - 50
 if a$ = "rusty sword" and gold < 50 then print "aNot enough money."
  if a$ = "sword" and gold > 89 then wep$ = "Sword"
 if a$ = "sword" and gold > 89 then wepd = 5
  if a$ = "sword" and gold > 89 then print "aYou now have a Sword! ."
 if a$ = "sword" and gold > 89 then gold = gold - 70
 if a$ = "sword" and gold < 70 then print "aNot enough money."
 if a$ = "go home" then print "alrighty then. see ya later."
 endif
 if cammand$ = "trade()"
 if exp > expmax then level = level + 1
 if exp > expmax then hpmax = hpmax + rnd(3)
 if exp > expmax then hp = hpmax
 if exp > expmax then attack = attack + 1
 if exp > expmax then print "aYou leveled up! You are now level ";level
 if exp < expmax then print "aNot enough EXP"
 if exp > expmax then expmax = expmax + 100
 if exp > expmax then exp = exp - expmax
 endif
 if cammand$ = "bar"
 print "a*Walked to Bar* BarMan: Hello Mate, like a beer? it heals 2 hp!"
 print "atype yes for a 3 gold beer and type no to go home."
 input "aAnswer: ";a$
 if a$ = "yes" and gold > 2 then print "aGood Choice. -3 gold, 2 + hp."
 if a$ = "yes" and gold > 2 then gold = gold - 3
 if a$ = "yes" and gold > 2 then hp = hp + 2
 if hp > hpmax then hp = hpmax
 if a$ = "yes" and gold < 3 then print "aNot enough money."
 if a$ = "no" then print "aAlrighty then. see ya later."
 endif
 if cammand$ = "attack"
 enemyhp = enemyhp - attack
 print "aYou did ",attack," damage to";enemy$
 enemyhp = enemyhp - (attack + wepd)
 print "aEnemy Hp: ";enemyhp
 turn$ = "aEnemys Turn"
 print "aTurn: ";turn$
 hp = hp - enemyattack
 print "aThe enemy did ",enemyattack," damage to ";name$
 turn$ = "aYour Turn"
 print "aTurn: ";turn
 if hp < 1 then gold = gold - rnd(10)
 if hp < 1 then print "You died and lost some gold."
 if hp < 1 then hp = 1
 if enemyhp < 1 then gold = gold + enemyvalue
 if enemyhp < 1 then exp = exp + rnd(100)
 if enemyhp < 1 then enemyhp = 3
 if enemyhp < 1 then print "aYou killed ",enemy$," and got ",enemyvalue," gold."
 endif
 if cammand$ = "fight1"
 enemy$ = "aFighting Dummy"
 enemyhp = 3
 enemyattack = 1
 enemyvalue = 3
 turn$ = "aYour Turn"
 print "aEnemy Name: ";enemy$
 print "aEnemy Hp: ";enemyhp
 print "aEnemy Attack: ";enemyattack
 print "aTurn: ";turn$
 print "aPrize: ";enemyvalue
 endif
  if cammand$ = "fight2"
 enemy$ = "aGoblin"
 enemyhp = 10
 enemyattack = 2
 enemyvalue = 20
 turn$ = "aYour Turn"
 print "aEnemy Name: ";enemy$
 print "aEnemy Hp: ";enemyhp
 print "aEnemy Attack: ";enemyattack
 print "aTurn: ";turn$
 print "aPrize: ";enemyvalue
 endif
  if cammand$ = "fight3"
 enemy$ = "aDragon"
 enemyhp = 50
 enemyattack = 15
 enemyvalue = 1000
 turn$ = "aYour Turn"
 print "aEnemy Name: ";enemy$
 print "aEnemy Hp: ";enemyhp
 print "aEnemy Attack: ";enemyattack
 print "aTurn: ";turn$
 print "aPrize: ";enemyvalue
 endif
 if cammand$ = "stats"
 print "aGold: ";gold
 print "aMaxHealth: ";hpmax
 print "aHealth: ";hp
 print "aLevel: ";level
 print "aEXP: ";exp
 print "aMaxEXP: ";expmax
 print "aAttack: ";attack
 print "aWeapon: ";wep$
 print "aWeapon Damage: ";wepd
 endif
 if cammand$ = "clear()"
 cls
 print "dsdf"
 endif
 if cammand$ = "name()"
 input "aType Name Here>";name$
 print "ayour name is now ";name$
 endif
 if cammand$ = "fortune()"
 print "aAsk me a yes/no question to see your answer. 1 = yes, 0 = no."
 input "aQuestion: ";quest$
 print "aAnswer: ";rnd(1)
 endif
 loop
 
 do
 if hp = 0
 enemy$ = "Winner"
 print "You Died! you lost some gold and was sent to the hospital."
 gold = gold - rnd(10)
 endif
 loop