Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program SPHINX
- EXTERNAL SUB subkill
- EXTERNAL SUB subGetObjName (INTEGER)
- EXTERNAL SUB subProcessNoun (STRING)
- EXTERNAL SUB subProcessVerb (STRING)
- EXTERNAL SUB subResponse (INTEGER)
- EXTERNAL SUB subPrintLocation (INTEGER)
- EXTERNAL SUB subPrintExits (INTEGER)
- EXTERNAL SUB subVerbOpen (INTEGER)
- EXTERNAL SUB subVerbMove (string,INTEGER)
- EXTERNAL SUB subVerbGetTake (INTEGER,INTEGER,INTEGER)
- EXTERNAL SUB subTrialMove (INTEGER)
- EXTERNAL SUB subVerbKill (INTEGER)
- EXTERNAL SUB subVerbWave (INTEGER)
- EXTERNAL SUB subVerbEat (INTEGER,INTEGER)
- EXTERNAL SUB subVerbCross (INTEGER)
- EXTERNAL SUB subVerbThrow (INTEGER)
- EXTERNAL SUB subVerbFeed (INTEGER)
- EXTERNAL SUB subVerbRub (INTEGER)
- EXTERNAL SUB subVerbLight (INTEGER)
- EXTERNAL SUB subVerbRead (INTEGER)
- EXTERNAL SUB subVerbPay (INTEGER)
- EXTERNAL SUB subVerbIn (INTEGER)
- EXTERNAL SUB subVerbOut (INTEGER)
- EXTERNAL SUB subCalculateScore
- EXTERNAL SUB subVerbFill (INTEGER)
- EXTERNAL SUB subObjectText (INTEGER,INTEGER,INTEGER)
- EXTERNAL SUB subPrintText (STRING)
- EXTERNAL SUB subFinish
- EXTERNAL SUB subEat
- EXTERNAL SUB subSnatch
- EXTERNAL SUB subSave (STRING)
- EXTERNAL SUB subLoad (STRING)
- EXTERNAL SUB subDebug
- EXTERNAL SUB subReadExits
- EXTERNAL SUB subReadObjectLocations
- EXTERNAL SUB subPrintHelp
- EXTERNAL STRING FUNCTION funTrimSpaces(STRING)
- EXTERNAL STRING FUNCTION funconvertlowerCase (STRING)
- !DECLARE STRING FUNCTION funTrimSpaces (STRING)
- !DECLARE STRING FUNCTION funConvertLowerCase ( STRING)
- COMMON (VARIABLES) INTEGER varKilledFlag, varKneelingFlag, varFlamesFlag, varLampLitFlag
- COMMON (VARIABLES) INTEGER varScore, varBearFlag, varRabbitFlag
- COMMON (VARIABLES) INTEGER varLampFuel, varScreenWidth, varSafeOpenFlag, varDwarfChance
- COMMON (VARIABLES) INTEGER varDwarfFlag, varTurnIncrement, varGoblinEncounters
- COMMON (VARIABLES) INTEGER varCurrentLocation, varTurnCount, varChasmFlag, varCasketOpenFlag
- COMMON (VARIABLES) INTEGER varDwarfEncounters, varMAX, varWord1Index, varWord2Index
- COMMON (VARIABLES) INTEGER varGotWaterFlag, varVampireEncounters
- COMMON (VARIABLES) INTEGER varTurnLastSeenDwarf, varSuppressDwarf
- COMMON (VARIABLES) INTEGER X, varCarryingCounter, K, varWavingAtSphinxFlag
- COMMON (VARIABLES) INTEGER varObjectLocations, varExitArray, varSpacePos, varBridgeFlag
- COMMON (VARIABLES) INTEGER M, cn, N, W, Q, varMAP
- COMMON (VARIABLES) INTEGER varObjectLocations(56), varExitArray(6), varExits(858)
- COMMON (VARIABLES) STRING varWord1$, varWord2$, varDirections$, O$, R$
- varDirections$ = "nsewud"
- varKneelingFlag = 0
- varWavingAtSphinxFlag = 0
- varTurnLastSeenDwarf = 0
- varGotWaterFlag = 0
- varDwarfChance = 0.97
- varLampFuel = 150
- B2$ = " "
- K = 0
- varWord1Index = 0
- I = 0
- X = 0
- varTurnCount = 0
- varChasmFlag = 0
- varBridgeFlag = 0
- varKilledFlag = 0
- varCasketOpenFlag = 0
- varSuppressDwarf = 0
- varDwarfEncounters = 0
- varSafeOpenFlag = 0
- varFlamesFlag = 1
- varLampLitFlag = 0
- varScore = 0
- varCarryingCounter = -3
- varVampireEncounters = 0
- varGoblinEncounters = 0
- varBearFlag = 0
- varRabbitFlag = 0
- varScreenWidth = 80
- varTurnIncrement = 1
- Call subReadExits
- Call subReadObjectLocations
- varCurrentLocation = 6
- Print
- Print " W E L C O M E T O "
- Print
- Print " .d8888b. 8888888b. 888 888 8888888 888b 888 Y88b d88P "
- Print "d88P Y88b 888 Y88b 888 888 888 8888b 888 Y88b d88P "
- Print "Y88b. 888 888 888 888 888 88888b 888 Y88o88P "
- Print " `Y888b. 888 d88P 8888888888 888 888Y88b 888 Y888P "
- Print " `Y88b. 8888888P' 888 888 888 888 Y88b888 d888b "
- Print " `888 888 888 888 888 888 Y88888 d88888b "
- Print "Y88b d88P 888 888 888 888 888 Y8888 d88P Y88b "
- Print " `Y8888P' 888 888 888 8888888 888 Y888 d88P Y88b "
- Print
- Print " A D V E N T U R E "
- Print
- Print
- Print " GOOD LUCK IN YOUR EXPLORATIONS HERE!! "
- Print
- Print " Try to find all the treasure and take it to the sphinx. "
- Print
- Print " Original (c) Acornsoft 1982. Dragged into 21st Century by Iain "
- Print
- Print
- Print "Press Enter to continue!"
- Input "", dummy$
- Call subPrintLocation(varCurrentLocation)
- labMainLoop:
- A$ = " "
- X = 0
- varWord2$ = " "
- varWord1$ = " "
- varOutputString$ = ""
- M = 0
- K = 0
- If varTurnIncrement = 1 Then
- varTurnCount = varTurnCount + 1
- End If
- If varLampLitFlag = 1 And varTurnIncrement = 1 Then
- varLampFuel = varLampFuel - 1
- varWord1Index = 0
- varWord2Index = 0
- End If
- varTurnIncrement = 1
- If Rnd > varDwarfChance And varDwarfFlag = 0 And (varTurnCount - varTurnLastSeenDwarf) > 25 Then
- varObjectLocations(31) = varCurrentLocation
- varDwarfFlag = 1
- varTurnLastSeenDwarf = varTurnCount
- End If
- If varCurrentLocation <> varObjectLocations(31) Or varDwarfChance = 2 Then
- GoTo labNoDwarf
- Else
- varDwarfEncounters = varDwarfEncounters + 1
- Call subPrintText("There is a dwarf here. He throws an axe at you.")
- If varObjectLocations(1) = 0 Then
- varObjectLocations(1) = varCurrentLocation
- End If
- If varDwarfEncounters > 6 Or Rnd > 0.95 Then
- Call subPrintText("The axe hits you hard in the chest and you bleed to death.")
- Call subKill
- End If
- If varObjectLocations(1) = varCurrentLocation Then
- Call subPrintText("The axe misses and lands on the ground next to you.")
- Else
- If varObjectLocations(1) <> varCurrentLocation Then
- Call subPrintText("The axe misses then vanishes into thin air.")
- End If
- End If
- End If
- varSuppressDwarf = 0
- labNoDwarf:
- R$ = " "
- If varCurrentLocation = 48 And varCurrentLocation = varObjectLocations(33) Then
- varGoblinEncounters = varGoblinEncounters + 1
- If varGoblinEncounters >= 5 Then
- Call subPrintText("The goblins suddenly leap upon you and tear you limb from limb!")
- Call subKill
- R$ = ""
- End If
- End If
- If varCurrentLocation = varObjectLocations(43) Then
- varVampireEncounters = varVampireEncounters + 1
- If varVampireEncounters >= 2 Then
- Call subResponse(44)
- Call subKill
- End If
- End If
- If varCurrentLocation > 8 And varObjectLocations(3) <> 1 And varCurrentLocation <> varObjectLocations(3) Then
- Print
- Call subPrintText("IT'S VERY DARK.")
- Call subPrintText("IF YOU MOVE YOU MAY FALL INTO A PIT.")
- GoTo lab200
- End If
- If varLampFuel <= 0 And varLampLitFlag = 1 And varObjectLocations(3) = 1 Then
- Print
- Call subPrintText("Your lamp has run out.")
- varLampLitFlag = 0
- Else
- If varLampFuel < 10 And varLampLitFlag = 1 And varObjectLocations(3) = 1 Then
- Print
- Call subPrintText("Your lamp is getting dim.")
- End If
- End If
- If varLampLitFlag = 0 And varCurrentLocation > 8 Then
- Print
- Call subPrintText("It's very dark.")
- Call subPrintText("If you move, you may fall into a pit.")
- End If
- lab200:
- Print
- Input "Command "; A$
- If Len(A$) = 0 Then
- Call subPrintText("What?")
- GoTo lab200
- End If
- A$ = funConvertLowerCase(A$)
- If Left$(A$, 3) = "inv" Then
- varTurnIncrement = 0
- Call subPrintLocation(1)
- GoTo labMainLoop
- End If
- If A$ = "disdwarf" Then
- Call subPrintText("Dwarf disabled")
- varTurnIncrement = 0
- varDwarfChance = 2
- varDwarfFlag = 0
- varDwarfIncrement = 0
- varTurnLastSeenDwarf = 0
- varObjectLocations(31) = 0
- End If
- If A$ = "enadwarf" Then
- Call subPrintText("Dwarf enabled")
- varDwarfIncrement = 0
- varTurnIncrement = 0
- varDwarfChance = 0.97
- GoTo lab200
- End If
- If A$ = "debug" Then
- varTurnIncrement = 0
- Call subDebug
- GoTo labMainLoop
- End If
- If Len(A$) = 1 Then
- Call subVerbMove(A$, varCurrentLocation)
- GoTo labMainLoop
- End If
- varSpacePos = InStr(0,A$, " ")
- If InStr(0,funTrimSpaces(Right$(A$, Len(A$) - varSpacePos)), " ") <> 0 Then
- Call subPrintText("I'm sorry. I can't understand more than two words at a time")
- varTurnIncrement = 0
- GoTo labMainLoop
- End If
- If varSpacePos = 0 Then
- Call subProcessVerb(A$)
- GoTo lab211
- Else
- varWord1$ = funTrimSpaces(Left$(A$, varSpacePos - 1))
- varWord2$ = funTrimSpaces(Right$(A$, Len(A$) - varSpacePos))
- If varWord1$ = "load" Then
- varTurnIncrement = 0
- Call subLoad(varWord2$)
- GoTo lab200
- End If
- If varWord1$ = "save" Then
- varTurnIncrement = 0
- Call subSave(varWord2$)
- GoTo lab200
- End If
- Call subProcessVerb(varWord1$)
- Call subProcessNoun(varWord2$)
- End If
- If varWord1$ = "go" Or varWord1$ = "exit" Or varWord1$ = "leave" Then
- GoTo lab244
- End If
- If varWord1$ = "drink" Then
- Call subVerbEat(varWord2Index, 2)
- GoTo labMainLoop
- End If
- If varWord1Index = -1 Then
- Call subPrintText("I don't understand the word " + varWord1$)
- varTurnIncrement = 0
- If varWord2Index <> -1 Then
- GoTo labMainLoop
- End If
- End If
- If varWord2Index = -1 Then
- Call subPrintText("I don't understand the word " + varWord2$)
- varTurnIncrement = 0
- GoTo labMainLoop
- Else
- If varWord1Index > 14 Then
- GoTo lab211
- End If
- End If
- On varWord1Index GOTO lab213, lab213, lab214, lab215, lab216, lab217, lab218, lab220, lab221, lab224, lab225, lab226, lab227, lab228
- lab211:
- If A$ = "exit" Then
- Call subVerbOut(varCurrentLocation)
- GoTo labMainLoop
- Else
- If varWord1Index <> -1 Then
- K = varWord1Index - 14
- Else
- Call subProcessNoun(A$)
- If varWord2Index = -1 Then
- Call subPrintText("I don't understand the word " + A$)
- GoTo labMainLoop
- Else
- Call subPrintText("What do you want to do to the " + A$)
- GoTo labMainLoop
- End If
- End If
- End If
- lab212:
- On K GOTO lab237, lab229, lab230, lab230, lab231, lab232, lab235, lab236, lab229, lab238, lab240, lab243, lab243, lab243, lab243, lab243, lab243, lab219, lab244
- Call subResponse(46)
- GoTo labMainLoop
- lab213:
- Call subVerbGetTake(varWord2Index, varCurrentLocation, 1)
- If X = 0 Then
- varCarryingCounter = varCarryingCounter + 1
- GoTo labMainLoop
- Else
- GoTo labMainLoop
- End If
- lab214:
- Call subVerbOpen(varWord2Index)
- GoTo labMainLoop
- lab215:
- Call subVerbWave(varWord2Index)
- GoTo labMainLoop
- lab216:
- Call subVerbThrow(varWord2Index)
- If X = 0 Then
- varCarryingCounter = varCarryingCounter - 1
- GoTo labMainLoop
- Else
- GoTo labMainLoop
- End If
- lab217:
- Call subVerbGetTake(varWord2Index, 1, varCurrentLocation)
- If X = 0 Then
- varCarryingCounter = varCarryingCounter - 1
- GoTo labMainLoop
- Else
- GoTo labMainLoop
- End If
- lab218:
- Call subVerbKill(varWord2Index)
- GoTo labMainLoop
- lab219:
- Call subVerbFill(varWord2Index)
- GoTo labMainLoop
- lab220:
- Call subVerbEat(varWord2Index, 1)
- GoTo labMainLoop
- lab221:
- Call subVerbCross(varWord2Index)
- GoTo labMainLoop
- If varWord2Index = 53 Then
- Call subVerbCross(varWord2Index)
- GoTo labMainLoop
- End If
- If varWord2Index = 56 Then
- If varCurrentLocation <> 3 And varCurrentLocation < 9 Then
- varCurrentLocation = 3
- Call subPrintLocation(varCurrentLocation)
- GoTo labMainLoop
- Else
- If varCurrentLocation = 3 Then
- varCurrentLocation = 2
- Call subPrintLocation(varCurrentLocation)
- GoTo labMainLoop
- Else
- Call subResponse(21)
- GoTo labMainLoop
- End If
- End If
- End If
- lab224:
- Call subVerbFeed(varWord2Index)
- GoTo labMainLoop
- lab225:
- Call subVerbRub(varWord2Index)
- GoTo labMainLoop
- lab226:
- Call subVerbLight(varWord2Index)
- GoTo labMainLoop
- lab227:
- Call subVerbRead(varWord2Index)
- GoTo labMainLoop
- lab228:
- Call subVerbPay(varWord2Index)
- GoTo labMainLoop
- lab229:
- Call subVerbIn(varCurrentLocation)
- GoTo labMainLoop
- lab230:
- Call subVerbOut(varCurrentLocation)
- GoTo labMainLoop
- lab231:
- R$ = "#"
- varKneelingFlag = 1
- Call subPrintText("You are kneeling down.")
- GoTo labMainLoop
- lab232:
- Call subPrintText("You don't want to quit already do you?")
- varTurnIncrement = 0
- lab233:
- Input "yes or no", A$
- A$ = Left$(funConvertLowerCase(A$), 1)
- If A$ = "n" Then
- GoTo labMainLoop
- End If
- If A$ = "y" Then
- Call subPrintText("OK")
- Call subCalculateScore(varCurrentLocation)
- !print "END PROGRAM"
- !input "Comprende?", a$
- stop
- Else
- GoTo lab233
- End If
- lab235:
- Call subCalculateScore(varCurrentLocation)
- GoTo labMainLoop
- lab236:
- Call subPrintLocation(varCurrentLocation)
- GoTo labMainLoop
- lab237:
- Call subPrintLocation(1)
- GoTo labMainLoop
- lab238:
- Call subPrintHelp
- GoTo labMainLoop
- lab240:
- if varSafeOpenFlag=1 then
- varSafeOpenFlag=0
- end if
- if varSafeOpenFlag=0 then
- varSafeOpenFlag=1
- end if
- !varSafeOpenFlag = varSafeOpenFlag Xor 1
- Call subPrintText("There was a very loud creaking sound then!")
- If varCurrentLocation = 137 Then
- varCurrentLocation = 138
- Else
- If varCurrentLocation = 141 Then
- varCurrentLocation = 11
- End If
- End If
- Call subPrintLocation(varCurrentLocation)
- GoTo labMainLoop
- lab243:
- varWord1$ = Left$(varWord1$, 1)
- Call subVerbMove(varWord1$, varCurrentLocation)
- GoTo labMainLoop
- lab244:
- varWord2$ = funTrimSpaces(varWord2$)
- Call subProcessVerb(varWord2$)
- If varWord1Index > 25 And varWord1Index < 32 Then
- Call subVerbMove(Left$(varWord2$, 1), varCurrentLocation)
- GoTo labMainLoop
- Else
- If Len(varWord2$) = 1 Then
- Call subVerbMove(varWord2$, varCurrentLocation)
- GoTo labMainLoop
- Else
- If varWord1Index <> -1 Then
- K = varWord1Index - 14
- GoTo lab212
- End If
- End If
- End If
- Call subProcessNoun(varWord2$)
- If varWord2Index = -1 Then
- Call subResponse(21)
- GoTo labMainLoop
- End If
- If varWord2Index = 53 Then
- Call subVerbCross(varWord2Index)
- GoTo labMainLoop
- End If
- If varWord2Index <> 56 Then
- Call subResponse(21)
- GoTo labMainLoop
- Else
- If varCurrentLocation <> 3 And varCurrentLocation < 9 Then
- varCurrentLocation = 3
- Call subPrintLocation(varCurrentLocation)
- GoTo labMainLoop
- Else
- If varCurrentLocation = 3 Then
- varCurrentLocation = 2
- Call subPrintLocation(varCurrentLocation)
- GoTo labMainLoop
- End If
- End If
- End If
- Call subResponse(21)
- GoTo labMainLoop
- end program
- Sub subKill
- COMMON (VARIABLES) INTEGER varKilledFlag, varCurrentLocation, varTurnCount
- Print
- Call subPrintText("Oh dear you seem to have been killed !")
- varKilledFlag = varKilledFlag - 100
- Call subCalculateScore(varCurrentLocation)
- Call subPrintText("You had " + Str$(varTurnCount) + " turns.")
- ! PRINT "END PROGRAM"
- !input a$
- stop
- End Sub
- Sub subGetObjName (integer n)
- COMMON (VARIABLES) STRING R$
- labObjects1:
- Data axe,sword,lamp,wand,keys,teeth,jack,chest,food,clam
- Data sapphires,diamond,gold,silver,platinum,rubies,emerald,pearls,coins,opals
- Data books,spices,sceptre,cushion,rug,ring,bottle,water,carrot,dragon
- Data dwarf,ogre,goblins,troll,bear,pirate,orc,rabbit,safe,casket
- Data crocodile,elephant,vampire,serpent,bracelet,amethyst,crown,boat,stake,stilton
- Data matches,mouse,bridge,swamp,lake,building,
- Restore
- For j = 1 To n
- Read R$
- If R$ = "" Then
- Read R$
- End If
- Next j
- End Sub
- Sub subProcessNoun (B2$)
- COMMON (VARIABLES) INTEGER varWord2Index,X
- COMMON (VARIABLES) STRING R$, varWord2$
- labObjects2:
- Data axe,sword,lamp,wand,keys,teeth,jack,chest,food,clam
- Data sapphires,diamond,gold,silver,platinum,rubies,emerald,pearls,coins,opals
- Data books,spices,sceptre,cushion,rug,ring,bottle,water,carrot,dragon
- Data dwarf,ogre,goblins,troll,bear,pirate,orc,rabbit,safe,casket
- Data crocodile,elephant,vampire,serpent,bracelet,amethyst,crown,boat,stake,stilton
- Data matches,mouse,bridge,swamp,lake,building,
- Restore
- While B2$ <> R$ And i% <= 57
- i% = i% + 1
- Read R$
- NEXT
- If i% >= 57 Then
- X = 1
- varWord2Index = -1
- Else
- varWord2Index = i%
- varWord2$ = R$
- End If
- End Sub
- Sub subProcessVerb (b1$)
- COMMON (VARIABLES) INTEGER varWord1Index
- COMMON (VARIABLES) STRING R$, varWord1$
- labVerbs:
- Data get,take,open,wave,throw,drop,kill,eat,cross,feed
- Data rub,light,read,pay,inventory,enter,out,leave,kneel,quit
- Data score,look,in,help,diaxos,north,south,east,west,up
- Data down,fill,go,load,save
- i% = 0
- Restore
- While b1$ <> R$ And i% <= 38
- i% = i% + 1
- Read R$
- NEXT
- If i% = 38 Then
- X = 1
- varWord1Index = -1
- Else
- varWord1Index = i%
- varWord1$ = R$
- END IF
- End Sub
- Sub subResponse (n)
- COMMON (VARIABLES) INTEGER varCounter, cn
- COMMON (VARIABLES) STRING R$
- labResponses:
- Data ,"You're not carrying anything."
- Data I dont understand the word
- Data "You're currently holding"
- Data There is
- Data There is no way to go that direction!
- Data "You're joking!"
- Data I see no
- Data "You're not carrying the"
- Data You killed the little dwarf!
- Data That made the goblins really mad!
- Data The bear is confused. He only wants to be your friend!
- Data The pirate dodges smartly away into the tunnels!
- Data The orc dodges and then growls ominously at you!
- Data The rabbit hops aside and says NEEERH WHATS UP DOC ?
- Data Nothing obvious happens!
- Data Well done! You vanquished a dragon with your bare hands!
- Data The chest opens easily with the keys revealing many rubies.
- Data "You can't with no keys! "
- Data You open up the clam with the jack and many pearls roll out.
- Data You cant do that at the moment.
- Data I cant apply that.
- Data A bridge now spans the
- Data Strange your lamp is brighter now!
- Data Thanks it was delicious!
- Data You cant! Its too wide to jump.
- Data Arrgh the bridge collapsed.
- Data The troll wont let you get by.
- Data You have nothing it wants.
- Data "There is a dwarf here. He throws an axe at you."
- Data You fell in a pit.
- Data "You can't! The safe door is shut."
- Data ARRRGH! CRASH!! The rocks gave way and you rolled to the bottom of the rock slide.
- Data The crocodile snaps its jaws neatly biting your leg off. You bleed to death!
- Data The elephant is blocking the way.
- Data Your matches flare up making a lot of smoke.
- Data The serpent starts to cough violently and you get thrown out.
- Data Its too wide to swim.
- Data You set off in the boat. Suddenly a sea-serpent leaps from beneath the waves and swallows you!
- Data "The fairy king appears, hands you a mithril ring, bows and slips away."
- Data The mouse eats the stilton and allows itself to be caught.
- Data The mouse runs around refusing to be caught.
- Data The sword kills the dragon. Then both sword and dragon fade away until only the dragons teeth remain.
- Data The stake pierces the vampires chest he screams and is dispersed on the wind.
- Data The vampire leaps on you and drains your blood.
- Data Suddenly a huge bird swoops down snatches the food and carries you across the swamp.
- Data I cant apply that without a noun.
- Data What do you want to do to the,
- varCounter = 0
- cn = 0
- Restore
- Read R$
- For j = 1 To n
- Read R$
- Next j
- Call subPrintText(R$ + " ")
- End Sub
- Sub subPrintLocation (varCurrentLocation)
- COMMON (VARIABLES) STRING varOutputString$, R$, varLocationDescription$(143)
- COMMON (VARIABLES) INTEGER varDwarfFlag,varObjectLocations(56),varScreenWidth
- varCounter = 0
- cn = 0
- varOutputString$ = ""
- If varCurrentLocation = 1 Then
- GoTo lab278
- end if
- Print
- Restore
- labdatalocs:
- Data Dummyloc
- Data "at the end of a road, outside a building. All around is forest."
- Data "in the building, obviously an old blacksmith's forge."
- Data in the forest.
- Data "on the road, a small raised path leads east, the road runs north-south."
- Data on the top of a mountain. In the distance a small building can be seen. All around you is dense forest. A road leads north.
- Data on a narrow path which seems to descend to the east.
- Data in the valley of doom. The path disappears down a small shaft here. Strange echoes can be heard from below.
- Data in the hall of spirits. Ghostly laughs and howls can be heard echoing around the walls. The air is full of dust and cobwebs.
- Data at a cross-roads in the tunnels. A chill wind blows from the north.
- Data in the Sorcerers lair. The walls resound with the sound of long forgotten spells.
- Data at a T-junction.
- Data "in the sword chamber, a large stone sits in the middle of the floor."
- Data in the gardeners store.
- Data by a lake which stretches far away to the horizon. The far side can only be dimly seen.
- Data in the fiery passage.
- Data in the banqueting hall.
- Data "at the edge of a deep crack, it is too wide to jump."
- Data in the smelting room. A large furnace sits in the corner.
- Data "in the oriental room, beside the chasm. The walls are decorated with chinese paintings."
- Data "in a very large room, the floor is covered with straw."
- Data in the old library.
- Data at a T-junction.
- Data in the bank vault. An enormous safe is set into the ceiling. There is no obvious handle.
- Data in a steep passage.
- Data at the troll bridge. A sign says STOP! TROLL OPERATED TOLL BRIDGE
- Data at a fork in the path. Behind you is the troll bridge.
- Data "in a very small, dark room. Full of broken rocks. A sign says DANGER FALLING ROCKS."
- Data in a large cave. It smells of bears.
- Data in a large room full of huge furniture.
- Data in the soft room. The walls resemble warm ice-cream.
- Data "in the slimy passage. A green, sticky slime crawls all around you."
- Data in a very small rocky cavern containing many stalactites.
- Data in a tiny room. On the wall it says Be humble in the eyes of the sphinx and use your brains!
- Data in a narrow tunnel.
- Data in the dragons lair. The bones of many adventurers lie here.
- Data in a narrow steep-sided passage. The roof cant be seen by lamp-light.
- Data at the DEAD-END-DIAMOND-MINE.
- Data in the blue room.
- Data in the oyster room. A very cold draft comes from below.
- Data on the edge of a vast glacier. It is riddled with deep crevasses too wide to jump!
- Data in the green room.
- Data on a high plateau. The bridge leads back across the glacier.
- Data in the catacombs.
- Data in the catacombs.
- Data in the catacombs.
- Data in the catacombs.
- Data in the hall of the mountain king.
- Data in an old pirates hideout. Many seafaring relics lie here
- Data on the edge of the desert. A huge sphinx sits here.
- Data in the safe.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the desert.
- Data in the red room.
- Data in the red room.
- Data in the white room.
- Data in the orange room.
- Data in the purple room.
- Data at a cross in the tunnels.
- Data at a cross in the tunnels.
- Data at a cross in the tunnels.
- Data at a cross in the tunnels.
- Data at a cross in the tunnels.
- Data wandering about in the iron passages. Your compass directions seem to be rather confused.
- Data wandering about in the iron passages. Your compass directions seem to be rather confused.
- Data wandering about in the iron passages. Your compass directions seem to be rather confused.
- Data wandering about in the iron passages. Your compass directions seem to be rather confused.
- Data wandering about in the iron passages. Your compass directions seem to be rather confused.
- Data wandering about in the iron passages. Your compass directions seem to be rather confused.
- Data wandering about in the iron passages. Your compass directions seem to be rather confused.
- Data wandering about in the iron passages. Your compass directions seem to be rather confused.
- Data wandering about in the iron passages. Your compass directions seem to be rather confused.
- Data wandering about in the iron passages. Your compass directions seem to be rather confused.
- Data at the foot of a hill. A castle can be seen at the top of it.
- Data in the castle gateway. The castle has obviously been left derelict for many years as the walls are begining to crumble away.
- Data in an immense courtyard.
- Data in the ruins of the north tower.
- Data in the dungeons. The air here is very musty. The floor is covered in dust and cobwebs cling to you as you move.
- Data in the Counts dining room. The decorations on the walls here are the blood stains of some of his unfortunate victims!
- Data on a steep staircase.
- Data in the south tower.
- Data in the ballroom. The music of the orchestras which used to play here still lingers on.
- Data at the entrance to the gnomes halls.
- Data in the gnomes kitchen.
- Data in the main hall. The Gnomes are obviously very untidy! They are also very shy and slip silently away as you enter.
- Data at a T-junction.
- Data at the south end of the main hall.
- Data in a low tunnel.
- Data in a low tunnel.
- Data in the dairy. There is a mouth_watering smell here of buttermilk and cheese.
- Data "in the pit. It is small,dark and very unpleasant here."
- Data in the rainbow room. The walls are decorated with all the colours imaginable.
- Data in a large chamber decorated in the style of the Maharajas palace.
- Data in a tiny water-worn pipe.
- Data in a tunnel hewn out of the rock by a giant explosion.
- Data in a room full of bottles of chemicals. This is the alchemists store. The smell of sulphur is overpowering.
- Data in a very tight passageway. A cool damp wind blows from the south.
- Data in a dark damp passageway. The ground is becoming a little soggy here.
- Data in the Everglades. It is rather swampy here and the mosquitoes are real pests!
- Data in a dark damp passageway. The ground is a little soggy here.
- Data in the alchemists laboratory. Theres a powerful sulphurous odour!
- Data "on a small path winding its way through a petrified forest."
- Data at a T-junction.
- Data at a T-junction.
- Data in the music room. Beautiful melodies echo all around.
- Data at a T-junction.
- Data "on the yellow brick road. Well I think it was yellow once upon a time but it has got rather muddy now."
- Data in an immense canyon. The sides reach upwards as far as the eye can see.
- Data in a small shrine obviously devoted to some fairy chief as pictures of him decorate all the walls.
- Data in a small passage. The ground is rather soft underfoot.
- Data in a patch of quicksand. Luckily though some kind previous adventurer has put a plank down so you can go on safely.
- Data at a dead_end. Oh dear you seem to have struggled through that quicksand for nothing.
- Data in the treasury.
- Data at yet another dead_end.
- Data at a dead end. Youll have to follow the yellow brick road once more.
- Data at the end of the yellow brick road. Im afraid you cant go any further in this direction as the rest of the road hasnt been built yet.
- Data in a fairy grotto. It is very beautiful but seems to be deserted.
- Data on the east shore. The mountains rise sharply all around the cove.
- Data in the wizards spell-chamber. When you entered the wizard was here mumbling about some lost spell-books. He saw you grunted something and vanished.
- Data in the west antechamber to the inner sanctum.
- Data in the inner sanctum. Not many have passed this way before. One intrepid adventurer seems to have written some graffiti DAVE KNEW W LANE.
- Data in the east antechamber.
- Data in a room similar to the spell-chamber.
- Data in the serpents stomach. Oh dear you seem to have become the monsters lunch.
- Data at the bottom of the rock slide. It is cramped and airless here. There is no obvious way to get out.
- For i% = 1 To 143
- Read varLocationDescription$(i%)
- Next i%
- R$ = varLocationDescription$(varCurrentLocation)
- If varObjectLocations(31) <> 0 Then
- varObjectLocations(31) = 0
- varDwarfFlag = 1
- End If
- Call subPrintText("You are " + R$)
- If varCurrentLocation = 136 Or varCurrentLocation = 15 Then
- varObjectLocations(56) = varCurrentLocation
- end if
- If varCurrentLocation = 16 And varFlamesFlag = 1 Then
- Call subPrintText("The walls are very hot!")
- Else
- If varCurrentLocation = 16 Then
- Call subPrintText("The walls are steaming!")
- End If
- End If
- If varCurrentLocation <> 3 And varCurrentLocation <> 142 And varCurrentLocation <> 143 Then
- Call subPrintExits(varCurrentLocation)
- If Abs(varCurrentLocation - 19) = 1 And varChasmFlag = 1 Then
- Print
- Else
- If Abs(varCurrentLocation - 42) = 1 And varBridgeFlag = 1 Then
- Print
- End If
- End If
- End If
- If varChasmFlag = 1 And Abs(varCurrentLocation - 19) = 1 Then
- Call subPrintText("A bridge now spans the chasm.")
- varObjectLocations(53) = varCurrentLocation
- End If
- If varBridgeFlag = 1 And Abs(varCurrentLocation - 42) = 1 Then
- Call subPrintText("A bridge now spans the glacier.")
- varObjectLocations(53) = varCurrentLocation
- End If
- If varCurrentLocation = 26 Or varCurrentLocation = 27 Then
- varObjectLocations(53) = varCurrentLocation
- End If
- lab278:
- j = 0
- I = 0
- varCounter = 0
- While j < 52
- j = j + 1
- If varObjectLocations(j) = varCurrentLocation Then
- varCounter = varCounter + 1
- End If
- NEXT
- If varCounter = 0 And varCurrentLocation = 1 Then
- Call subPrintText("You are not carrying anything.")
- GoTo lab284
- Else
- If varCounter = 0 And varCurrentLocation <> 1 Then
- GoTo lab284
- Else
- Print
- varMAX = varCounter
- End If
- End If
- If varCurrentLocation = 1 Then
- varOutputString$ = "You're currently holding "
- Else
- varOutputString$ = "There is "
- End If
- I = 0
- cn = 0
- varCounter = varMAX
- While I < 52
- I = I + 1
- If varObjectLocations(I) = varCurrentLocation Then
- Call subObjectText(I, varCounter, varCurrentLocation)
- varOutputString$ = varOutputString$ + R$
- varCounter = varCounter - 1
- End If
- NEXT
- Call subPrintText(varOutputString$)
- lab284:
- If varDwarfEncounters <> 0 And varDwarfFlag = 1 Then
- varObjectLocations(31) = varCurrentLocation
- End If
- If varCasketOpenFlag = 1 And varCurrentLocation = 94 Then
- Call subPrintText("The casket is open.")
- End If
- If varCurrentLocation = 24 And varSafeOpenFlag = 1 Then
- Call subPrintText("The safe door is open.")
- End If
- Print
- End Sub
- Sub subPrintExits (varCurrentLocation)
- COMMON (VARIABLES) INTEGER varExits(858), varExitArray(6)
- COMMON (VARIABLES) STRING O$, R$
- I = varCurrentLocation * 6 - 6
- For J = 1 To 6
- varMAP = varExits(I + J)
- If varMAP > 0 Then
- varCounter = varCounter + 1
- varExitArray(J) = 1
- Else
- varExitArray(J) = 0
- End If
- Next J
- If varCounter > 1 Then
- O$ = "There are exits to the "
- Else
- If varCounter = 1 Then
- O$ = "There is an exit "
- End If
- End If
- For J = 1 To 6
- Call subGetObjName(81 + J)
- If varCounter = 0 Or varExitArray(J) = 0 Then
- GoTo lab296
- End If
- If varCounter > 2 Then
- O$ = O$ + R$ + ", "
- End If
- If varCounter = 2 Then
- O$ = O$ + R$ + " and "
- End If
- If varCounter = 1 Then
- O$ = O$ + R$ + "."
- End If
- varCounter = varCounter - 1
- lab296:
- Next J
- Call subPrintText(O$)
- End Sub
- Sub subVerbOpen (varWord2Index)
- COMMON (VARIABLES) INTEGER varCurrentLocation, varCasketOpenFlag, varObjectLocations(56)
- If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 And varWord2Index <> 28 Then
- Call subResponse(7)
- Call subPrintText(varWord2$ + " here.")
- GoTo lab306
- End If
- If varWord2Index = 40 And varCurrentLocation = 94 And varCasketOpenFlag = 0 Then
- varObjectLocations(43) = 94
- varCasketOpenFlag = 1
- Call subPrintLocation(varCurrentLocation)
- GoTo lab306
- End If
- If varWord2Index = 39 Then
- Call subResponse(20)
- End If
- If varWord2Index = 8 And varObjectLocations(5) = 1 Then
- Call subResponse(17)
- varObjectLocations(16) = varCurrentLocation
- Else
- If varWord2Index = 8 Then
- Call subResponse(18)
- End If
- End If
- If varWord2Index = 10 And varObjectLocations(7) = 1 Then
- Call subResponse(19)
- varObjectLocations(18) = varCurrentLocation
- Else
- If varWord2Index = 10 Then
- Call subResponse(20)
- End If
- End If
- If varWord2Index = 8 Or varWord2Index = 10 Or varWord2Index = 39 Then
- GoTo lab306
- End If
- Call subResponse(21)
- lab306:
- End Sub
- Sub subVerbMove (A$, N)
- COMMON (VARIABLES) INTEGER varCurrentLocation, varObjectLocations(56), varLampLitFlag, varExits(858), varBearFlag, varRabbitFlag
- M = InStr(0,varDirections$, A$)
- X = 0
- If M = 0 Then
- Call subPrintText("I don't understand the word " + A$)
- GoTo lab318
- End If
- Call subTrialMove(N, M)
- If X = 1 Then
- GoTo lab314
- end if
- If varLampLitFlag = 0 Then
- If N > 8 Then
- If Rnd > 0.5 Then
- Call subResponse(30)
- Call subKill
- End If
- End If
- End If
- varMAP = varExits(N * 6 - 6 + M)
- If varMAP = 0 Then
- Call subResponse(5)
- Else
- varCurrentLocation = varMAP
- End If
- lab314:
- If varCurrentLocation = 4 Then
- If Rnd > 0.75 Then
- varCurrentLocation = 2
- End If
- End If
- If varBearFlag = 1 Then
- varObjectLocations(35) = varCurrentLocation
- end if
- If varRabbitFlag = 1 Then
- varObjectLocations(38) = varCurrentLocation
- END IF
- Call subPrintLocation(varCurrentLocation)
- If varCurrentLocation = 33 And Rnd > 0.5 Then
- Call subPrintText("A hollow voice whispers DIAXOS.")
- End If
- lab318:
- End Sub
- Sub subVerbGetTake (INTEGER varWord2Index, INTEGER N, INTEGER K)
- COMMON (VARIABLES) INTEGER varObjectLocations(56), varCarryingCounter, varGotWaterFlag
- If Not (varWord2Index = 8 Or varWord2Index = 10 Or Abs(varWord2Index - 37) <= 7 Or varWord2Index >= 53) Then
- GoTo lab321
- Else
- X = 1
- If varObjectLocations(varWord2Index) <> N Then
- Print "deb% Alert here whats going on!"
- Call subResponse(8 - Sgn(N - 1))
- Call subPrintText(varWord2$ + " here")
- GoTo lab332
- Else
- Call subResponse(6)
- GoTo lab332
- End If
- End If
- lab321:
- R$ = "'"
- If K = 1 And varWord2Index = 28 And varObjectLocations(27) <> 1 And varCurrentLocation = 15 Then
- Call subPrintText("You have nothing to put it in, so it runs away through your fingers.")
- GoTo lab332
- End If
- If varWord2Index = 28 And varGotWaterFlag = 1 Then
- varObjectLocations(28) = 1
- Else
- If varWord2Index = 28 Then
- varObjectLocations(28) = 15
- Else
- If varWord2Index = 52 And K = 1 Then
- Call subResponse(41)
- GoTo lab332
- End If
- End If
- End If
- R$ = " "
- If varWord2Index = 52 And N = 1 And K = 111 And varObjectLocations(42) = 111 Then
- varObjectLocations(42) = 0
- varWord1$ = "drop"
- varWord2$ = "mouse." + Chr$(10) + Chr$(13) + "The elephant sees it and runs away"
- End If
- R$ = ""
- If varCarryingCounter = 15 And K = 1 Then
- Call subPrintText("You can't carry anything more, you'll have to drop something first.")
- X = 1
- GoTo lab332
- End If
- If K = 1 And varObjectLocations(27) = 1 And varObjectLocations(28) = 1 And varWord2Index = 28 Then
- Call subPrintText("Your bottle is already full.")
- X = 1
- GoTo lab330
- End If
- If N = 1 And varWord2Index = 27 And varGotWaterFlag = 1 Then
- varGotWaterFlag = 0
- Call subPrintText("You drop the bottle and all the water leaks away!")
- varCarryingCounter = varCarryingCounter - 1
- varWord1$ = "will have to get some more from"
- varWord2$ = "lake"
- End If
- If varWord2Index = 28 And K = 1 And varObjectLocations(28) = N Then
- varWord1$ = "fill"
- varWord2$ = "bottle with the water"
- End If
- If varObjectLocations(varWord2Index) = N Then
- varObjectLocations(varWord2Index) = K
- Call subPrintText("You " + varWord1$ + " the " + varWord2$ + ".")
- Else
- If K = 1 Then
- Call subPrintText("I see no " + varWord2$ + " here.")
- X = 1
- Else
- Call subPrintText("You're not carrying the " + varWord2$ + " here.")
- X = 1
- End If
- End If
- lab330:
- If varObjectLocations(28) = 1 And varWord2Index = 28 Then
- varObjectLocations(28) = 15
- varGotWaterFlag = 1
- Else
- If varWord2Index = 28 Then
- varObjectLocations(28) = 15
- varGotWaterFlag = 0
- End If
- End If
- If varCurrentLocation = 117 And N = 1 And varWord2Index <> 9 Then
- varObjectLocations(varWord2Index) = 0
- Call subPrintText("Oh dear the " + varWord2$ + " sank into the swamp.")
- End If
- lab332:
- End Sub
- Sub subTrialMove (INTEGER varCurrentLocation, INTEGER n)
- COMMON (VARIABLES) INTEGER varObjectLocations(56),c%, varGotWaterFlag
- COMMON (VARIABLES) INTEGER varBearFlag, varRabbitFlag,varFlamesFlag, varCasketOpenFlag, varSafeOpenFlag
- COMMON (VARIABLES) STRING R$
- If varCurrentLocation = varObjectLocations(36) Then
- I = 11
- WHILE varObjectLocations(I) <> 1 Or I < 30
- I = I + 1
- NEXT
- If I < 30 Then
- varObjectLocations(I) = 51
- Call subGetObjName(I)
- Call subPrintText("The pirate snatches your " + R$)
- c% = c% - 1
- If I = 27 And varGotWaterFlag = 1 Then
- varGotWaterFlag = 0
- End If
- End If
- End If
- If varCurrentLocation = varObjectLocations(35) Then
- varBearFlag = 1
- Call subPrintText("There is a brown bear following you.")
- End If
- If varCurrentLocation = varObjectLocations(38) Then
- varRabbitFlag = 1
- Call subPrintText("The giant rabbit is still with you!")
- End If
- If varCurrentLocation = 16 And varFlamesFlag = 1 And n = 3 Then
- X = 1
- Call subPrintText("The flame's heat drives you back.")
- End If
- If varCurrentLocation = 117 And n = 3 And varObjectLocations(41) = 117 Then
- Call subResponse(33)
- Call subKill
- End If
- If varCurrentLocation = 94 And n <> 6 And varCasketOpenFlag = 0 Then
- varObjectLocations(43) = 94
- varCasketOpenFlag = 1
- GoTo lab349
- End If
- If varCurrentLocation = 111 And n = 1 And varCurrentLocation = varObjectLocations(42) Then
- Call subResponse(34)
- X = 1
- GoTo lab349
- End If
- If varCurrentLocation = 48 And varCurrentLocation = varObjectLocations(33) And n = 4 Then
- X = 1
- Call subPrintText("The goblins crowd around and stop you.")
- End If
- If varCurrentLocation = 30 And n = 1 And varCurrentLocation = varObjectLocations(32) Then
- X = 1
- Call subPrintText("The ogre is blocking the way.")
- End If
- If varCurrentLocation = 36 And n = 6 And varCurrentLocation = varObjectLocations(30) Then
- X = 1
- Call subPrintText("The dragon is blocking the way.")
- End If
- If varCurrentLocation = 32 And varCurrentLocation = varObjectLocations(37) And varCurrentLocation = varObjectLocations(35) Then
- Call subPrintText("The bear growls and chases the orc away.")
- varObjectLocations(35) = 0
- varObjectLocations(37) = 0
- varBearFlag = 0
- End If
- If varCurrentLocation = 32 And varCurrentLocation = varObjectLocations(37) And n = 1 Then
- X = 1
- Call subPrintText("The orc won't let you get by.")
- End If
- If (varCurrentLocation = 24 And n = 5) Or (varCurrentLocation = 51 And n = 6) Then
- If varSafeOpenFlag = 0 Then
- X = 1
- Call subResponse(31)
- Print
- End If
- End If
- If varCurrentLocation = 51 And n = 6 Then
- If varSafeOpenFlag = 0 Then
- X = 1
- Call subResponse(31)
- Print
- End If
- End If
- If varCurrentLocation = 28 And n = 6 Then
- Call subResponse(32)
- Print
- End If
- lab349:
- End Sub
- Sub subVerbKill (INTEGER w)
- COMMON (VARIABLES) INTEGER varCarryingCounter, varObjectLocations(56), varCurrentLocation
- COMMON (VARIABLES) STRING varWord2$
- If varObjectLocations(w) <> varCurrentLocation Then
- Call subResponse(7)
- Print varWord2$; " here."
- GoTo lab354
- Else
- If w < 30 Or w = 39 Or w = 40 Or Abs(w - 48) < 4 Or w > 52 Then
- Call subResponse(6)
- GoTo lab354
- End If
- End If
- lab351:
- Input "What with? Your bare hands ? ", b$
- b$ = funConvertLowerCase(b$)
- If b$ <> "no" Then
- GoTo lab353
- Else
- Input "What with then ? ", varWord2$
- Call subProcessNoun(funConvertLowerCase(varWord2$))
- If X = 1 Then
- GoTo lab354
- Else
- varWord1$ = "throw"
- Call subVerbThrow(varWord2Index)
- If X = 1 Then
- GoTo lab354
- Else
- varCarryingCounter = varCarryingCounter - 1
- GoTo lab354
- End If
- End If
- End If
- lab353:
- If b$ <> "yes" Then
- Call subPrintText("yes or no")
- GoTo lab351
- Else
- If w = 30 Then
- Call subResponse(16)
- varObjectLocations(30) = 0
- varObjectLocations(6) = varCurrentLocation
- Else
- Call subPrintText("Your blows are useless.")
- End If
- End If
- lab354:
- End Sub
- Sub subVerbWave (INTEGER varWord2Index)
- COMMON (VARIABLES) INTEGER varCurrentLocation, varObjectLocations(56), varChasmFlag, varBridgeFlag, varKneelingFlag, varWavingAtSphinxFlag
- COMMON (VARIABLES) STRING varWord2$
- If varObjectLocations(varWord2Index) <> 1 And varWord2Index <> 28 Then
- Call subResponse(8)
- Call subPrintText(varWord2$ + ".")
- GoTo lab362
- Else
- If varWord2Index = 28 Then
- Call subResponse(21)
- GoTo lab362
- End If
- End If
- If varWord2Index <> 4 Then
- Call subPrintText("OK")
- GoTo lab362
- End If
- If varCurrentLocation = 18 And varChasmFlag = 0 Then
- Call subPrintText("A bridge now spans the chasm.")
- varChasmFlag = 1
- varObjectLocations(53) = varCurrentLocation
- GoTo lab362
- Else
- If varCurrentLocation = 135 And varObjectLocations(26) = 0 Then
- Call subResponse(39)
- varObjectLocations(26) = 1
- GoTo lab362
- End If
- End If
- If varCurrentLocation = 41 And varBridgeFlag = 0 Then
- Call subPrintText("A bridge now spans the glacier.")
- varBridgeFlag = 1
- varObjectLocations(53) = varCurrentLocation
- GoTo lab362
- End If
- If varCurrentLocation = 50 And varKneelingFlag = 1 Then
- varWavingAtSphinxFlag = 1
- Call subFinish
- End If
- Call subResponse(15)
- lab362:
- End Sub
- Sub subVerbEat (INTEGER varWord2Index, INTEGER n)
- COMMON (VARIABLES) varGotWaterFlag, varCurrentLocation, varObjectLocations(56)
- If varWord2Index = 28 And n = 2 And (varGotWaterFlag = 1 Or varCurrentLocation = 15) Then
- Call subResponse(24)
- varGotWaterFlag = 0
- GoTo lab369
- End If
- If varWord2Index = 28 Then
- Call subResponse(21)
- GoTo lab369
- End If
- If varObjectLocations(varWord2Index) <> 1 Then
- Call subResponse(8)
- Call subPrintText(varWord2$ + " here.")
- GoTo lab369
- End If
- If n = 1 Then
- If varWord2Index = 9 Or varWord2Index = 29 Or varWord2Index = 50 Then
- Call subResponse(24)
- varObjectLocations(varWord2Index) = 0
- GoTo lab369
- End If
- End If
- Call subResponse(6)
- lab369:
- End Sub
- Sub subVerbCross (INTEGER varWord2Index)
- COMMON (VARIABLES) integer varCurrentLocation, varObjectLocations(56), varChasmFlag, varBridgeFlag, varRabbitFlag, varBearFlag
- COMMON (VARIABLES) STRING varWord2$
- If varObjectLocations(varWord2Index) <> 1 And varObjectLocations(varWord2Index) <> varCurrentLocation And varWord2Index <> 28 Then
- Call subResponse(7)
- Call subPrintText(varWord2$ + " here.")
- GoTo lab378
- Else
- If varWord2Index = 28 Then
- Call subResponse(21)
- GoTo lab378
- End If
- End If
- If varCurrentLocation <> 18 Then
- GoTo lab372
- Else
- If varChasmFlag = 1 Then
- varCurrentLocation = 20
- Call subPrintLocation(varCurrentLocation)
- GoTo lab378
- Else
- Call subResponse(25)
- GoTo lab378
- End If
- End If
- lab372:
- If varCurrentLocation <> 20 Then
- GoTo lab373
- Else
- If varChasmFlag = 1 Then
- varCurrentLocation = 18
- Call subPrintLocation(varCurrentLocation)
- GoTo lab378
- Else
- Call subResponse(25)
- GoTo lab378
- End If
- End If
- lab373:
- If Abs(varCurrentLocation - 42) <> 1 Then
- GoTo lab374
- Else
- If varBridgeFlag = 0 Then
- Call subResponse(25)
- GoTo lab378
- Else
- If varObjectLocations(26) = 1 Then
- varCurrentLocation = varCurrentLocation - 2 * Sgn(varCurrentLocation - 42)
- Call subPrintLocation(varCurrentLocation)
- GoTo lab378
- Else
- Call subResponse(26)
- Call subKill
- End If
- End If
- End If
- lab374:
- If Abs(varCurrentLocation - 26.5) < 1 And varObjectLocations(34) = 26 Then
- Call subResponse(27)
- GoTo lab378
- End If
- If varCurrentLocation <> 27 And varCurrentLocation <> 26 Then
- GoTo lab376
- Else
- If varRabbitFlag = 1 Or varBearFlag = 1 Then
- Call subResponse(26)
- Call subKill
- Else
- varCurrentLocation = 27 + (varCurrentLocation = 27)
- Call subPrintLocation(varCurrentLocation)
- GoTo lab378
- End If
- End If
- lab376:
- If varCurrentLocation = 15 And varWord2Index = 55 And varObjectLocations(48) = 1 Then
- varCurrentLocation = 142
- Call subResponse(38)
- Call subPrintLocation(varCurrentLocation)
- varObjectLocations(48) = 0
- GoTo lab378
- Else
- If varCurrentLocation = 15 And varWord2Index = 55 Then
- Call subResponse(37)
- GoTo lab378
- End If
- End If
- Call subResponse(21)
- lab378:
- End Sub
- Sub subVerbThrow (INTEGER varWord2Index)
- COMMON (VARIABLES) integer varCurrentLocation, varDwarfEncounters, varObjectLocations(56), varDwarfFlag, varFlamesFlag
- Call subVerbGetTake(varWord2Index, 1, varCurrentLocation)
- If X = 1 Then
- GoTo lab407
- End If
- R$ = " "
- If varWord2Index > 1 Then
- GoTo lab393
- End If
- If varCurrentLocation = varObjectLocations(31) And Rnd < 0.6 Then
- varObjectLocations(31) = 0
- varDwarfEncounters = 0
- varDwarfFlag = 0
- Call subResponse(9)
- GoTo lab407
- Else
- If varCurrentLocation = varObjectLocations(31) Then
- Call subPrintText("The dwarf dodges neatly aside.")
- GoTo lab407
- End If
- End If
- If varCurrentLocation = varObjectLocations(32) Then
- Call subPrintText("The ogre catches the axe and slices you in two with it.")
- Call subKill
- End If
- If varCurrentLocation = varObjectLocations(30) Then
- Call subPrintText("The axe bounces harmlessly off the dragon.")
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(33) Then
- Call subResponse(10)
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(34) Then
- Call subPrintText("The troll ducks, picks up the fallen axe and kills you with a single blow.")
- Call subKill
- End If
- If varCurrentLocation = varObjectLocations(35) Then
- Call subResponse(11)
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(36) Then
- Call subResponse(12)
- varObjectLocations(36) = 20 + Int(Rnd*10)
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(37) Then
- Call subResponse(13)
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(38) Then
- Call subResponse(14)
- End If
- GoTo lab407
- lab393:
- If varWord2Index > 2 Then
- GoTo lab403
- End If
- If varCurrentLocation = varObjectLocations(31) Then
- Call subResponse(9)
- varDwarfEncounters = 0
- varObjectLocations(31) = 0
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(32) Then
- Call subPrintText("The sword kills the ogre but then melts away.")
- varObjectLocations(32) = 0
- varObjectLocations(2) = 0
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(30) Then
- Call subResponse(42)
- varObjectLocations(30) = 0
- varObjectLocations(2) = 0
- varObjectLocations(6) = varCurrentLocation
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(33) Then
- Call subResponse(10)
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(34) Then
- Call subPrintText("The troll catches the sword and kills you with a single stroke.")
- Call subKill
- End If
- If varCurrentLocation = varObjectLocations(35) Then
- Call subResponse(11)
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(36) Then
- Call subResponse(12)
- varObjectLocations(36) = 20 + Int(Rnd*10)
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(37) Then
- Call subResponse(13)
- GoTo lab407
- End If
- If varCurrentLocation = varObjectLocations(38) Then
- Call subResponse(14)
- GoTo lab407
- End If
- lab403:
- If varWord2Index = 28 And varCurrentLocation = 16 And varFlamesFlag = 1 Then
- varFlamesFlag = 0
- Call subPrintText("The flame dies in a cloud of steam.")
- End If
- If varWord2Index = 6 And varCurrentLocation = varObjectLocations(33) Then
- Call subPrintText("The teeth become skeleton warriors and drive the goblins away.")
- varObjectLocations(33) = 0
- varObjectLocations(6) = 0
- Else
- If varCurrentLocation = varObjectLocations(41) And varWord2Index = 47 Then
- Call subResponse(40)
- varObjectLocations(41) = 0
- varObjectLocations(47) = 0
- End If
- End If
- R$ = ""
- If varCurrentLocation = 117 And varWord2Index = 9 Then
- Call subResponse(45)
- varCurrentLocation = 118
- varObjectLocations(9) = 0
- Call subPrintLocation(varCurrentLocation)
- End If
- If varCurrentLocation = varObjectLocations(43) And varWord2Index = 49 Then
- Call subResponse(43)
- varObjectLocations(43) = 0
- varObjectLocations(49) = 0
- End If
- lab407:
- End Sub
- Sub subVerbFeed (INTEGER varWord2Index)
- COMMON (VARIABLES) INTEGER varCurrentLocation, varObjectLocations(56),K, varCarryingCounter, varBearFlag, varRabbitFlag
- COMMON (VARIABLES) STRING varWord2$, O$
- If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 And varWord2Index <> 28 Then
- Call subResponse(7)
- Print varWord2$; " here."
- GoTo lab414
- Else
- If varWord2Index = 28 Then
- Call subResponse(21)
- GoTo lab414
- End If
- End If
- If varWord2Index = 30 Or varWord2Index = 32 Or varWord2Index = 33 Or varWord2Index = 37 Then
- Call subPrintText("The only thing it wants to eat is, possibly, YOU!")
- GoTo lab414
- Else
- If varWord2Index <> 38 And varWord2Index <> 35 And varWord2Index <> 41 And varWord2Index <> 52 Then
- Call subResponse(6)
- GoTo lab414
- End If
- End If
- If varWord2Index = 41 And varObjectLocations(9) = 1 Then
- Call subPrintText("You throw the food to the crocodile.")
- Call subResponse(45)
- varCurrentLocation = 118
- Call subPrintLocation(varCurrentLocation)
- varObjectLocations(9) = 0
- GoTo lab414
- Else
- If varWord2Index = 41 Then
- Call subResponse(28)
- GoTo lab414
- End If
- End If
- If varWord2Index = 52 And varObjectLocations(50) = 1 Then
- Call subResponse(40)
- varObjectLocations(52) = 1
- varObjectLocations(50) = 0
- GoTo lab414
- Else
- If varWord2Index = 52 Then
- Call subResponse(28)
- GoTo lab414
- End If
- End If
- If varWord2Index = 35 Or varWord2Index = 38 Then
- Call subPrintText("What with")
- K = varWord2Index
- O$ = varWord2$
- Input A$
- Call subProcessNoun(funConvertLowerCase(A$))
- If varWord2Index <> 29 And varWord2Index <> 9 Then
- Call subResponse(6)
- Else
- Call subEat
- varObjectLocations(varWord2Index) = 0
- varObjectLocations(K) = 0
- varCarryingCounter = varCarryingCounter - 2
- If K = 35 Then
- varBearFlag = 0
- Else
- If K = 38 Then
- varRabbitFlag = 0
- End If
- End If
- End If
- End If
- lab414:
- End Sub
- Sub subVerbRub (INTEGER varWord2Index)
- COMMON (VARIABLES) INTEGER varCurrentLocation, varObjectLocations(56), varLampLitFlag, varLampFuel
- COMMON (VARIABLES) STRING varWord2$
- If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 And varWord2Index <> 28 Then
- Call subResponse(7)
- Call subPrintText(varWord2$ + " here.")
- GoTo lab420
- Else
- If varWord2Index = 28 Then
- Call subResponse(21)
- GoTo lab420
- End If
- End If
- If varWord2Index = 3 And varLampLitFlag = 1 And varLampFuel <= 10 Then
- varLampFuel = 150
- Call subResponse(23)
- GoTo lab420
- Else
- If varWord2Index = 3 And varLampFuel <= 0 Then
- varLampFuel = 150
- Call subResponse(15)
- GoTo lab420
- Else
- If varWord2Index = 3 And varLampFuel > 0 Then
- Call subResponse(15)
- GoTo lab420
- End If
- End If
- End If
- If varWord2Index = 26 Then
- varCurrentLocation = 11
- Call subPrintLocation(varCurrentLocation)
- GoTo lab420
- End If
- Call subResponse(6)
- lab420:
- End Sub
- Sub subVerbLight (INTEGER varWord2Index)
- COMMON (VARIABLES) INTEGER varLampLitFlag, varCurrentLocation, varObjectLocations(56)
- If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 And varWord2Index <> 28 Then
- Call subResponse(7)
- Call subPrintText(varWord2$ + " here.")
- GoTo labExitVerbLight
- Else
- If varWord2Index = 28 Then
- Call subResponse(21)
- GoTo labExitVerbLight
- End If
- End If
- If varWord2Index = 51 Then
- varObjectLocations(51) = 0
- Call subResponse(35)
- If varCurrentLocation = 142 Then
- Call subResponse(36)
- varCurrentLocation = 136
- Call subPrintLocation(varCurrentLocation)
- GoTo labExitVerbLight
- Else
- If varWord2Index = 51 Then
- GoTo labExitVerbLight
- End If
- End If
- End If
- If varWord2Index = 3 And varLampLitFlag = 0 And varLampFuel > 0 Then
- varLampLitFlag = 1
- Call subPrintText("Your lamp is now on.")
- GoTo labExitVerbLight
- Else
- If varWord2Index = 3 And varLampLitFlag = 0 Then
- Call subPrintText(" Your lamp has run out.")
- GoTo labExitVerbLight
- Else
- If varWord2Index = 3 Then
- Call subPrintText("Your lamp is already lit!")
- GoTo labExitVerbLight
- End If
- End If
- End If
- Call subResponse(21)
- labExitVerbLight:
- End Sub
- Sub subVerbRead (INTEGER varWord2Index)
- COMMON (VARIABLES) INTEGER varObjectLocations(56)
- COMMON (VARIABLES) STRING varWord2$
- If varWord2Index = 28 Then
- Call subResponse(21)
- GoTo labExitVerbRead
- End If
- If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 Then
- Call subResponse(7)
- Call subPrintText(varWord2$ + " here")
- GoTo labExitVerbRead
- End If
- If varWord2Index = 21 Then
- Call subPrintText("The books tell of a land across the water.")
- Else
- Call subResponse(21)
- End If
- labExitVerbRead:
- End Sub
- Sub subVerbPay (INTEGER varWord2Index)
- COMMON (VARIABLES) INTEGER varCurrentLocation, varObjectLocations(56), varCarryingCounter
- COMMON (VARIABLES) STRING varWord2$
- If varWord2Index = 28 Then
- Call subResponse(21)
- GoTo labExitVerbPay
- End If
- I = 11
- If varObjectLocations(varWord2Index) <> varCurrentLocation And varObjectLocations(varWord2Index) <> 1 Then
- Call subResponse(7)
- Call subPrintText(varWord2$ + " here.")
- GoTo labExitVerbPay
- End If
- If varWord2Index = 34 Then
- While I <> 26 And varObjectLocations(I) <> 1
- I = I + 1
- NEXT
- If I < 26 Then
- varObjectLocations(I) = 51
- Call subGetObjName(I)
- Call subSnatch
- varObjectLocations(34) = 0
- varCarryingCounter = varCarryingCounter - 1
- Else
- Call subResponse(28)
- End If
- End If
- labExitVerbPay:
- End Sub
- Sub subVerbIn (INTEGER n)
- COMMON (VARIABLES) INTEGER varCurrentLocation
- If n = 2 Then
- varCurrentLocation = 3
- Call subPrintLocation(varCurrentLocation)
- Else
- If n = 8 Then
- varCurrentLocation = 9
- Call subPrintLocation(varCurrentLocation)
- Else
- Call subResponse(21)
- End If
- End If
- End Sub
- Sub subVerbOut (INTEGER n)
- COMMON (VARIABLES) INTEGER varCurrentLocation
- If n = 3 Then
- varCurrentLocation = 2
- Call subPrintLocation(varCurrentLocation)
- Else
- If n = 9 Then
- varCurrentLocation = 8
- Call subPrintLocation(varCurrentLocation)
- Else
- Call subResponse(21)
- End If
- End If
- End Sub
- Sub subCalculateScore (INTEGER varCurrentLocation)
- COMMON (VARIABLES) INTEGER varObjectLocations(56), varWavingAtSphinxFlag,varKilledFlag
- varScore = 0
- For j = 11 To 29
- If varObjectLocations(j) = 1 Or varObjectLocations(j) = 50 Then
- varScore = varScore + 30
- end if
- Next j
- For j = 45 To 48
- If varObjectLocations(j) = 1 Or varObjectLocations(j) = 50 Then
- varScore = varScore + 30
- end if
- Next j
- If varWavingAtSphinxFlag = 1 Then
- If varCurrentLocation = 50 Then
- varScore = varScore + 170
- End If
- End If
- If varScore + varKilledFlag < 0 Then
- Call subPrintText("You have scored 0 out of a possible 800.")
- Else
- Call subPrintText("You have scored " + Str$(varScore + varKilledFlag) + " out of 800.")
- End If
- End Sub
- FUNCTION STRING funTrimSpaces (STRING z$)
- lab453:
- If Left$(z$, 1) = " " Then
- z$ = Right$(z$, Len(z$) - 1)
- GoTo lab453
- End If
- lab454:
- If Right$(z$, 1) = " " Then
- z$ = Left$(z$, Len(z$) - 1)
- GoTo lab454
- End If
- funTrimSpaces = z$
- End FUNCTION
- FUNCTION STRING funConvertLowerCase (STRING z$)
- b$ = ""
- For j = 1 To Len(z$)
- Q = Asc(Mid$(z$, j, 1))
- If Q > 64 And Q < 91 Then
- Q = Q + 32
- End If
- b$ = b$ + Chr$(Q)
- Next j
- funConvertLowerCase = (funTrimSpaces(b$))
- End FUNCTION
- Sub subObjectText (INTEGER w, INTEGER n, INTEGER varCurrentLocation)
- COMMON (VARIABLES) STRING R$,O$
- COMMON (VARIABLES) INTEGER K, varGotWaterFlag
- R$ = ""
- K = 0
- If n = 1 And varMAX <> 1 Then
- R$ = R$ + " and "
- End If
- If w = 5 Then
- R$ = R$ + "a set of keys,"
- GoTo lab478
- End If
- If w = 6 Then
- R$ = R$ + "a set of dragon's teeth,"
- GoTo lab478
- End If
- If w = 26 Then
- R$ = R$ + "a mithril "
- GoTo lab477
- End If
- If w = 1 Or w = 42 Or w = 17 Or w = 46 Then
- R$ = R$ + "an "
- GoTo lab477
- End If
- If w = 50 Then
- R$ = R$ + "a piece of stilton,"
- GoTo lab478
- End If
- If w = 9 Then
- GoTo lab477
- End If
- If w = 7 Then
- R$ = R$ + "a hydraulic "
- GoTo lab477
- End If
- If w = 48 Or w = 49 Then
- R$ = R$ + "a wooden "
- GoTo lab477
- End If
- If w = 11 Or w = 20 Then
- R$ = R$ + "a cluster of "
- GoTo lab477
- End If
- If w = 16 Or w = 18 Then
- R$ = R$ + "a small fortune in "
- GoTo lab477
- End If
- If w = 51 Then
- R$ = R$ + "a box of "
- GoTo lab477
- End If
- If w = 33 Then
- R$ = R$ + "a gang of "
- GoTo lab477
- End If
- If w = 22 Then
- R$ = R$ + "a small jar of "
- GoTo lab477
- End If
- If w = 21 Then
- R$ = R$ + "a collection of library "
- GoTo lab477
- End If
- If w = 19 Then
- R$ = R$ + "a set of "
- GoTo lab477
- End If
- If w = 43 Then
- R$ = R$ + "an evil "
- GoTo lab477
- End If
- If w = 36 Then
- R$ = R$ + "a bearded "
- GoTo lab477
- End If
- If Abs(w - 14) < 2 Then
- R$ = R$ + "a bar of "
- GoTo lab477
- End If
- If w = 44 Then
- R$ = R$ + "a bad smell,"
- GoTo lab478
- End If
- If w = 32 Or w = 37 Or w = 41 Then
- R$ = R$ + "a mean looking "
- GoTo lab477
- End If
- If w = 30 Or w = 42 Then
- R$ = R$ + "a large "
- GoTo lab477
- End If
- If w = 35 Or w = 38 Then
- R$ = R$ + "a friendly "
- GoTo lab477
- End If
- If w <> 27 Then
- GoTo lab475
- Else
- If varGotWaterFlag = 0 Then
- R$ = R$ + "a bottle,"
- GoTo lab478
- Else
- R$ = R$ + "a bottle of water,"
- GoTo lab478
- End If
- End If
- lab475:
- If w = 28 And varGotWaterFlag = 1 And Left$(A$, 3) = "inv" Then
- GoTo lab478
- Else
- If w = 28 Then
- GoTo lab477
- End If
- End If
- R$ = R$ + "a "
- lab477:
- O$ = R$
- Call subGetObjName(w)
- R$ = O$ + R$ + ", "
- If InStr(0,R$, " ") = 0 Then
- R$ = " " + R$
- K = 1
- End If
- lab478:
- If n <= 2 Then
- R$ = Left$(R$, Len(R$) - 1)
- End If
- If varCurrentLocation <> 1 And n = 1 Then
- R$ = R$ + " here"
- End If
- If n = 1 Then
- R$ = R$ + "."
- End If
- If K = 1 And R$ = " " Then
- R$ = Right$(R$, Len(R$) - 1)
- End If
- cn = 0
- End Sub
- Sub subVerbFill (INTEGER w)
- COMMON (VARIABLES) INTEGER varObjectLocations(56), varWord2Index, varGotWaterFlag, varCurrentLocation
- COMMON (VARIABLES) STRING varWord2$
- If w = 28 Then
- Call subResponse(21)
- GoTo labExitVerbFill
- End If
- If varObjectLocations(w) <> varCurrentLocation And varObjectLocations(w) <> 1 Then
- Call subResponse(7)
- Call subPrintText(varWord2$ + " here.")
- GoTo labExitVerbFill
- Else
- If varObjectLocations(varWord2Index) <> 1 Then
- Call subResponse(8)
- Call subPrintText(varWord2$ + ".")
- GoTo labExitVerbFill
- End If
- End If
- If w = 27 And varCurrentLocation = varObjectLocations(28) And varGotWaterFlag = 0 Then
- Call subPrintText("Your bottle is now full of water.")
- varGotWaterFlag = 1
- Else
- If w = 27 And varCurrentLocation = varObjectLocations(28) Then
- Call subPrintText("your bottle is already full.")
- Else
- Call subResponse(21)
- End If
- End If
- labExitVerbFill:
- End Sub
- Sub subPrintText (STRING varScrText$)
- COMMON (VARIABLES) INTEGER varScreenWidth
- pos1% = 1
- pos2% = 1
- col% = 1
- i% = 0
- While Len(varScrText$) > 1
- i% = 0
- While Mid$(varScrText$, i%, 1) <> " " And i% <= Len(varScrText$)
- i% = i% + 1
- Next
- pos1% = i%
- output$ = Mid$(varScrText$, 1, i%)
- Print output$;
- varScrText$ = Right$(varScrText$, Len(varScrText$) - pos1%)
- col% = col% + Len(output$)
- i% = 0
- While Mid$(varScrText$, i%, 1) <> " " And i% <= Len(varScrText$)
- i% = i% + 1
- Next
- pos2% = i%
- If pos2% >= varScreenWidth - col% + 2 Then
- Print
- col% = 1
- End If
- Next
- End Sub
- Sub subFinish
- COMMON (VARIABLES) INTEGER varCurrentLocation, varTurnCount
- Call subPrintText("Well done, you've solved the puzzle.")
- Call subCalculateScore(varCurrentLocation)
- Call subPrintText("You had " + Str$(varTurnCount) + " turns.")
- ! Need to end the program here. Having end program seems to throw a VB for a loop
- ! END PROGRAM
- !INPUT "End Program here",a$
- stop
- End Sub
- Sub subEat
- COMMON (VARIABLES) STRING O$, varWord2$
- Call subPrintText("The " + O$ + " eats the " + varWord2$ + " and runs away.")
- End Sub
- Sub subSnatch
- COMMON (VARIABLES) STRING R$
- Call subPrintText("The troll snatches your " + R$ + " and runs away.")
- End Sub
- Sub subSave (string filename$)
- COMMON (VARIABLES) INTEGER varKilledFlag, varKneelingFlag, varFlamesFlag, varLampLitFlag
- COMMON (VARIABLES) INTEGER varScore, varBearFlag, varRabbitFlag
- COMMON (VARIABLES) INTEGER varLampFuel, varScreenWidth, varSafeOpenFlag, varDwarfChance
- COMMON (VARIABLES) INTEGER varDwarfFlag, varTurnIncrement, varGoblinEncounters
- COMMON (VARIABLES) INTEGER varCurrentLocation, varTurnCount, varChasmFlag, varCasketOpenFlag
- COMMON (VARIABLES) INTEGER varDwarfEncounters, varMAX, varWord1Index, varWord2Index
- COMMON (VARIABLES) INTEGER varGotWaterFlag, varVampireEncounters
- COMMON (VARIABLES) INTEGER varTurnLastSeenDwarf, varSuppressDwarf
- COMMON (VARIABLES) INTEGER X, varCarryingCounter, K, varWavingAtSphinxFlag
- COMMON (VARIABLES) INTEGER varObjectLocations, varExitArray,varSpacePos, varBridgeFlag
- COMMON (VARIABLES) INTEGER M, cn, N, W, Q, varMAP
- COMMON (VARIABLES) INTEGER varObjectLocations(56), varExitArray(6), varExits(858)
- COMMON (VARIABLES) STRING varWord1$, varWord2$, varDirections$, O$, R$
- filename$ = filename$ + ".sav"
- Open filename$ For Output As #1
- Print #1, varBearFlag, varChasmFlag, varCasketOpenFlag, varCarryingCounter, varDwarfEncounters, varFlamesFlag, varGoblinEncounters
- Print #1, varKilledFlag, varCurrentLocation, varLampFuel, varWavingAtSphinxFlag, varRabbitFlag, varTurnLastSeenDwarf, varSafeOpenFlag
- Print #1, varScore, varTurnCount, varBridgeFlag, varVampireEncounters, varGotWaterFlag, varLampLitFlag, varDwarfFlag, varDwarfChance
- Print #1, varSuppressDwarf
- For cnt = 1 To 56
- Print #1, varObjectLocations(cnt)
- Next cnt
- Close #1
- Call subPrintText("Game state saved")
- End Sub
- Sub subLoad (string filename$)
- COMMON (VARIABLES) INTEGER varKilledFlag, varKneelingFlag, varFlamesFlag, varLampLitFlag
- COMMON (VARIABLES) INTEGER varScore, varBearFlag, varRabbitFlag
- COMMON (VARIABLES) INTEGER varLampFuel, varScreenWidth, varSafeOpenFlag, varDwarfChance
- COMMON (VARIABLES) INTEGER varDwarfFlag, varTurnIncrement, varGoblinEncounters
- COMMON (VARIABLES) INTEGER varCurrentLocation, varTurnCount, varChasmFlag, varCasketOpenFlag
- COMMON (VARIABLES) INTEGER varDwarfEncounters, varMAX, varWord1Index, varWord2Index
- COMMON (VARIABLES) INTEGER varGotWaterFlag, varVampireEncounters
- COMMON (VARIABLES) INTEGER varTurnLastSeenDwarf, varSuppressDwarf
- COMMON (VARIABLES) INTEGER X, varCarryingCounter, K, varWavingAtSphinxFlag
- COMMON (VARIABLES) INTEGER varObjectLocations, varExitArray, varSpacePos, varBridgeFlag
- COMMON (VARIABLES) INTEGER M, cn, N, W, Q, varMAP
- COMMON (VARIABLES) INTEGER varObjectLocations(56), varExitArray(6), varExits(858)
- COMMON (VARIABLES) STRING varWord1$, varWord2$, varDirections$, O$, R$
- filename$ = filename$ + ".sav"
- Open filename$ For Input As #1
- Input #1, varBearFlag, varChasmFlag, varCasketOpenFlag, varCarryingCounter, varDwarfEncounters, varFlamesFlag, varGoblinEncounters
- Input #1, varKilledFlag, varCurrentLocation, varLampFuel, varWavingAtSphinxFlag, varRabbitFlag, varTurnLastSeenDwarf, varSafeOpenFlag
- Input #1, varScore, varTurnCount, varBridgeFlag, varVampireEncounters, varGotWaterFlag, varLampLitFlag, varDwarfFlag, varDwarfChance
- Input #1, varSuppressDwarf
- For cnt = 1 To 56
- Input #1, varObjectLocations(cnt)
- Next cnt
- Close #1
- Call subPrintText("Game state loaded")
- Print
- Call subPrintLocation(varCurrentLocation)
- End Sub
- Sub subDebug
- COMMON (VARIABLES) INTEGER varKilledFlag, varKneelingFlag, varFlamesFlag, varLampLitFlag
- COMMON (VARIABLES) INTEGER varScore, varBearFlag, varRabbitFlag
- COMMON (VARIABLES) INTEGER varLampFuel, varScreenWidth, varSafeOpenFlag, varDwarfChance
- COMMON (VARIABLES) INTEGER varDwarfFlag, varTurnIncrement, varGoblinEncounters
- COMMON (VARIABLES) INTEGER varCurrentLocation, varTurnCount, varChasmFlag, varCasketOpenFlag
- COMMON (VARIABLES) INTEGER varDwarfEncounters, varMAX, varWord1Index, varWord2Index
- COMMON (VARIABLES) INTEGER varGotWaterFlag, varVampireEncounters
- COMMON (VARIABLES) INTEGER varTurnLastSeenDwarf, varSuppressDwarf
- COMMON (VARIABLES) INTEGER X, varCarryingCounter, K, varWavingAtSphinxFlag
- COMMON (VARIABLES) INTEGER varObjectLocations, varExitArray, varExits, varSpacePos, varBridgeFlag
- COMMON (VARIABLES) INTEGER M, cn, N, W, Q, varMAP
- COMMON (VARIABLES) INTEGER varObjectLocations(56), varExitArray(6), varExits(858)
- COMMON (VARIABLES) STRING varWord1$, varWord2$, varDirections$, O$, R$
- If varDwarfChance = 0.97 Then
- varDwarfStatus$ = "ENABLED"
- Else
- varDwarfStatus$ = "DISABLED"
- End If
- Print
- Print "Environment"
- Print "Location # :"; varCurrentLocation
- Print "Dwarf Status: "; varDwarfStatus$
- Print
- Print "Counters"
- Print "Turn: "; varTurnCount; "Items :"; varCarryingCounter; " Lamp Fuel="; varLampFuel; "DwarfEncounters: "; varDwarfEncounters
- Print "DwarfSeenIncr: "; varTurnLastSeenDwarf
- Print
- Print "Flags"
- Print "Bear: "; varBearFlag; " Rabbit: "; varRabbitFlag; " Dwarf: "; varDwarfFlag; " Lamp Lit: "; varLampLitFlag
- Print "Water: "; varGotWaterFlag; " Flames: "; varFlamesFlag; " Casket: "; varCasketOpenFlag; " Chasm: "; varChasmFlag
- Print "DwarfSuppress: "; varSuppressDwarf
- Print
- Print "Exit Array"
- Print " N S E W U D"
- For i% = 1 To 6
- Print varExitArray(i%);
- Next i%
- Print
- Print "Objects array :"
- For i% = 1 To 56
- Print i%; ":";
- Print varObjectLocations(i%); " ";
- Next i%
- Print
- End Sub
- Sub subReadExits
- COMMON (VARIABLES) INTEGER varExits(858)
- labExitData:
- Data 0,0,0,0,0,0
- Data 4,5,4,4,0,0
- Data 0,0,0,0,0,0
- Data 4,4,4,4,0,0
- Data 2,6,7,4,0,0
- Data 5,4,4,4,0,0
- Data 4,4,8,5,0,0
- Data 4,4,4,7,0,9
- Data 0,14,10,0,8,0
- Data 15,11,16,9,0,0
- Data 10,0,12,0,0,0
- Data 0,13,14,11,0,0
- Data 12,0,0,0,0,17
- Data 9,0,0,12,0,0
- Data 0,10,17,0,0,0
- Data 0,17,18,10,0,0
- Data 16,0,0,15,13,0
- Data 19,0,0,16,0,0
- Data 0,18,0,0,0,0
- Data 21,0,22,0,0,0
- Data 0,20,23,0,0,0
- Data 0,25,0,20,24,0
- Data 120,0,24,21,0,0
- Data 0,0,0,23,51,22
- Data 22,26,0,0,0,0
- Data 25,0,0,0,0,0
- Data 0,0,30,28,0,0
- Data 0,29,27,0,0,143
- Data 28,39,0,0,0,0
- Data 31,0,0,27,33,0
- Data 0,30,32,0,0,0
- Data 40,0,0,31,0,0
- Data 0,34,35,0,0,30
- Data 33,0,0,73,0,0
- Data 0,36,0,33,0,0
- Data 35,0,0,0,0,37
- Data 0,0,0,38,36,0
- Data 0,0,37,0,0,0
- Data 29,72,0,0,0,0
- Data 0,32,0,0,42,41
- Data 0,0,0,0,40,0
- Data 0,0,0,0,0,40
- Data 44,0,0,46,47,0
- Data 45,43,47,46,0,0
- Data 0,44,111,0,46,47
- Data 45,43,44,48,46,47
- Data 45,43,44,0,0,0
- Data 0,0,46,49,0,101
- Data 52,0,48,0,0,0
- Data 0,71,0,0,0,0
- Data 0,0,0,0,0,24
- Data 0,0,53,49,0,0
- Data 54,52,52,52,0,0
- Data 53,55,53,53,0,0
- Data 54,54,56,54,0,0
- Data 55,55,55,57,0,0
- Data 56,56,58,56,0,0
- Data 57,59,57,57,0,0
- Data 60,58,58,58,0,0
- Data 59,61,59,59,0,0
- Data 60,60,62,60,0,0
- Data 61,61,61,63,0,0
- Data 62,62,64,62,0,0
- Data 63,65,63,63,0,0
- Data 66,64,64,64,0,0
- Data 65,67,65,65,0,0
- Data 52,66,68,66,0,0
- Data 67,67,67,69,0,0
- Data 68,68,70,68,0,0
- Data 69,71,69,69,0,0
- Data 50,70,70,70,0,0
- Data 73,39,0,74,0,81
- Data 81,0,86,72,74,0
- Data 0,72,73,75,0,79
- Data 74,0,76,0,76,77
- Data 75,77,0,0,78,75
- Data 78,79,0,0,75,76
- Data 76,0,79,77,0,82
- Data 0,74,78,77,80,0
- Data 0,81,82,86,79,0
- Data 72,0,73,80,0,82
- Data 80,78,0,0,81,83
- Data 84,87,0,0,85,82
- Data 87,0,85,83,0,88
- Data 0,87,84,83,86,0
- Data 73,0,80,87,0,85
- Data 83,84,0,0,85,86
- Data 84,0,89,90,0,91
- Data 90,0,90,88,0,91
- Data 89,89,0,0,88,91
- Data 88,89,0,0,92,90
- Data 0,91,0,93,0,0
- Data 0,0,92,0,94,0
- Data 98,99,97,0,95,93
- Data 0,100,0,0,0,94
- Data 0,0,0,0,100,0
- Data 0,0,100,94,0,0
- Data 0,94,0,100,0,0
- Data 94,0,0,0,0,100
- Data 95,0,98,97,99,96
- Data 102,0,103,0,48,0
- Data 0,101,0,108,0,107
- Data 0,105,0,101,0,109
- Data 0,106,107,0,110,0
- Data 103,0,0,0,0,106
- Data 104,0,0,0,105,0
- Data 0,0,0,104,102,0
- Data 0,0,0,102,0,0
- Data 0,0,0,0,103,0
- Data 0,0,104,0,0,0
- Data 112,0,0,45,0,0
- Data 0,111,0,0,113,0
- Data 0,0,114,0,0,112
- Data 119,0,0,113,0,0
- Data 0,116,0,120,0,0
- Data 115,117,0,0,0,0
- Data 116,0,118,0,0,0
- Data 0,0,121,117,0,0
- Data 0,114,0,0,0,0
- Data 0,23,115,0,0,0
- Data 0,123,122,118,0,0
- Data 0,0,131,121,124,0
- Data 121,127,0,132,0,0
- Data 0,126,0,128,0,122
- Data 126,0,133,134,0,0
- Data 124,125,0,0,0,0
- Data 123,0,0,0,135,0
- Data 0,0,124,129,0,0
- Data 0,0,128,0,0,130
- Data 0,0,0,0,129,0
- Data 0,0,0,122,0,0
- Data 0,0,123,0,0,0
- Data 0,0,0,125,0,0
- Data 0,0,125,0,0,0
- Data 0,0,0,0,0,127
- Data 0,0,0,0,0,137
- Data 0,0,0,0,136,0
- Data 0,0,139,0,0,0
- Data 0,140,0,138,0,0
- Data 139,0,141,0,0,0
- Data 0,0,0,140,0,0
- Data 0,0,0,0,0,0
- Data 0,0,0,0,0,0
- Restore
- For varCO = 1 To (143 * 6)
- Read varExits(varCO)
- Next varCO
- End Sub
- Sub subReadObjectLocations
- COMMON (VARIABLES) INTEGER labObjectLocations
- labObjectLocations:
- Data 0,13,3,11,3,0,143,49,17,40
- Data 39,38,134,19,51,0,42,0,131,132
- Data 22,34,49,31,20,0,5,15,14,36
- Data 0,30,48,26,29,10,32,21,24,94
- Data 117,111,0,142,110,95,138,92,126,108
- Data 119,96,0,117,15,3
- Restore
- For j = 1 To 55
- Read varObjectLocations(j)
- Next j
- End Sub
- Sub subPrintHelp
- Print "I can't, you're on your own."
- Print
- Print "To move use directions such as N,S or E. I can understand simple instructions."
- Print "These statements should be in the form <verb> <noun> separated by a space."
- Print
- Print "If you get stuck try something completely different."
- Print
- Print "By the way magic is quite useful!"
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement