Help creating text based RPG
Posted: Mon Jun 20, 2005 12:08 pm
I am using Pete's Tutorials on the site. I am on Tutorial 2, Challenge 4 and I cant figure out how to start it. I got past the first three challenges without any problems. I think if I could just figure out how to start it the rest would be easy. Here is the code I do have:
PRINT "You can go left, right, or forward"
PRINT "Which direction do you want to go? ";: INPUT d$
IF d$ = "Left" OR d$ = "left" GOTO 1
IF d$ = "Right" OR d$ = "right" GOTO 2
IF d$ = "Forward" OR d$ = "forward" GOTO 3
5 attack=INT(RND*4)+1
1 PRINT "You have been attacked"
4 PRINT "Enemy 1"
HP=INT(RND*9)+1
PRINT HP
7 PRINT "What do you want to do? You can attack or use an item";: INPUT choices!
IF choices$ = Attack
IF choices$ = item GOTO 6
2
3
6 PRINT "You dont have any items yet";: GOTO 7
PRINT "You can go left, right, or forward"
PRINT "Which direction do you want to go? ";: INPUT d$
IF d$ = "Left" OR d$ = "left" GOTO 1
IF d$ = "Right" OR d$ = "right" GOTO 2
IF d$ = "Forward" OR d$ = "forward" GOTO 3
5 attack=INT(RND*4)+1
1 PRINT "You have been attacked"
4 PRINT "Enemy 1"
HP=INT(RND*9)+1
PRINT HP
7 PRINT "What do you want to do? You can attack or use an item";: INPUT choices!
IF choices$ = Attack
IF choices$ = item GOTO 6
2
3
6 PRINT "You dont have any items yet";: GOTO 7