home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User 4
/
AUCD4.iso
/
acornuser
/
1998
/
aug1998
/
freeware
/
PD
/
IntFiction
/
DavidRPG2
/
Example
< prev
Wrap
Text File
|
1998-03-26
|
2KB
|
141 lines
| Example Game
| David Spence, 1998.
| For DavidRPG2 the adventure interpreter.
name=Example
adventure=To test this
author=David Spence, 1998
version=0.01 (13 Mar 1998)
| Begin Rooms
| all rooms must have name and text1 and can have up to 20 lines of text
variable o = 0
variable jj = 0
room one start {
name: "Room one"
text: "This is the first room."
"It is cold and damp."
east: goto(two)
north: goto(three)
objects: bat,box
actions: {
"shout": print("Keep your voice down.\n")
}
}
room onea {
name: "Special Room"
text: "This is the secret room."
"Jump to leave."
east: {
change(o,1)
print("Print you have typed east ")
print(o)
print(" times.\n")
}
north: set(o,0)
actions: {
"jump": {
print("You leave the room for good?")
goto(one)
}
}
}
room two {
name: "Room two"
text: "This is the second room."
west: goto(one)
north: goto(three)
}
room three {
name: "Room three"
text: "This is the third room."
"It is warm and damp."
"You feel like you are being watched."
south: goto(one)
north: goto(two)
people: old_man
}
| next the objects
| objects need move:, name:, text1:
object box {
move: no
| -1 is infinite
energy: 2
dead: {
print("The box is destroyed.\n")
O_move(box,null)
print("You are teleported to a special room\n")
goto(onea)
set(jj,1)
}
name: "Box"
text: "It is very large and cannot be moved."
canbe: {
"hit": {
print("The box is crushed.\n")
change(energy,-1)
}
}
}
object bat {
move: yes
| -1 is infinite
energy: -1
name: "Bat"
text: "It is a large baseball bat."
cando: {
"hit": {
print("You hit it with the bat")
}
}
}
| finally the people
person old_man {
name: "Old Man"
text: "He is old and looks wise."
move: no
energy: -1
see: print("The old man says hello\n")
unsee: print("The old man says goodbye.")
canbe: {
"hit": {
print("The Old man is invincible.\n")
}
}
talk: {
"help":{
print("I am imaginary, I cannot help you.\n")
}
}
}
| the player
player {
name: "A. N. Explorer"
text: "Your not a very interesting person."
energy: -1
cando: {
"unjump": {
if(jj = "1") {
if(c_room <> "Special Room") {
goto(onea)
print("Well Done. You are moved back to the secret room.")
}
}
}
}
}