;		Test Game Database		Mark 1
;
;
;Declare Game Name - for binding to chat
@GAMENAME:YAMA
;
;	UID's an Archwiz (WILL) be allowed to login under
;
@ARCHID
0
;
;	Archwizard names
;
@ARCHNAME
;
;	The merry ego trippers
;
Anarchy
Debugiit
Potato
Madsysop
;
;	Operator Account, for superusers 
;
System
;
;	User defined room bit flags
;
@RFLAG
outside
tdrop
city
nomobile
floods
join
merge
cold
underwater
;
;	User defined object flags
;
@OFLAG
getflip
canget
canwear
weapon
armour
food
container
opens
;
;	User defined player flas
;
@PFLAG
crippled
dumb
wizmode
wizard
berk
setup
pretend
;
@CONSTANTS
; All the constants for the whole game
; -1 is used for nothing all over
VMAGIC=4320
<sys/types
<sys/flags
<sys/fields
;
;	Player fields
;
;
;	These have 2 definitions. 1 is user flag number the other is the
;	access number for LDP/SETP etc. ie 1 is used for definition the
;	other for the language - not perfect but it will have to do
;
AGIL=0
PAGIL=7
STAM=1
PSTAM=8
MAXSTAM=2
PMAXSTAM=9
FIGHTING=3
PFIGHT=10
TRACE=4
PTRACE=11
TRACEREF=7
PTRACEREF=14
SPEED=8
PSPEED=15
SPCOUNT=9
PSPCOUNT=16
WEAPON=10
PWPN=17
FLAGS2=11
PFLAGS2=18
GAMES=12
PGAMES=19
VERSION=13
PVERSION=20
ATTACHED=14
PATTACHED=21
FOLLOW=15
PFOLLOW=22
FOLLOWREF=16
PFOLLOWREF=23
SYSTAB=17
PSYSTAB=24
OWNER=18
POWNER=25
SLEEPCT=19
PSLEEPCT=26
ATTACK=20
PATTACK=27
NOAIR=21
PNOAIR=28
HELPING=22
PHELPING=29
;
;	flags 2 names
;
imprisoned=1
attached=2
nosey=3
converse=4
password=5
tread=6
eyesclosed=7
holdbreath=8
verbose=9
superbrief=10
;
;	Object Fields
;
DOORREF=0
DAMAGE=0
ODAMAGE=6
ODOORREF=6
VALUE=1
OVALUE=7
FOOD=2
OFOOD=8
OBURN=9
BURN=3
OSHARP=10
SHARP=4
BLUNT=5
OBLUNT=11
STR=6
OSTR=12
OWNERO=7
OOWNER=13
;
;	Room Fields
;
OWNERR=0
ROWNER=14
BEENTO=1
RBEENTO=15
;
;	Flags
;
FWIZLOCK=255
FFREEZE=254
FBOOT=253
FPEACE=252
FTIDETICK=251
FWTICK=250
FWTYPE=249
FWATER=248
FDIED=247
;SPARE FLAG HERE=246
;stop at 245 - restart at 239 (240-245 used by exitplayer table 7)
FECHO=239
FPOLICE=238
FHOUR=237
FTIMETICK=236
FHANGOVER=235
FWORD=234
FSHUTDOWN=233
FHAYBARNBURN=232
; Flag to say which tick we are on - some things only done on 3rd tick.
FTICKTOCK=231
; Reset time bomb counter
FTIMEBOMB=230
; Temp store
FLOCHOLD=229
;
;	The worms
;
@VOCAB
pray	V
illusion	V
hold V
breathe	V
breath	N
creation	N
tod	V
off	P
shoes	N
fingers	N
addnoun	V
addadj	V
delnoun V
deladj	V
guard	N
royal	A
bed	N
on	N
lie	V
under	P
beneath S
hay	N
fish	N
eyes	N
amnatha	N
anitra  N
makeroom	V
setname	V
setlong		V
makeobject	V
makeplayer	V
showbug		V
setwizard	V
setpleb		V
setmaxstate	V
setdesc		V
setweapon	V
resweapon	V
setsize		V
setweight	V
initdump	V
fdump		V
createservants	V
setarrive	V
setleave	V
sethere		V
setfollow	V
setservant	V
setseedark	V
setcanget	V
setflannel	V
setlitall	V
setlit0		V
setcontainer	V
setopens	V
setfood		V
createguards	V
resseedark	V
rescanget	V
resflannel	V
reslitall	V
reslit0		V
rescontainer	V
resopens	V
resfood		V
setvalue	V
setsharp	V
setdeath	V
setoutside	V
setdark		V
setnomobile	V
settdrop	V
resdeath	V
resoutside	V
resdark		V
resnomobile	V
restdrop	V
setnexit	V
resnexit	V
seteexit	V
reseexit	V
setsexit	V
ressexit	V
setwexit	V
reswexit	V
setuexit	V
resuexit	V
setdexit	V
resdexit	V
hangover	V
nohangover	V
time	V
wave	V
wimper	V
burp	V
fart	V
grin	V
smile	V
snigger	V
laugh	V
bounce	V
purr	V
sulk	V
moan	V
groan	V
cower	V
sigh	V
pout	V
chuckle	V
giggle	V
titter	V
gibber	V
sniff	V
strut	V
eyeball	V
snarl	V
thank	V
miaow	V
kneel	V
;
ruffle	V
tickle	V
scritch V
snuggle	V
bonk	V
spank	V
prod	V
smell	V
bow	V
cackle	V
applaud	V
blush	V
clap	V
comfort V
cough	V
cry	V
cuddle	V
frown	V
gasp	V
glare	V
growl	V
hiccup	V
hiccough S
nibble	V
nod	V
poke	V
scream	V
shake	V
shiver	V
shrug	V
sing	V
slap	V
smirk	V
snap	V
sneeze	V
snicker	V
snore	V
spit	V
squeeze	V
stare	V
whistle	V
wink	V
yawn	V
;
in	P
into	S
from	S
by	S
on	S
onto	S
using	S
;
blind 	V
last	V
police	V
converse V
*	V
wizverse	V
arch	V
archverse V
sharpen	V
grind	S
brief	V
verbose	V
superbrief V
in	V
enter	S
board	S
wear	V
remove	V
syntax	V
rules	V
typo	V
sleep	V
at	P
wake	V
stop	V
finish	V
disc	N
cure	V
show	V
setlevel	V
zigawobble V
m	V
male	S
f	V
female	S
wiz	V
witch	S
wizard	S
wizard  N
lord	N
mode	N
lock	N
unlock	N
lock	V
unlock	V
peace	V
cripple	N
war	V
pretend	V
freeze	V
melt	V
buy	V
drink	N
innkeeper N
keeper	S
toss	V
throw	S
dig	V
imprison V
release V
write	V
kgb	V
bgk	V
cls	V
kiss	V
hug	V
look    V
l	S
r	S
get	V
take	S
t	S
ge	S
drop	V
dr	S
put	S
insert	V
play	V
start	S
cripple	V
quit	V
qq	S
shutdown	V
i       V
inv	S
inven	S
invent	S
inventory	S
rain	V
drizzle	V
clear	V
ring	V
bong	S
warm	V
hands	N
hand	S
feet	S
clean	V
polish	S
rub	S
wipe	S
exits	V
limbo   N
chaos   N
n	V
north	S
e	V
east	S
s	V
south	S
w	V
west	S
u	V
up	S
climb	S
d	V
down	S
cr	V
swim	V
zap	V
say	V
speak	S
utter	S
shout	V
sh	S
who	V
wq	S
qw	S
invisible	V
invis	S
visible	V
vis	S
open	V
op	S
close	V
cl	S
shut	S
fill	V
door	N
trapdoor S
hatch	S
vampyre	N
vampire	S
save	V
tell	V
te	S
;;;promote	V
;;;demote	V
rooms	V
set	V
where	V
dir	V
summon	V
su	S
snoop	V
place	V
unsnoop	V
emote	V
:	S
help	V
combat	N
credits	N
playing	N
emotions	N
rules	N
bug	V
all	N
force	V
make	S
begone	V
give	V
feed	S
attach	V
detach	V
steal	V
pinch	S
nick	S
st	S
wind	V
rope	N
to	P
goto	V
button	N
score	V
sc	S
walk	V
kick	V
panic	V
kill	V
k	S
attack	S
hit	S
bang	S
break	S
maim	S
slay	S
murder	S
wound	S
fight	S
flee	V
eat	V
drink	S
wield	V
weild	S
weapon	S
;
;	For mist plebs
;
retaliate	S
ret	S
;
levels	V
follow	V
pursue	V
lose	V
setscore V
setstr	V
setstam	V
setagil	V
trace	V
track	S
untrace	V
untrack S
heal	V
change 	V
password V
pwchange S
passwd	S
setpass  V
setspeed	V
crash	V
light   V
li	S
ignite	S
extinguish V
unlight S
ext	S
move	V
push	S
press	S
roll	S
turn	S
examine	V
ex	S
read	S
search	S
keyhole	N
hole	S
me	N
myself	S
with	P
wi	S
value	V
val	S
north	N
n	S
east	N
e	S
south	N
s	S
west	N
w	S
up	N
u	S
climb	S
down	N
d	S
out	N
in	N
out 	V
leave	S
jump	V	
stats	V
;
blind	N
blindness	S
cliff	N
cliffs	S
telescope N
cliff	A
path	N
southern	A
inn	N
pub	S
cellar	N
cellars	S
barrel	N
barrels	S
fire	N
fireplace S
hearth	S
chimney	S
chest	N
seachest S
storm	V
credits	V
gorgon  N
;Make forks and pitchforks the same
pitchfork N
fork	S
stone	N
block	S
paradise N
once	N
names	N
name	S
<SUB/dylan.words
<SUB/j.words
;
;	Room declarations
;
@ROOM
<SUB/room.dat
<SUB/dylan.rooms
<SUB/j.rooms
<SUB/rockroom.dat
<SUB/grave.dat
<SUB/church.dat
<SUB/m.rooms
<SUB/tomb.dat
<SUB/forest.dat
<SUB/quarry.rooms
<SUB/mine.rooms
;<SUB/moor.rooms
@PLAYER
<SUB/player.dat
<SUB/j.players
<SUB/m.players
<SUB/dylan.players
@OBJECT
<SUB/object.dat
<SUB/dylan.objects
<SUB/j.objects
<SUB/m.objects
<SUB/tombobject.dat
<SUB/dumped.dat
@EXIT
<SUB/exit.dat
<SUB/dylan.exits
<SUB/j.exits
<SUB/m.exits
<SUB/rockexit.dat
<SUB/graveexit.dat
<SUB/churchexit.dat
<SUB/tombexit.dat
<SUB/forest.exits
<SUB/quarry.exits
;<SUB/moor.exits
<SUB/dumped.exits
;
;	The game messages
;
@MESSAGE
;
;	U0/1/2 MUST BE HERE AND DECLARED FIRST
;
U0
^
U1
^
U2
^
BARNBURNING
You stand in the middle of a blazing barn, with the flames climbling ever
higher and hotter. You gasp and choke in the foul smoke that fills the barn.
The only way out is through the door.^
BARNBURNT
You stand amongst the still smouldering remains of the hay barn, surrounded
by black, burnt wood and straw. There is a door to the east.^
LOG
^
LOG2
^
SECHO
^
CLSMSG
^
WARMSG
The air of peace and friendship lifts.^
PEACEMSG
An air of peace and friendship settles across the land.^
PARROT1
Pieces of eight^
PARROT2
Yo ho ho and a bottle of rum^
PARROT3
Shiver me mainbrace^
PARROT4
Aye aye cap'n^
PARROTM
^
CREDITMSG


Yama was designed and created by   :	Alan Cox(Anarchy)
RMOL Chat support with the help of :	RMOL	(Caederus)

Scenario Design And Implementation :	Alan Cox      (Anarchy)
					Dylan Williams(The Furry Potato)
					Dunc Brannen  (Dunk)
					James Goodwin (Madsysop)
	
YAMA was developed on tardis, the edinburgh Unix machine for the people.

Thanks to:	Zem    (helping debug the sun version).
		Dan&MM (helping debug the sequent word order probs)
		Jerk   (helping debug sun/telnet version)
		Rognog (making it work under Xenix)
		Drizz  (fixing tty detach code)
^
SOMEONE
Someone^
QUOTEDOT
".^
EXNMIN
In	    :	    ^
EXNMOUT
Out 	    :       ^
EXNMN
North       :       ^
EXNME
East        :       ^
EXNMS
South       :       ^
EXNMW
West        :       ^
EXNMU
Up          :       ^
EXNMD
Down        :       ^
NOEXIT
You can see no exits.^
TISDARK
It is dark, you can't see a thing.^
DRPWHAT
I don't know what you want to drop.^
DROPIT
You drop ^
DOT
.^
OPBRK
(^
CLBRK
)^
DRSHUT
The door is shut.^
DRISCL
The door is already closed.^
DRISOP
The door is already open.^
NOOPEN
You can't open that.^
NOCLOSE
You can't close that.^
WHODAT
Who is that.^
WHATTELL
What a strange thing to talk to!^
TELLSU
 tells you "^
VOICESAY
A voice in the distance^
SHOUT
 shouts "^
TELLSELF
Talking to yourself is the first sign of madness, (playing this is the second).^
WHATTELE
What are you trying to teleport.^
TELEROOM
You can only teleport people into rooms.^
WHERETO
I don't know where you are trying to teleport to.^
VANISH
vanishes.^
APPEAR
appears.^
APPEARINH
 appears in your hand.^
NUMROOMS
 rooms in total.^
NUMOBS
 objects in total.^
NOTOBJ
You can only set the state of objects.^
WHATSET
I don't know what you are trying to set.^
SILLYSET
You can't set it's state to that !^
WHATSETTO
To what state ?^
SETJELLY
You couldn't set a jelly!^
ITWORTH
Its worth about ^
ITWORTH2
 points.^
HELP
This is strictly a test system so currently only the following commands work.
For a fuller description of use, type 'syntax'. For a list of emotion commands
type 'HELP EMOTIONS'.

NORTH	EAST	SOUTH	WEST	UP	DOWN	EXITS

BUG	CLOSE	CREDITS	DROP	EXAMINE	EXTINGUISH	FLEE	FOLLOW	GET
GIVE	HIT	INVEN	JUMP	KILL	LEVELS	LIGHT	LOCK	LOOK	OPEN
PASSWORD 	QUIT	RULES	SAY	SCORE	SHOUT	SLEEP	STEAL   SYNTAX
TELL	TYPO	UNLOCK	VALUE	WAKE	WEAR	WIELD	WHO

BRIEF	VERBOSE	RULES	SAVE	SYNTAX

Help is also available on

EMOTIONS	RULES		CREDITS		PLAYING		COMBAT^
COMBATHELP
Fighting things (and other players) is an integral part of the game play. You
get points for successfully killing things, and if they are carrying anything
you will be able to retrieve their belongings once they die.
If you intend to kill something it is a good idea to have a weapon. You can
make this your 'weapon to hand', by using the WIELD command. This means that
should anyone attack you, you will immediately retaliate with that weapon.
If you are attacked you will automatically retaliate anyway, but if you have
no weapon to hand you will fight with bare hands until you WIELD one.
Should you die in a fight you will lose ALL of your points, and go back to
being a peasant. If you are losing a fight you may wish to run away with
the command 'FLEE <direction>'. This loses you some points but nothing like
as many as dying.
After a fight you will probably be weak. Eating food and sleeping both help
to recover strength, but you should be careful in case your victim comes
back looking for revenge....^
PLAYHELP
YAMA is a multi-user game in the traditional mould. The ultimate aim of the
game is to get to the rank of Arch-Duke. To gain levels in the game you need
to score points (The SCORE command will show your current score, and LEVELS
will show you the amount needed to reach a specific level). Points are awarded
for killing monsters (and players), for finding treasure and dropping it at
the temple, or occasionally for solving puzzles.
You will find the following basic commands useful to get you started
HELP		-	General help and common commands
N,E,S,W,U,D	-	To more around the game (compass points)
LOOK		-	Redescribe the place you are in
WHO		-	See who is playing
TELL PERSON <message>	Tell a player something
SAY <message>	-	Say something to everyone in the room
SHOUT <message>	-	Shout something to everyone in the game
GET <item>	-	Pick up an item
DROP <item>	-	Drop an item
EXAMINE <item>	-	Possibly get more information about something
LOOK IN <item>	-	Look into things like buckets, and sacks
^
EMOHELP
APPLAUD	BOUNCE	BOW	BURP	CACKLE	CHUCKLE	CLAP	COMFORT	COUGH	COWER
CRY	CUDDLE	EYEBALL FROWN	GASP	GIGGLE	GLARE	GRIN	GROAN	GROWL
HICCUP	HUG	KISS	KNEEL	LAUGH	MIAOW	MOAN	NIBBLE	NOD	POKE
POUT	PURR	RUFFLE  SCREAM	SCRITCH	SHAKE	SHIVER	SHRUG	SIGH	SING
SLAP	SMILE 	SMIRK	SNAP	SNARL	SNEEZE	SNIFF	SNIGGER	SNICKER	SNORE
SPIT	SQUEEZE	STARE	STRUT	SULK	THANK	TITTER	WAVE	WHISTLE	WINK
YAWN
^
WIZHELP
Currently implemented wizard commands are

BLIND	CHANGE	CLEAR	CRIPPLE	CURE	DIR	DRIZZLE	EMOTE	FORCE
FREEZE	GOTO	HANGOVER	MELT	NOHANGOVER	PEACE	RAIN
ROOMS	SET	SHOW	SNOOP	SPEED	STORM	SUMMON	TIME	TRACE
UNSNOOP	UNTRACE	WAR	WHERE	WIZ LOCK	WIZ MODE	WIZ UNLOCK
ZAP
^
ARCHHELP
Currently implemented Lord commands are

ATTACH		BEGONE		BGK		CRASH		DETACH	
IMPRISON	INVIS		KGB		LAST		PLACE	
RELEASE		SETAGIL		SETFOLLOW	SETLEVEL	SETPASS
SETPLEB		SETSCORE	SETSTAM		SETSTR		SETWIZARD
SHUTDOWN	SHOWBUG		VIS

More extra help is available on creation. Type HELP CREATION for more details.
^
MAKEHELP
Creation Commands: Please Be Careful...

ADDNOUN		ADDOBJ		DELADJ		DELNOUN		FDUMP	
INITDUMP	MAKEOBJECT	MAKEPLAYER	MAKEROOM	SETCANGET
SETCONTAINER	SETDESC		SETFLANNEL	SETFOOD		SETLIT0	
SETLITALL	SETLONG		SETMAXSTATE	SETNAME		SETOPENS
SETSHARP	SETSIZE		SETVALUE	SETWEAPON	SETWEIGHT
RESCANGET	RESCONTAINER	RESFLANNEL	RESFOOD		RESLIT0
RESLITALL	RESOPENS	RESWEAPON	SETDEATH	RESDEATH
SETDARK		RESDARK		SETNOMOBILE	RESNOMOBILE	SETOUTSIDE
RESOUTSIDE	SETTDROP	RESTDROP	SETNEXIT	RESNEXIT
SETEEXIT	RESEEXIT	SETSEXIT	RESSEXIT	SETWEXIT
RESWEXIT	SETUEXIT	RESUEXIT	SETDEXIT	RESDEXIT
SETSEEDARK	RESSEEDARK
^
RULEMESS
At the moment there are only 2 rules:

1) No quiting during a fight - This includes clearing the call, or any other
   way - doing this constitutes cheating, and your character will be killed
   (so you might as well see the fight out in case you win! - or you can flee.)
   
2) Playing more than one character at a time constitutes cheating.
^
SYNTAXFILE
SUB/SYNTAX.TXT^
CRASH
The game is now exiting... Goodbye...^
BUGMSG
Your bug has been recorded... thank you.^
ARCHPROMPT
# ^
BUGFILE
SUB/BUG.TXT^
WHOCARR
' carrying ^
WHOAT
 at '^
CARRBY
 carried by ^
INOBJ
 in ^
SQDOT
'.^
FORCEJOKE
The force doesn't see to be with you.^
UFORCED
You are forced to ^
WAKEUP
You wake up.^
TRANSP
You have been magically transported!^
SUMWOT
What are you trying to summon ?^
SUMSELF
Now thats what I call a silly idea.^
STPSNP
You have stopped snooping on ^
STRSNP
You have started to snoop on ^
NTSNP
You aren't snooping on anyone.^
WHATGIVE
What are you trying to give away ?^
SILLYGIVE
Don't be silly.^
GIVESELF
Now thats what I call really generous. ^
NOTCARRY
They can't carry that.^
GIVESU
 gives you ^
GONROOM
That isn't a room.^
GOTOOUT
dissappears in a haze of shimmering light.^
GOTOIN
appears in puff of smoke.^
GOWHERE
where is that ?^
FOLGN
n^
FOLGE
e^
FOLGS
s^
FOLGW
w^
FOLGU
u^
FOLGD
d^
STRFL
You start following ^
STPFL
You stop following ^
NOFOL
You can no longer follow ^
YOUFOL
You follow ^
HLPS
 has offered to help you.^
NOHLP
You can no longer help ^
NOTWPN
That is not a weapon. ^
CONTAIN
 contains ^
LEVELS

	Peasant			  0
	Pikeman			100
	Warrior			200
	Trooper			300
	Swordsman		500
	Swordmaster		800
	Knight		       1300
	Baron		       2100
	Viscount	       3400
	Earl		       5500
	Marquis		       8900
	Duke		      14400
	Arch-Duke	      23300
^
LEVNM1
Peasant^
LEVNF1
Peasant^
LEVNM2
Pikeman^
LEVNF2
Pikewoman^
LEVNM3
Warrior^
LEVNF3
Warrior^
LEVNM4
Trooper^
LEVNF4
Trooper^
LEVNM5
Swordsman^
LEVNF5
Swordswoman^
LEVNM6
Swordsmaster^
LEVNF6
Swordsmistress^
LEVNM7
Sir^
LEVNF7
Dame^
LEVNM8
Baron^
LEVNF8
Baroness^
LEVNM9
Viscount^
LEVNF9
Viscountess^
LEVNM10
Earl^
LEVNF10
Countess^
LEVNM11
Marquis^
LEVNF11
Marchioness^
LEVNM12
Duke^
LEVNF12
Duchess^
LEVNM13
Arch-Duke^
LEVNF13
Arch-Duchess^
LEVNM14
Warlord^
LEVNF14
Warlady^
LEVNM15
Overlord^
LEVNF15
Overlady^
THE
 the ^
SPACE
 ^
POTATO
Potato^
ANARCHY
Anarchy^
USCORE
Score   : ^
USTR
Strength: ^
UMAXST
 from : ^
UDEX
Agility : ^
USTAM
Stamina : ^
UARENOW
You are now ^
NOTAPLAYER
That is not a player.^
NUMVAL
Number expected.^
ATTACK
has attacked^
NINFIGHT
Not in a fight.^
HITU
 hits you^
MISSEDU
 misses you^
UHIT
You hit ^
UMISSED
You missed ^
WITH
 with ^
YOUDIED
You appear to be a little bit dead.^
GOTEM
Your last blow did the trick.^
FIGHTING
You are already fighting.^
SILLYKILL
Call the samaritans first.^
JPCLIFF
Jumping over cliffs is not a good idea.^
NOWPN
You suddenely realise you don't have ^
NOWPN2
 and are forced to fight with bare hands!^
KILLNPL
You stride up to ^
KILLNPL2
 and yell 'Make my day..' but it doesn't seem impressed.^
WLDWOT
Wield what ?^
WLDNCAR
How can you fight with something you are not even carrying!^
RUNAWAY
 tries to escape from the fight.^
FLEEWHERE
Which way ?^
NOTLIT
 is not lit.^
ISALRLIT
 is already lit.^
FROMWHAT
From what ?^
PLAYERLOG
SUB/player_log^
NOSEY
SUB/nosey^
BOOK
SUB/book^
MVBARREL
There is a narrow doorway hidden behind the barrels!^
MVBACK
You move the barrels back over the door.^
MVWRONG
You can't shift the barrels from this side.^
FOUNTDRINK
The water seems laden with the sadness of mankind, and somehow carries the
feelings of the whole world, the unheard cries of the lonely, the pain of
the lost, and the terror of the afraid. Unable to cope, you break down into
tears.^
FOUNTEXAM
'Beauty may pass with the heady days of youth, but I shall always remember
you' is carved onto the bowl of the fountain.^
GATEEXAM
The gates are already victims of time, decaying slowly to nothingness...
Ashes to ashes, rust to rust.^
NAMEEXAM1
One inscription that catches your eye is ,'I fear not mortality, for I know
that even after the wind has stopped bruising this cruel world, I will be
remembered still', but the name that lies above it has been worn beyond your
vision.^
NAMEEXAM
One name that catches your eye is 'Anarchy The Wizard'. Beside it is
written 'Even I clutch at the straws of immortality, not for the fear of
dying but for the fear of being forgotten.'^
MANDIES
As the old man dies he looks up sadly and says 'Remember me... please remember
me'. He shudders and there is the faintest whisper as his soul departs from
the land of the living.^
PRAYTEMP
You sense compassion, like a hand stretching out from afar, but not enough,
never enough to save you from the remorseless pull of time.^
SPHERESEE
The sphere is cold and dark, with only the odd flicker from its crystal
heart.^
SPHEREFIRE
The light from the fire seems to well up inside the sphere and as you gaze
into the dancing light you seem pulled out across time and space as if you
are seeing though another's eyes.^
VOIDSEE
You are looking out into void.. absolute nothingness. You shake a little as
you wrench your eyes away.^
SWORDEXAM
The sword is beautifully decorated and obviously of some significance. A
beautifully carved wolf with crystal eyes seems to watch you from the handle.^
STATP
Player^
STATO
Object^
STATR
Room^
PSTAT1
Crippled^
PSTAT2
Brief^
PSTAT3
Male^
PSTAT4
Blind^
PSTAT5
Deaf^
PSTAT6
Asleep^
PSTAT7
SeeDark^
OSTAT2
Flannel^
OSTAT3
Lit0^
OSTAT4
LitAll^
RSAT2
Fall(unused)^
RSTAT3
Dark^
RSTAT4
Small(unused)^
RSTAT5
Death(unused)^
WIPEOUT






























^
RAINS
It has started to rain.^
RAINSTOP
The rain stops and the skies clear.^
STORMBREAK
The rain lashes down hard as a storm breaks.^
TYPOFILE
SUB/TYPO.TXT^
SPEARHIT
The spear files unerringly, striking you between the eyes.
You are dead....^
SPEARTHROW
The spear appears to have the flight capabilities of the tree it was carved
from, and plummets to the ground a few feet in front of you.^
GURUREAD
The Guru takes the piece of paper, examines it and says, "The paper tells of
great wealth hidden in the hills to the west off here, but first you must help
me. 
 "Recently an evil force entered here and stole an emerald figurine of great 
magical importance. I have spent time preparing spells to combat this force,
but I am unable to leave here, in case it returns in my absence. Find the 
figurine and I will reward you greatly and help you find your treasure."
 The Guru removes a ring from one of his fingers and continues, "Take this
ring, wear it on your finger and you will become invisible to mortals, but
beware, it was not intended for mortal use, staying invisible will drain your
stamina, do not let it kill you!"
The Guru gives you the ring.^
GURUKILL
The Guru anticipates your action and raises an arm towards you. All of a 
sudden you feel a shrinking sensation - a sharp pain and then oblivion.^
RINGKILL
You feel weak and suddenly everything dims and darkens, as you collapse
semi-concious to the ground you manage to rip the ring from your finger.
Darkness overtakes you....^
STEALFROMU
 tries to steal from you!!^
