The code for the game, in case you were curious
DECLARE SUB help (x!, y!, hp!, hpt!, fight!, mage!, maget!, tcount!, t)
DECLARE SUB examine (x!, y!)
DECLARE SUB save (file$, x!, y!, hp!, hpt!, fight!, mage!, maget!, tcount!)
DECLARE SUB statmanage (hp!, hpt!, fight!, mage!, maget!, die!)
DECLARE SUB died (hp!)
DECLARE SUB statshow (hp!, hpt!, fight!, mage!, maget!, x!, y!, tcount!)
DECLARE SUB intro (ch!, file$, die!)
DECLARE SUB mapcheck (x!, y!, xc!, yc!, health!, tcount!)
DECLARE SUB tbox (text$, soundset!)
DECLARE SUB mapshow (x!, y!)
COMMON SHARED maxx, maxy, file$
CLS : SCREEN 12: RANDOMIZE TIMER: TIMER ON
st = TIMER: FOR i = 1 TO 50000: NEXT: t = (TIMER - st) / 50000
maxx = 100: maxy = 100
DIM SHARED map(maxx, maxy)
DIM SHARED you(100), youshad(100)
DIM SHARED textbox$(4), helph(5, 5)
DIM SHARED block(11, 11)
FOR i = 0 TO 5: READ helph(0, i): READ helph(1, i): helph(4, i) = helph(0, i): helph(5, i) = helph(1, i): NEXT
OPEN "c:\files\rpg\gamefile\textures.txt" FOR INPUT AS #1
INPUT #1, texnum: DIM SHARED texture(texnum * 100 - 1), textscrip$(texnum - 1)
FOR a = 0 TO (texnum - 1)
FOR py = 0 TO 9
FOR px = 0 TO 9
INPUT #1, col
PSET (px, py), col
NEXT: NEXT
GET (0, 0)-(9, 9), texture(a * 100)
LINE INPUT #1, textscrip$(a)
NEXT
CLOSE #1
OPEN "C:\files\rpg\gamefile\monster.txt" FOR INPUT AS #1
FOR a = 1 TO 2
FOR py = 0 TO 9
FOR px = 0 TO 9
INPUT #1, col
PSET (px, py), col
NEXT: NEXT
IF a = 1 THEN GET (0, 0)-(9, 9), you
IF a = 2 THEN GET (0, 0)-(9, 9), youshad
NEXT
CLOSE #1
OPEN "C:\files\rpg\gamefile\items.txt" FOR INPUT AS 1
INPUT #1, itemnum: DIM items(itemnum * 100 - 1)
FOR a = 0 TO (itemnum - 1)
FOR py = 0 TO 9
FOR px = 0 TO 9
INPUT #1, col
PSET (px, py), col
NEXT: NEXT
GET (0, 0)-(9, 9), items(a * 100)
NEXT
CLOSE #1
DO
CALL intro(ch, file$, die)
SELECT CASE ch
CASE 0
OPEN "C:\files\rpg\gamefile\" + file$ + ".txt" FOR INPUT AS #1
INPUT #1, startx: INPUT #1, starty: INPUT #1, maxx: INPUT #1, maxy
REDIM map(maxx, maxy)
FOR i = 0 TO maxy
FOR j = 0 TO maxx
INPUT #1, map(j, i)
NEXT: NEXT
CLOSE #1
x = startx: y = starty
hptot = 10: fight = 1: magetot = 1: hp = hptot: mage = magetot: tcount = 0
CASE 1
OPEN "C:\files\rpg\" + file$ + ".rsf" FOR INPUT AS #1
INPUT #1, map$: INPUT #1, x: INPUT #1, y: INPUT #1, hp: INPUT #1, hptot
INPUT #1, fight: INPUT #1, mage: INPUT #1, magetot: INPUT #1, tcount
CLOSE #1
file$ = map$
OPEN "C:\files\rpg\gamefile\" + map$ + ".txt" FOR INPUT AS #1
INPUT #1, startx: INPUT #1, starty: INPUT #1, maxx: INPUT #1, maxy
REDIM map(maxx, maxy)
FOR i = 0 TO maxy
FOR j = 0 TO maxx
INPUT #1, map(j, i)
NEXT: NEXT
CLOSE #1
END SELECT
CLS
LOCATE 8, 2: PRINT "Press 'h' to see Help menu."
LINE (129, 189)-(240, 300), 4, B
LINE (127, 187)-(242, 302), 4, B
LINE (6, 14)-(633, 97), 1, B
LINE (4, 12)-(635, 99), 1, B
CALL tbox("Welcome!", 0)
CALL mapshow(x, y)
CALL statshow(hp, hptot, fight, mage, magetot, x, y, tcount)
DO
press$ = INKEY$
IF press$ = CHR$(0) + CHR$(75) THEN IF x - 1 >= 0 AND x - 1 <= maxx THEN CALL mapcheck(x, y, -1, 0, hp, tcount)
IF press$ = CHR$(0) + CHR$(77) THEN IF x + 1 >= 0 AND x + 1 <= maxx THEN CALL mapcheck(x, y, 1, 0, hp, tcount)
IF press$ = CHR$(0) + CHR$(72) THEN IF y - 1 >= 0 AND y - 1 <= maxy THEN CALL mapcheck(x, y, 0, -1, hp, tcount)
IF press$ = CHR$(0) + CHR$(80) THEN IF y + 1 >= 0 AND y + 1 <= maxy THEN CALL mapcheck(x, y, 0, 1, hp, tcount)
IF press$ = " " THEN CALL mapcheck(x, y, 0, 0, hp, tcount)
IF LCASE$(press$) = "s" THEN CALL save(file$, x, y, hp, hptot, fight, mage, magetot, tcount)
IF LCASE$(press$) = "e" THEN CALL examine(x, y)
IF LCASE$(press$) = "h" THEN CALL help(x, y, hp, hptot, fight, mage, magetot, tcount, t)
IF ox <> x OR oy <> y THEN
CALL mapshow(x, y)
IF x = startx AND y = starty THEN CALL tbox("This is where you started out!", 0)
END IF
IF press$ <> "" THEN CALL statshow(hp, hptot, fight, mage, magetot, x, y, tcount)
IF tcount <> otcount THEN CALL statmanage(hp, hptot, fight, mage, magetot, die)
ox = x: oy = y
otcount = tcount
LOOP WHILE press$ <> CHR$(27) AND die = 0
IF die = 0 THEN CALL tbox("Goodbye!", 0)
DO: press$ = INKEY$: LOOP WHILE press$ = ""
LOOP
DATA -30,-40,30,-40,-30,0,30,0,-30,40,30,40
SUB died (hp)
IF hp > -1 THEN CALL tbox("You have died.", 0)
IF hp <= -1 AND hp > -10 THEN CALL tbox("You have died a painful death.", 0)
IF hp <= -10 THEN CALL tbox("You have died an extremely painful death.", 0)
PLAY "mbo4l8ccl16cl8cd+l16dl8dl16cl8cl16o3bo4l4c"
END SUB
SUB examine (x, y)
DO: press$ = INKEY$
IF press$ <> "" THEN
IF press$ = CHR$(0) + CHR$(72) THEN IF y - 1 >= 0 THEN CALL tbox("You see " + textscrip$(map(x, y - 1)) + " to your north.", 0): eend = 1
IF press$ = CHR$(0) + CHR$(80) THEN IF y + 1 <= maxy THEN CALL tbox("You see " + textscrip$(map(x, y + 1)) + " to your south.", 0): eend = 1
IF press$ = CHR$(0) + CHR$(75) THEN IF x - 1 >= 0 THEN CALL tbox("You see " + textscrip$(map(x - 1, y)) + " to your west.", 0): eend = 1
IF press$ = CHR$(0) + CHR$(77) THEN IF x + 1 <= maxx THEN CALL tbox("You see " + textscrip$(map(x + 1, y)) + " to your east.", 0): eend = 1
IF press$ = " " THEN CALL tbox("You look down and see " + textscrip$(map(x, y)) + " beneath your feet.", 0): eend = 1
IF eend = 0 THEN eend = 1
END IF
LOOP WHILE eend = 0
END SUB
SUB help (x, y, hp, hpt, fight, mage, maget, tcount, t)
rc! = 3.141592653589793# / 180
LINE (0, 0)-(639, 479), 0, BF
LINE (0, 0)-(639, 479), 2, B
LINE (2, 2)-(637, 477), 2, B
LOCATE 2, 14: PRINT "Welcome to the Help Menu! Press any key to resume game."
LOCATE 4, 5: PRINT "Moving your character:"
COLOR 1
LOCATE 6, 7: PRINT "-Press the up arrow key to move north."
LOCATE 7, 7: PRINT "-Press the down arrow key to move south."
LOCATE 8, 7: PRINT "-Press the left arrow key to move west."
LOCATE 9, 7: PRINT "-Press the right arrow key to move east."
COLOR 15
LOCATE 11, 5: PRINT "Exiting the game:"
COLOR 4
LOCATE 13, 7: PRINT "-Press the Esc key. Then press any key to return to the main menu."
LOCATE 14, 7: PRINT "-Note that the game will NOT be saved when you do this."
COLOR 15
LOCATE 16, 5: PRINT "Saving your game:"
COLOR 14
LOCATE 18, 7: PRINT "-Press the 's' key. Then type in the save name, and hit enter."
COLOR 15
LOCATE 20, 5: PRINT "Examining things in the game:"
COLOR 2
LOCATE 22, 7: PRINT "-Press the 'e' key. Then hit any of the arrow keys or the space bar."
LOCATE 23, 7: PRINT "-Hitting the space bar will tell you what you are standing on."
LOCATE 24, 7: PRINT "-Hitting an arrow key will tell you what is in that direction."
LOCATE 25, 7: PRINT "-Hitting any other key will return you to normal play."
COLOR 15
DO: press$ = INKEY$
a = a + 1: IF a >= 360 THEN a = 0
LINE (helph(4, 0) + 500, helph(5, 0) + 120)-(helph(4, 4) + 500, helph(5, 4) + 120), 0
LINE (helph(4, 1) + 500, helph(5, 1) + 120)-(helph(4, 5) + 500, helph(5, 5) + 120), 0
LINE (helph(4, 2) + 500, helph(5, 2) + 120)-(helph(4, 3) + 500, helph(5, 3) + 120), 0
FOR i = 0 TO 5
helph(4, i) = helph(2, i): helph(5, i) = helph(3, i)
helph(2, i) = COS(a * rc!) * helph(0, i) + SIN(a * rc!) * helph(1, i)
helph(3, i) = COS(a * rc!) * helph(1, i) - (SIN(a * rc!) * helph(0, i))
NEXT
LINE (helph(2, 0) + 500, helph(3, 0) + 120)-(helph(2, 4) + 500, helph(3, 4) + 120), 5
LINE (helph(2, 1) + 500, helph(3, 1) + 120)-(helph(2, 5) + 500, helph(3, 5) + 120), 5
LINE (helph(2, 2) + 500, helph(3, 2) + 120)-(helph(2, 3) + 500, helph(3, 3) + 120), 5
FOR d = 0 TO .01 / t: NEXT
LOOP WHILE press$ = ""
LINE (0, 0)-(639, 479), 0, BF
LOCATE 8, 2: PRINT "Press 'h' to see Help menu."
LINE (129, 189)-(240, 300), 4, B
LINE (127, 187)-(242, 302), 4, B
LINE (6, 14)-(633, 97), 1, B
LINE (4, 12)-(635, 99), 1, B
CALL mapshow(x, y)
CALL statshow(hp, hpt, fight, mage, maget, x, y, tcount)
FOR i = 0 TO 4
LOCATE 2 + i, 2: PRINT textbox$(i)
NEXT
END SUB
SUB intro (ch, file$, die)
die = 0
FOR i = 0 TO 4
textbox$(i) = ""
NEXT
CLS
COLOR 2
LOCATE 12, 31: PRINT "WELCOME to Ardenia"
COLOR 1
LOCATE 14, 25: PRINT "The RPG by Random Tree Software"
COLOR 4
DO: l = 0
LOCATE 19, 23: INPUT "Load a file, create a new one, or exit:", ch$
LOCATE 21, 28: PRINT SPACE$(30)
LOCATE 22, 28: PRINT SPACE$(30)
COLOR 15
SELECT CASE LCASE$(ch$)
CASE IS = "new"
LOCATE 21, 28: INPUT "Map to start out on:", file$: ch = 0
OPEN "C:\files\rpg\gamefile\" + file$ + ".txt" FOR APPEND AS #1: CLOSE #1
OPEN "C:\files\rpg\gamefile\" + file$ + ".txt" FOR INPUT AS #1
IF EOF(1) THEN LOCATE 22, 28: PRINT "Please choose an actual file.": l = 1: COLOR 4: LOCATE 20, 23: PRINT SPACE$(40): CLOSE #1: KILL "C:\files\rpg\gamefile\" + file$ + ".txt"
CLOSE #1
CASE IS = "open", IS = "load"
LOCATE 21, 28: INPUT "File to open:", file$: ch = 1
OPEN "C:\files\rpg\" + file$ + ".rsf" FOR APPEND AS #1: CLOSE #1
OPEN "C:\files\rpg\" + file$ + ".rsf" FOR INPUT AS #1
IF EOF(1) THEN LOCATE 22, 28: PRINT "Please choose an actual file.": l = 1: COLOR 4: LOCATE 20, 23: PRINT SPACE$(40): CLOSE #1: KILL "C:\files\rpg\" + file$ + ".rsf"
CLOSE #1
CASE IS = "exit"
LOCATE 21, 36: PRINT "Goodbye!": END
CASE ELSE
LOCATE 21, 28: PRINT "Please choose a correct input.": l = 1: COLOR 4: LOCATE 20, 23: PRINT SPACE$(40)
END SELECT
LOOP WHILE l = 1
PLAY "mbo4l16cdel4gl16edco3l4go4l16cdel8gl16edel4c"
LOCATE 27, 28: PRINT "Press any key to continue."
DO: press$ = INKEY$: LOOP WHILE press$ = ""
CLS
END SUB
SUB mapcheck (x, y, xc, yc, health, tcount)
SELECT CASE map(x + xc, y + yc)
CASE IS = 0
CALL tbox("You can't move through solid wall.", 1)
CASE IS = 2
CALL tbox("You can't cross water.", 1)
CASE IS = 5
CALL tbox("There is a tree in the way.", 1)
CASE IS = 7
CALL tbox("This solid rock is inpenetrable.", 1)
CASE IS = 8
IF x + xc * 2 >= 0 AND x + xc * 2 <= maxx AND y + yc * 2 >= 0 AND y + yc * 2 <= maxy THEN
tertest = map(x + xc * 2, y + yc * 2)
IF tertest = 1 OR tertest = 3 OR tertest = 4 OR tertest = 6 OR tertest = 10 OR tertest = 11 OR tertest = 12 THEN
x = x + xc * 2: y = y + yc * 2: CALL tbox("You walk through the door.", 0)
IF tertest = 10 THEN
dam = INT(RND * 9) + 1
health = health - dam
dam$ = LTRIM$(RTRIM$(STR$(dam)))
CALL tbox("You step into the lava.", 0)
CALL tbox("You are burned and take " + dam$ + " damage!", 1)
END IF
tcount = tcount + 1
ELSE CALL tbox("There is nothing on the other side.", 1)
END IF
ELSE CALL tbox("There is nothing on the other side.", 1)
END IF
CASE IS = 9
CALL tbox("You can't cross this very deep pit.", 1)
CASE IS = 10
dam = INT(RND * 9) + 1
health = health - dam
dam$ = LTRIM$(RTRIM$(STR$(dam)))
IF xc <> 0 OR yc <> 0 THEN CALL tbox("You step into the lava.", 0)
IF xc = 0 AND yc = 0 THEN CALL tbox("You continue standing in the lava, contrary to your best instinct.", 1)
CALL tbox("You are burned and take " + dam$ + " damage!", 1)
x = x + xc: y = y + yc
tcount = tcount + 1
CASE IS = 13
CALL tbox("There is a column in the way.", 1)
CASE IS = 14
CALL tbox("There is a snowy pine in the way.", 1)
CASE IS = 15
CALL tbox("There is a palm tree in the way.", 1)
CASE ELSE
x = x + xc: y = y + yc
tcount = tcount + 1
END SELECT
END SUB
SUB mapshow (x, y)
'FOR c = -5 TO 5
'FOR b = -5 TO 5
'mx = x + b: my = y + c
''LOCATE 1, 1: PRINT x, y, mx, my, mx - x, my - y
'block(mx - x + 5, my - y + 5) = 0
'FOR i = 1 TO 20
'bx = CINT(x + (((mx - x) / 20) * i))
'by = CINT(y + (((my - y) / 20) * i))
'IF bx <> mx OR by <> my THEN
'IF bx >= 0 AND bx <= maxx AND by >= 0 AND by <= maxy THEN
'IF map(bx, by) = 0 OR map(bx, by) = 7 OR map(bx, by) = 8 THEN block(mx - x + 5, my - y + 5) = 1
'END IF
'END IF
'NEXT
'NEXT: NEXT
FOR my = y - 5 TO y + 5
FOR mx = x - 5 TO x + 5
IF mx >= 0 AND mx <= maxx AND my >= 0 AND my <= maxy THEN
'IF block(mx - x + 5, my - y + 5) = 0 THEN
PUT ((mx - x) * 10 + 180, (my - y) * 10 + 240), texture(map(mx, my) * 100), PSET
'ELSE LINE ((mx - x) * 10 + 180, (my - y) * 10 + 240)-((mx - x) * 10 + 189, (my - y) * 10 + 249), 0, BF
'END IF
ELSE LINE ((mx - x) * 10 + 180, (my - y) * 10 + 240)-((mx - x) * 10 + 189, (my - y) * 10 + 249), 0, BF
END IF
NEXT: NEXT
PUT (180, 240), youshad, AND
PUT (180, 240), you, OR
END SUB
SUB save (file$, x, y, hp, hpt, fight, mage, maget, tcount)
3 : LOCATE 28, 1: INPUT "Save name:", name$
IF name$ = "" THEN CALL tbox("Please enter a name.", 1): GOTO 3
OPEN "C:\files\rpg\" + name$ + ".rsf" FOR OUTPUT AS #1
PRINT #1, file$ + ", ";
PRINT #1, LTRIM$(RTRIM$(STR$(x))) + ", ";
PRINT #1, LTRIM$(RTRIM$(STR$(y))) + ", ";
PRINT #1, LTRIM$(RTRIM$(STR$(hp))) + ", ";
PRINT #1, LTRIM$(RTRIM$(STR$(hpt))) + ", ";
PRINT #1, LTRIM$(RTRIM$(STR$(fight))) + ", ";
PRINT #1, LTRIM$(RTRIM$(STR$(mage))) + ", ";
PRINT #1, LTRIM$(RTRIM$(STR$(maget))) + ", ";
PRINT #1, LTRIM$(RTRIM$(STR$(tcount))) + ", ";
CLOSE #1
CALL tbox("File successfully saved as " + name$ + ".", 0)
LOCATE 28, 1: PRINT SPACE$(20)
END SUB
SUB statmanage (hp, hpt, fight, mage, maget, die)
IF INT(hp) <= 0 THEN CALL died(hp): die = 1
IF hp < hpt THEN hp = hp + .02
IF hp > hpt THEN hp = hpt
IF mage < maget THEN mage = mage + .02
IF mage > maget THEN mage = maget
END SUB
SUB statshow (hp, hpt, fight, mage, maget, x, y, tcount)
LOCATE 20, 60: PRINT SPACE$(20)
LOCATE 20, 60: PRINT "Health: ";
IF INT(hp) / hpt > .667 THEN COLOR 2
IF INT(hp) / hpt <= .667 AND hp / hpt > .333 THEN COLOR 14
IF INT(hp) / hpt <= .333 THEN COLOR 4
hpshow = hp: IF hp < 0 THEN hpshow = 0
PRINT LTRIM$(RTRIM$(STR$(INT(hpshow))));
COLOR 15
PRINT " / " + LTRIM$(RTRIM$(STR$(hpt)))
LOCATE 21, 60: PRINT SPACE$(20)
LOCATE 21, 60: PRINT "Fighting skill: " + LTRIM$(RTRIM$(STR$(fight)))
LOCATE 22, 60: PRINT SPACE$(20)
LOCATE 22, 60: PRINT "Magic: ";
IF INT(mage) / maget > .667 THEN COLOR 2
IF INT(mage) / maget <= .667 AND hp / hpt > .333 THEN COLOR 14
IF INT(mage) / maget <= .333 THEN COLOR 4
mageshow = mage: IF mageshow < 0 THEN mageshow = 0
PRINT LTRIM$(RTRIM$(STR$(INT(mageshow))));
COLOR 15
PRINT " / " + LTRIM$(RTRIM$(STR$(maget)))
LOCATE 22, 17: PRINT x
LOCATE 22, 28: PRINT y
LOCATE 11, 16: PRINT "Time in game:" + LTRIM$(RTRIM$(STR$(tcount)))
END SUB
SUB tbox (text$, soundset)
IF soundset <> 0 THEN PLAY "o4l64cde"
IF LEN(text$) > 78 THEN text$ = MID$(text$, 1, 78)
FOR i = 0 TO 3: textbox$(i) = textbox$(i + 1): NEXT
textbox$(4) = text$
FOR i = 0 TO 4
LOCATE 2 + i, 2: PRINT SPACE$(78)
LOCATE 2 + i, 2: PRINT textbox$(i)
NEXT
END SUB