COM1
^
COM2
^
COM3
^
COM4
^
COM5
^
COM6
^
COM7
^
COM8
^
COM9
^
COM10
^
COM11
^
COM12
^
COM13
^
COM14
^
COM15
^
COM16
^
COM17
^
COM18
^
COM19
^
COM20
^
POLICEFILE
SUB/POLICE.TXT^
;
;	The 2 different bits of description for the thronehall
;
THRONE2
self proclaimed lords of this world. Vast arrays of fan vaults and loft pillars
carved with beautiful designs give an almost cathedral like atmosphere to this
place. A huge crystal throne stands on a carved marble plinth in the centre of 
the hall.^
THRONE1
self proclaimed lords of this world. As you survey the beautiful chamber from
your seat upon the crystal throne you can but smile and feel contented with
the world at your feet.^
BRIDGEJMP
You leap off the bridge into the rushing river below you. As you land the 
force of the water hits you and knocks the breath from you as you are swept
downstream. The journey is a short one, but it is your last.^
BRIDGEJMP2
You leap from the bridge into the rushing river below you. As you land the
force of the water hits you and you feel yourself being washed downstream. At
the last moment your pike jams between the bottom of the bridge and the river
bed, catapulting you unceremoniously onto the river bank.^
TIME
^
DAY
^
MONTH
^
YEAR
^
DATE
^
HOUR
^
MIN
^
SECS
^
COMLOG
SUB/comand_log^
;
;	Item control tables
;
@ITEMTABLES
WOLFSWORD
;make the wolfsword change name according to its state
.name $ANY $ANY STATE !ME 1 LD RETVAL &{the battered sword} LD RETQRY 0 DONE
$ANY $ANY $ANY DONE
@END
;
;	The tables come here
;
@TABLES
69
@TABLE
$ANY $ANY $ANY	LDP 64 !ME PLOC EQ 64 NOITEM MSGCR {Shut up you are dead.} PLACE !ME DUMP EXIT DONE
;do me preposition
$ANY me $ANY 	LD IHERE1 !ME LD IPRES1 !ME LD IGLOB1 !ME
$ANY $ANY me 	LD 1HERE2 !ME LD IPRES2 !ME LD IGLOB2 !ME
;
;	Entry of game controllers
;
zigawobble $ANY $ANY ARCH !ME PBIT !ME %setup MSGCR {Ok..} LDP 64 !ME PFLAGS RES 64 %setup SET 64 %male SETP !ME PFLAGS !64 PLACE !ME SGATE LOOK DONE
$ANY $ANY $ANY	ARCH !ME PBIT !ME %setup MSGCR {Incorrect} EXIT DONE
; pick a sex
m $ANY $ANY 	PBIT !ME %setup LDP 64 !ME PFLAGS RES 64 %setup SET 64 %male RES 64 %pretend SETP !ME PFLAGS !64 PLACE !ME SGATE LOOK DOACT !ME {arrives} 1 DONE
f $ANY $ANY 	PBIT !ME %setup LDP 64 !ME PFLAGS RES 64 %setup RES 64 %male RES 64 %pretend SETP !ME PFLAGS !64 PLACE !ME SGATE LOOK DOACT !ME {arrives} 1 DONE
$ANY $ANY $ANY 	PBIT !ME %setup MSGCR {Huh ?, Male or female ?} DONE
;
;	Command info accounting
;
$ANY $ANY $ANY 	LDP 64 !ME PLOC LD 65 !FPOLICE ADD 65 &COM1 MFORMAT {%N0: %N1: %m0} !65 U0 { } !ME !64 !ME ADD FPOLICE 1 GT FPOLICE 19 LD FPOLICE 0
;
;	User logging
;
$ANY $ANY $ANY	LDP 64 !ME PFLAGS2 BIT 64 nosey LDP 64 !ME PLOC MFORMAT {%N2:%N1:%m0} LOG U0 { } !ME !64 !ME APPEND NOSEY LOG
$ANY $ANY $ANY	LDP 64 !ME PLOC MFORMAT {%N2:%N1:%m0} LOG U0 { } !ME !64 !ME APPEND COMLOG LOG
;
;	Detach command.. must come before attach so you can detach!
;
detach $ANY $ANY ARCH !ME LDP 64 !ME PFLAGS2 -BIT 64 attached MSGCR {You aren't attached to anything apart from your ego.} DONE
detach $ANY $ANY ARCH !ME RES 64 attached SETP !ME PFLAGS2 !64 SETP !ME PATTACHED -1 SETP !ME PSNOOP NOITEM OK DONE
;
;	If attached transfer command to attached host
;
$ANY $ANY $ANY 	LDP 64 !ME PFLAGS2 BIT 64 attached LDP ME !ME PATTACHED PARSE U0 DONE
;
;	Do sleeping
;
$ANY $ANY $ANY 	PBIT !ME %asleep LDP 64 !ME PSLEEPCT LT 64 8 MSGCR {You can't wake yourself up yet!} DONE
$ANY $ANY $ANY 	PBIT !ME %asleep MSGCR {You wake up.} LDP 64 !ME PFLAGS RES 64 %asleep SETP !ME PFLAGS !64
;
;	Check for *command formats
;
$ANY $ANY $ANY  EXTRACT U0 LOG 0 1 SUBSTR LOG {*} LENGTH U0 65 GT 65 1 EXTRACT U0 LOG 1 !65 LDP 64 !ME PFLAGS2 RES 64 converse SETP !ME PFLAGS2 !64 PARSE LOG LDP 64 !ME PFLAGS2 SET 64 converse SETP !ME PFLAGS2 !64 DONE
* $ANY $ANY LDP 64 !ME PFLAGS2 RES 64 converse SETP !ME PFLAGS2 !64 DONE
;
;	Check for conversing
;
$ANY $ANY $ANY 	LDP 64 !ME PFLAGS2 BIT 64 converse LENGTH U0 65 EQ 65 0 DONE
$ANY $ANY $ANY  BIT 64 converse MFORMAT {%m0} U1 U0 { } !ME !ME !ME CALL 9 DONE
;
;	Waking a person
;
wake $ANY $ANY 	EQ IHERE1 NOITEM LD IHERE1 !ME
wake $ANY $ANY  EQ IHERE1 !ME DONE
wake $ANY $ANY 	-IS !IHERE1 IPLAYER MSGCR {How can you possibly wake } PNAME !8 DONE
wake $ANY $ANY 	-PBIT !IHERE1 %asleep PCNAME !IHERE1 MSGCR { isn't asleep!} DONE
wake $ANY $ANY 	MSG {You wake } PNAME !IHERE1 MSGCR DOT LDP 64 !IHERE1 PFLAGS RES 64 %asleep SETP !IHERE1 PFLAGS !64 DOTO !ME {wakes} 26 !IHERE1 DONE
;
;	Brave sir robin ran away.
;
flee out $ANY LD 64 13 CALL 8 DONE
flee in $ANY LD 64 12 CALL 8 DONE
flee north $ANY LD 64 2 CALL 21 DONE
flee east $ANY LD 64 3 CALL 21 DONE
flee south $ANY LD 64 4 CALL 21 DONE
flee west $ANY LD 64 5 CALL 21 DONE
flee up $ANY LD 64 6 CALL 21 DONE
flee down $ANY LD 64 7 CALL 21 DONE
flee $ANY $ANY MSGCR FLEEWHERE DONE
;
;	Normal walking around (specials first)
;
n $ANY $ANY AT MEETRM STATE FIRE1 1 PARSE {enter fireplace} DONE
;
;	Standard behaviour
;
north $ANY $ANY LD 64 2 CALL 8 DONE
east $ANY $ANY LD 64 3 CALL 8 DONE
south $ANY $ANY LD 64 4 CALL 8 DONE
west $ANY $ANY LD 64 5 CALL 8 DONE
up   $ANY $ANY LD 64 6 CALL 8 DONE
down $ANY $ANY LD 64 7 CALL 8 DONE
;
;	Misc System Commands
;
tod $ANY $ANY	CALL 59 MSGCR TIME OK DONE
warm hands fire -EQ IPRES2 NOITEM MSGCR {You settle back, relax, and warm yourself.} DONE
warm me fire 	-EQ IPRES2 NOITEM MSGCR {You settle back, relax, and warm yourself.} DONE
zap $ANY wand 	GOT WAND -EQ IPRES1 NOITEM IS !IPRES1 IPLAYER LD IPRES2 !IPRES1 CALL 45 DONE
wave wand $ANY 	GOT WAND -EQ IPRES2 NOITEM IS !IPRES2 IPLAYER CALL 45 DONE
wave wand $ANY  GOT WAND MSGCR {Nothing happens.} DONE
zap $ANY staff 	GOT POTATOSTAFF -ARCH !ME MSGCR {What?} DONE
zap $ANY staff  ARCH !ME GOT POTATOSTAFF -EQ IPRES1 NOITEM LD IGLOB1 !IPRES1
zap $ANY staff  ARCH !ME GOT POTATOSTAFF EQ IGLOB1 NOITEM MSGCR {Zap what?} DONE
zap $ANY staff  ARCH !ME GOT POTATOSTAFF IS !IGLOB1 IROOM MSGCR {You dont really want to zap a room, do you!} DONE
zap $ANY staff  ARCH !ME GOT POTATOSTAFF IS !IGLOB1 IOBJECT MSG {Bolts of hot flame gush out of the staff, devouring } PNAME !13 CR DOTO !ME {fires bolts of fire from his staff which engulf and destroy} 26 !IGLOB1 PLACE !IGLOB1 !IGLOB1 DONE
zap $ANY staff  ARCH !ME GOT POTATOSTAFF DOTO !ME { fires bolts of flame from his staff, which engulf and destroy} 26 !IGLOB1
zap $ANY staff  ARCH !ME GOT POTATOSTAFF MSG {The staff releases deadly streams of fire which destroy } PNAME !IGLOB1 CR LD 64 !ME LD ME !IGLOB1
zap $ANY staff  ARCH !ME GOT POTATOSTAFF MSGCR {You are reduced to ashes in a matter of seconds.} MSGCR {You have died.} CALL 17 PLACE !IGLOB1 DUMP EXIT LD ME !64 DONE
light door staff ARCH !ME GOT POTATOSTAFF MSGCR {Sorry, you can't light a door.} DONE
light $ANY staff ARCH !ME GOT POTATOSTAFF EQ IPRES1 NOITEM MSGCR {Light what?} DONE
light $ANY staff ARCH !ME GOT POTATOSTAFF -IS !IPRES1 IOBJECT MSGCR {You can't light that!} DONE
light $ANY staff ARCH !ME GOT POTATOSTAFF -OBIT !IPRES1 %lit0 MSGCR {You can't light that!} DONE
light $ANY staff ARCH !ME GOT POTATOSTAFF STATE !IPRES1 0 MSGCR {It's already lit.} DONE
light $ANY staff ARCH !ME GOT POTATOSTAFF MSG {A thin blue stream of light flows from the staff, hits and lights } PNAME !9 CR DOTO !ME {'s staff emits a fine blue stream which hits and lights} 26 !IPRES1 SETSTATE !IPRES1 0 DONE
sleep on bed		AT FARMBED STATE STRAWBED 3 MSGCR {You lie down and relax..} MSGCR {The bed collapses under your weight.} SETSTATE FARMBED 2 DONE
sleep on bed 		AT FARMBED STATE STRAWBED 0 MSGCR {Oowww, ooooo  it's hot!} DONE
sleep on bed		AT FARMBED MSGCR {You can't lie on that, it's wrecked!} DONE
;
;	Miscellaneous general functions
;
sleep $ANY $ANY 	LDP 64 !ME PFIGHT -EQ 64 -1 MSGCR {Not in a fight!} DONE
sleep $ANY $ANY 	MSGCR {You bore yourself to sleep.} LDP 64 !ME PFLAGS SET 64 %asleep SETP !ME PFLAGS !64 SETP !ME PSLEEPCT 0 DONE
converse $ANY $ANY	LDP 64 !ME PFLAGS2 SET 64 converse SETP !ME PFLAGS2 !64 MSGCR {Type '*' to exit converse mode.} DONE
syntax $ANY $ANY 	TYPE SYNTAXFILE DONE
police $ANY $ANY 	LD 67 0 CALL 41 MSGCR {You have been very helpful...We shall be doing further investigation.} DONE
last $ANY $ANY 		ARCH !ME LD 67 1 CALL 41 DONE
rules $ANY $ANY 	MSGCR RULEMESS DONE
credits $ANY $ANY 	MSGCR CREDITMSG DONE
verbose $ANY $ANY 	LDP 64 !ME PFLAGS2 RES 64 superbrief  SET 64 verbose SETP !ME PFLAGS2 !64 DONE
brief $ANY $ANY 	LDP 64 !ME PFLAGS2 RES 64 superbrief RES 64 verbose SETP !ME PFLAGS2 !64 DONE
superbrief $ANY $ANY	LDP 64 !ME PFLAGS2 RES 64 verbose SET 64 superbrief SETP !ME PFLAGS2 !64 DONE
follow $ANY $ANY 	EQ IPRES1 NOITEM MSGCR {Follow who?} DONE
follow $ANY $ANY 	EQ IPRES1 !ME MSGCR {You run around in circles.} DOACT !ME {runs around in circles.} 25 DONE
follow $ANY $ANY 	-IS !IPRES1 IPLAYER MSGCR {I don't think that it will be going very far!} DONE
follow $ANY $ANY 	LDP 64 !ME PLEVEL LDP 65 !IPRES1 PVIS LT 64 !65 MSGCR {Follow who?} DONE
follow $ANY $ANY 	LDP 64 !ME PFIGHT -EQ 64 NOITEM MSGCR {You are too busy fighting.} DONE
follow $ANY $ANY 	-CANSEE !ME !IPRES1 MSGCR {You can't see, so it would prove pretty difficult to follow!} DONE
follow $ANY $ANY 	LDP 64 !ME PFOLLOW EQ 64 !IPRES1 MSG {You are already following } PCNAME !IPRES1 CR DONE
follow $ANY $ANY 	SETP !ME PFOLLOW !IPRES1 LDP 65 !IPRES1 PLOC SETP !ME PFOLLOWREF !65 -EQ 64 NOITEM MSG {You stop following } PCNAME !64 MSG { and start following } PCNAME !IPRES1 MSGCR {.} DONE
follow $ANY $ANY 	MSG {You start following } PCNAME !IPRES1 MSGCR {.} DONE
lose $ANY $ANY 		EQ IPRES1 NOITEM MSGCR {Lose who ?} DONE
lose $ANY $ANY 		-IS !IPRES1 IPLAYER MSGCR {Paranoid or what ?} DONE
lose $ANY $ANY 		LDP 64 !IPRES1 PFOLLOW -EQ 64 !ME PCNAME !IPRES1 MSGCR { is not following you.} DONE
lose $ANY $ANY 		SETP !IPRES1 PFOLLOW NOITEM OK DONE
;
;	Wearing things
;
wear $ANY $ANY 		EQ IPRES1 -1 MSGCR {Huh?} DONE
wear $ANY $ANY 		-GOT !IPRES1 MSG {You aren't carrying } PNAME !IPRES1 MSGCR {!} DONE
wear $ANY $ANY 		-OBIT !IPRES1 %canwear MSGCR {You can't wear that!} DONE
wear $ANY $ANY 		OBIT !IPRES1 %worn MSGCR {You are already wearing it!} DONE
;
;	Ring special cases for wearing
;
wear $ANY $ANY 		LDO 64 !IPRES1 OFLAGS SET 64 %worn SETO !IPRES1 OFLAGS !64 MSG {You put on } PNAME !9 CR MFORMAT {puts on %n0.} LOG { } { } !IPRES1 !ME !ME DOACT !ME LOG 25 DONE
remove mud shoes	MSGCR {You poke at your shoes with your fingers, which just covers your fingers in} MSGCR {mud too!} DONE
remove mud fingers	MSGCR {You try to remove the mud from your fingers, but you just smear it over} MSGCR {more of you hands!} DONE
remove $ANY $ANY 	EQ IPRES1 NOITEM MSGCR {Huh?} DONE
remove $ANY $ANY 	-OBIT !IPRES1 %worn MSGCR {You are not wearing it!} DONE
remove $ANY $ANY 	LDO 64 !IPRES1 OFLAGS RES 64 %worn SETO !IPRES1 OFLAGS !64 MSG {You take off } PNAME !9 MSGCR {.} MFORMAT {takes off %n0.} LOG { } { } !IPRES1 !ME !ME DOACT !ME LOG 26 DONE
;
;	Typo's
;
typo $ANY $ANY MSGCR {Thank you...it has been recorded.} LDP 64 !ME PLOC MFORMAT {%N2:%N1: %m0} LOG U1 { } !ME !64 !ME APPEND TYPOFILE LOG DONE
;
;	Lamp 
;
fill lamp bowl PRES LAMP HERE ROCKBOWL PARSE {fill oil lamp with oil} DONE
fill lamp oil PRES LAMP HERE ROCKBOWL STATE OIL 0 MSGCR {The oil is ablaze.} DONE
fill lamp oil PRES LAMP HERE ROCKBOWL STATE LAMP 2 DEC LAMP MSGCR {You fill the lamp} JP 2
fill lamp oil PRES LAMP HERE ROCKBOWL STATE LAMP 1 MSGCR {You top up the lamp.} JP 1
fill lamp oil PRES LAMP PLACE OIL OILW SETSTATE OIL 0 MSGCR {As your naked flame touches the oil there is a massive explosion.} MSGCR {You are blasted by burning oil and die horribly.} LDO 64 OIL OFLAGS SET 64 %litall SETO OIL OFLAGS !64 EXIT DONE
fill lamp oil PRES LAMP SETO LAMP OBURN 600 SETSTATE LAMP 1 OK DONE
;
;	Spear throwing specials
;
throw spear $ANY -GOT SPEAR MSGCR {What spear?!} DONE
throw spear $ANY EQ IPRES2 NOITEM MSGCR {Throw where?} DONE
throw spear $ANY -IS !IPRES2 IPLAYER MSGCR {Huh?} DONE
throw spear $ANY ARCH !ME ARCH !IPRES2 MSGCR {The spear flies with magical precision}
throw spear $ANY ARCH !ME ARCH !IPRES2 DOTO !ME {throws a spear at} 26 !IPRES2
throw spear $ANY ARCH !ME ARCH !IPRES2 DOACT !IPRES2 {turns around with lightning speed and catches the spear inches away from his chest!} 25 PLACE SPEAR !12 LD 64 !0 LD 0 !12 MSGCR {You turn around and catch the spear.} LD ME !64 DONE
throw spear $ANY ARCH !ME MSG {The spear flies with magical precision, instantly killing } PNAME !IPRES2 MSGCR {.} DOTO !ME {throws a spear at} 26 !IPRES2
throw spear $ANY ARCH !ME LD 64 !ME LD ME !IPRES2 MSGCR SPEARHIT EXIT LD ME !64 PLACE SPEAR DUMP DONE
throw spear $ANY MSGCR SPEARTHROW DOACT !ME {drops a spear.} 26 LDP 64 !ME PLOC PLACE SPEAR !64 DONE
;
toss   coin well	PARSE {drop coin in well} DONE
toss   coin $ANY	EQ IPRES1 @COIN CHANCE 5000 SETSTATE COIN 0 MSGCR {It comes up heads.} DONE
toss   coin $ANY	EQ IPRES1 @COIN SETSTATE COIN 1 MSGCR {It comes up tails.} DONE
;
;	Digging
;
dig    $ANY $ANY	AT UNBCH ISAT CORPSE SAND PLACE CORPSE UNBCH MSGCR {You dig up a corpse.} DONE
dig    $ANY $ANY	HERE FARMMUD MSGCR {You dig around in the mud.} PARSE {look in mud} DONE
dig    $ANY $ANY	AT POTATOFIELD ISAT TURNIP SAND PLACE TURNIP POTATOFIELD MSGCR {You dig up a turnip.} GET TURNIP DONE
dig    $ANY $ANY	MSGCR {You find nothing special} DONE
;
; Breathe deep now !
;
hold breath $ANY	LDP 64 !ME PLOC RBIT !64 %underwater MSGCR {You should have thought of that before....} DONE
hold breath $ANY	LDP 64 !ME PFLAGS2 SET 64 holdbreath SETP !ME PFLAGS2 !64 SETP !ME PNOAIR 10 MSGCR {You take a deep breath.} DONE
breathe	$ANY $ANY	LDP 64 !ME PLOC RBIT !64 %underwater MSGCR {What do you think you are, a fish ?} DONE
breathe $ANY $ANY	LDP 64 !ME PFLAGS2 RES 64 holdbreath SETP !ME PFLAGS2 !64 SETP !ME PNOAIR 3 OK DONE
;
;	Reading the archwizards book
;
read   book $ANY	-HERE ARCHBOOK MSGCR {How can you read it if it isnt here?} DONE
read   book $ANY	ARCH !ME MSGCR {   ===Ye olde booke of archwizards===} TYPE BOOK DONE
read   book $ANY	ARCH !ME MSGCR {The pages seem to have vanished.} DONE
read   book $ANY	-ARCH !ME MSGCR {It is written in some strange script you cannot understand.} DONE
write  $ANY $ANY 	ARCH !ME -HERE ARCHBOOK MSGCR {It helps to have the book in the same room!} DONE
write  $ANY $ANY 	ARCH !ME APPEND BOOK U1 MSGCR {You carefully write the message onto the dusty pages.} APPEND BOOK {===============================================================================} DONE
freeze $ANY $ANY 	PBIT !ME %wizmode LD 254 1 MSGCR {Mobiles frozen.} DONE
melt   $ANY $ANY	PBIT !ME %wizmode LD 254 0 MSGCR {Mobiles now free to move.} DONE
war    $ANY $ANY	PBIT !ME %wizmode LD FPEACE 0 LD 64 &WARMSG CALL 23 DONE
peace  $ANY $ANY 	PBIT !ME %wizmode LD FPEACE 1 LD 64 &PEACEMSG CALL 23 DONE
pretend $ANY $ANY 	PBIT !ME %pretend LDP 64 !ME 0 RES 64 %pretend SETP !ME 0 !64 PLACE !ME ARCHSTUDY DONE
pretend $ANY $ANY 	PROMPT {%} MSGCR WIPEOUT LDP 64 !ME 0 SET 64 %pretend SETP !ME 0 !64 DONE
;
;	Throwing people in towers..
;
imprison $ANY $ANY -ARCH !ME MSGCR {What ?} DONE
imprison $ANY $ANY EQ IGLOB1 NOITEM MSGCR {Imprison who ?} DONE
imprison $ANY $ANY -IS !IGLOB1 IPLAYER MSGCR {How can you imprison that!} DONE
imprison $ANY $ANY LDP 64 !IGLOB1 PLOC EQ 64 @TOWER MSGCR {They seem to be imprisoned already.. maybe they need executing ?} DONE
imprison $ANY $ANY LD 64 !ME LD ME !IGLOB1 MSGCR {You are surrounded by soldiers, arrested and carried off to the tower.} DOACT !ME {is suddenely surrounded by soldiers and carried off to the tower.} 25
imprison $ANY $ANY PLACE !ME TOWER DOACT !ME {is flung into the tower and the door is locked.} 25 LOOK LD ME !64
imprison $ANY $ANY LDP 65 !IGLOB1 PFLAGS2 SET 65 imprisoned SETP !IGLOB1 PFLAGS2 !65 DONE
release  $ANY $ANY -ARCH !ME MSGCR {What ?} DONE
release  $ANY $ANY EQ IGLOB1 NOITEM MSGCR {Release who ?} DONE
release  $ANY $ANY -IS !IGLOB1 IPLAYER MSGCR {How can you release that ?} DONE
release  $ANY $ANY LDP 64 !13 PLOC -EQ 64 @TOWER MSGCR {They are not imprisoned.} DONE
release  $ANY $ANY LD 64 !ME LD ME !IGLOB1 MSGCR {You have been set free.} DOACT !ME {is lead from the cell by a group of soldiers.} 25 PLACE !ME SGATE DOACT !ME {arrives} 25 LDP 65 !ME PFLAGS2 RES 65 imprisoned SETP !ME PFLAGS2 !65 LOOK LD ME !64 DONE
;
;	Security police
;
;
kgb $ANY $ANY ARCH !0 EQ 13 -1 MSGCR {Secret agent Boris wishes to know who to follow.} DONE
kgb $ANY $ANY ARCH !0 -IS !13 IPLAYER MSGCR {That would not be an overly interesting report, comrade.} DONE
kgb $ANY $ANY ARCH !0 LDP 64 !13 PFLAGS2 SET 64 nosey SETP !13 PFLAGS2 !64 MSGCR {Agents deployed, comrade.} DONE
bgk $ANY $ANY ARCH !0 EQ 13 -1 MSGCR {We have no dossier on this person.} DONE
bgk $ANY $ANY ARCH !0 -IS !13 IPLAYER MSGCR {Is this a new american intelligence plot ?} DONE
bgk $ANY $ANY ARCH !0 LDP 64 !13 PFLAGS2 BIT 64 nosey RES 64 nosey SETP !13 PFLAGS2 !64 MSGCR {Agents called off, and are ready for next assignment.} DONE
bgk $ANY $ANY ARCH !0 MSGCR {We have no agents deployed on this person, yet.} DONE
;
;	Allow/Disallow shouting
;
hangover $ANY $ANY PBIT !ME %wizmode LD FHANGOVER 1 DONE
nohangover $ANY $ANY PBIT !ME %wizmode LD FHANGOVER 0 DONE
;	SHOW command
show chest $ANY MSGCR {You rip open your shirt.} -PBIT !ME %wizmode DONE
show hand $ANY MSGCR {You spread your cards onto the table.} -PBIT !ME %wizmode DONE
show $ANY $ANY PBIT !ME %wizmode CALL 58 DONE
;
;	Mist wizard mode rip off 8-)
;
wiz mode $ANY PBIT !ME %berk MSGCR {Not you, you are berserk.} DONE
wiz mode $ANY -PBIT !ME %wizard MSGCR {Pardon ?} DONE
wiz mode $ANY PBIT !ME %wizmode PBIT !ME %male MSGCR {Leaving wizard mode} LDP 64 !ME 0 RES 64 %wizmode SETP !ME 0 !64 DONE
wiz mode $ANY PBIT !ME %wizmode MSGCR {Leaving witch mode} LDP 64 !ME 0 RES 64 %wizmode SETP !ME 0 !64 DONE
wiz mode $ANY MSG {Welcome oh } PBIT !ME %male MSGCR {master}
wiz mode $ANY -PBIT !ME %male MSGCR {mistress}
wiz mode $ANY LDP 64 !ME 0 SET 64 %wizmode SETP !ME 0 !64 DONE
;
;	Wizard locking
;
wiz lock $ANY -PBIT !ME %wizmode MSGCR {Pardon ?} DONE
wiz lock $ANY LD 255 !ME MSGCR {The game is now locked.} DONE
wiz unlock $ANY -PBIT !ME %wizmode MSGCR {Pardon ?} DONE
wiz unlock $ANY LD 255 -1 MSGCR {The game is now unlocked.} DONE
;
;	Wiz a message
;
wiz $ANY $ANY -PBIT !ME %wizmode MSGCR {Pardon ?} DONE
wiz $ANY $ANY LD 64 !ME LD ME 0 DO 0
	        PBIT !ME %wizmode PCNAME !64 MSG { : } MSGCR U1
	      ADD 0 1 LT 0 !16 LOOP 0
	      LD ME !64 DONE
;
;	ARCH a message
;	    
arch $ANY $ANY -ARCH !ME MSGCR {What ?} DONE
arch $ANY $ANY LD 64 !ME LD ME 0 DO 0
		ARCH !ME PCNAME !64 MSG { : } MSGCR U1
	       ADD 0 1 LT 0 !16 LOOP 0
	       LD ME !64 DONE
;	
;	Initialise the dump file
;
initdump $ANY $ANY ARCH !ME DELFILE {SUB/dumped.dat} APPEND {SUB/dumped.dat} {;Dumped items stored here} OK DONE
;
;	Dump an item to dump file
;
fdump $ANY $ANY ARCH !ME CALL 54 DONE
;
;	Clear screen (ansi/vt100 only) - FIXME
;
cls $ANY $ANY MSGCR CLSMSG DONE
;
;	Stat an item
;
stats $ANY $ANY EQ 9 -1 LD 9 !13
stats $ANY $ANY -PBIT !ME %wizmode MSGCR {I'm sorry I don't understand.} DONE
stats $ANY $ANY EQ 9 -1 MSGCR {What is that ?} DONE
stats $ANY $ANY IS !9 1 MSG STATP TABTO 20 PNAME !9
stats $ANY $ANY IS !9 2 MSG STATR TABTO 20 PNAME !9
stats $ANY $ANY IS !9 3 MSG STATO TABTO 20 PNAME !9
stats $ANY $ANY MSGCR DOT
stats $ANY $ANY -IS !9 IPLAYER DONE
stats $ANY $ANY PBIT !9 %wizard MSG {Wizard} TABTO 12
stats $ANY $ANY PBIT !9 %wizmode MSG {Wizmode} TABTO 12
stats $ANY $ANY PBIT !9 %seedark MSG {Seedark} TABTO 12
stats $ANY $ANY PBIT !9 %crippled MSG {Crippled} TABTO 12
stats $ANY $ANY PBIT !9 %blind MSG {Blind} TABTO 12
stats $ANY $ANY PBIT !9 %deaf MSG {Deaf} TABTO 12
stats $ANY $ANY PBIT !9 %dumb MSG {Dumb} TABTO 12
stats $ANY $ANY PBIT !9 %berk MSG {Berserk} TABTO 12
stats $ANY $ANY CR LDP 64 !9 PFLAGS2 BIT 64 imprisoned MSG {Imprisoned} TABTO 12
stats $ANY $ANY BIT 64 nosey MSG {Nosey} TABTO 12
stats $ANY $ANY BIT 64 converse MSG {Converse} TABTO 12
stats $ANY $ANY BIT 64 attached MSG {Attached} TABTO 12
stats $ANY $ANY BIT 64 imprisoned MSG {Imprisoned} TABTO 12
stats $ANY $ANY BIT 64 eyesclosed MSG {EyesClosed} TABTO 12
stats $ANY $ANY BIT 64 holdbreath MSG {Held breath} TABTO 12
stats $ANY $ANY CR DONE
;
;	Grind wheel controlling stuff
;
walk $ANY treadmill PARSE {turn treadmill} DONE
walk treadmill $ANY PARSE {turn treadmill} DONE
turn treadmill $ANY AT SMITHB LDP 64 !ME PFLAGS2 BIT 64 tread MSGCR {You are.} DONE
turn treadmill $ANY AT SMITHB MSGCR {You start turning the treadmill} LDP 64 !ME PFLAGS2 SET 64 tread SETP !ME PFLAGS2 !64 DONE
start treadmill $ANY AT SMITHB LDP 64 !ME PFLAGS2 BIT 64 tread MSGCR {You are.} DONE
start treadmill $ANY AT SMITHB MSGCR {You start turning the treadmill} LDP 64 !ME PFLAGS2 SET 64 tread SETP !ME PFLAGS2 !64 DONE
stop treadmill $ANY AT SMITHB LDP 64 !ME PFLAGS2 -BIT 64 tread MSGCR {You aren't turning it.} DONE
stop treadmill $ANY AT SMITHB MSGCR {You stop turning the treadmill} LDP 64 !ME PFLAGS2 RES 64 tread SETP !ME PFLAGS2 !64 DONE
grind $ANY $ANY -AT SMITHY MSGCR {How can you do that ?} DONE
grind $ANY $ANY EQ 9 -1 MSGCR {What is that ?} DONE
grind $ANY $ANY -IS !9 IOBJECT MSGCR {Don't be silly.} DONE
grind $ANY $ANY LD 64 0 DO 0
		  LDP 65 !64 PFLAGS2 BIT 65 tread JP 2
		  ADD 64 1 LT 64 !16 LOOP 0
		  MSGCR {The grinder is not spinning.} DONE
grind $ANY $ANY -OBIT !9 %weapon MSGCR {You can't grind that!} DONE
grind $ANY $ANY STATE !9 1 LDP 64 !9 ODAMAGE ADD 64 5 SETP !9 ODAMAGE !64 SETP !9 OBLUNT 0 DEC !9 MSG {You sharpen } PNAME !9 MSGCR {.} DONE
grind $ANY $ANY SETP !9 OBLUNT 0 MSG {You sharpen } PNAME !9 MSGCR {.} DONE
;
;	Eyes open/closing
;
open eyes $ANY LDP 64 !ME PFLAGS2 BIT 64 eyesclosed RES 64 eyesclosed SETP !ME PFLAGS2 !64 LDP 64 !ME PFLAGS RES 64 %blind SETP !ME PFLAGS !64 OK DONE
open eyes $ANY MSGCR {Your eyes are open.} DONE
close eyes $ANY LDP 64 !ME PFLAGS2 BIT 64 eyesclosed MSGCR {You have already closed your eyes.} DONE
close eyes $ANY PBIT !ME %blind MSGCR {You are blind, it will make no difference.} DONE
close eyes $ANY LDP 64 !ME PFLAGS2 SET 64 eyesclosed SETP !ME PFLAGS2 !64 LDP 64 !ME PFLAGS SET 64 %blind SETP !ME PFLAGS !64 OK DONE
;
;	Various item moving things
;
press button $ANY AT PASS2 ISAT SECRTDOOR2 PASS2 OK DONE
press button $ANY AT PASS2 PLACE SECRTDOOR2 PASS2 MSGCR {A section of the wall slides away to reveal a door.} DONE
move stone $ANY AT OLDCELLAR CALL 66 GT 64 1 STATE STONEBLOCK 1 MSGCR {You push the block back into the wall.} DEC STONEBLOCK SETR OLDCELLAR EWEST 0 SETR STOREROOM EEAST 0 DONE
move stone $ANY AT OLDCELLAR GT 64 1 STATE STONEBLOCK 0 MSGCR {You move the block to reveal a hole in the wall leading to the west.} INC STONEBLOCK SETR OLDCELLAR EWEST @STOREROOM SETR STOREROOM EEAST @OLDCELLAR DONE
move stone $ANY AT OLDCELLAR -GOT CROWBAR MSGCR {It's too heavy for you to move.} DONE
move stone crowbar AT OLDCELLAR GOT CROWBAR STATE STONEBLOCK 1 MSGCR {You push the block back into the wall.} DEC STONEBLOCK SETR OLDCELLAR EWEST 0 SETR STOREROOM EEAST 0 DONE
move stone crowbar AT OLDCELLAR GOT CROWBAR STATE STONEBLOCK 0 MSGCR {You move the block to reveal a hole in the wall leading to the west.} INC STONEBLOCK SETR OLDCELLAR EWEST @STOREROOM SETR STOREROOM EEAST @OLDCELLAR DONE
move barrel $ANY EQ 9 @BARRELDOOR STATE !9 1 DARK DEC BARRELDOOR2 DEC !9 MSGCR {You move the barrels around a bit.} DONE
move barrel $ANY EQ 9 @BARRELDOOR STATE !9 1 DEC BARRELDOOR2 DEC !9 MSGCR MVBARREL DONE
move barrel $ANY EQ 9 @BARRELDOOR DARK INC BARRELDOOR2 INC !9 MSGCR {You move the barrels around a bit.} DONE
move barrel $ANY EQ 9 @BARRELDOOR INC !9 INC BARRELDOOR2 MSGCR MVBACK DONE
move barrel $ANY EQ 9 @BARRELDOOR2 MSGCR MVWRONG DONE
move $ANY $ANY EQ 8 -1 MSGCR {Move what ?} DONE
move tomb $ANY EQ 8 @TOMB STATE TOMB 1 MSGCR {You shove at the tomb, and you are astounded when it moves.} DEC !8 SETP TOMBRM EDOWN @UTOMB DONE
move $ANY $ANY IS !8 IPLAYER PCNAME !8 MSGCR { doesn't want to be pushed around.} DONE
move $ANY $ANY MSG {You try moving } PNAME !8 MSGCR { but achieve nothing.} DONE
wind up rope AT WELLRM ISAT BUCKET WELL PLACE BUCKET WELLRM MSGCR {You wind the rope upwards and retrieve a bucket. The rope however is rotten and} MSGCR {useless.} INC WELL DONE
wind rope up AT WELLRM ISAT BUCKET WELL PLACE BUCKET WELLRM MSGCR {You wind the rope upwards and retrieve a bucket. The rope however is rotten and} MSGCR {useless.} INC WELL DONE
;
;	Extinguish a light source, + special cases
;
extinguish $ANY $ANY EQ 9 -1 MSGCR {I don't know what that is.} DONE
extinguish $ANY $ANY -IS !9 3 MSGCR {I don't understand.} DONE
extinguish hay $ANY GT FHAYBARNBURN 0 MSGCR {You burn yourself as you try to extinguish the roaring flames.} DONE
extinguish hay $ANY LT FHAYBARNBURN 1 MSGCR {It's not burning!} DONE
extinguish $ANY $ANY OBIT !9 %weapon OBIT !9 %litall MSGCR {It doesn't want to go out.} DONE
extinguish door $ANY MSGCR {I don't understand.} DONE
extinguish $ANY $ANY OBIT !9 %litall MSGCR {You can't extinguish that.} DONE
extinguish $ANY $ANY -OBIT !9 3 PNAME !9 MSGCR NOTLIT DONE
extinguish $ANY $ANY -STATE !9 0 PNAME !9 MSGCR NOTLIT DONE
extinguish $ANY $ANY SETSTATE !9 1 OK DONE
;light $ANY $ANY PRINT !7 MSG DOT PRINT !8 MSG DOT PRINT !9 MSGCR DOT PRINT !4 MSG DOT PRINT !1 MSGCR DOT
;
;	Setting fire to things, including specia cases
;
light hay $ANY 	-AT HAYBARN MSGCR {What hay?} DONE
		EQ 12 -1 MSGCR FROMWHAT DONE
		-OBIT !12 %litall -OBIT !12 %lit0 PNAME !12 MSGCR NOTLIT DONE
		EQ FHAYBARNBURN -1 MSGCR {I think the welsh already beat you to it!} DONE
		GT FHAYBARNBURN 0 MSGCR {It's already burning quite happily.} DONE
		ADD FHAYBARNBURN 1 OK DONE
light oil $ANY  HERE ROCKBOWL LD 9 @OIL
light $ANY $ANY EQ 9 -1 MSGCR {I don't know what that is.} DONE
light $ANY $ANY IS !9 IPLAYER MSGCR {No actually they are quite heavy!} DONE
light $ANY $ANY -IS !9 3 MSGCR {You can't light that!} DONE
; trap doors.. doors use lit0 to do rooms lighting when door opens
; not as ignitables
light $ANY door MSGCR {You can't do that!} DONE
light door $ANY MSGCR {You can't light that!} DONE
light $ANY $ANY EQ 12 -1 MSGCR FROMWHAT DONE
light $ANY $ANY -OBIT !12 %litall -OBIT !12 %lit0 PNAME !12 MSGCR NOTLIT DONE
light $ANY $ANY -STATE !12 0 -OBIT !12 %litall PNAME !12 MSGCR NOTLIT DONE
light $ANY $ANY EQ 9 @ENCMESSAGE PLACE ENCMESSAGE ENCMESSAGE MSGCR {It burns up.} DONE
light $ANY $ANY -EQ 9 @OIL -OBIT !9 3 MSGCR {You can't light that.} DONE
light $ANY $ANY STATE !9 0 PNAME !9 MSGCR ISALRLIT DONE
light $ANY $ANY EQ 9 @LAMP STATE !9 2 MSGCR {The lamp is empty.} DONE
light oil  $ANY HERE ROCKBOWL PLACE OIL OILW SETSTATE OIL 0 MSGCR {As your naked flame touches the oil there is a massive explosion.} MSGCR {You are blasted by burning oil and die horribly.} LDO 64 OIL OFLAGS SET 64 %litall SETO OIL OFLAGS !64 EXIT DONE
light $ANY $ANY SETSTATE !9 0 OK DONE
;
;	Obtain the value of something
;
value $ANY $ANY EQ 9 -1 MSGCR {I don't know what that is.} DONE
value $ANY $ANY -IS !9 3 MSGCR {You can only value objects.} DONE
value $ANY $ANY LDO 64 !9 7 Z 64 PCNAME !9 MSGCR { is worthless.} DONE
value $ANY $ANY MSG ITWORTH PRINT !64 MSGCR ITWORTH2 DONE
;
;	Eat (including drink) something
;
eat $ANY $ANY LDP 64 !ME PLOC RBIT !64 %underwater MSGCR {You can't eat or drink underwater.} DONE
eat $ANY $ANY EQ 9 -1 MSGCR {I don't know what that is.} DONE
eat $ANY $ANY EQ 9 @FOUNT MSGCR FOUNTDRINK DONE
eat puddle $ANY MSGCR {Yuk, I'd rather drink lager!} DONE
eat $ANY $ANY -IS !9 3 MSGCR {You can't eat that!} DONE
eat $ANY $ANY EQ 9 @POTION PLACE !9 DUMP MSGCR {You feel very strange.}
eat $ANY $ANY EQ 9 @POTION PBIT !ME %male LDP 64 !ME PFLAGS RES 64 %male SETP !ME PFLAGS !64 MSGCR {Your sex is now female.} DONE
eat $ANY $ANY EQ 9 @POTION LDP 64 !ME PFLAGS SET 64 %male SETP !ME PFLAGS !64 MSGCR {Your sex is now male.} DONE
eat $ANY $ANY -OBIT !9 %food MSGCR {You can't eat that!} DONE
eat $ANY $ANY LDP 64 !ME PSTAM LDO 65 !9 OFOOD ADD 64 !65 SETP !ME PSTAM !64 PLACE !9 DUMP OK DONE
buy drink $ANY AT INN HERE INNKEEPER MSGCR {"We don't serve your sort here" sneers the Innkeeper.} DONE
buy drink $ANY AT INN HERE TROLL MSGCR {The troll laughs at you and smiles evilly.} DONE
buy drink $ANY AT INN MSGCR {The bar staff seem to be out.} DONE
;
;	Select a current weapon
;
wield $ANY $ANY EQ 7 -1 -EQ 9 -1 MSGCR WLDNCAR DONE
wield $ANY $ANY EQ 7 -1 MSGCR WLDWOT DONE
wield $ANY $ANY -OBIT !7 %weapon MSGCR NOTWPN DONE
wield $ANY $ANY LDP 64 !ME PWPN EQ 64 !7 MSGCR {You are already wielding it.} DONE
wield $ANY $ANY -EQ 64 -1 MSG {You stop wielding } PNAME !64 CR
wield $ANY $ANY SETP !ME PWPN !7 MSG {You wield } PNAME !7 MSGCR {.} DONE
;
;	Hitting things
;
ring gong $ANY EQ 8 @GONG STATE RAFTMK2 1 DOACT CHARON {rows back across the lake} 25 PLACE CHARON UNBCH DOACT CHARON {rows the boat away.} 25 PLACE RAFTMK1 RIVCAV SETR RIVCAV EEAST @RAFTRM SETR UNBCH EWEST 0 SETR RAFTRM EEAST 0
ring gong $ANY EQ 8 @GONG STATE RAFTMK2 1 DEC RAFTMK2 PLACE CHARON RAFTRM DOACT !ME {strikes the gong.} 25 DOACT GONG {chime fades away.} 25 LD 64 &{A boat comes slowly into view, rowed by a strange ferryman.} CALL 32 SETR RAFTRM EWEST @RIVCAV DONE
ring gong $ANY EQ 8 @GONG MSGCR {Bong!} DONE
kill gong $ANY EQ 8 @GONG STATE RAFTMK2 1 DOACT CHARON {rows back across the lake} 25 PLACE CHARON UNBCH DOACT CHARON {rows the boat away.} 25 PLACE RAFTMK1 RIVCAV SETR RIVCAV EEAST @RAFTRM SETR UNBCH EWEST 0 SETR RAFTRM EEAST 0
kill gong $ANY EQ 8 @GONG STATE RAFTMK2 1 DEC RAFTMK2 PLACE CHARON RAFTRM DOACT !ME {strikes the gong.} 25 DOACT GONG {chime fades away.} 25 LD 64 &{A boat comes slowly into view, rowed by a strange ferryman.} CALL 32 SETR RAFTRM EWEST @RIVCAV DONE
kill gong $ANY EQ 8 @GONG MSGCR {Bong!} DONE
;
;	Breaking down door
;
kill door $ANY EQ 8 -1 MSGCR {What door!} DONE
kill door $ANY LDO 64 !8 OSTR EQ 64 -1 MSGCR {The door is already wrecked.} DONE
kill door $ANY -EQ 10 -1 -OBIT !10 %weapon MSGCR NOTWPN DONE
kill door $ANY -EQ 10 -1 SETP !ME 17 !10
kill door $ANY LDP 64 !ME 17 EQ 64 -1 MSGCR {You beat on the door.} LD 64 &{Someone knocks on the door.} CALL 60 DONE
kill door $ANY LD 70 !64 LD 71 10 CALL 38
kill door $ANY LDO 65 !64 ODAMAGE LDO 66 !8 ODOORREF LDO 67 !8 OSTR EQ 67 0 MSG {You hit } PNAME !8 MSG { with } PNAME !64 MSGCR {.} LD 64 &{Someone bangs on the door.. very hard indeed} CALL 60 DONE
kill door $ANY SUB 67 !65 LD 68 !8 ADD 68 !66 GT 67 0 SETO !8 OSTR !67 SETO !68 OSTR !67 MSG {You hit } PNAME !8 MSG { with } PNAME !64 MSGCR {.} LD 64 &{Someone bangs on the door.. very hard indeed} CALL 60 DONE
kill door $ANY SETSTATE !8 0 SETSTATE !68 0 MSGCR {The door bursts open.} SETO !8 OSTR -1 SETO !68 OSTR -1 LD 64 &{The door bursts open!} CALL 60 DONE
;
;	Combat stuff
;
kill gorgon $ANY EQ 8 -1 AT GORGRM MSGCR {You wander around but can find nothing.} DONE
kill $ANY $ANY EQ 8 -1 MSGCR WHODAT DONE
kill $ANY $ANY EQ FPEACE 1 MSGCR {You don't feel like violence, just stay cool and relax.} DONE
kill crier $ANY -ARCH !ME EQ 8 @CRIER MSGCR {Remembering town criers are traditionally powerful mages you decide not to.} DONE
kill parrot $ANY -ARCH !ME EQ 8 @PARROT MSGCR {The parrot squarks angrily and flutters out of reach.} DONE
kill innkeeper $ANY -ARCH !ME EQ 8 @INNKEEPER PLACE TROLL INN DOACT TROLL {steps into your way.} 25 DOACT INNKEEPER {has left} 25 PLACE INNKEEPER DUMP LD 8 @TROLL
kill ferryman $ANY -ARCH !ME EQ 8 @CHARON DOTO CHARON {reaches out a gnarled bony hand and makes a strange symbol. A massive bolt of energy blasts} 10 !ME PLACE !ME DUMP EXIT DONE
kill guru $ANY -ARCH !ME EQ 8 @GURU MSGCR GURUKILL MFORMAT {raises his arm towards %N0 and %N0 shrinks into oblivion.} LOG { } { } !ME !ME !ME PLACE !ME DUMP DOACT GURU LOG 25 EXIT DONE
kill $ANY $ANY LDP 64 !ME PFIGHT -EQ 64 -1 MSGCR FIGHTING DONE
kill $ANY $ANY -IS !8 1 MSG KILLNPL PNAME !8 MSGCR KILLNPL2 DONE
kill $ANY $ANY EQ 8 !ME MSGCR SILLYKILL DONE
; weapon selector
kill $ANY $ANY -EQ 10 -1 -OBIT !10 %weapon MSGCR NOTWPN DONE
;
kill $ANY $ANY -EQ 10 -1 SETP !ME 17 !10
kill $ANY $ANY SETP !ME PFIGHT !8 SETP !8 PFIGHT !ME DOTO !ME ATTACK 1 !8 MFORMAT {%N0 and %N1 have started fighting.} LOG { } { } !ME !8 !ME LD 64 &LOG CALL 39 DONE
;;	PRINT !13 PRINT !14 CR DONE
;
;	Sillies
;
kick bucket $ANY LDP 64 !ME 10 -EQ 64 -1 MSGCR {Not in a fight.} DONE
kick bucket $ANY OK EXIT DONE
panic $ANY $ANY MSGCR {You run around screaming.} DOACT !ME {runs around screaming.} 25 DONE
bug $ANY $ANY MFORMAT {%N0: %m0} LOG U1 { } !ME !ME !ME APPEND BUGFILE LOG MSGCR BUGMSG DONE
;
;	Open/Close/Lock/Unlock commands
;
open $ANY $ANY EQ 9 -1 MSGCR {I don't know what that is.} DONE
close $ANY $ANY EQ 9 -1 MSGCR {I don't know what that is.} DONE
lock $ANY $ANY EQ 9 -1 MSGCR {I don't know what that is.} DONE
unlock $ANY $ANY EQ 9 -1 MSGCR {I don't know what that is.} DONE
open door $ANY STATE !9 0 MSGCR DRISOP DONE
open door $ANY STATE !9 2 MSGCR {The door is locked.} DONE
close door $ANY LDO 64 !9 OSTR EQ 64 -1 MSGCR {The door is wrecked.} DONE
close door $ANY STATE !9 1 MSGCR DRISCL DONE
close door $ANY STATE !9 2 MSGCR {The door is locked.} DONE
open door $ANY DEC !9 OK CALL 11 LD 64 &{Someone opens the door.} CALL 60 DONE
close door $ANY INC !9 OK CALL 11 LD 64 &{Someone closes the door.} CALL 60 DONE
lock door $ANY LDO 64 !9 OSTR EQ 64 -1 MSGCR {The door is wrecked.} DONE
lock door $ANY STATE !9 2 MSGCR {It is already locked.} DONE
lock door $ANY EQ 9 @TDOOR5 -GOT KEY MSGCR {You have no key that fits.} DONE
lock door $ANY EQ 9 @TDOOR5 SETSTATE !9 2 CALL 11 LD 64 &{Someone locks the door.} CALL 60 OK DONE
lock door $ANY EQ 9 @TDOOR6 -GOT KEY MSGCR {You have no key that fits.} DONE
lock door $ANY EQ 9 @TDOOR6 SETSTATE !9 2 CALL 11 LD 64 &{Someone locks the door.} CALL 60 OK DONE
lock door $ANY EQ 9 @BARNDOOR1 -GOT BARNKEY MSGCR {You have no key that fits.} DONE
lock door $ANY EQ 9 @BARNDOOR1 SETSTATE !9 2 CALL 11 LD 64 &{Someone locks the door.} CALL 60 OK DONE
lock door $ANY EQ 9 @BARNDOOR2 -GOT BARNKEY MSGCR {You have no key that fits.} DONE
lock door $ANY EQ 9 @BARNDOOR2 SETSTATE !9 2 CALL 11 LD 64 &{Someone locks the door.} CALL 60 OK DONE
unlock door $ANY -STATE !9 2 MSGCR {It is not locked.} DONE
unlock door $ANY EQ 9 @TDOOR5 -GOT KEY MSGCR {You have no key that fits.} DONE
unlock door $ANY EQ 9 @TDOOR5 SETSTATE !9 1 CALL 11 OK DONE
unlock door $ANY EQ 9 @TDOOR6 -GOT KEY MSGCR {You have no key that fits.} DONE
unlock door $ANY EQ 9 @TDOOR6 SETSTATE !9 1 CALL 11 OK DONE
unlock door $ANY EQ 9 @BARNDOOR1 -GOT BARNKEY MSGCR {You have no key that fits.} DONE
unlock door $ANY EQ 9 @BARNDOOR1 SETSTATE !9 1 CALL 11 OK DONE
unlock door $ANY EQ 9 @BARNDOOR2 -GOT BARNKEY MSGCR {You have no key that fits.} DONE
unlock door $ANY EQ 9 @BARNDOOR2 SETSTATE !9 1 CALL 11 OK DONE
lock $ANY $ANY MSGCR {You can't lock that.} DONE
unlock $ANY $ANY MSGCR {You can't unlock that.} DONE
open $ANY $ANY -IS !9 3 MSGCR {You can't open that!} DONE
open $ANY $ANY obit !9 %opens STATE !9 0 MSGCR {It is already open.} DONE
open $ANY $ANY obit !9 %opens STATE !9 2 MSGCR {It is locked.} DONE
open $ANY $ANY EQ 9 @COFFIN -GOT CRUCIFIX HERE VAMPYRE MSGCR {The vampyre stands between you and the coffin.} DONE
open $ANY $ANY obit !9 %opens DEC !9 OK DONE
open $ANY $ANY MSGCR NOOPEN DONE
close $ANY $ANY -IS !9 3 MSGCR {You can't close that!} DONE
close $ANY $ANY obit !9 %opens -STATE !9 0 MSGCR {It is already closed.} DONE
close $ANY $ANY obit !9 %opens inc !9 OK DONE
close $ANY $ANY MSGCR NOCLOSE DONE
;
;	Some misc commands.
;
zap $ANY $ANY PBIT !ME %wizmode EQ 13 -1 MSGCR {But who do you want to blast into a million pieces.} DONE
zap $ANY $ANY PBIT !ME %wizmode -ARCH !ME ARCH !13 MSGCR {The spell reflects.} LD 13 !0
zap $ANY $ANY PBIT !ME %wizmode LD 67 !ME LD 0 !13 DOACT !ME {is blasted into dust.} 2 MSGCR {You have been blasted into a million pieces.} PLACE !ME DUMP CALL 17 EXIT LD 0 !67 OK DONE
who $ANY $ANY CALL 10 DONE
vis $ANY $ANY ARCH !ME SETP !ME 6 0 OK DOACT !ME {suddenely appears!} 25 DONE
invis $ANY $ANY ARCH !ME DOACT !ME {vanishes!} 25 LDP 64 !ME 2 SETP !ME 6 !64 OK DONE
;
;	Various special exits
;
climb up fire AT MEETRM STATE FIRE1 0 MSGCR {You are not fireproof!} DONE
climb up fire AT MEETRM DOACT !ME {climbs up the chimney} 25 PLACE !ME CHIMNEY DOACT !ME {arrives} 25 LOOK DONE
enter coffin $ANY HERE COFFIN STATE COFFIN 1 MSGCR {The coffin is closed.} DONE
enter coffin $ANY HERE COFFIN -CANPUT !ME COFFIN MSGCR {You will not fit into the coffin.} DONE
enter coffin $ANY HERE COFFIN DOACT !ME {climbs into the coffin.} 25 PLACE !ME COFFIN DOACT !ME {climbs into the coffin.} 25 LOOK DONE
enter tomb $ANY AT GRAVE2 PARSE {e} DONE
climb $ANY coffin HERE COFFIN STATE COFFIN 1 MSGCR {The coffin is closed.} DONE
climb $ANY coffin HERE COFFIN -CANPUT !ME COFFIN MSGCR {You will not fit into the coffin.} DONE
climb $ANY coffin HERE COFFIN DOACT !ME {climbs into the coffin.} 25 PLACE !ME COFFIN DOACT !ME {climbs into the coffin.} 25 LOOK DONE
enter fire $ANY AT MEETRM STATE FIRE1 0 MSGCR {You are not fireproof!} DONE
enter fire $ANY AT MEETRM DOACT !ME {climbs up the chimney} 25 PLACE !ME CHIMNEY DOACT !ME {arrives} 25 LOOK DONE
enter pentacle $ANY AT TCENTRE PARSE {n} DONE
out $ANY $ANY AT PENTACLE PARSE {s} DONE
out $ANY $ANY AT COFFIN STATE COFFIN 1 MSGCR {The coffin lid is too heavy to lift from the inside.} DONE
out $ANY $ANY AT COFFIN DOACT !ME {climbs out of the coffin.} 25 LDO 64 COFFIN OLOC PLACE !ME !64 DOACT !ME {climbs out of the coffin.} 25 LOOK DONE
get $ANY raft AT RIVCAV STATE RAFTMK2 0 PARSE {e} DONE
get $ANY raft AT UNBCH STATE RAFTMK2 1 PARSE {w} DONE
get $ANY raft AT RAFTRM PARSE {out} DONE
enter raft $ANY AT RIVCAV STATE RAFTMK2 0 PARSE {e} DONE
enter raft $ANY AT UNBCH STATE RAFTMK2 1 PARSE {w} DONE
out $ANY $ANY AT RAFTRM STATE RAFTMK2 0 PARSE {w} DONE
out $ANY $ANY AT RAFTRM STATE RAFTMK2 1 PARSE {e} DONE
out $ANY $ANY LD 64 13 CALL 8 DONE
;
; Code for enter xxxx here for places which match adj/no
;
in $ANY $ANY LD 64 2 LDP 65 !ME PLOC
	-IS !65 IROOM MSGCR {You can't go that way.} DONE
	DO 0
		LDR 66 !65 !64 GETWORDS !66 67 68
		EQ 67 -1 EQ 68 VNOUN1 CALL 8 DONE
		EQ 67 VADJ1 EQ 68 VADJ1 CALL 8 DONE
		ADD 64 1 LT 64 8 LOOP 0
	LD 64 12 CALL 8 DONE
;
;	Where does it go
;
exits $ANY $ANY DARK MSGCR TISDARK DONE
exits $ANY $ANY AT COFFIN MSG {Out         :       } LDO 64 COFFIN OLOC PCNAME !64 CR DONE
exits $ANY $ANY LDP 64 !ME 1 LD 66 0
exits $ANY $ANY AT PASS2 -HERE SECRTDOOR2 JP 1
exits $ANY $ANY LDR 65 !64 2 GT 65 0 MSG EXNMN PNAME !65 LD 66 1 CR
; Hide the barrel secret exit
exits $ANY $ANY AT CELLAR2 STATE BARRELDOOR 1 JP 1
exits $ANY $ANY LDR 65 !64 3 GT 65 0 MSG EXNME PNAME !65 LD 66 1 CR
exits $ANY $ANY LDR 65 !64 4 GT 65 0 MSG EXNMS PNAME !65 LD 66 1 CR
exits $ANY $ANY LDR 65 !64 5 GT 65 0 MSG EXNMW PNAME !65 LD 66 1 CR
exits $ANY $ANY LDR 65 !64 6 GT 65 0 MSG EXNMU PNAME !65 LD 66 1 CR
exits $ANY $ANY LDR 65 !64 7 GT 65 0 MSG EXNMD PNAME !65 LD 66 1 CR
exits $ANY $ANY LDR 65 !64 12 GT 65 0 MSG EXNMIN PNAME !65 LD 66 1 CR
exits $ANY $ANY LDR 65 !64 13 GT 65 0 MSG EXNMOUT PNAME !65 LD 66 1 CR
exits $ANY $ANY Z 66 MSGCR {You can see no exits.} DONE
exits $ANY $ANY DONE
;
;	Adjustments for the bed
;
get $ANY bed EQ 8 @STRAWBED PARSE {lie on bed} DONE
get bed $ANY EQ 8 @STRAWBED PARSE {lie on bed} DONE
look $ANY bed AT FARMBED STATE STRAWBED 2 MSGCR {You can't see anything under it, it's all smashed.} DONE
look $ANY bed AT FARMBED LD 12 @UNDRBED
;
;	Looking into items
;
look $ANY $ANY -EQ 12 -1 -IS !12 3 MSGCR {How can you look in that ?} DONE
look $ANY $ANY -EQ 12 -1 -OBIT !12 %container MSGCR {How can you look in that ?} DONE
look $ANY $ANY -EQ 12 -1 OBIT !12 %opens -STATE !12 0 MSGCR {It is closed.} DONE
look $ANY $ANY -EQ 12 -1 DARK MSGCR {It is dark, you can't see!} DONE
look $ANY $ANY -EQ 12 -1 PCNAME !12 MSG { contains } LOBJS !12 MSGCR { } DONE
look $ANY $ANY PBIT !ME %brief LDP 64 !ME PFLAGS RES 64 %brief SETP !ME PFLAGS !64 LOOK LDP 64 !ME PFLAGS SET 64 %brief SETP !ME PFLAGS !64 DONE
look $ANY $ANY LOOK DONE
lie on bed AT FARMBED STATE STRAWBED 0 MSGCR {Awww, ooo it's hot!} DONE
lie on bed AT FARMBED STATE STRAWBED 3 MSGCR {As you get onto the bed, it breaks under your weight!} SETSTATE STRAWBED 2 DONE
lie on bed AT FARMBED MSGCR {But it's all smashed up!} DONE
;
;	general purpose GET/GET FROM
;
get all $ANY EQ 12 -1 DARK MSGCR {It is dark, you cannot see what is here.} DONE
get all $ANY JP 2
get $ANY $ANY EQ 12 -1 EQ 8 -1 HERE SHELF LD 12 @SHELF
get $ANY $ANY EQ 12 -1 EQ 8 -1 HERE FARMMUD LD 12 @FARMMUD
get $ANY $ANY EQ 12 @STRAWBED LD 12 @UNDRBED
get $ANY $ANY -EQ 12 -1 -IS !12 3 MSGCR {You can't take things from that.} DONE
get $ANY $ANY -EQ 12 -1 -OBIT !12 %container MSGCR {You can't take things from that.} DONE
get $ANY $ANY -EQ 12 -1 OBIT !12 %opens -STATE !12 0 MSGCR {It is not open.} DONE
get $ANY $ANY -EQ 12 -1 LD 8 -1 NEXTMATCH !12 !4 !1 -1 8
get all $ANY EQ 12 -1 LDP 64 !ME PLOC NEIL !64 -1 8
get all $ANY -EQ 12 -1 NEIL !12 -1 8
get all $ANY EQ 8 -1 DONE
get all $ANY -EQ 12 -1 -ISAT !8 !12 JP 9
get all $ANY EQ 12 -1 -HERE !8 JP 8
get all $ANY -OBIT !8 %canget JP 7
get all $ANY IS !8 1 JP 6
get $ANY $ANY EQ 8 -1 MSGCR {I don't understand what you are trying to take.} DONE
get $ANY $ANY IS !8 1 MSGCR {They don't want to be taken.} DONE
get $ANY $ANY -EQ 12 -1 LDP 64 !ME PLOC PLACE !8 !64
get $ANY $ANY -CANPUT !8 !ME MSGCR {You can't carry any more.} DONE
get $ANY $ANY OBIT !8 %canget GET !8 MSG {You take } PNAME !8 MSGCR {.} JP 1
get $ANY $ANY MSGCR {You can't take that!} DONE
get all $ANY -EQ 12 -1 NEIL !12 !8 8 JP -10
get all $ANY EQ 12 -1 LDP 64 !ME PLOC NEIL !64 !8 8 JP -11
get $ANY $ANY DONE
;
;	Dropping items
;
drop oil lamp PRES LAMP HERE ROCKBOWL PARSE {fill lamp with oil} DONE
drop $ANY $ANY EQ 12 @STRAWBED LD 12 @UNDRBED
drop all $ANY LD 7 -1 NEIL !ME !7 7
drop $ANY $ANY EQ 7 -1 MSGCR DRPWHAT DONE
drop $ANY $ANY -EQ 12 -1 -IS !12 IOBJECT MSGCR {You can't put something in that.} DONE
drop $ANY $ANY -EQ 12 -1 -OBIT !12 %container MSGCR {You can't put something in that.} DONE
drop $ANY $ANY -EQ 12 -1 OBIT !12 %opens -STATE !12 0 MSGCR {It is shut} DONE
drop all $ANY -GOT !7 JP 13
drop $ANY $ANY OBIT !7 %worn MSG {You take off } PNAME !7 MSGCR {.}
drop $ANY $ANY EQ 12 @WELL EQ 7 @COIN MSGCR {As the coin disappears with a splash into the water, a hand seems to shimmer} MSGCR {out of the air and solidify next to you.} PLACE COIN DUMP LDP 64 !ME PLOC PLACE HAND !64 JP 7
drop $ANY $ANY EQ 12 @WELL PCNAME !7 MSGCR { vanishes down the well, and moments later there is a splash.} PLACE !7 DUMP JP 6
drop all $ANY EQ 7 !12 JP 8
drop $ANY $ANY -EQ 12 -1 -CANPUT !7 !12 MSGCR {It won't fit.} DONE
drop $ANY $ANY EQ 7 !12 MSGCR {An interesting excerise in warped space.} DONE
drop $ANY $ANY EQ 12 @SHELF PLACE !7 !12 MSG {You put } PNAME !7 MSG { on } PNAME !12 MSGCR {.} JP 1
drop $ANY $ANY -EQ 12 -1 PLACE !7 !12 MSG {You put } PNAME !7 MSG { in } PNAME !12 MSGCR {.}
drop $ANY $ANY AT HAYBARN OBIT !7 %lit0 STATE !7 0 EQ FHAYBARNBURN 0 LD FHAYBARNBURN 1
drop $ANY $ANY EQ 12 -1 AT SOUTHYARD LDO 64 !7 OSIZE LT 64 11 MSG DROPIT PNAME !7 MSGCR {, which sinks into the mud.} PLACE !7 FARMMUD JP 2
drop $ANY $ANY EQ 12 -1 DROP !7 MSG DROPIT PNAME !7 MSGCR {.}
drop $ANY $ANY EQ 12 -1 LDP 64 !ME 1 RBIT !64 7 LDO 65 !7 7 LDP 66 !ME 3 ADD 66 !65 SETP !ME 3 !66 PLACE !7 DUMP
drop all $ANY NEIL !ME !7 7 JP -13
drop $ANY $ANY DONE
;
;	Some general command stuff
;
i $ANY $ANY MSG {You are carrying } LOBJS !ME CR DONE
quit $ANY $ANY LDP 64 !ME 10 -EQ 64 -1 MSGCR {Not in a fight.} DONE
quit $ANY $ANY MSGCR {Goodbye.} EXIT DONE
cr $ANY $ANY -CR DONE
say $ANY $ANY LDP 64 !ME PFLAGS2 BIT 64 holdbreath MSGCR {Not while youre holding your breath you cant.} DONE
say $ANY $ANY LDP 64 !ME PLOC RBIT !64 %underwater MSGCR {Gurgle gurgle glug glug.} DONE
say $ANY $ANY CALL 9 DONE
save $ANY $ANY LDP 64 !ME 5 SETP !ME 5 -1 save SETP !ME 5 64 done
shout $ANY $ANY -EQ FHANGOVER 0 MSGCR {Sorry one of the Lords has a hangover, so no shouting.} DONE
shout $ANY $ANY LDP 64 !ME PFLAGS2 BIT 64 holdbreath MSGCR {Not while youre holding your breath you cant.} DONE
shout $ANY $ANY LDP 64 !ME PLOC RBIT !64 %underwater MSGCR {Gurgle gurgle glug glug.} DONE
shout $ANY $ANY CALL 12 DONE
rooms $ANY $ANY PBIT !ME %wizmode CALL 13 DONE
dir $ANY $ANY PBIT !ME %wizmode CALL 14 DONE
;
;	Spying on people
;
snoop $ANY $ANY PBIT !ME %wizmode EQ 13 -1 MSGCR WHODAT DONE
snoop $ANY $ANY PBIT !ME %wizmode -LT 13 !16 MSGCR {I'm sorry, I don't understand.} DONE
snoop $ANY $ANY PBIT !ME %wizmode ARCH !13 MSGCR {You can't snoop on him.} DONE
snoop $ANY $ANY PBIT !ME %wizmode LDP 64 !ME 5 -EQ 64 -1 MSG STPSNP PNAME !64 MSGCR DOT
snoop $ANY $ANY PBIT !ME %wizmode SETP !ME 5 !13 MSG STRSNP PNAME !13 MSGCR DOT DONE
unsnoop $ANY $ANY PBIT !ME %wizmode LDP 64 !ME 5 EQ 64 -1 MSGCR NTSNP DONE
unsnoop $ANY $ANY PBIT !ME %wizmode SETP !ME 5 -1 MSG STPSNP PNAME !64 MSGCR DOT DONE
;
;	Set states of items
;
set $ANY $ANY -EQ 9 NOITEM LD 13 !9
set $ANY $ANY PBIT !ME %wizmode EQ 13 -1 MSGCR WHATSET DONE
set $ANY $ANY PBIT !ME %wizmode -NUMOF U2 64 MSGCR WHATSETTO DONE
set $ANY $ANY PBIT !ME %wizmode -IS !13 3 MSGCR NOTOBJ DONE
set $ANY $ANY PBIT !ME %wizmode LT 64 0 MSGCR SILLYSET DONE
set $ANY $ANY PBIT !ME %wizmode LDO 65 !13 2 DIV 65 16 LT 64 !65 SETSTATE !13 !64 OK DONE
set $ANY $ANY PBIT !ME %wizmode MSGCR SILLYSET DONE
set $ANY $ANY MSGCR SETJELLY DONE
;
;	Tell peoople messages
;
tell $ANY $ANY LDP 64 !ME PFLAGS2 BIT 64 holdbreath MSGCR {Not while youre holding your breath you cant.} DONE
tell $ANY $ANY LDP 64 !ME PLOC RBIT !64 %underwater MSGCR {Gurgle gurgle glug glug.} DONE
tell $ANY $ANY EQ 8 -1 LD 8 !13
tell $ANY $ANY EQ 8 -1 MSGCR WHODAT DONE
tell $ANY $ANY -CANSEE !ME !8 MSGCR WHODAT DONE
tell $ANY $ANY -IS !8 1 MSGCR WHATTELL DONE
tell $ANY $ANY EQ 8 !ME MSGCR TELLSELF DONE
tell $ANY $ANY PBIT !8 %deaf DONE
tell $ANY $ANY PBIT !8 %asleep LD 64 !ME LD 0 !8 MSGCR {You wake up.} LDP 65 !ME PFLAGS RES 65 %asleep SETP !ME PFLAGS !65 LD ME !64
tell $ANY $ANY LD 64 !ME LD 0 !8 CANSEE !ME !64 PNAME !64
tell $ANY $ANY -CANSEE !ME !64 MSG {Someone}
tell $ANY $ANY MSG TELLSU MSG U2 MSGCR QUOTEDOT DONE
;
;	General emotion function
;
emote $ANY $ANY PBIT !ME %wizmode DOACT !ME U1 1 DONE
emote $ANY $ANY MFORMAT {%n0} LOG {} {} !ME !ME !ME MFORMAT {: %n0} LOG2 {} {} !ME !ME !ME
emote $ANY $ANY SETNAME !ME LOG2 DOACT !ME U1 1 SETNAME !ME LOG DONE
;
;	Arch wizard people removing command
;
begone $ANY $ANY ARCH !ME EQ 13 -1 MSGCR WHODAT DONE
begone $ANY $ANY ARCH !ME -LT 13 !16 PLACE !13 !13 DONE
begone $ANY $ANY ARCH !ME LD 0 !13 MSGCR U2 EXIT DONE
;
;	Archwizard people invoking command
;
summon $ANY $ANY EQ 8 -1 LD 8 !13
summon $ANY $ANY PBIT !ME %wizmode EQ 8 -1 MSGCR SUMWOT DONE
summon $ANY $ANY PBIT !ME %wizmode EQ 8 !ME MSGCR SUMSELF DONE
summon $ANY $ANY PBIT !ME %wizmode DOACT !8 VANISH 25 PLACE !8 !ME
summon $ANY $ANY PBIT !ME %wizmode IS !8 1 LDP 65 !ME 1 PLACE !8 !65 DOACT !8 APPEAR 25 LD 65 !ME LD 0 !8 MSGCR TRANSP LOOK LD 0 !65 DONE
summon $ANY $ANY PBIT !ME %wizmode PCNAME !8 MSGCR APPEARINH DONE
;
;	Transfer items freely around the game
;
place $ANY $ANY ARCH !ME EQ 8 -1 LD 8 !13
place $ANY $ANY ARCH !ME EQ 8 -1 MSGCR WHATTELE DONE
place $ANY $ANY ARCH !ME EQ 14 -1 MSGCR WHERETO DONE
place $ANY $ANY ARCH !ME IS !8 1 -IS !14 2 MSGCR TELEROOM DONE
place $ANY $ANY ARCH !ME DOACT !8 VANISH 25 PLACE !8 !14 DOACT !8 APPEAR 25 IS !8 1 LD 65 !ME LD 0 !8 MSGCR TRANSP LOOK LD 0 !65
place $ANY $ANY ARCH !ME DONE
;
;	Help system (so far)
;
help emotions $ANY MSGCR EMOHELP DONE
help rules $ANY PARSE {rules} DONE
help credits $ANY PARSE {credits} DONE
help combat $ANY MSGCR COMBATHELP DONE
help playing $ANY MSGCR PLAYHELP DONE
help creation $ANY ARCH !ME MSGCR MAKEHELP DONE
help wizard $ANY PBIT !ME %wizmode MSGCR WIZHELP DONE
help lord $ANY ARCH !ME MSGCR ARCHHELP DONE
help $ANY $ANY -EQ 9 -1 -LT 9 !16 MSGCR {Huh ?} DONE
help $ANY $ANY EQ 9 !ME MSGCR {Don't be silly.} DONE
help $ANY $ANY -EQ 9 -1 LDP 64 !ME PHELPING -EQ 64 -1 MSG {You stop helping } PNAME !64 MSGCR {.}
help $ANY $ANY -EQ 9 -1 SETP !ME PHELPING !9 OK DONE
help $ANY $ANY MSGCR HELP
help $ANY $ANY PBIT !ME %wizmode MSG {WIZARD		}
help $ANY $ANY ARCH !ME MSG {LORD		CREATION}
help $ANY $ANY CR DONE
;
;	Giving items to people
;
give $ANY $ANY -EQ 9 -1 -IS !9 IPLAYER LD 8 !11 LD 10 !7
give $ANY $ANY EQ 8 -1 MSGCR WHODAT DONE
give $ANY $ANY EQ 10 -1 MSGCR WHATGIVE DONE
give $ANY $ANY EQ 8 !ME MSGCR GIVESELF DONE
give $ANY $ANY -IS !8 1 MSGCR SILLYGIVE DONE
give $ANY $ANY EQ 8 @CHARON LDO 64 !10 OVALUE LT 64 5 MSG {The ferryman seems uninterested in } PNAME !10 MSGCR {.} DONE
give $ANY $ANY EQ 8 @CHARON MSG {The ferryman takes } PNAME !10 MSGCR { and tucks it into his robes.} CALL 33 PLACE !10 DUMP DONE
give $ANY $ANY EQ 8 @SEAGULL EQ 10 @FISH PLACE FISH FISH MSGCR {The seagull grabs the fish from your hand and swallows it.} LDP 64 !ME PSCORE ADD 64 10 SETP !ME PSCORE !64 DONE
give $ANY $ANY EQ 8 @SEAGULL2 EQ 10 @FISH PLACE FISH FISH MSGCR {The seagull grabs the fish from your hand and swallows it.}  LDP 64 !ME PSCORE ADD 64 10 SETP !ME PSCORE !64 DONE
give $ANY $ANY -CANPUT !10 !8 MSGCR NOTCARRY DONE
give $ANY $ANY EQ 8 @BEGGAR EQ 10 @RUM MSGCR {The beggar swigs down the rum.} PLACE RUM DUMP MSGCR {The beggar hiccups 'Yer a good pal cap'n , here take this i'll no do me any} MSGCR {good now.} MSGCR {The beggar gives you the map.} PLACE MAP !ME DONE
give $ANY $ANY EQ 8 @BEGGAR OBIT !10 %food MSG {The beggar takes } PNAME !10 MSGCR { and thanks you.} PLACE !10 DUMP DONE
give $ANY $ANY EQ 8 @BEGGAR MSGCR {The beggar says 'A man can't eat that'.} DONE
give $ANY $ANY EQ 8 @GURU EQ 10 @ENCMESSAGE PLACE !10 DUMP MSGCR GURUREAD PLACE GOLDRING !ME DONE
give $ANY $ANY EQ 8 @VAMPYRE EQ 10 @HAND MSGCR {The vampyre grabs the hand gleefully.} DOACT VAMPYRE {has left} 25 PLACE HAND DUMP PLACE VAMPYRE DUMP DONE
give $ANY $ANY -LT 8 !16 MSGCR {They don't seem to want it.} DONE
give $ANY $ANY PLACE !10 !8 LD 64 !ME LD 0 !8 CANSEE !ME !64 PNAME !64 MSG GIVESU PNAME !10 MSGCR DOT DONE
give $ANY $ANY PLACE !10 !8 LD 64 !ME LD 0 !8 MSG {Someone} MSG GIVESU PNAME !10 MSGCR DOT DONE
;
;	For the lighter fingered
;
steal $ANY $ANY EQ 11 -1 MSGCR {From who ?} DONE
steal $ANY $ANY EQ 11 !ME MSGCR {Now that's what I call a warped imagination.} DONE
steal $ANY $ANY -IS !11 IPLAYER MSGCR {How can you steal from that!} DONE
steal $ANY $ANY EQ 11 @CHARON MSGCR {The ferryman grabs at you angrily and hurls you from his boat into oblivion.} EXIT
steal $ANY $ANY NEXTMATCH !11 !4 !1 -1 8
steal $ANY $ANY EQ 8 -1 MSGCR {They are not carrying that.} DONE
steal $ANY $ANY LDP 64 !11 PWPN EQ 64 !8 MSGCR {They have that to hand, for killing people with!} DONE
steal $ANY $ANY PBIT !11 %worn MSGCR {They are wearing that.} DONE
steal $ANY $ANY LDP 65 !11 PLEVEL -PBIT !11 %asleep -ARCH !0 LDP 66 !ME PLEVEL SUB 66 !65 ADD 66 20 MUL 66 250 RANDOM 65 GT 65 !66 MSGCR {Your attempt fails.} CHANCE 7500 -PBIT !11 %asleep LD 64 !ME LD ME !11 PCNAME !64 MSGCR STEALFROMU LD ME !64 DONE
steal $ANY $ANY -PBIT !11 %asleep -PBIT !ME %wizmode GT 65 !66 DONE
steal $ANY $ANY -CANPUT !8 !ME MSGCR {You can't carry that.} DONE
steal $ANY $ANY EQ 11 @PRIEST SETP PRIEST PFIGHT !ME DOACT PRIEST {attacks you angrily.} 25 DONE
steal $ANY $ANY PLACE !8 !ME MSGCR {Done it.} DONE
;
;	Travel to place by name
;
goto $ANY $ANY PBIT !ME %wizmode EQ 13 -1 MSGCR GOWHERE DONE
goto $ANY $ANY PBIT !ME %wizmode IS !13 IPLAYER LDP 64 !13 PLOC -EQ 64 -1 DOACT !ME GOTOOUT 25 PLACE !ME !64 DOACT !ME GOTOIN 25 LOOK DONE
goto $ANY $ANY PBIT !ME %wizmode IS !13 IPLAYER MSGCR {Following the dead can seriously damage you health!} DONE
goto $ANY $ANY PBIT !ME %wizmode IS !13 IOBJECT LDO 64 !13 OLOC -EQ 64 -1 IS !64 IROOM DOACT !ME GOTOOUT 25 PLACE !ME !64 DOACT !ME GOTOIN 25 LOOK DONE
goto $ANY $ANY PBIT !ME %wizmode IS !13 IOBJECT -EQ 64 -1 MSGCR {That is inside another itme!} DONE
goto $ANY $ANY PBIT !ME %wizmode -IS !13 2 MSGCR GONROOM DONE
goto $ANY $ANY PBIT !ME %wizmode DOACT !ME GOTOOUT 25 PLACE !ME !13 DOACT !ME GOTOIN 25 LOOK DONE
;
;	Paddling
;
swim $ANY $ANY AT PIT STATE WATER 4 MSGCR {But you are swimming already, idiot!} DONE
swim $ANY $ANY AT PIT STATE WATER 3 WEIGHS 200 MSGCR {You weigh too much to swim.} DONE
swim $ANY $ANY AT PIT STATE WATER 3 MSGCR {You splash around a bit.} DONE
swim $ANY $ANY AT PIT MSGCR {There isn't enough water to swim in.} DONE
swim $ANY puddle -EQ 11 -1 MSGCR {You sit down in the puddle and splash around a bit feeling good.} DOACT !ME {sits in the puddle and splashes around.} 1 DONE
swim $ANY $ANY AT UNBCH MSGCR {You dive into the waters.. but at their touch you seem to forget and all is dark} EXIT DONE
swim $ANY $ANY AT RIVCAV MSGCR {You dive into the waters.. but at their touch you seem to forget and all is dark} EXIT DONE
swim $ANY $ANY AT ROCK MSGCR {The waters are too rough.} DONE
swim $ANY $ANY AT RAFTRM MSGCR {You dive into the waters.. but at their touch you seem to forget and all is dark} EXIT DONE
swim $ANY $ANY AT RIVEND MSGCR {You dive into the waters.. but at their touch you seem to forget and all is dark} EXIT DONE
swim $ANY $ANY AT ULEDGE MSGCR {The sea is too rough.} DONE
swim $ANY $ANY AT RBEACH MSGCR {The sea is too rough.} DONE
;
;	Jumping - misc sillies
;
jump $ANY barrels AT CELLAR1 MSGCR {You prance around on the barrels for a bit.} MSGCR {Maybe you should become an idiot full time.} DONE
jump $ANY barrels AT CELLAR2 MSGCR {You prance around on the barrels for a bit.} MSGCR {Maybe you should become an idiot full time.} DONE
jump $ANY squirrel HERE SQUIRREL MSGCR {The squirrel dodges to one side and tickles your knees.}
jump $ANY squirrel HERE SQUIRREL NEIL !ME -1 64 MSGCR {You fall about and drop everything.} PARSE {drop all}
jump $ANY squirrel HERE SQUIRREL DONE
jump $ANY fire -EQ 11 -1 STATE !11 0 MSGCR {Wheeee.... youch owwww...  oww.. yelp!} DONE
jump $ANY puddle ARCH !ME -EQ 11 -1 MSGCR {You leap into the air and come down on the puddle with a SPLASH, throwing water everywhere.} DOACT !ME {jumps into the puddle with a splash, soaking you with water.} 1 DONE
jump $ANY puddle -EQ 11 -1 MSGCR {You leap into the air and come down on the puddle with a SPLASH} MSGCR {soaking yourself in the process.} DOACT !ME {jumps into the puddle in an attempt to soak you.} 1 DONE
jump $ANY bridge -GOT PIKE AT BRIDGEJ MSGCR BRIDGEJMP DOACT !ME {jumps off the bridge.} 25 PLACE !ME DUMP EXIT DONE
jump $ANY bridge AT BRIDGEJ MSGCR BRIDGEJMP2 DOACT !ME {jumps off the bridge} 25 PLACE !ME BELOWBRIDGE LOOK DONE
jump $ANY river -GOT PIKE AT BRIDGEJ MSGCR BRIDGEJMP DOACT !ME {jumps off the bridge.} 25 PLACE !ME DUMP EXIT DONE
jump $ANY river AT BRIDGEJ MSGCR BRIDGEJMP2 DOACT !ME {jumps off the bridge} 25 PLACE !ME BELOWBRIDGE LOOK DONE
jump $ANY $ANY MSGCR {Wheeee......} DONE
;
;	Arch force only
;
force $ANY $ANY PBIT !ME %wizmode EQ 13 -1 MSGCR WHODAT DONE
force $ANY $ANY PBIT !ME %wizmode ARCH !13 MSGCR FORCEJOKE DONE
force $ANY $ANY PBIT !ME %wizmode LD 255 !ME LD 0 !13 MSG UFORCED MSGCR U2 PARSE U2 LD 0 !255 LD 255 -1 DONE
;
;	Find items by name
;
where $ANY $ANY PBIT !ME %wizmode CALL 15 DONE
;
;	Show a players status
;
score $ANY $ANY LD 65 !ME LDP 64 !ME 2 CALL 16 CR
score $ANY $ANY LDP 64 !ME 3 MSG USCORE PRINT !64 CR
score $ANY $ANY LDP 64 !ME 4 MSG USTR PRINT !64 CR MSG UDEX LDP 64 !ME 7 PRINT !64 CR
score $ANY $ANY LDP 64 !ME 8 MSG USTAM PRINT !64 MSG UMAXST LDP 64 !ME 9 PRINT !64 CR
score $ANY $ANY DONE
;
;	Track items around th game
;
trace $ANY $ANY PBIT !ME %wizmode EQ 13 NOITEM MSGCR WHODAT DONE
trace $ANY $ANY PBIT !ME %wizmode SETP !ME 11 !13 SETP !ME 14 NOITEM OK DONE
untrace $ANY $ANY PBIT !ME %wizmode SETP !ME 11 -1 OK DONE
;
;	Set stats
;
setscore $ANY $ANY ARCH !ME EQ 13 -1 MSGCR WHODAT DONE
setscore $ANY $ANY ARCH !ME -NUMOF U2 64 MSGCR NUMVAL DONE
setscore $ANY $ANY ARCH !ME -IS !13 1 MSGCR NOTAPLAYER DONE
setscore $ANY $ANY ARCH !ME SETP !13 3 !64 OK DONE
setstr   $ANY $ANY ARCH !ME EQ 13 -1 MSGCR WHODAT DONE
setstr   $ANY $ANY ARCH !ME -NUMOF U2 64 MSGCR NUMVAL DONE
setstr   $ANY $ANY ARCH !ME -IS !13 1 MSGCR NOTAPLAYER DONE
setstr   $ANY $ANY ARCH !ME SETP !13 4 !64 OK DONE
setagil  $ANY $ANY ARCH !ME EQ 13 -1 MSGCR WHODAT DONE
setagil  $ANY $ANY ARCH !ME -NUMOF U2 64 MSGCR NUMVAL DONE
setagil  $ANY $ANY ARCH !ME -IS !13 1 MSGCR NOTAPLAYER DONE
setagil  $ANY $ANY ARCH !ME SETP !13 7 !64 OK DONE
setstam  $ANY $ANY ARCH !ME EQ 13 -1 MSGCR WHODAT DONE
setstam  $ANY $ANY ARCH !ME -NUMOF U2 64 MSGCR NUMVAL DONE
setstam  $ANY $ANY ARCH !ME -IS !13 1 MSGCR NOTAPLAYER DONE
setstam  $ANY $ANY ARCH !ME SETP !13 8 !64 SETP !13 9 !64 OK DONE
setstam  $ANY $ANY ARCH !ME EQ 13 -1 MSGCR WHODAT DONE
setlevel $ANY $ANY ARCH !ME -EQ 13 -1 -ARCH !13 NUMOF U2 64 GT 64 12 LT 64 15 MSGCR {Sorry, no plebs as arches please!} DONE
setlevel $ANY $ANY ARCH !ME -EQ 13 -1 -ARCH !13 GT 64 14 MSGCR {You can't create thet level.} DONE
setlevel $ANY $ANY ARCH !ME -EQ 13 -1 SETP !13 PLEVEL !64 DONE
setspeed $ANY $ANY PBIT !ME %wizmode -NUMOF U2 64 MSGCR NUMVAL DONE
setspeed $ANY $ANY PBIT !ME %wizmode EQ 13 -1 MSGCR WHODAT DONE
setspeed $ANY $ANY PBIT !ME %wizmode -IS !13 1 MSGCR NOTAPLAYER DONE
setspeed $ANY $ANY PBIT !ME %wizmode SETP !13 15 !64 SETP !13 16 !64 OK DONE
;Password command currently crashes the server!
password $ANY $ANY LDP 64 !ME PFLAGS2 SET 64 password SETP !ME PFLAGS2 !64 PROMPT {Enter old password: } PWCHANGE DONE
setpass $ANY $ANY ARCH !ME pwset U1 DONE
setpass $ANY $ANY ARCH !ME DONE
levels $ANY $ANY MSGCR LEVELS DONE
crash $ANY $ANY -ARCH !ME MSGCR {Crash what ?} DONE
crash $ANY $ANY LD 65 !ME ARCH !65 LD 64 0
crash $ANY $ANY -ARCH !65 MSGCR {I'm sorry I don't understand.} DONE
crash $ANY $ANY  LD 0 !64 MSGCR CRASH EXIT ADD 64 1
crash $ANY $ANY LT 64 !16 JP -2
crash $ANY $ANY ZEBEDEE DONE
shutdown $ANY $ANY ARCH !ME -EQ FSHUTDOWN 0 LD 64 &{SHUTDOWN halted.} CALL 23 LD FSHUTDOWN 0 DONE
shutdown $ANY $ANY LD FSHUTDOWN 300 LD 64 &{SHUTDOWN in 5 minutes} CALL  23 DONE
change $ANY $ANY PBIT !ME %wizmode EQ 13 NOITEM MSGCR {What is that?} DONE
change $ANY $ANY PBIT !ME %wizmode -IS !13 IPLAYER MSGCR {Change the sex of that!?} DONE
change $ANY $ANY PBIT !ME %wizmode PBIT !13 %male LDP 64 !13 PFLAGS RES 64 %male SETP !13 PFLAGS !64 LD 64 !0 LD 0 !13 MSGCR {Your sex has been magically changed to female!} LD 0 !64 OK DONE
change $ANY $ANY PBIT !ME %wizmode LDP 64 !13 PFLAGS SET 64 %male SETP !13 PFLAGS !64 LD 65 !0 LD 0 !13 MSGCR {Your sex has been magically changed to male!} LD 0 !65 OK DONE
cure cripple $ANY PBIT !ME %wizmode EQ 14 NOITEM MSGCR {What is that ?} DONE
cure cripple $ANY PBIT !ME %wizmode -IS !14 IPLAYER MSGCR {You can only cure players.} DONE
cure cripple $ANY PBIT !ME %wizmode LDP 64 !14 0 RES 64 %crippled SETP !14 0 !64 LD 64 !ME LD 0 !14 MSGCR {You have been magically cured!} DONE
cripple $ANY $ANY PBIT !ME %wizmode EQ 13 NOITEM MSGCR {What is that ?} DONE
cripple $ANY $ANY PBIT !ME %wizmode -IS !13 IPLAYER MSGCR {You can't cripple that!} DONE
cripple $ANY $ANY PBIT !ME %wizmode LDP 64 !13 0 SET 64 %crippled SETP !13 0 !64 LD 64 !ME LD 0 !13 MSGCR {You have been magically crippled!} LD 0 !64 DONE
blind $ANY $ANY PBIT !ME %wizmode EQ 13 NOITEM MSGCR {Blind what?} DONE
blind $ANY $ANY PBIT !ME %wizmode -IS !13 IPLAYER MSGCR {You can only blind players.} DONE
blind $ANY $ANY PBIT !ME %wizmode LDP 64 !13 PFLAGS SET 64 %blind SETP !13 0 !64
	        PBIT !ME %wizmode LDP 64 !13 PFLAGS2 RES 64 eyesclosed SETP !13 PFLAGS2 !64
		PBIT !ME %wizmode LD 64 !ME LD 0 !13 MSGCR {You have been magically blinded!.} LD 0 !64 OK DONE
cure blind $ANY PBIT !ME %wizmode EQ 14 NOITEM MSGCR {Cure what?} DONE
cure blind $ANY PBIT !ME %wizmode -IS !14 IPLAYER MSGCR {You can only cure players.} DONE
cure blind $ANY PBIT !ME %wizmode LDP 64 !14 0 RES 64 %blind SETP !14 0 !64 LD 64 !ME LD 0 !14 MSGCR {You have been magically cured!} LD 0 !64 DONE
storm $ANY $ANY PBIT !ME %wizmode LD 65 3 CALL 29 DONE
drizzle $ANY $ANY PBIT !ME %wizmode LD 65 1 call 29 DONE
rain $ANY $ANY PBIT !ME %wizmode LD 65 2 call 29 DONE
clear $ANY $ANY PBIT !ME %wizmode LD 65 0 call 29 DONE
showbug $ANY $ANY ARCH !0 TYPE {SUB/BUG.TXT} OK DONE
time $ANY $ANY PBIT !ME %wizmode CALL 53 DONE
pray $ANY $ANY MSGCR PRAYTEMP DONE
examine $ANY $ANY DARK MSGCR {It is dark.} DONE
examine mud $ANY -EQ 9 -1 PARSE {look in mud} DONE
examine names $ANY AT REMTEMP CHANCE 5000 MSGCR NAMEEXAM DONE
examine names $ANY AT REMTEMP MSGCR NAMEEXAM1 DONE
examine gates $ANY EQ 9 @RUSTGATE MSGCR GATEEXAM DONE
examine fountain $ANY EQ 9 @FOUNT MSGCR FOUNTEXAM DONE
examine keyhole $ANY AT PASS2 -DARK MSGCR {Inside the keyhole you see a small wooden button.} DONE
examine keyhole $ANY AT PASS2 DARK MSGCR {Its too dark too examine anything.} DONE
examine $ANY $ANY EQ 9 @CPARCHMENT MSGCR {It reads 'Beyond darkness lies the gogrgon, so beware fool'} DONE
examine $ANY $ANY EQ 9 @CORPSE ISAT CPARCHMENT SAND PLACE CPARCHMENT !ME MSGCR {You find a piece of parchment in the hand of the corpse.} DONE
examine sword $ANY EQ 9 @WOLFSWORD MSGCR SWORDEXAM DONE
examine $ANY $ANY EQ 9 @SPHERE STATE SPHERE 1 MSGCR {It's very mucky.} DONE
examine $ANY $ANY EQ 9 @SPHERE PRES LANTERN STATE LANTERN 0 CALL 68 DONE
examine $ANY $ANY EQ 9 @SPHERE PRES INCENSE STATE INCENSE 0 CALL 68 DONE
examine $ANY $ANY EQ 9 @SPHERE PRES CANDLE STATE CANDLE 0 CALL 68 DONE
examine $ANY $ANY EQ 9 @SPHERE PRES STRAWBED STATE STRAWBED 0 CALL 68 DONE
examine $ANY $ANY EQ 9 @SPHERE PRES TORCH1 STATE TORCH1 0 CALL 68 DONE
examine $ANY $ANY EQ 9 @SPHERE PRES LAMP STATE LAMP 0 CALL 68 DONE
examine $ANY $ANY EQ 9 @SPHERE PRES FIRE1 STATE FIRE1 0 CALL 68 DONE
examine $ANY $ANY EQ 9 @SPHERE PRES FIRE2 STATE FIRE2 0 CALL 68 DONE
examine $ANY $ANY EQ 9 @SPHERE PRES FIRE3 STATE FIRE3 0 CALL 68 DONE
examine $ANY $ANY EQ 9 @SPHERE PRES FIRE4 STATE FIRE4 0 CALL 68 DONE
examine $ANY $ANY EQ 9 @SPHERE PRES FIREP1 STATE FIREP1 0 CALL 68 DONE
examine $ANY $ANY EQ 9 @SPHERE MSGCR SPHERESEE DONE
examine sundial $ANY HERE SUNDIAL GT FWTYPE 1 MSGCR {The sky is overcast.} DONE
examine sundial $ANY HERE SUNDIAL LT FHOUR 7 MSGCR {It is still too dark.} DONE
examine sundial $ANY HERE SUNDIAL GT FHOUR 21 MSGCR {It is too dark to read the sundial.} DONE
examine sundial $ANY HERE SUNDIAL CALL 53 DONE
examine $ANY $ANY EQ 9 @ROCKBOWL PARSE {look in bowl} DONE
examine $ANY $ANY -EQ 9 -1 IS !9 IOBJECT MFORMAT {SUB/ODIR/%n0} LOG { } { } !9 !ME !ME -TYPE LOG MSGCR {Its nothing special.} DONE
examine $ANY $ANY -EQ 9 -1 IS !9 IOBJECT DONE
examine $ANY $ANY -EQ 9 -1 IS !9 IPLAYER MFORMAT {SUB/PDIR/%n0} LOG { } { } !9 !ME !ME -TYPE LOG MSGCR {You see nothing special about them.} DONE
examine $ANY $ANY -EQ 9 -1 IS !9 IPLAYER DONE
examine $ANY $ANY -EQ 9 -1 MSG {You see nothing special about } PNAME !9 MSGCR {.} DONE
examine $ANY $ANY MSGCR {You see nothing special.} DONE
polish $ANY $ANY EQ 9 -1 MSGCR {What is that.} DONE
polish $ANY $ANY -IS !9 IOBJECT MSGCR {What ?} DONE
polish $ANY $ANY EQ 9 @SPHERE STATE SPHERE 1 DEC SPHERE MSGCR {It cleans up nicely.} SETO !9 OVALUE 20 DONE
polish $ANY $ANY MSGCR {You achieve nothing.} DONE
insert disc $ANY GOT CD AT DYLROOM PLACE CD CDPLAYER MSGCR {The disc slides into the player.} SETSTATE CDPLAYER 1 DONE
insert disc $ANY AT DYLROOM -GOT CD MSGCR {You need a disc to play.} DONE
play disc $ANY AT DYLROOM STATE CDPLAYER 1 SETSTATE CDPLAYER 2 MSGCR {You grip your ears in terror as the music pours forth.} DONE
play disc $ANY AT DYLROOM -STATE CDPLAYER 1 MSGCR {You need to have a disc in it first.} DONE
stop disc $ANY AT DYLROOM STATE CDPLAYER 2 MSGCR {The cdplayer seems jammed,and wont stop!.} DONE
kiss $ANY $ANY EQ 9 -1 MSGCR {Who do you want to kiss?} DONE
kiss $ANY $ANY -IS !9 1 MSGCR {You kiss it,but it doesnt seem interested.} DONE
kiss $ANY $ANY EQ 9 !0 MSGCR {You are getting desperate, arent you!} DONE
kiss $ANY $ANY PBIT !ME %male PBIT !9 %male MSGCR {It takes all sorts I suppose!}
kiss $ANY $ANY -PBIT !ME %male -PBIT !9 %male MSGCR {It takes all sorts I suppose!}
kiss $ANY $ANY MSG {You give } PNAME !9 MSGCR { a great big sloppy kiss!} DOTO !ME {gives a sloppy kiss to} 26 !9 DONE
hug $ANY $ANY EQ 9 -1 MSGCR {Who do you want to hug?} DONE
hug $ANY $ANY -IS !9 1 MSGCR {You try to hug it but it just seems bored.} DONE
hug $ANY $ANY PBIT !ME %male EQ 9 !0 MSGCR {You'll be trying to make love to yourself next, Mr ego!} DONE
hug $ANY $ANY -PBIT !ME %male EQ 9 !0 MSGCR {You'll be trying to make love to yourself next, Miss ego!} DONE
hug $ANY $ANY PBIT !ME %male PBIT !9 %male MSGCR {It takes all sorts I suppose!}
hug $ANY $ANY -PBIT !ME %male -PBIT !9 %male MSGCR {It takes all sorts I suppose!}
hug $ANY $ANY MSG {You give } PNAME !9 MSGCR { a massive hug!} DOTO !ME {gives a massive hug to} 26 !9 DONE
attach $ANY $ANY -ARCH !ME MSGCR {Pardon?} DONE
attach $ANY $ANY ARCH !ME EQ 9 -1 LD 9 !13
attach $ANY $ANY ARCH !ME EQ 9 -1 MSGCR {Attach to what?} DONE
attach $ANY $ANY ARCH !ME ARCH !9 MSGCR {Oh no you don't!} DONE
attach $ANY $ANY ARCH !ME LDP 64 !ME PFLAGS2 SET 64 attached SETP !ME PFLAGS2 !64 SETP !ME PATTACHED !9 SETP !ME PSNOOP !9 OK DONE
;
;	Include creation stuff
;
<SUB/creation.tab
;
;	Loads of emotion commands
;
cower $ANY $ANY DOACT !ME {cowers.} 26 DONE
burp $ANY $ANY DOACT !ME {burps loudly.} 26 DONE
fart $ANY $ANY DOACT !ME {lets off a real rip-roarer} 26 DONE
grin $ANY $ANY DOACT !ME {grins moronically.} 25 DONE
smile $ANY $ANY DOACT !ME {smiles happily.} 25 DONE
snigger $ANY $ANY DOACT !ME {sniggers.} 26 DONE
laugh $ANY $ANY DOACT !ME {laughs.} 26 DONE
bounce $ANY $ANY DOACT !ME {bounces around.} 25 DONE
purr $ANY $ANY DOACT !ME {purrs.} 26 DONE
miaow $ANY $ANY DOACT !ME {miaows.} 26 DONE
sulk $ANY $ANY DOACT !ME {sulks.} 25 DONE
moan $ANY $ANY DOACT !ME {moans.} 25 DONE
groan $ANY $ANY DOACT !ME {groans loudly.} 26 DONE
sigh $ANY $ANY DOACT !ME {sighs.} 26 DONE
sulk $ANY $ANY DOACT !ME {sulks.} 25 DONE
pout $ANY $ANY DOACT !ME {pouts.} 25 DONE
chuckle $ANY $ANY DOACT !ME {chuckles.} 26 DONE
giggle $ANY $ANY DOACT !ME {giggles.} 26 DONE
titter $ANY $ANY DOACT !ME {titters.} 26 DONE
gibber $ANY $ANY DOACT !ME {gibbers.} 25 DONE
sniff $ANY $ANY DOACT !ME {sniffs.} 25 DONE
strut $ANY $ANY DOACT !ME {struts around.} 25 DONE
snarl $ANY $ANY DOACT !ME {snarls angrily.} 25 DONE
eyeball $ANY $ANY EQ 9 -1 MSGCR {Who is that.} DONE
eyeball $ANY $ANY EQ 9 !ME MSGCR {Neat party trick!} DONE
eyeball $ANY $ANY DOTO !ME {eyeballs} 25 !9 DONE
ruffle $ANY $ANY EQ 9 -1 MSGCR {Who is that} DONE
ruffle $ANY $ANY -LT 9 !16 MSGCR {What ?} DONE
ruffle $ANY $ANY EQ 9 !ME MSGCR {You ruffle your hair up.} DONE
ruffle $ANY $ANY LD 64 !ME LD ME !9 PCNAME !64 MSGCR { ruffles your hair.} LD ME !64 DONE
spank $ANY $ANY EQ 9 -1 MSGCR {Who is that} DONE
spank $ANY $ANY EQ 9 !ME MSGCR {Weird..} DONE
spank $ANY $ANY -LT 9 !16 MSGCR {You can't spank that.} DONE
spank $ANY $ANY LD 64 !ME LD ME !9 PCNAME !64 MSGCR { spanks your bottom.} LD ME !64 DONE
tickle $ANY $ANY EQ 9 -1 MSGCR {Who is that} DONE
tickle $ANY $ANY -LT 9 !16 MSGCR {You can't tickle that.} DONE
tickle $ANY $ANY EQ 9 !ME MSGCR {Humm..} DONE
tickle $ANY $ANY LD 64 !ME LD ME !9 PCNAME !64 MSGCR { tickles you.} LD ME !64 DONE
scritch $ANY $ANY EQ 9 -1 MSGCR {Who is that} DONE
scritch $ANY $ANY -LT 9 !16 MSGCR {You can't scritch that.} DONE
scritch $ANY $ANY EQ 9 !ME MSGCR {Huh ?} DONE
scritch $ANY $ANY LD 64 !ME LD ME !9 PCNAME !64 MSGCR { scritches your hair.} LD ME !64 DONE
bonk $ANY $ANY EQ 9 -1 MSGCR {Who is that} DONE
bonk $ANY $ANY -LT 9 !16 MSGCR {Pervert!} DONE
bonk $ANY $ANY EQ 9 !ME MSGCR {Don't flatter yourself!} DONE
bonk $ANY $ANY LD 64 !ME LD ME !9 PCNAME !64 MSGCR { gives you a nice bonk.} LD ME !64 DONE
wimper $ANY $ANY DOACT !ME {wimpers.} 25 DONE
snuggle $ANY $ANY EQ 9 -1 MSGCR {Who is that} DONE
snuggle $ANY $ANY -LT 9 !16 MSGCR {You can't do that!} DONE
snuggle $ANY $ANY EQ 9 !ME MSGCR {Humm..} DONE
snuggle $ANY $ANY LD 64 !ME LD ME !9 PCNAME !64 MSGCR { snuggles up to you.} LD ME !64 DONE
prod $ANY $ANY EQ 9 -1 MSGCR {Who is that} DONE
prod $ANY $ANY EQ 9 !ME MSGCR {You prod yourself.} DONE
prod $ANY $ANY LD 64 !ME LD ME !9 PCNAME !64 MSGCR { prods you.} LD ME !64 DONE
kneel $ANY $ANY DOACT !ME {kneels.} 25 DONE
thank $ANY $ANY EQ 9 -1 MSGCR {Who is that ?} DONE
thank $ANY $ANY EQ 9 !ME MSGCR {Some people..} DONE
thank $ANY $ANY DOTO !ME {thanks} 25 !9 DONE
wave $ANY $ANY EQ 9 -1 DOACT !ME {waves byebye.} 25 DONE
wave $ANY $ANY IS !9 IOBJECT MSGCR {Nothing happens.} DONE
wave $ANY $ANY -LT 9 !16 MSGCR {What ?} DONE
wave $ANY $ANY EQ 9 !ME MSGCR {Fine..} DONE
wave $ANY $ANY DOTO !ME {waves to} 25 !9 DONE
bow $ANY $ANY DOACT !ME {bows.} 25 DONE
cackle $ANY $ANY DOACT !ME {cackles evilly.} 26 DONE
applaud $ANY $ANY DOACT !ME {applauds.} 26 DONE
blush $ANY $ANY DOACT !ME {blushes.} 25 DONE
clap $ANY $ANY DOACT !ME {claps loudly.} 26 DONE
comfort $ANY $ANY EQ 9 -1 MSGCR {Who is that ?} DONE
comfort $ANY $ANY -LT 9 !16 MSGCR {What ?} DONE
comfort $ANY $ANY EQ 9 !ME OK DONE
comfort $ANY $ANY DOTO !ME {comforts} 25 !9 DONE
cough $ANY $ANY DOACT !ME {coughs.} 26 DONE
cry $ANY $ANY DOACT !ME {bursts into tears.} 25 DONE
cuddle $ANY $ANY EQ 9 -1 MSGCR {Who is that ?} DONE
cuddle $ANY $ANY -LT 9 !16 MSGCR {What ?} DONE
cuddle $ANY $ANY EQ 9 !ME MSGCR {Feeling lonely are you.} DONE
cuddle $ANY $ANY DOTO !ME {cuddles} 25 !9 DONE
frown $ANY $ANY DOACT !ME {frowns.} 25 DONE
gasp $ANY $ANY DOACT !ME {gasps.} 26 DONE
glare $ANY $ANY DOACT !ME {glares.} 25 DONE
growl $ANY $ANY DOACT !ME {growls.} 26 DONE
hiccup $ANY $ANY DOACT !ME {hiccups.} 26 DONE
nibble $ANY $ANY EQ 9 -1 MSGCR {Who is that ?} DONE
nibble $ANY $ANY -LT 9 !16 MSGCR {What ?} DONE
nibble $ANY $ANY EQ 9 !ME MSGCR {Now that would make an interesting party trick.} DONE
nibble $ANY $ANY LD 64 !ME LD ME !9 PCNAME !64 MSGCR { nibbles your ear.} LD 0 !64 DONE
nod $ANY $ANY DOACT !ME {nods.} 25 DONE
poke $ANY $ANY EQ 9 -1 MSGCR {Who is that.} DONE
poke $ANY $ANY -LT 9 !16 MSGCR {What ?} DONE
poke $ANY $ANY EQ 9 !ME MSGCR {You poke yourself.} DONE
poke $ANY $ANY DOTO !ME {pokes} 26 !9 DONE
scream $ANY $ANY DOACT !ME {screams loudly.} 26 DONE
shake $ANY $ANY PBIT !ME %male DOACT !ME {shakes his head.} 25 DONE
shake $ANY $ANY DOACT !ME {shakes her head.} 25 DONE
shiver $ANY $ANY DOACT !ME {shivers.} 25 DONE
shrug $ANY $ANY PBIT !ME %male DOACT !ME {shrugs his shoulders.} 25 DONE
shrug $ANY $ANY DOACT !ME {shrugs her shoulders.} 25 DONE
sing $ANY $ANY CALLED !ME {White} DOACT !ME {sings in gaelic.} 26 DONE
sing $ANY $ANY CALLED !ME {Cyberman} DOACT !ME {sits down and sings about lots of metals except gold.} 26 DONE
sing $ANY $ANY CALLED !ME {Hecate} DOACT !ME {sings 'This corrosion'.} 26 DONE
sing $ANY $ANY DOACT !ME {sits down and sings about gold.} 26 DONE
slap $ANY $ANY EQ 9 -1 MSGCR {Who is that.} DONE
slap $ANY $ANY -LT 9 !16 MSGCR {What ?} DONE
slap $ANY $ANY EQ 9 !ME MSGCR {How silly.} DONE
slap $ANY $ANY DOTO !ME {slaps} 26 !9 DONE
smirk $ANY $ANY DOACT !ME {smirks.} 25 DONE
snap $ANY $ANY PBIT !ME %male DOACT !ME {snaps his fingers.} 25 DONE
snap $ANY $ANY DOACT !ME {snaps her fingers.} 25 DONE
sneeze $ANY $ANY DOACT !ME {sneezes.} 25 DONE
snicker $ANY $ANY DOACT !ME {snickers.} 26 DONE
snore $ANY $ANY DOACT !ME {snores loudly.} 26 DONE
spit $ANY $ANY DOACT !ME {spits.} 25 DONE
squeeze $ANY $ANY EQ 9 -1 MSGCR {Who is that.} DONE
squeeze $ANY $ANY -LT 9 !16 MSGCR {What ?} DONE
squeeze $ANY $ANY EQ 9 !ME MSGCR {Feeling lonely are we ?} DONE
squeeze $ANY $ANY DOTO !ME {squeezes} 26 !9 DONE
stare $ANY $ANY DOACT !ME {stares rudely.} 25 DONE
whistle $ANY $ANY DOACT !ME {whistles.} 25 DONE
wink $ANY $ANY DOACT !ME {winks.} 25 DONE
yawn $ANY $ANY DOACT !ME {yawns.} 25 DONE
$NONE $ANY $ANY -EQ 13 -1 LT 13 !16 MFORMAT {TELL %m0} LOG U0 { } !ME !ME !ME PARSE LOG DONE
$NONE $ANY $ANY MSGCR {I'm sorry, I don't know that verb.} DONE
$ANY $ANY $ANY MSGCR {I'm sorry, I don't understand.} DONE
@TAB 1
;
;	This table is called after a players commands have been processed
;
	-AT TOWER LDP 64 !ME PFLAGS2 RES 64 imprisoned SETP !ME PFLAGS2 !64
;Do farm attic
	AT FARMATTIC WEIGHS 400 MSGCR {As you step up into the attic, the beams give way under your weight} MSGCR {You land with a thud!} PLACE !ME FARMBED SETSTATE ATTICHOLE 1
	CALL 22
;	misc stuff
	LD 65 !ME CALL 18
; {Fix the stamina}
	LDP 64 !ME PMAXSTAM LDP 65 !ME PSTAM GT 65 !64 SETP !ME PSTAM !64
	CALLED !ME {Anarchy} LDP 64 !ME PFLAGS2 BIT 64 nosey CHANCE 1000 MSGCR {You catch a faint glimpse of someone following you in the shadows.}
	CALLED !ME {Potato} LDP 64 !ME PFLAGS2 BIT 64 nosey CHANCE 1000 MSGCR {You catch a faint glimpse of someone following you in the shadows.}
	AT UTOMB LD 64 !ME LD ME @SHELF -WEIGHS 250 LD ME !64 CALL 36
;
;	All in order now...
;	
	DONE
@TAB 2
;
;	Called at start of room description of items.
;
;Do Death room
	LDP 242 !ME PLOC RBIT !242 %death -PBIT !ME %wizmode EXIT LD ME @BEGGAR DONE
	LDP 242 !ME PLOC RBIT !242 %death MSGCR {[DEATH ROOM]}
;Do Weather
	RBIT !242 %outside CALL 25
;Do Shelf
	HERE SHELF MSG {The shelf contains: } LOBJS SHELF CR
;Chimney tweak with message
	AT CHIMNEY HERE ENCMESSAGE SETSTATE ENCMESSAGE 0
	-AT CHIMNEY HERE ENCMESSAGE SETSTATE ENCMESSAGE 1
;Do Throne hall
	AT THRONEHALL CALLED !ME ANARCHY MSGCR THRONE1
	AT THRONEHALL -CALLED !ME ANARCHY MSGCR THRONE2
	DONE
@TAB 3
;Do Death room
	LDP 242 !ME PLOC RBIT !242 %death -PBIT !ME %wizmode EXIT LD ME @BEGGAR DONE
	DONE
@TAB 4
; init stuff
	-EQ 255 -1 EQ 253 0 LD 255 -1 LD 253 1
	CALL 59
	MFORMAT {%m0 %N1 has entered the game for the first time.} LOG TIME { } !ME !ME !ME APPEND PLAYERLOG LOG
;
;Clear all the beento flags so that they get room descriptions!
	LD 64 0
	DO 0
	  IS !64 IROOM LDR 65 !64 RBEENTO RES 65 !ME SETR !64 RBEENTO !65
	  NEXT !64 IROOM 64 LOOP 0
;
;	Hello New
;
	-ARCH !ME -EQ 255 NOITEM MSGCR {The game is currently WIZARD LOCKED} LDP 64 !ME PFLAGS SET 64 %setup SETP !ME PFLAGS !64 EXIT DONE
	-ARCH !ME -EQ FSHUTDOWN 0 MSGCR {No more logins.. Game shutting down} EXIT DONE
	PROMPT {[M/F]:}
	ARCH !ME PROMPT {Magic word:} SETP !ME PFLAGS2 0
	SETP !ME 5 -1 MSG {Hello } PNAME !ME CR PLACE !ME DUMP SETP !ME PVIS 0 SETP !ME PSTR 100 SETP !ME PSNOOP -1 -ARCH !ME MSGCR {What sex shall I make you (male or female) ?}
;set stats
	SETP !ME 12 -1 SETP !ME 13 -1 SETP !ME PTRACEREF -1 SETP !ME PSPEED -1
	LDP 64 !ME PFLAGS2 RES 64 imprisoned RES 64 attached RES 64 converse RES 64 nosey RES 64 password SETP !ME PFLAGS2 !64 SETP !ME PSPCOUNT -1 SETP !ME PTRACE -1 SETP !ME PFIGHT -1 SETP !ME PWPN -1 SETP !ME PATTACHED -1
	SETP !ME PVIS 0 LDP 64 !ME PFLAGS RES 64 %wizard SET 64 %setup ARCH !ME SET 64 %wizard
	RES 64 %wizmode SETP !ME PFLAGS !64 CALL 17 LD FDIED 0
	SETP !ME PGAMES 0 SETP !ME PVERSION VMAGIC LDP 64 !ME PFLAGS RES 64 %berk RES 64 %wizmode RES 64 %crippled RES 64 %dumb RES 64 %pretend RES 64 %seedark RES 64 %blind SETP !ME PFLAGS !64
	ARCH !ME SETP !ME 2 13 LDP 64 !ME 0 SET 64 7 SETP !ME 0 !64
	ARCH !ME CALLED !ME ANARCHY SETP !ME 2 14
	CALL 31
	DOACT !ME {arrives.} 21 SETP !ME PFOLLOW -1 SETP !ME PHELPING -1
	SETIOH !ME 0 {is here}
	SETIOH !ME 2 {arrives.}
	SETIOH !ME 1 {leaves.}
	DONE
@TAB 5
;
; 	We come here when a player re-enters. First init wizlock if needed
;
	-EQ 255 NOITEM EQ 253 0 LD 255 NOITEM LD 253 1
;
;	Log entry info
;	
	CALL 59
	MFORMAT {%m0 %N1 entered game having played before.} LOG TIME { } !ME !ME !ME APPEND PLAYERLOG LOG
;
;	See if there are locks/shutdowns
;
	-ARCH !ME -PBIT !ME %wizard -EQ 255 -1 MSGCR {The game is currently WIZARD LOCKED} EXIT DONE
	-ARCH !ME -EQ FSHUTDOWN 0 MSGCR {No more logins.. Game shutting down} EXIT DONE
;
;Clear beento flags so they get room descriptions
	LD 64 0
	DO 0
	  IS !64 IROOM LDR 65 !64 RBEENTO RES 65 !ME SETR !64 RBEENTO !65
	  NEXT !64 IROOM 64 LOOP 0
;
;Check persona version id
;
	LDP 64 !ME PVERSION -EQ 64 VMAGIC SETP !ME PVERSION VMAGIC SETP !ME PGAMES 0 MSGCR {Updating player.}
	SETP !ME 5 -1 LDP 64 !ME PFLAGS2 bit 64 imprisoned PLACE !ME TOWER
;
;Welcome to game
;
	AT TOWER LOOK
	-ARCH !ME -AT TOWER LDP 64 !ME PGAMES -EQ 64 1 PLACE !ME SGATE MSG {Hello } PNAME !ME MSG {, you have played } PRINT !64 MSGCR { times before.} SETP !ME 5 -1 LOOK
	-ARCH !ME -AT TOWER LDP 64 !ME PGAMES EQ 64 1 PLACE !ME SGATE MSG {Hello } PNAME !ME MSGCR {, you have played once before.} SETP !ME 5 -1 LOOK
;
;	Egotripping across the universe.. always got a big head, and its getting worse
;
	ARCH !ME CALLED !ME POTATO SETP !ME 2 14 PLACE POTATOSTAFF !ME LDP 64 !ME PFLAGS RES 64 %dumb SETP !ME PFLAGS !64
	ARCH !ME -CALLED !ME ANARCHY PLACE !ME ARCHSTUDY MSG {Welcome,oh powerful } PNAME !ME MSG {, you have played } LDP 64 !ME PGAMES PRINT !64 MSGCR { times before.} SETP !ME 5 -1 LOOK
	CALLED !ME ANARCHY PLACE !ME THRONEHALL MSGCR {Welcome oh Lord.} LOOK
;
;Initialise Flags
;
	SETP !ME 12 -1 SETP !ME 13 -1 SETP !ME 14 -1 SETP !ME 15 -1
	SETP !ME 16 -1 SETP !ME 11 -1 SETP !ME 10 -1 SETP !ME 17 -1 SETP !ME 6 0 SETP !ME PATTACHED -1 LDP 64 !ME PFLAGS2 RES 64 attached SETP !ME PFLAGS2 !64
	SETP !ME PNOAIR 3 LDP 64 !ME PFLAGS2 RES 64 holdbreath SETP !ME PFLAGS2 !64
	LDP 64 !ME PFLAGS RES 64 %asleep SETP !ME PFLAGS !64
;
; Archwiz etc specials
;
	ARCH !ME SETP !ME 2 13 LDP 64 !ME 0 SET 64 7 SETP !ME 0 !64
	LDP 64 !ME PFLAGS2 RES 64 converse RES 64 password SETP !ME PFLAGS2 !64
	-ARCH !ME LDP 64 !ME PFLAGS RES 64 %seedark SETP !ME PFLAGS !64
	ARCH !ME CALLED !ME POTATO SETP !ME 2 14
	ARCH !ME CALLED !ME ANARCHY SETP !ME 2 14
	ARCH !ME CALLED !ME {Madsysop} SETP !ME 2 14
;
;Sets default arch ioh messages
;
	ARCH !ME SETIOH !ME 0 {stands proudly here}
	ARCH !ME SETIOH !ME 2 {strides in majestically.}
	ARCH !ME SETIOH !ME 1 {leaves gracefully.}
;
;Init message, then make sure we not following anyone
;
	CALL 31 SETP !ME PFOLLOW NOITEM SETP !ME PHELPING NOITEM
;
;Tel the people they are here
;
	-ARCH !ME SETIOH !ME 2 {arrives.}
	-ARCH !ME SETIOH !ME 1 {leaves.}
	MFORMAT {%a0} LOG {} {} !ME !ME !ME DOACT !ME LOG 21 CALL 22
	-ARCH !ME SETIOH !ME 0 {is here}
	DONE
@TAB 6
;
;	This table is called once per second, and always once at start time
;	if nobody is playing the driver will suspend processing, including this
;	table to avoid wasting CPU time.
;
; 	253 controls the boot setup 
; 	and things we cant(or couldnt) set up at compile time
;
	EQ 253 0 LD 255 NOITEM SETP PRIEST PWPN @MACHETE SETP TROLL PWPN @CLUB LD FPOLICE 0 LD FHOUR 6 SETP REAPER PWPN @SCYTHE PLACE TURNIP SAND
	EQ 253 0 CALL 59 APPEND COMLOG {***   Starting new game   ***} APPEND COMLOG TIME
	EQ 253 0 LD 253 -1
;
;	Timers
;
	LD 16 32
	EQ FSHUTDOWN 120 LD 64 &{SHUTDOWN: 2 minutes} CALL 23
	EQ FSHUTDOWN 60  LD 64 &{SHUTDOWN: 1 minute} CALL 23
	EQ FSHUTDOWN 1   LD 64 &{SHUTDOWN: now} CALL 23
	EQ FSHUTDOWN 1   LD 64 0 FORUSER 0 0
	EQ FSHUTDOWN 1     EXIT
	EQ FSHUTDOWN 1   ENDUSER 0
	EQ FSHUTDOWN 1   ZEBEDEE
	GT FSHUTDOWN 0   SUB FSHUTDOWN 1
;
;		Auto reset timebomb.. goes off after 1.5 hours with 
;		players on the game
;
	EQ FTIMEBOMB 5400 LD 64 &{Automatic Reset in 2 minutes} CALL 23
	EQ FTIMEBOMB 5460 LD 64 &{Automatic Reset in 1 minute} CALL 23
	EQ FTIMEBOMB 5520 LD 64 &{Automatic Reset: Restart in about 2 minutes.} CALL 23
	EQ FTIMEBOMB 5520 LD 64 0 FORUSER 0 0
	EQ FTIMEBOMB 5520    EXIT
	EQ FTIMEBOMB 5520 ENDUSER 0 ZEBEDEE
	ADD FTIMEBOMB 1
;
;	Tide timer
;
	ADD FTIMETICK 1 GT FTIMETICK 300 ADD FHOUR 1 CALL 42 LD FTIMETICK 0
	LT FTIDETICK 360 ADD FTIDETICK 1
	ADD FWTICK 1 EQ FWTICK 300 LD FWTICK 0 CALL 24
;	
;	This house is on fire....
;
	EQ FHAYBARNBURN 1 DOACT HAY {goes up in smoke.} 26 OK SETSTATE HAY 0 SETLONG HAYBARN BARNBURNING
	-EQ FHAYBARNBURN -1 -EQ FHAYBARNBURN 0 ADD FHAYBARNBURN 1 EQ FHAYBARNBURN 5 LD 64 &{You see a plume of smoke rise into the sky.} CALL 26
	EQ FHAYBARNBURN 40 CALL 57
	EQ FHAYBARNBURN 240 SETLONG HAYBARN BARNBURNT PLACE BARNDOOR1 DUMP PLACE BARNDOOR2 DUMP SETR SOUTHYARD 5 @HAYBARN SETR HAYBARN 3 @SOUTHYARD PLACE SNEEDLE HAYBARN PLACE TRAPDOOR3 HAYBARN SETR HAYBARN EDOWN @TRAPDOOR3
;
;	CD player control
;
	STATE CDPLAYER 2 CALL 30
;
;	Echoes echoes echoes...
;
	EQ FECHO 1 MFORMAT {whispers "%m0".} U1 SECHO { } !ME !ME !ME DOACT EVOICE U1 25 SUB FECHO 1
	EQ FECHO 2 MFORMAT {says "%m0".} U1 SECHO { } !ME !ME !ME DOACT EVOICE U1 25 SUB FECHO 1
	EQ FECHO 3 MFORMAT {shouts "%m0".} U1 SECHO { } !ME !ME !ME DOACT EVOICE U1 25 SUB FECHO 1
;
;	Pit water level control
;
	LD 65 !FWATER
	LD 64 !FWTYPE ADD 64 !64 ADD FWATER !64 SUB FWATER 3
	LT FWATER 0 LD FWATER 0
	GT FWATER 200 LD FWATER 200
	LD 66 !FWATER DIV 66 20 GT 66 5 LD 66 5
	SETSTATE WATER !66 SETSTATE PITLEVEL !66
	DIV 65 20 GT 65 5 LD 65 5
	LT 66 !65 EQ 66 4 SETSTATE WFALL 0 DOACT WFALL {dries up to a trickle and stops flowing.} 0
	LT 66 !65 DOACT WATER {level is falling.} 16 JP 3
	EQ 66 !65 JP 2
	GT 66 !65 DOACT WATER {level is rising.} 16 EQ 66 3 DOACT WATER {is up to your neck.} 0
	EQ 66 4 CALL 27
	EQ 66 5 CALL 28
;
;	Puddles
;
	GT FWATER 19 -STATE PUDDLE1 1 PLACE PUDDLE1 ALLEY SETSTATE PUDDLE1 1 DOACT  PUDDLE1 {forms on the ground.} 2
	LT FWATER 6 STATE PUDDLE1 1  DOACT  PUDDLE1 {evaporates away.} 2 PLACE PUDDLE1 DUMP SETSTATE PUDDLE1 0
	GT FWATER 19 -STATE PUDDLE2 1 PLACE PUDDLE2 SMYARD SETSTATE PUDDLE2 1 DOACT PUDDLE2 {forms on the ground.} 2
	LT FWATER 6 STATE PUDDLE2 1  DOACT PUDDLE2 {evaporates away.} 2 PLACE PUDDLE2 DUMP SETSTATE PUDDLE2 0
	GT FWATER 19 -STATE PUDDLE3 1 PLACE PUDDLE3 EASTROAD SETSTATE PUDDLE3 1 DOACT  PUDDLE3 {forms on the ground.} 2
	LT FWATER 6 STATE PUDDLE1 3  DOACT  PUDDLE3 {evaporates away.} 2 PLACE PUDDLE3 DUMP SETSTATE PUDDLE3 0
;
;
;	Light sources (Alter examine sphere too)
;
	LD 0 @LANTERN CALL 37 LD 0 @INCENSE CALL 37 LD 0 @CANDLE CALL 37
	LD 0 @STRAWBED CALL 37 LD 0 @TORCH1 CALL 37 LD 0 @LAMP CALL 37
;
;	Wet stuff
;
	LD 0 @POTION LD 64 &{washes away} CALL 65
	LD 0 @PARCHMENT LD 64 &{turns to pulp} CALL 65
	LD 0 @CPARCHMENT LD 64 &{turns to pulp} CALL 65
	LD 0 @ENCMESSAGE LD 64 &{turns to pulp} CALL 65
;
	ADD FTICKTOCK 1 EQ FTICKTOCK 2 LD FTICKTOCK 0
	-EQ FTICKTOCK 0 DONE
;
;	************* THREE SECOND ONLY STUFF BEGINS HERE **************
;
;
;	Move Mobiles
;
	LD ME !16 -NEXT !ME IPLAYER ME JP 7
	DO 12
		-EQ 0 @VOLE CALL 19
		LDP 64 !ME PFOLLOW -EQ 64 -1 CALL 46
		NEXT !ME IPLAYER ME LOOP 12
;
;	Thyme (for bed ?)
;	
	-ISAT THYME COPSE SETSTATE THYME 1
;
;	Combat handler/Trace and other player 3 secs
;
	FORUSER 0 ME
;
;	Throne ego trip stuff
;
	CALLED !ME ANARCHY AT THRONEHALL SETIOH !ME 0 {sits upon the crystal throne}
	CALLED !ME ANARCHY -AT THRONEHALL SETIOH !ME 0 {stands before you in all his glory}
;
	LDP 64 !ME PLOC EQ 64 @-1 JP 15
	CALL 64 CALL 67
	LDP 64 !ME PTRACE -EQ 64 -1 LDO 65 !64 PLOC LDP 66 !ME PTRACEREF
	-EQ 64 -1 -EQ 65 -1 -EQ 65 !66 SETP !ME 14 !65 MSG {(TRACE)} PNAME !64 MSG { : } PNAME !65 CR
	-EQ 64 -1 EQ 65 -1 SETP !ME 11 -1 MSGCR {(TRACE)Can no longer trace.}
	LDP 64 !ME PFLAGS2 BIT 64 tread -AT SMITHB RES 64 tread SETP !ME PFLAGS2 !64
	LDP 64 !ME PFOLLOW -EQ 64 -1 CALL 46
	GOT GOLDRING OBIT GOLDRING %worn CALL 40 JP 2
	PBIT !ME %asleep LDP 64 !ME PSLEEPCT ADD 64 1 SETP !ME PSLEEPCT !64 CHANCE 2000 LDP 64 !ME 8 LDP 65 !ME 9 ADD 64 1 -GT 64 !65 SETP !ME 8 !64
	PBIT !ME %asleep LDP 64 !ME PSTAM LDP 65 !ME PMAXSTAM EQ 64 !65 LDP 64 !ME PFLAGS RES 64 %asleep SETP !ME PFLAGS !64 MSGCR {You are too awake to sleep anymore.}
	LDP 64 !ME 17 LDP 65 !ME 10 -EQ 64 -1 -GOT !64 -EQ 65 -1 MSG NOWPN PNAME !64 MSGCR NOWPN2
	-EQ 64 -1 -GOT !64 SETP !ME 17 -1
	LDP 64 !ME 1 LT 64 0 JP 3
	LDP 64 !ME 10 LT 64 0 JP 2
;
	-HERE !64 SETP !ME 10 -1 JP 1
	CALL 20
	ENDUSER 0
;
;	Mobile side combat
;
	LD 0 !16 NEXT !16 IPLAYER ME
	DO 12
		LDP 64 !ME PLOC LT 64 0 JP 3
		LDP 64 !ME 10 LT 64 0 JP 2
		-HERE !64 SETP !ME 10 -1 JP 1
		CALL 20
	NEXT !ME IPLAYER ME LOOP 12
	DONE
;
;
;
@TAB 7
;
;	Someone has left the game, either by an EXIT call, or by direct
;	intervention (eg network line drop)
;
;	This can be called anywhere - use only private flags (240-245)
;	not 64 65 etc PLEASE
;
;	If we are called free slot, we have exited or been exited in table
;	7 handling.. eg clearing call just as we quit. We just throw the
;	extra case away and go back to the old one
;
	CALLED !ME {[FREE SLOT]} DONE
;
;	Potato quitting puts staff away
;
	CALLED !ME {Potato} PLACE POTATOSTAFF ARCHSTUDY
;
;	Check for leaving in fights - we log this stuff
;
	LDP 240 !ME PFIGHT -EQ 240 -1 MSGCR {leaving game in a fight is naughty and any offenders will be punished!}
;
;	Clean up attched cases - Dont use DO here, unless its a DO used nowhere else
;
	LD 240 0
	LDP 241 !240 PATTACHED EQ 241 !ME SETP !240 PATTACHED NOITEM LDP 241 !240 PFLAGS2 RES 241 attached SETP !240 PFLAGS2 !241
	ADD 240 1 LT 240 !16 JP -2
;
;	Calculate time of day
;
	CALL 59
;
;	Set up info
;
	SETP !ME  PATTACHED NOITEM LDP 240 !ME PFLAGS RES 240 attached SETP !ME PFLAGS !240
	LDP 240 !ME PGAMES ADD 240 1 SETP !ME PGAMES !240
	LDP 240 !ME PFIGHT -EQ 240 -1 MFORMAT {%m0 %N1 exited while in a fight!(naughty naughty!)} LOG TIME { } !ME !ME !ME APPEND PLAYERLOG LOG
;
;	Do logging
;
	EQ 240 -1 -EQ FDIED -1 MFORMAT {%m0 %N1 has exited the game.} LOG TIME { } !ME !ME !ME APPEND PLAYERLOG LOG
	EQ 240 -1 EQ FDIED -1 MFORMAT {%m0 %N1 has exited the game having died.} LOG TIME { } !ME !ME !ME APPEND PLAYERLOG LOG
;
;	Report byebye	
;
	MSGCR {Goodbye.} DOACT !ME {has left.} 25
;
;	Tell everybody whats happening
;
	LD 240 0
	LDP 242 !ME PFIGHT PBIT !240 %wizmode  -EQ 242 -1 LD 241 !0 LD 0 !240  PNAME !241 MSGCR { has left the game in a fight!} LD 0 !241
	ARCH !240 LDP 241 !240 PLOC -EQ 241 -1 EQ 242 -1 EQ FDIED -1 LD 241 !0 LD 0 !240 PNAME !241 MSGCR { has died.} LD 0 !241
	ARCH !240 LDP 241 !240 PLOC -EQ 241 -1 EQ 242 -1 -EQ FDIED -1 LD 241 !0 LD 0 !240 PNAME !241 MSGCR { has quit the game.} LD 0 !241
	ADD 240 1 LT 240 !16 JP -4
;
;	Save the player
;
	SETP !ME 5 -1 SAVE SETP !ME PATTACHED -1 LDP 240 !ME PFLAGS2 RES 240 attached SETP !ME PFLAGS2 !240
	SETP !ME 6 1000
;
;	Discard belongings
;
	-NEIL !ME -1 241 JP 3
	LDR 240 !ME PLOC
	GOT !241 PLACE !241 !240
	NEIL !ME !241 241 JP -2
	LD FDIED 0
;
;	Release wizlock if we owned it
;
	EQ FWIZLOCK !ME LD FWIZLOCK -1
	DONE
@TAB 8
;
;	Move people around..	MUST NOT AFFECT FLAG 70
;
;	Movement cancels follow info.. follow itself restores this flag
;	if it needs too.
;
	SETP !ME PFOLLOW NOITEM
	PBIT !ME %crippled MSGCR {You aren't going anywhere when you are crippled!} DONE
	LDP 65 !ME 10 -EQ 65 NOITEM MSGCR NINFIGHT DONE
;
;	Mobiles special rules
;
	EQ ME @INNKEEPER DONE
	EQ ME @REAPER AT GRAVE7 EQ 64 ENORTH DONE
	EQ ME @SEAGULL EQ 64 ESOUTH AT ULEDGE DONE
	EQ ME @SEAGULL2 EQ 64 ESOUTH AT ULEDGE DONE
	EQ ME @BEGGAR EQ 64 ENORTH AT SGATE DONE
	EQ ME @SEAGULL EQ 64 ESOUTH AT CLIFFPATH DONE
	EQ ME @TROLL1 EQ 64 ENORTH AT CAVEJUNC DONE
	EQ ME @TROLL1 EQ 64 EWEST AT GCMAZE8 DONE
;
;	General special rules
;
	EQ 64 EDOWN AT CLIFFPATH LT FTIDETICK 180 MSGCR {The tide is in, and the cliff path leads nowhere.} DONE
	EQ 64 EDOWN AT BYPIT STATE WATER 5 MSGCR {You can't get to the pit, its overflowing with water.} DONE
	EQ 64 EWEST AT PIT  -STATE WATER 4 MSGCR {You can't quite reach the passageway.} DONE
	EQ 64 EWEST AT SOUTHYARD GT FHAYBARNBURN 0 LT FHAYBARNBURN 240 MSGCR {The flames beat you back.} DONE
;
;
;	Normal junk
;
	LDP 65 !ME 1 -IS !65 2 MSGCR {You can't go that way.} DONE
	LDR 66 !65 !64
;	Z 66 -LT 65 @FRST1 -GT 65 @FRST5 MSGCR {The thick trees and undergrowth bars your path.} DONE
	Z 66 MSGCR {You can't go that way.} DONE
;
;	Sinking into the mud
;	
	AT SOUTHYARD LT FWATER 11 WEIGHS 900 MSGCR {You seem to be bogged down in the mud with all1 your weight.} SETSTATE FARMMUD 0 DONE
	AT SOUTHYARD GT FWATER 10 LT FWATER 51 WEIGHS 700 MSGCR {You seem to be bogged down in the mud with all your weight.} SETSTATE FARMMUD 1 DONE
	AT SOUTHYARD GT FWATER 50 LT FWATER 101 WEIGHS 600 MSGCR {You seem to be bogged down in the mud with all your weight.} SETSTATE FARMMUD 2 DONE
	AT SOUTHYARD GT FWATER 100 LT FWATER 151 WEIGHS 500 MSGCR {You seem to be bogged down in the mud with all your weight.} SETSTATE FARMMUD 3 DONE
	AT SOUTHYARD GT FWATER 151 WEIGHS 400 MSGCR {You seem to be bogged down in the mud with all your weight.} SETSTATE FARMMUD 4 DONE
;
;	Other special cases
;
	HERE VAMPYRE -GOT CRUCIFIX MSGCR {As you turn away the vampyre sinks his teeth deep into your neck.} EXIT DONE
	AT CHIMNEY EQ 66 @MEETRM STATE FIRE1 0 MSGCR {The fire is lit.. you will get toasted trying to do that.} DONE
	IS !66 3 STATE !66 1 AT CELLAR2 MSGCR {You can't go that way.} DONE
	IS !66 3 AT PASS2 -STATE !66 0 EQ 64 ENORTH MSGCR {You can't go that way.} DONE
	IS !66 3 STATE !66 2 MSGCR {The door is locked.} DONE
	IS !66 3 STATE !66 1 MSGCR DRSHUT DONE
	IS !66 3 LDO 67 !66 6 ADD 66 !67 LDO 66 !66 1
	EQ 66 -1 MSGCR {You can't go that way.} DONE
	GOT PIKE -RBIT !66 %outside MSGCR {You can't take a pike in there!} DONE
	RBIT !66 %nomobile -LT ME !16 DONE
	EQ 66 @JROCK2 LT FWTYPE 2 LD 66 @JROCK3
	MFORMAT {%l0} LOG {} {} !ME !ME !ME DOACT !ME LOG 25 PLACE !ME !66 MFORMAT {%a0} LOG {} {} !ME !ME !ME DOACT !ME LOG 25
;
;	Dont describe rooms to mobiles.
;
	-LT ME !16 DONE
;	Attempt to only describe room once if in brief mode
;
	LDP 65 !ME PLOC IS !65 IROOM RBIT !65 %death LDP 64 !ME PFLAGS RES 64 %brief SETP !ME PFLAGS !64 LOOK DONE
	LDP 65 !ME PFLAGS2 BIT 65 verbose LDP 64 !ME PFLAGS RES 64 %brief SETP !ME PFLAGS !64 LOOK DONE
	BIT 65 superbrief LDP 64 !ME PFLAGS SET 64 %brief SETP !ME PFLAGS !64 LOOK DONE
	LDP 65 !ME PLOC
	LDR 67 !65 RBEENTO BIT 67 !ME LDP 64 !ME PFLAGS SET 64 %brief SETP !ME PFLAGS !64 LOOK DONE
	SET 67 !ME SETR !65 RBEENTO !67 -PBIT !ME %brief LOOK DONE
	LDP 64 !ME PFLAGS RES 64 %brief SETP !ME PFLAGS !64 LOOK SET 64 %brief SETP !ME PFLAGS !64 DONE
	DONE
@TAB 9
;	Saying things
	AT ECHCAVE MFORMAT {%m0} SECHO U1 { } !ME !ME !ME LD FECHO 3
	HERE PARROT RANDOM 64 DIV 64 2500 ADD 64 &PARROT1 MFORMAT {%m0} !64 U1 { } !ME !ME !ME
	LD 64 !ME
	FORUSER 0 ME
		EQ 64 !ME JP 4
		PBIT !ME %asleep JP 3
		PBIT !ME %deaf JP 2
		HERE !64 CANSEE !ME !64 PNAME !64 MSG { says "} MSG U1 MSGCR {".} JP 1
		HERE !64 MSG {Someone says "} MSG U1 MSGCR {".}
	ENDUSER 0
	LD ME !64
;
;	Special things you can say
;
$ANY paradise once AT ECHCAVE DOACT !ME {vanishes in a flash!} 25 PLACE !ME RIDCAV DOACT !ME {appears in a flash!} 25 LOOK
$ANY amnatha anitra STATE CANDLE 1 DONE
$ANY amnatha anitra AT PENTACLE HERE CANDLE CALL 52 DONE
$ANY amnatha anitra CHANCE 8500 DONE
$ANY amnatha anitra AT TCENTRE ISAT CANDLE PENTACLE ISAT THYME PENTACLE CALL 52 DONE
$ANY amnatha anitra AT TCENTRE ISAT CANDLE PENTACLE CALL 51 DONE
$ANY $ANY $ANY	DONE
@TAB 10
;
;	Anarchy's revised Madsysop's revised who command
;
	LDP 69 !ME PLEVEL
	FORUSER 0 65
		LDP 68 !65 PVIS LT 69 !68 JP 5
		GT 68 0 MSG OPBRK
		LDP 64 !65 PLEVEL CALL 16
		ARCH !ME MSG WHOAT LDP 67 !65 1 PNAME !67 MSG WHOCARR LOBJS !65
		GT 68 0 MSG CLBRK
		CR
	ENDUSER 0
	DONE
@TAB 11
;
; Sync door sides Door in !8, ie make both door sides same state
; When the faking stuff works properly this wont be needed
;
	LDO 65 !8 2 LDO 64 !8 6 ADD 64 !8 SETO !64 2 !65 DONE
@TAB 12
;
;	SHOUT COMMAND
;
	AT ECHCAVE MFORMAT {%m0} SECHO U1 { } !ME !ME !ME LD FECHO 3
;
;	Go around and tell the relevant people
;
	LD 64 !ME
	FORUSER 0 ME
		EQ 64 !ME JP 7
		PBIT !ME %deaf JP 6
		PBIT !ME %asleep LDP 67 !ME PFLAGS RES 67 %asleep SETP !ME PFLAGS !67 MSGCR {You wake up.}
		HERE !64 CANSEE !ME !64 PNAME !64 JP 3
		ARCH !ME PNAME !64 JP 2
		ARCH !64 LDP 65 !ME 6 LDP 66 !64 6 -LT 65 !66 PNAME !64 JP 1
		MSG VOICESAY
		MSG SHOUT MSG U1 MSGCR QUOTEDOT
	ENDUSER 0
	LD ME !64 DONE
	DONE
@TAB 13
;
;	ROOM COMMAND	(Unfinished)
;
	LD 64 0 LD 65 0 LD 66 0
	DO 0
	  MFORMAT {%n0 } LOG { } { } !64 !ME !ME LENGTH LOG 67
	  IS !64 IROOM DIV 67 20 ADD 66 !67 ADD 66 1 GT 66 4 CR LD 66 0
	  IS !64 IROOM MSG LOG TABTO 20 ADD 65 1 EQ 66 4 LD 66 0
	  NEXT !64 IROOM 64 LOOP 0
	CR PRINT !65 MSGCR NUMROOMS DONE
@TAB14
;
;	DIR command (unfinished)
;
	LD 65 0 LD 66 0 LD 64 NOITEM
	-NEXT !64 IOBJECT 64 MSGCR {Wot no objects!} DONE
	DO 0
	  MFORMAT {%n0} LOG { } { } !64 !ME !ME LENGTH LOG 67 LD 68 !67
	  IS !64 IOBJECT ADD 66 20 DIV 66 20 MUL 66 20
	  IS !64 IOBJECT ADD 67 !66 GT 67 58 CR LD 66 0
	  IS !64 IOBJECT PNAME !64 TABTO 20 ADD 65 1 ADD 66 !68
	NEXT !64 IOBJECT 64 LOOP 0
	CR PRINT !65 MSGCR NUMOBS DONE
@TAB 15
;
;	Where command. Doesn't currently handle any item hiding room ideas
;	since it doesnt ever get called by a mortal
;
	LD 64 0 -NEXTGMATCH !4 !1 -1 64 DONE
	LDO 65 !64 1 EQ 65 -1 JP 6
	-CANSEE !ME !64 JP 5
	IS !64 2 JP 4
	LDP 65 !64 1 -CANSEE !ME !65 JP 3
	PNAME !64 IS !65 1 MSG CARRBY PNAME !65 MSGCR DOT JP 2
	IS !65 2 MSG WHOAT PNAME !65 MSGCR SQDOT JP 1
	MSG INOBJ PNAME !65 MSGCR DOT
	NEXTGMATCH !4 !1 !64 64 JP -8
	DONE
@TAB 16
;
;Level Name LEV in 64 user in 65
;dont ever let this be -1 or it goes off forever
;
;	Special accounts
;
	CALLED !65 {System} MSG {System (Operator)} DONE
	CALLED !65 {Potato} GT 64 12 JP 16
	CALLED !65 {Madsysop} GT 64 12 JP 15
	-PBIT !65 %male JP 16
	JP !64
	PNAME !65 MSG THE MSG LEVNM1 DONE
	PNAME !65 MSG THE MSG LEVNM2 DONE
	PNAME !65 MSG THE MSG LEVNM3 DONE
	PNAME !65 MSG THE MSG LEVNM4 DONE
	PNAME !65 MSG THE MSG LEVNM5 DONE
	PNAME !65 MSG THE MSG LEVNM6 DONE
	MSG LEVNM7 MSG SPACE PNAME !65 DONE
	MSG LEVNM8 MSG SPACE PNAME !65 DONE
	MSG LEVNM9 MSG SPACE PNAME !65 DONE
	MSG LEVNM10 MSG SPACE PNAME !65 DONE
	MSG LEVNM11 MSG SPACE PNAME !65 DONE
	MSG LEVNM12 MSG SPACE PNAME !65 DONE
	MSG LEVNM13 MSG SPACE PNAME !65 DONE
	MSG LEVNM14 MSG SPACE PNAME !65 DONE
	MSG LEVNM15 MSG SPACE PNAME !65 DONE
	JP !64
	PNAME !65 MSG THE MSG LEVNF1 DONE
	PNAME !65 MSG THE MSG LEVNF2 DONE
	PNAME !65 MSG THE MSG LEVNF3 DONE
	PNAME !65 MSG THE MSG LEVNF4 DONE
	PNAME !65 MSG THE MSG LEVNF5 DONE
	PNAME !65 MSG THE MSG LEVNF6 DONE
	MSG LEVNF7 MSG SPACE PNAME !65 DONE
	MSG LEVNF8 MSG SPACE PNAME !65 DONE
	MSG LEVNF9 MSG SPACE PNAME !65 DONE
	MSG LEVNF10 MSG SPACE PNAME !65 DONE
	MSG LEVNF11 MSG SPACE PNAME !65 DONE
	MSG LEVNF12 MSG SPACE PNAME !65 DONE
	MSG LEVNF13 MSG SPACE PNAME !65 DONE
	MSG LEVNF14 MSG SPACE PNAME !65 DONE
	MSG LEVNF15 MSG SPACE PNAME !65 DONE
@TAB 17
;
;	Someone has died, as in physically ceasing to be alive for good
;	If its a mobile dump them, if its a player generate new 0 score
;	bottom level char, unless they are archwizzes
;
;	THIS TABLE MUST NOT AFFECT FLAG 67
;
;	Drop all stuff if a mobile... (Player does it in table 7)
;
	LDP 240 !ME PFIGHT -EQ 240 NOITEM SETP !ME PFIGHT NOITEM
	LDR 240 !ME PLOC
	-NEIL !ME -1 241 JP 2
	GOT !241 PLACE !241 !240
	NEIL !ME !241 241 JP -2
;
;	dont reset mobile stats (They are used for score calc etc...)
;
	PLACE !ME DUMP
	-LT 0 !16 DONE
;
; 	or arch/wiz in wizmode stats
;
	ARCH !ME DONE
	PBIT !ME %wizmode DONE
;
;	Generate new stats for the character
;
	RANDOM 64 DIV 64 500 ADD 64 50 SETP !ME PAGIL !64
	RANDOM 64 DIV 64 500 ADD 64 50 SETP !ME PMAXSTAM !64 SETP !ME PSTAM !64
	RANDOM 64 DIV 64 500 ADD 64 50 SETP !ME PSTR !64
;
;	Set up the rest of the info
;
	SETP !ME PLEVEL 0 SETP !ME PSCORE 0 SETP !ME PSNOOP -1 SETP !ME PVIS 0
	SETP !ME PFIGHT -1 LD FDIED -1 SETP !ME PTRACE -1 SETP !ME 12 -1 SETP !ME 13 -1
	SETP !ME PTRACEREF -1 SETP !ME PSPEED -1 SETP !ME PSPCOUNT -1 SETP !ME PWPN -1
	SETP !ME PFLAGS2 0
	DONE
@TAB 18
;
;	Generate level for player 65 
;	ignore mobiles!
;
	-LT 65 !16 DONE
	LDP 66 !65 PLEVEL LDP 67 !65 PSCORE
	GT 66 12 DONE
	LD 64 0
	GT 67 99 LD 64 1
	GT 67 199 LD 64 2
	GT 67 299 LD 64 3
	GT 67 499 LD 64 4
	GT 67 799 LD 64 5
	GT 67 1299 LD 64 6
	GT 67 2099 LD 64 7
	GT 67 3399 LD 64 8
	GT 67 5499 LD 64 9
	GT 67 8899 LD 64 10
	GT 67 14399 LD 64 11
	GT 67 23299 LD 64 12
	EQ 66 !64 DONE
	SETP !65 2 !64 MSG UARENOW CALL 16 CR
	SUB 64 !66 MUL 64 6
	LDP 66 !ME 4 ADD 66 !64 SETP !ME 4 !66
	LDP 66 !ME 7 ADD 66 !64 SETP !ME 7 !66
	LDP 66 !ME 8 ADD 66 !64 SETP !ME 8 !66
	LDP 66 !ME 9 ADD 66 !64 SETP !ME 9 !66 DONE
@TAB 19
;
;	Move a mobile around (mobile is !ME)
;
	AT DUMP DONE
	LDP 64 !ME PLOC LT 64 0 DONE
	LDP 64 !ME PSPCOUNT LDP 65 !ME PSPEED ADD 64 1 LT 64 !65 SETP !ME PSPCOUNT !64 DONE
	SETP !ME PSPCOUNT 0
	EQ ME @GURU DONE
	EQ ME @VAMPYRE DONE
	EQ ME @CHARON DONE
	EQ ME @RIDDLER DONE
	EQ ME @PARROT CALL 34 DONE
	EQ ME @CRIER CALL 35 DONE
	EQ ME @TROLL DONE
	EQ 254 0 -EQ ME @PRIEST -EQ ME @DANCERS RANDOM 64 DIV 64 2500 ADD 64 2 CALL 8
	LDP 64 !ME PATTACK -CHANCE !64 JP 4
	LDP 64 !ME PFIGHT -EQ 64 -1 JP 3
	FORUSER 0 64
		EQ FPEACE 0 HERE !64 CHANCE 2000 SETP !ME PFIGHT !64 SETP !64 PFIGHT !ME DOTO !ME ATTACK 1 !64 MFORMAT {%N0 and %N1 have started fighting.} LOG { } { } !ME !64 !ME LD 64 &LOG CALL 39 DONE
	ENDUSER 0
	LDP 64 !ME PSYSTAB GT 64 0 CALL !64
	DONE
@TAB 20
;
;	0 is attacking 64
;
	EQ 0 -1 DONE
	EQ 0 @-1 DONE
	EQ 64 -1 DONE
	EQ 64 @-1 DONE
;
;	Kill any follows/wake up - ought to get bonus hit in for sleeping
;	victims really
;
	PBIT !64 %asleep LDP 65 !64 PFLAGS RES 65 %asleep SETP !64 PFLAGS !65 LD 65 !ME LD ME !64 MSGCR {You wake up.} LD ME !65
	SETP !ME PFOLLOW NOITEM
;
;	Consider combat chances
;
	LDP 65 !ME PAGIL LDP 66 !64 PAGIL SUB 65 !66 DIV 65 4 ADD 65 50
	GT 65 90 LD 65 90
	RANDOM 66 DIV 66 100
	SETP !64 PFIGHT !ME LDP 67 !ME PWPN
	GT 65 !66 JP 4
	EQ 67 -1 MSG UMISSED PNAME !64 MSGCR DOT
	EQ 67 -1 LD 68 !ME LD 0 !64 PNAME !68 MSG MISSEDU MSGCR DOT LD 0 !68 DONE
	MSG UMISSED PNAME !64 MSG WITH PNAME !67 MSGCR DOT
	LD 68 !ME LD 0 !64 PNAME !68 MSG MISSEDU MSG WITH PNAME !67 MSGCR DOT LD 0 !68 DONE
;
;	A Hit!
;
	EQ 67 -1 MSG UHIT PNAME !64 MSGCR DOT
	EQ 67 -1 LD 68 !ME LD 0 !64 PNAME !68 MSG HITU MSGCR DOT LD 0 !68
	-EQ 67 -1 MSG UHIT PNAME !64 MSG WITH PNAME !67 MSGCR DOT
	-EQ 67 -1 LD 68 !ME LD 0 !64 PNAME !68 MSG HITU MSG WITH PNAME !67 MSGCR DOT LD 0 !68
	LDP 68 !ME PSTR DIV 68 15
	-EQ 67 -1 LDO 69 !67 ODAMAGE ADD 68 !69
	EQ 68 0 DONE
	LD 70 10000 DIV 70 !68 RANDOM 68 DIV 68 !70 ADD 68 2
	LDP 69 !64 PSTAM SUB 69 !68 SETP !64 PSTAM !69
;
;	Do death stuff
;
	LT 69 1 LDP 70 !64 PLEVEL LD 68 !70 MUL 68 !70 MUL 68 !70
	LT 69 1 -LEVEL 12 LDP 70 !ME PSCORE ADD 70 !68 SETP !ME PSCORE !70
	LT 69 1 LD 68 !ME LD ME !64 MSGCR YOUDIED CALL 17 EXIT
	LT 69 1 LD ME !68 MSGCR GOTEM SETP !ME PFIGHT -1
	LT 69 1 EQ 64 @KEEPER MSGCR MANDIES DONE
	LD 65 !ME CALL 18 DONE
@TAB 21
;
;	Fleeing from something
;
	LDP 69 !ME PFIGHT EQ 69 -1 CALL 8 DONE
	DOACT !ME RUNAWAY 1 LDP 69 !ME 3 LD 68 !69 DIV 68 10 SUB 69 !68 SETP !ME 3 !69
	LDP 70 !ME PFIGHT SETP !ME PFIGHT -1 CALL 8 HERE !70 SETP !ME PFIGHT !70 DONE
	SETP !70 PFIGHT -1
	DONE
@TAB 22
;
;	Cases for people doing things
;
	PBIT !ME %setup DONE
	PBIT !ME %pretend DONE
	LDP 64 !ME PFLAGS2 BIT 64 password RES 64 password SETP !ME PFLAGS2 !64 DONE
;
;	Don't set prompts on mobiles
;
	-LT ME !16 DONE
	LDP 64 !ME PFLAGS2 BIT 64 converse PROMPT {Say> } DONE
	ARCH !ME LDP 64 !ME 6 GT 64 16 PROMPT {((---->))} DONE
	PBIT !ME %wizmode GT 64 0 PROMPT {(---->)} DONE
	PBIT !ME %wizmode PROMPT {---->} DONE
	LDP 64 !ME 6 GT 64 0 PROMPT {(>>>)} DONE
	PROMPT {>>>} DONE
@TAB 23	
;
;	Broadcast MSG !64 to all, including sleepers/deaf/blind - a bit nicer
;	in 1.10 now foruser exists
;
	LD 65 !ME
	FORUSER 0 ME
		MSGCR !64
	ENDUSER 0
	LD ME !65 DONE
@TAB 24
;
;	Weather changes - currently very simplified compared with aber#5
;
	RANDOM 64 LT 64 5000 LD 65 0
	GT 64 4999 LD 65 1
	GT 64 5999 LD 65 2
	GT 64 8999 LD 65 3
	CALL 29
	DONE
@TAB 25
;
;	Describe weather
;
	GT FHOUR 6 LT FHOUR 22 JP 4
	EQ FWTYPE 1 MSGCR {Thin whispy clouds scud across the wan and gibbous moon.} DONE
	EQ FWTYPE 2 MSGCR {Dark clouds, veil the sky, and the rain pours down.} DONE
	EQ FWTYPE 3 MSGCR {Black storm clouds scud across the moonlit sky, and the rain lashes down.} DONE
	MSGCR {A pale gibbous moon hangs in the sky.} DONE
	EQ FWTYPE 1 MSGCR {It is drizzling.} DONE
	EQ FWTYPE 2 MSGCR {It is raining.} DONE
	EQ FWTYPE 3 MSGCR {The skies are filled with dark and scudding clouds, and the rain lashes down.} DONE
	DONE
@TAB 26
;
; 	Broadcast MSG !64 to non sleepers who are outside and not blind
;
	LD 65 !ME
	FORUSER 0 ME
		LDP 66 !ME PLOC -PBIT !ME %blind -PBIT !ME %asleep IS !66 IROOM RBIT !66 %outside MSGCR !64
	ENDUSER 0
	LD ME !65 DONE
@TAB 27
;
;	check if players in the pit can swim or sink.
;
	FORUSER 0 ME
		AT PIT WEIGHS 500 MSGCR {You sink into the murky depths under all your weight,never to see daylight again...} EXIT
		AT PIT -WEIGHS 500 MSGCR {You swim around in the dirty water.}
		AT PIT PBIT !ME %crippled MSGCR {You dont seem to be able to swim,and you sink to the bottom..} EXIT
	ENDUSER 0
	DONE
@TAB 28
;
;	kicks players out of pit when water level is high.
;
	FORUSER 0 ME
		AT PIT PLACE !ME BYPIT MSGCR {You are washed out of the pit.} LOOK DOACT !ME {is washed out of the pit.} 1
		AT PASS1 MSGCR {All of a sudden the water comes rushing down the passage. The force of the} MSGCR {water blows you out down the passage into the open air} MSGCR {You fall... and fall...} MSGCR {Then land with an all too fatal thud}
		AT PASS1 PLACE !ME ROCKRISE DOACT !ME {flies out of the hole in the rock and lands with a splat.} 1 PLACE !ME DUMP EXIT
		AT PASS2 MSGCR {All of a sudden the water comes rushing down the passage. The force of the} MSGCR {water blows you out down the passage into the open air} MSGCR {You fall... and fall...} MSGCR {Then land with an all too fatal thud}
		AT PASS2 PLACE !ME ROCKRISE DOACT !ME {flies out of the hole in the rock and lands with a splat.} 1 PLACE !ME DUMP EXIT
		AT HIDDENRM MSGCR {The door is blown clean open and a huge wave of water crushes you paper thin} MSGCR {against the far wall} EXIT
	ENDUSER 0
;
;	Do the mobiles too
;
	LD 64 @SEAGULL
	LD 0 !64 AT PIT PLACE !ME BYPIT DOACT !ME {is washed out of the pit.} 1
	AT PASS1 MSGCR {All of a sudden the water comes rushing down the passage. The force of the} MSGCR {water blows you out down the passage into the open air} MSGCR {You fall... and fall...} MSGCR {Then land with an all too fatal thud}
	AT PASS1 PLACE !ME ROCKRISE DOACT !ME {flies out of the hole in the rock and lands with a splat.} 1 EXIT
	AT PASS2 MSGCR {All of a sudden the water comes rushing down the passage. The force of the} MSGCR {water blows you out down the passage into the open air} MSGCR {You fall... and fall...} MSGCR {Then land with an all too fatal thud}
	AT PASS2 PLACE !ME ROCKRISE DOACT !ME {flies out of the hole in the rock and lands with a splat.} 1 EXIT
	AT HIDDENRM MSGCR {The door is blown clean open and a huge wave of water crushes you paper thin} MSGCR {against the far wall} EXIT
	ADD 64 1 -GT 64 @VOLE JP -7
	STATE WFALL 0 DOACT WFALL {springs to life and begins gushing down the cliff.} 0 SETSTATE WFALL 1
	DONE
@TAB 29
;
;	set weather to !65, and tell people of changes
;
	EQ 65 !FWTYPE DONE
	EQ 65 3 LD FWTYPE 3 LD 64 &STORMBREAK CALL 26 DONE
	EQ FWTYPE 0 -EQ 65 0 LD FWTYPE !65 LD 64 &RAINS CALL 26 DONE
	EQ 65 0 -EQ FWTYPE 0 LD FWTYPE !65 LD 64 &RAINSTOP CALL 26 DONE
	LD FWTYPE !65 DONE
@TAB 30
;
;	CD player draining strength (very silly)(I know, but its fun to keep)
;
	FORUSER 0 ME
		AT DYLROOM LDP 65 !ME PSTAM SUB 65 1 SETP !ME PSTAM !65
		AT DYLROOM EQ 65 0 MSGCR { The music has taken too much from you, and you have died..} EXIT
	ENDUSER 0
	DONE
@TAB 31
	LD 64 !ME
	FORUSER 0 65
		-EQ 64 !65 LD 0 !65 PBIT !ME %wizmode LDP 66 !ME PLOC -EQ 66 -1 PNAME !64 MSG { has entered game having played } LDP 240 !64 PGAMES PRINT !240 MSGCR { times.}
	ENDUSER 0
	LD ME !64 DONE
@TAB 32
;
;	Send text message in flag 64 to all awake seeing people in a room regardless
;	MUST NOT AFFECT FLAG 66
;
	FORUSER 0 65
		HERE !65 -PBIT !65 %asleep -PBIT !65 %blind LD 66 !0 LD 0 !65 MSGCR !64 LD 0 !66
	ENDUSER 0
	DONE
@TAB 33
;
;	Ferryman in action.
;
	DOACT CHARON {rows the raft across the lake} 25
	STATE RAFTMK2 1 PLACE CHARON UNBCH DOACT CHARON {rows the boat away.} 25
	STATE RAFTMK2 1 PLACE RAFTMK1 RIVCAV SETR RIVCAV EEAST @RAFTRM SETR UNBCH EWEST 0 SETR RAFTRM EEAST 0
	STATE RAFTMK2 1 SETR RAFTRM EWEST @RIVCAV
	STATE RAFTMK2 1 DEC RAFTMK2 PLACE CHARON RAFTRM JP 4
	PLACE CHARON RIVCAV DOACT CHARON {rows the boat away.} 25
	PLACE RAFTMK1 UNBCH SETR RIVCAV EEAST 0 SETR UNBCH EWEST @RAFTRM SETR RAFTRM EWEST 0
	SETR RAFTRM EEAST @UNBCH
	INC RAFTMK2 PLACE CHARON RAFTRM
	LD 64 &{A boat comes slowly into view, rowed by a strange ferryman.} LD 66 !ME LD ME @RAFTMK1 CALL 32 LD ME !66 LOOK
	DONE
@TAB 34
;
;	Parrot control table
;
	LDP 64 BEGGAR PLOC LDP 65 PARROT PLOC
	-EQ 64 !65 -EQ 64 -1 -EQ 64 @DUMP -EQ 65 -1 -EQ 65 @DUMP PLACE PARROT !64
	RANDOM 64 DIV 64 2500 LD 65 &PARROT1 ADD 65 !64
	MFORMAT {squarks '%m0'.} PARROTM !65 { } !ME !ME !ME
	AT ECHCAVE MFORMAT {%m0} SECHO !65 { } !ME !ME !ME LD FECHO 3
	DOACT !ME PARROTM 25 DONE
@TAB 35
;
;	Town crier message
;
	LD 64 !ME
	FORUSER 0 ME
		-PBIT !ME %deaf HERE CRIER TYPE {SUB/crier.msg}
	ENDUSER 0
	LD 0 !64 DONE
@TAB 36
;
;	Shelf flipper
;
	LD 64 !ME
	FORUSER 0 ME
		-PBIT !ME %wizmode AT UTOMB MSGCR {The walls slide inwards crushing you out of existance.} EXIT
		PBIT !ME %wizmode AT UTOMB MSGCR {The walls slide inwards, but just stop short of crushing you!}
	ENDUSER 0
	LD ME !64
	DONE
@TAB 37
;
;	Burn lights down and send them out
;
	LDO 64 !ME OBURN LT 64 0 DONE
	-STATE !ME 0 DONE
	LD 65 !ME LD 68 0
	LDO 66 !65 OLOC EQ 66 -1 JP 7
	EQ 66 !65 DONE
	ADD 68 1 EQ 68 10 DONE
	IS !66 IROOM -RBIT !66 %underwater JP 4
	-IS !66 IROOM LD 65 !66 JP -5
	DOACT !ME {goes out.} 25 SETSTATE !ME 1
	LDO 65 !ME OLOC LT 65 !16 -PBIT !65 %asleep LD 66 !ME LD ME !65 PCNAME !66 MSGCR { goes out.} LD 0 !66
	DONE
	EQ 64 0 DOACT !ME {goes out.} 25 SETSTATE !ME 1
	EQ 64 0 LDO 65 !ME OLOC LT 65 !16 -PBIT !65 %asleep LD 66 !ME LD ME !65 PCNAME !66 MSGCR { goes out.} LD 0 !66
	EQ 64 0 DONE
	EQ 64 60 DOACT !ME {flickers and dims.} 25
	EQ 64 60 LDO 65 !ME OLOC LT 65 !16 -PBIT !65 %asleep LD 66 !ME LD ME !65 PCNAME !66 MSGCR { flickers and dims.} LD 0 !66
	SUB 64 1 SETO !ME OBURN !64
	DONE
@TAB 38
;
;	Damage weapon !70 by !71
;
	LDO 72 !70 OSHARP EQ 72 0 DONE
	-STATE !70 0 DONE
	LDO 73 !70 OBLUNT ADD 73 !71 SETP !70 OBLUNT !73
	-GT 73 !72 DONE
	INC !70
	LDO 71 !70 ODAMAGE DIV 71 2 SETO !70 ODAMAGE !71 DONE
@TAB 39
;
;	Broadcast message in 64 to all peeps in wizmode.
;
	LD 65 !ME
	FORUSER 0 ME
		LDP 66 !ME PLOC -EQ 66 -1 PBIT !ME %wizmode MSGCR !64
	ENDUSER 0
	LD 0 !65 DONE
@TAB 40
;
;	Deals with ring invis junk
;
	LDP 64 !ME PSTAM GT 64 9 SUB 64 1 SETP !ME PSTAM !64 DONE
	MSGCR RINGKILL LDP 64 !ME PFLAGS SET 64 %asleep SETP !ME PFLAGS !64 LDO 64 GOLDRING OFLAGS RES 64 %worn SETO GOLDRING OFLAGS !64
	DOACT !ME {collapses to the ground} 25 DONE
@TAB 41
;
;	POLICE. If called with 67=0 print to file else print to screen
;
	CALL 59
	EQ 67 0 MFORMAT {%N0 made the complaint on %m0} LOG TIME { } !ME !ME !ME APPEND POLICEFILE LOG
	LD 64 0 LD 65 &COM1
	EQ 67 0 APPEND POLICEFILE !65
	-EQ 67 0 MSGCR !65
	ADD 65 1 ADD 64 1 LT 64 20 JP -3
	EQ 67 0 APPEND POLICEFILE {Players on were: } LD 64 0
	-EQ 67 0 MSGCR {Players on are: } LD 64 0
	LDP 65 !64 PLOC EQ 65 -1 JP 4
	LDP 66 !64 PWPN EQ 66 -1 MFORMAT {%N0 at %N1 wielding nothing} LOG { } { } !64 !65 !ME JP 1
	MFORMAT {%N0 at %N1 wielding %n2} LOG { } { } !64 !65 !66
	EQ 67 0 APPEND POLICEFILE LOG
	-EQ 67 0 MSGCR LOG
	ADD 64 1 LT 64 !16 JP -6
	DONE
@TAB 42
;
;	The day/night clock
;
	EQ FHOUR 7 LD 64 &{The sun rises, and dawn breaks.} CALL 26 CALL 43
	EQ FHOUR 22 LD 64 &{The sun sets, and night falls.} CALL 26 CALL 44
	EQ FHOUR 12 LD 64 &{It is midday.} CALL 26
	EQ FHOUR 21 LD 64 &{The sun is sinking below the horizon.} CALL 26
	EQ FHOUR 24 LD FHOUR 0
	DONE
@TAB 43
;
;	Things done at dawn
;
	DOACT REAPER {vanishes.} 25 PLACE REAPER DUMP DOACT SPIRIT {fades away as it is touched by the sunlight.} 25 PLACE SPIRIT DUMP
	DONE
@TAB 44
;
;	Things for nightfall
;
	LDO 64 REAPER PSTAM GT 64 1 PLACE REAPER GRAVE3 DOACT REAPER {coalesces out of the shadows.} 25
	LDO 64 SPIRIT PSTAM GT 64 1 PLACE SPIRIT GRAVE5 DOACT SPIRIT {fades slowly into view.} 25
	DONE
@TAB 45
;
;	Using the wand of fireballs
;
	-EQ FPEACE 0 MSGCR {Feeling pacifist you decide not to.} DONE
	EQ 12 @INNKEEPER DOACT INNKEEPER {runs off.} 25 PLACE INNKEEPER DUMP PLACE TROLL INN DOACT TROLL {lumbers up to you.} 25 LD 12 @TROLL
	EQ 12 @CHARON MSGCR {The ferryman grabs the wand from your hands!} PLACE WAND WAND DONE
	EQ 12 @CRIER MSGCR {Remembering that traditionally town criers are great mages you decide not to.} DONE
	EQ 12 @GURU MSGCR {The guru makes a single strange gesture and you explode from within.} DOACT !ME {explodes messily.} 25 EXIT DONE
	EQ 12 !ME MSGCR {Bolts of fire leap from the wand, nearly striking you!} DONE
	DOTO !ME {waves the wand. Bolts of fire leap from it striking} 26 !12 MSGCR {Bolts of fire leap from the wand!}
	EQ 12 @PARROT DOACT PARROT {emits a final squark and explodes in a ball of flaming feathers.} 25 SETP PARROT PSTAM 1
	STATE WAND 0 MSGCR {The wand crumbles to dust.} PLACE WAND DUMP
	DEC WAND
	LDP 64 !12 PSTAM SUB 64 10 LT 64 1 LDP 67 !12 PLEVEL LD 68 !67 MUL 68 !67 MUL 68 !67 LDP 67 !ME PSCORE
	LT 64 1 ADD 67 !68 SETP !ME PSCORE !67 LD 67 !ME LD ME !12 DOACT !ME {has passed on.} 25 CALL 17 MSGCR {You seem to have died} EXIT PLACE !ME DUMP LD ME !67 DONE
	SETP !12 PSTAM !64 SETP !12 PFIGHT !ME
	DONE
@TAB 46
;
;	64 holds PFOLLOW for !ME
;
	LDP 65 !ME PLOC EQ 65 NOITEM DONE
	HERE !64 DONE
;
;	Basic checks to see if following is viable
;
	LD 70 !64
	LDP 65 !64 PLOC -CANSEE !ME !64 LD 65 -1 JP 1
	EQ 65 -1 SETP !ME PFOLLOW -1 MSGCR {You appear to have lost them.} DONE
;
;	Loop through the exits of this room trying to find one to target
;
	LD 64 ENORTH LDP 66 !ME PLOC
;
;	Look for a route
;
	LDR 67 !66 !64 EQ 67 !65 CALL 8 SETP !ME PFOLLOW !70 DONE
;
;	Work out where doors go
;
	IS !67 IOBJECT LDO 68 !67 6 ADD 67 !68 LDO 67 !67 OLOC
;
;	Can we go via a door - is so try it open etc not our problem
;
	EQ 67 !65 CALL 8 HERE !70 SETP !ME PFOLLOW !70 DONE
;
;	Try next exit
;
	ADD 64 1 -GT 64 EDOWN JP -4
;
;	Cant seem to get there
;
	SETP !ME PFOLLOW -1 MSGCR {You appear to have lost them.}
	DONE
@TAB 47 
;
;	Beggar control table
;
	CHANCE 1000 DOACT !ME {says 'Spare some food for a poor beggar'} 25 DONE
	DONE
@TAB 48
;
;	Priest
;
	CHANCE 1000 DOACT !ME {screams with rage.} 26 DONE
	CHANCE 2000 DOACT !ME {yells 'Blood and souls for my Lords'.} 26 DONE
	CHANCE 2000 DOACT !ME {says 'I'll send your soul to the screaming pits of limbo'} 26 DONE
	CHANCE 2000 DOACT !ME {says 'Die!'} 26 DONE
	DONE
@TAB 49
;
;	Squirrel
;
	CHANCE 100 DOACT !ME {says 'neep'.} 26 DONE
	DONE
@TAB 50
;
;	Barman
;
	CHANCE 500 DOACT !ME {says 'Get out of here scum, we don't serve your sort.'} 26 DONE
	CHANCE 500 DOACT !ME {says 'Shove off before you get your knees broken'} 26 DONE
	CHANCE 200 DOACT !ME {says 'Beat it, lardball'} 26 DONE
	DONE
@TAB 51
;
;	See if players are in with the demon
;
	LD 64 !ME
	FORUSER 0 ME
		AT PENTACLE LD ME !64 LD 64 1 CALL 52 DONE
	ENDUSER 0
	LD ME !64 DONE
@TAB 52
;
;	Summoning demon
;
	DOACT CANDLE {flickers and dies.} 25 PLACE CANDLE TCENTRE DOACT CANDLE {flickers and dies.} 25 PLACE CANDLE CANDLE
	ISAT THYME PENTACLE PLACE THYME THYME
	LD 64 !ME PLACE DEMON TCENTRE DOACT DEMON {appears out of the shadows in the centre of the pentacle.} 25
;
;	Kill anyone daft enuff to stand in pentacle
;
	FORUSER 0 ME
		AT PENTACLE MSGCR {A gigantic hideous shape forms out of the shadows. Before you can scream it} MSGCR {rips the soul from your body!} EXIT
	ENDUSER 0
	LD ME !64 DOACT DEMON {vanishes back to the nether hells from whence it came} 25 PLACE DEMON DUMP
;
;	Burn a blade
;
	-NEIL PENTACLE -1 65 DONE
	IS !65 IOBJECT OBIT !65 %weapon SETSTATE !65 2 LDO 64 !65 ODAMAGE ADD 64 5 SETO !65 ODAMAGE !64 LDO 64 !65 OFLAGS SET 64 %litall SETO !65 OFLAGS !64 DONE
	NEIL PENTACLE !65 65 JP -2
	DONE
@TAB 53
;
;	Print times out nicely
;
	LD 64 !FHOUR EQ 64 0 MSGCR {It is the witching hour.} DONE
	MSG {It's about } EQ 64 12 MSGCR {midday.} DONE
	LT FHOUR 12 PRINT !FHOUR MSGCR { o'clock in the morning.} DONE
	SUB 64 12 PRINT !64
	LT 64 6 MSGCR { o'clock in the afternoon.} DONE
	LT 64 10 MSGCR { o'clock in the evening.} DONE
	MSGCR { o'clock at night.}
@TAB 54
;
;	Stuff to allow people to dump items
;
	EQ 9 -1 LD 9 !13
	EQ 9 -1 MSGCR {What is that.} DONE
	IS !9 IOBJECT APPEND {SUB/dumped.dat} {@OBJECT}
	IS !9 IPLAYER APPEND {SUB/dumped.dat} {@PLAYER} CALL 55 DONE
	IS !9 IROOM   APPEND {SUB/dumped.dat} {@ROOM} CALL 56 DONE
;
;	Dump an object
;
	MFORMAT {%T0 %n0} LOG { } { } !9 !ME !ME APPEND {SUB/dumped.dat} LOG
;	Words
	GETWORDS !9 64 65 WTEXT !64 2 LOG WTEXT !65 3 LOG2
	MFORMAT {%m0 %m1} LOG LOG LOG2 !ME !ME !ME APPEND {SUB/dumped.dat} LOG
;	Bit Flags
	MFORMAT { } LOG { } { } !ME !ME !ME
	OBIT !9 %flannel MFORMAT {%m0 %m1} LOG LOG {flannel} !ME !ME !ME
	OBIT !9 %canget  MFORMAT {%m0 %m1} LOG LOG {canget} !ME !ME !ME
	OBIT !9 %canwear MFORMAT {%m0 %m1} LOG LOG {canwear} !ME !ME !ME
	OBIT !9 %worn    MFORMAT {%m0 %m1} LOG LOG {worn} !ME !ME !ME
	OBIT !9 %opens   MFORMAT {%m0 %m1} LOG LOG {opens} !ME !ME !ME
	OBIT !9 %container MFORMAT {%m0 %m1} LOG LOG {container} !ME !ME !ME
	OBIT !9 %weapon  MFORMAT {%m0 %m1} LOG LOG {weapon} !ME !ME !ME
	OBIT !9 %food    MFORMAT {%m0 %m1} LOG LOG {food} !ME !ME !ME
	OBIT !9 %lit0	 MFORMAT {%m0 %m1} LOG LOG {lit0} !ME !ME !ME
	OBIT !9 %litall  MFORMAT {%m0 %m1} LOG LOG {litall} !ME !ME !ME
	OBIT !9 %getflip MFORMAT {%m0 %m1} LOG LOG {getflip} !ME !ME !ME
	OBIT !9 %armour  MFORMAT {%m0 %m1} LOG LOG {armour} !ME !ME !ME
	APPEND {SUB/dumped.dat} LOG
;	loc state maxstate size weight
	LDO 64 !9 OLOC LDO 65 !9 OSTATES LDO 66 !9 OSIZE LDO 67 !9 OWEIGHT
	LD 68 !65 DIV 68 16 MUL 68 16 SUB 65 !68 DIV 68 16
;	move carried items to parent
	LT 64 !16 LDP 64 !64 PLOC
;
	NUMT !65 LOG NUMT !68 LOG2 MFORMAT {%T0 %m0 %m1} LOG LOG LOG2 !64 !ME !ME
	NUMT !66 LOG2 MFORMAT {%m0 %m1} LOG LOG LOG2 !ME !ME !ME
	NUMT !67 LOG2 MFORMAT {%m0 %m1} LOG LOG LOG2 !ME !ME !ME
	APPEND {SUB/dumped.dat} LOG
;	value,damage etc...
	LDO 64 !9 ODAMAGE NUMT !64 LOG2 MFORMAT {%m0} LOG LOG2 { } !ME !ME !ME
	LDO 64 !9 OVALUE -EQ 64 0 NUMT !64 LOG2 MFORMAT {%m0 VALUE=%m1} LOG LOG LOG2 !ME !ME !ME
	LDO 64 !9 OFOOD -EQ 64 0 NUMT !64 LOG2 MFORMAT {%m0 FOOD=%m1} LOG LOG LOG2 !ME !ME !ME
	LDO 64 !9 OSHARP -EQ 64 0 NUMT !64 LOG2 MFORMAT {%m0 SHARP=%m1} LOG LOG LOG2 !ME !ME !ME
	LDO 64 !9 OBLUNT -EQ 64 0 NUMT !64 LOG2 MFORMAT {%m0 BLUNT=%m1} LOG LOG LOG2 !ME !ME !ME
	LDO 64 !9 OSTR -EQ 64 0 NUMT !64 LOG2 MFORMAT {%m0 STR=%m1} LOG LOG LOG2 !ME !ME !ME
	APPEND {SUB/dumped.dat} LOG
;	state texts
	LD 69 0
	DO 0
;	  PRINT !68 CR PRINT !69 CR
	  SETSTATE !9 !69 MFORMAT {%d0^} LOG { } { } !9 !ME !ME
	  APPEND {SUB/dumped.dat} LOG
	  ADD 69 1 LT 69 !68 LOOP 0
	SETSTATE !9 !65
	DONE
@TAB 55
;Dump a player
	MSGCR {Unimplemented} DONE
@TAB 56
;dump a room
	MFORMAT {%T0 %n0} LOG { } { } !9 !ME !ME APPEND {SUB/dumped.dat} LOG
;text
	MFORMAT {%r0^} LOG { } { } !9 !ME !ME APPEND {SUB/dumped.dat} LOG
;	Words
	GETWORDS !9 64 65 WTEXT !64 2 LOG WTEXT !65 3 LOG2
	MFORMAT {%m0 %m1} LOG LOG LOG2 !ME !ME !ME APPEND {SUB/dumped.dat} LOG
;flags
	MFORMAT { } LOG { } { } !ME !ME !ME
	RBIT !9 %outside MFORMAT {%m0 %m1} LOG LOG {outside} !ME !ME !ME
	RBIT !9 %tdrop   MFORMAT {%m0 %m1} LOG LOG {tdrop} !ME !ME !ME
	RBIT !9 %city    MFORMAT {%m0 %m1} LOG LOG {city} !ME !ME !ME
	RBIT !9 %dark    MFORMAT {%m0 %m1} LOG LOG {dark} !ME !ME !ME
	RBIT !9 %death   MFORMAT {%m0 %m1} LOG LOG {death} !ME !ME !ME
	RBIT !9 %small   MFORMAT {%m0 %m1} LOG LOG {small} !ME !ME !ME
	RBIT !9 %nomobile   MFORMAT {%m0 %m1} LOG LOG {nomoible} !ME !ME !ME
	APPEND {SUB/dumped.dat} LOG
;0 0 0 ...
	APPEND {SUB/dumped.dat} {0 0 0 0 0 0 0 0 0 0}
	LDR 65 !9 ENORTH -EQ 65 -1 MFORMAT LOG {%T0 N %T1} { } { } !9 !65 !ME APPEND {SUB/dumped.exits} LOG
	LDR 65 !9 EEAST -EQ 65 -1 MFORMAT LOG {%T0 E %T1} { } { } !9 !65 !ME APPEND {SUB/dumped.exits} LOG
	LDR 65 !9 ESOUTH -EQ 65 -1 MFORMAT LOG {%T0 S %T1} { } { } !9 !65 !ME APPEND {SUB/dumped.exits} LOG
	LDR 65 !9 EWEST -EQ 65 -1 MFORMAT LOG {%T0 W %T1} { } { } !9 !65 !ME APPEND {SUB/dumped.exits} LOG
	LDR 65 !9 EUP -EQ 65 -1 MFORMAT LOG {%T0 U %T1} { } { } !9 !65 !ME APPEND {SUB/dumped.exits} LOG
	LDR 65 !9 EDOWN -EQ 65 -1 MFORMAT LOG {%T0 D %T1} { } { } !9 !65 !ME APPEND {SUB/dumped.exits} LOG
	DONE
;
@TAB 57
;
;	Checks to see what players are in barn when it burns, and kills them
;
	LD ME NOITEM NEXT !ME IPLAYER 0 DO 0
		AT HAYBARN MSGCR {The heat and smoke ovecome you and you collapse...} MSGCR {You have died. Better luck next time..} EXIT
		NEXT !0 IPLAYER 0 LOOP 0
	DONE
@TAB 58
;
;	SHOW/STAT
;
	EQ 9 NOITEM LD 9 !13
	EQ 9 NOITEM MSGCR {What is that ?} DONE
	PCNAME !9 CR
	IS !9 IROOM CALL 62 DONE
	IS !9 IOBJECT JP 23
	LT 9 !16 MSG {Score: } LDP 64 !9 PSCORE PRINT !64 CR
	MSG {Strength: } LDP 64 !9 PSTR PRINT !64 CR
	MSG {Stamina : } LDP 64 !9 PSTAM PRINT !64 MSG {(} LDP 64 !9 PMAXSTAM PRINT !64 MSGCR {)}
	MSG {Agility : } LDP 64 !9 PAGIL PRINT !64 CR
	MSG {Level   : } LDP 64 !9 PLEVEL PRINT !64 CR
	-LT 9 !16 MSG {Speed   : } LDP 64 !9 PSPEED PRINT !64 CR
	MSG {Location: } LDP 64 !9 PLOC -EQ 64 NOITEM PCNAME !64 CR JP 1
	MSGCR {None}
	PBIT !9 %male MSG {Male} TABTO 12
	-PBIT !9 %male MSG {Female} TABTO 12
	PBIT !9 %wizard MSG {Wizard} TABTO 12
	PBIT !9 %wizmode MSG {Wizmode} TABTO 12
	PBIT !9 %seedark MSG {Seedark} TABTO 12
	PBIT !9 %crippled MSG {Crippled} TABTO 12
	PBIT !9 %blind MSG {Blind} TABTO 12
	PBIT !9 %deaf MSG {Deaf} TABTO 12
	PBIT !9 %dumb MSG {Dumb} TABTO 12
	PBIT !9 %berk MSG {Berserk} TABTO 12
	CR LDP 64 !9 PFLAGS2 BIT 64 imprisoned MSG {Imprisoned} TABTO 12
	BIT 64 nosey MSG {Nosey} TABTO 12
	BIT 64 converse MSG {Converse} TABTO 12
	BIT 64 attached MSG {Attached} TABTO 12
	CR DONE
	MSG {Location: } LDO 64 !9 OLOC -EQ 64 NOITEM PCNAME !64 CR
	EQ 64 NOITEM MSGCR {None}
	MSG {Weight  : } LDO 64 !9 OWEIGHT PRINT !64 CR
	MSG {Size    : } LDO 64 !9 OSIZE PRINT !64 CR
	MSG {Value   : } LDO 64 !9 OVALUE PRINT !64 CR
	OBIT !9 %weapon MSG {Damage  : } LDO 64 !9 ODAMAGE PRINT !64 CR
	OBIT !9 %weapon MSG {Sharp   : } LDO 64 !9 OSHARP PRINT !64 CR
	OBIT !9 %weapon MSG {Blunt   : } LDO 64 !9 OBLUNT PRINT !64 CR
	MSG {Str     : } LDO 64 !9 OSTR PRINT !64 CR
	OBIT !9 %food MSG {Food    : } LDO 64 !9 OFOOD PRINT !64 CR
	OBIT !9 %lit0 MSG {Burn    :} LDO 64 !9 OBURN PRINT !64 CR
	OBIT !9 %container MSG {Container:} LDO 64 !9 OSIZE PRINT !64 CR
	OBIT !9 %opens MSG {Opens} TABTO 12
	OBIT !9 %worn MSG {Worn} TABTO 12
	OBIT !9 %canwear MSG {Canwear} TABTO 12
	OBIT !9 %canget MSG {Canget} TABTO 12
	OBIT !9 %flannel MSG {Flannel} TABTO 12
	OBIT !9 %litall MSG {Litall} TABTO 12
	OBIT !9 %weapon MSG {Weapon}
	CR DONE
@TAB 59
;
; 	Time of day in TIME
;
; 	Uses 91 - 97
;
	TOD 91 92 93 94 95 96 97
;
; 	Get the day!
;
	JP !97
	MFORMAT {Sun} DAY { } { } !ME !ME !ME JP 6
	MFORMAT {Mon} DAY { } { } !ME !ME !ME JP 5
	MFORMAT {Tue} DAY { } { } !ME !ME !ME JP 4
	MFORMAT {Wed} DAY { } { } !ME !ME !ME JP 3
	MFORMAT {Thur} DAY { } { } !ME !ME !ME JP 2
	MFORMAT {Fri} DAY { } { } !ME !ME !ME JP 1
	MFORMAT {Sat} DAY { } { } !ME !ME !ME
;
;	 Get the month!
;
	JP !95
	MFORMAT {Jan} MONTH { } { } !ME !ME !ME JP 11
	MFORMAT {Feb} MONTH { } { } !ME !ME !ME JP 10
	MFORMAT {Mar} MONTH { } { } !ME !ME !ME JP 9
	MFORMAT {Apr} MONTH { } { } !ME !ME !ME JP 8
	MFORMAT {May} MONTH { } { } !ME !ME !ME JP 7
	MFORMAT {June} MONTH { } { } !ME !ME !ME JP 6
	MFORMAT {July} MONTH { } { } !ME !ME !ME JP 5
	MFORMAT {Aug} MONTH { } { } !ME !ME !ME JP 4
	MFORMAT {Sept} MONTH { } { } !ME !ME !ME JP 3
	MFORMAT {Oct} MONTH { } { } !ME !ME !ME JP 2
	MFORMAT {Nov} MONTH { } { } !ME !ME !ME JP 1
	MFORMAT {Dec} MONTH { } { } !ME !ME !ME
;
; 	Get the time!
;
	NUMT !93 HOUR LT 93 10 MFORMAT {0%m0} HOUR HOUR { } !ME !ME !ME
	NUMT !92 MIN LT 92 10 MFORMAT {0%m0} MIN MIN { } !ME !ME !ME
	NUMT !91 SECS LT 91 10 MFORMAT {0%m0} SECS SECS { } !ME !ME !ME
;
; 	Get the date!
;
	NUMT !94 DATE
;
;	And finally the year!
;
	NUMT !96 YEAR
	MFORMAT {%m0 %m1} TIME DAY MONTH !ME !ME !ME
	MFORMAT {%m0 %m1} TIME TIME DATE !ME !ME !ME
	MFORMAT {%m0 %m1} TIME TIME YEAR !ME !ME !ME
	MFORMAT {%m0 %m1} TIME TIME HOUR !ME !ME !ME
	MFORMAT {%m0:%m1} TIME TIME MIN !ME !ME !ME
	MFORMAT {%m0:%m1} TIME TIME SECS !ME !ME !ME
	DONE
@TAB 60
;
;	Report to far side of a door
;
	LD 66 !ME LDO 65 !8 6 ADD 65 !8
	FORUSER 0 ME
		HERE !65 MSGCR !64
	ENDUSER 0
	LD ME !66 DONE
@TAB 61
;
;	We ATTACHTABLE this to players, it handles special effects like the ring
;
;.vis $ANY $ANY WORN RING LD RETVAL 10 LD RETQRY 0 DONE
$ANY $ANY $ANY DONE
@TAB 62
;
;	SHOW ROOM
;
	MSG {Location: } LDP 64 !9 PLOC -EQ 64 NOITEM PCNAME !64 CR JP 1
	MSGCR {None}
	RBIT !9 %death    MSG {Death} TABTO 12
	RBIT !9 %dark     MSG {Dark} TABTO 12
	RBIT !9 %tdrop 	  MSG {TDrop} TABTO 12
	RBIT !9 %nomobile MSG {NoMobile} TABTO 12
	RBIT !9 %outside  MSG {Outside} TABTO 12
	CR DONE
@TAB 63
; Level Number in 64.
;Returns min points for that level in 65.
	GT 64 14 MSGCR {Level too high.} DONE
	LT 64 0 MSGCR {Eeeek, level too low !} DONE
	JP !64
	LD 64 0 DONE
	LD 64 100 DONE
	LD 64 200 DONE
	LD 64 300 DONE
	LD 64 500 DONE
	LD 64 800 DONE
	LD 64 1300 DONE
	LD 64 2100 DONE
	LD 64 3400 DONE
	LD 64 5500 DONE
	LD 64 8900 DONE
	LD 64 14400 DONE
	LD 64 23300 DONE
	LD 64 100000 DONE
	LD 64 100000 DONE
	DONE
@TAB 64
	LDP 64 !ME PLOC RBIT !64 %underwater JP 2
	LDP 65 !ME PNOAIR EQ 65 4 MSGCR {You can no longer hold your breath.} LDP 66 !ME PFLAGS2 RES 66 holdbreath SETP !ME PFLAGS2 !66
	LT 65 3 SETP !ME PNOAIR 3
	LDP 65 !ME PNOAIR SUB 65 1 EQ 65 0 MSGCR {You are unable to hold your breath.} MSGCR {You breath water and pass away...} EXIT DONE
	SETP !ME PNOAIR !65
	DONE
@TAB 65
	LD 67 !ME LD 66 0
	LDO 65 !67 OLOC EQ 65 -1 DONE
	IS !65 IROOM -RBIT !65 %underwater DONE
	IS !65 IROOM JP 2
	ADD 66 1 GT 66 10 DONE
	LD 67 !65 JP -5
	DOACT !ME !64 25
	LDO 65 !ME OLOC LT 65 !16 -PBIT !65 %asleep LD 66 !ME LD ME !65 PCNAME !66 MSG { } MSGCR !64
	PLACE !ME DUMP DONE
@TAB 66
	LD 64 0
	FORUSER 0 65
		LDP 66 !65 PHELPING EQ 66 !ME ADD 64 1
	ENDUSER 0
	DONE
@TAB 67
	LDP 65 !ME PHELPING EQ 65 -1 DONE
	HERE !65 DONE
	SETP !ME PHELPING -1 MSG {You can no longer help } PNAME !65 MSGCR {.} DONE
@TAB 68
	MSGCR SPHEREFIRE
	LDO 65 WOLFSWORD OLOC EQ 65 -1 MSGCR VOIDSEE DONE
	IS 65 IPLAYER LDP 65 !65 PLOC EQ 65 -1 MSGCR VOIDSEE DONE
	IS 65 IOBJECT MSGCR {You cannot make sense of the view you are seeing.} DONE
	LDP FLOCHOLD !ME PLOC LDO 64 WOLFSWORD OLOC PLACE !ME !64
	LDP 65 !ME PFLAGS LD 66 !65 RES 65 %brief SETP !ME PFLAGS !65 LOOK SETP !ME PFLAGS !66
	PLACE !ME !FLOCHOLD DONE
@END