home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum3.lzh
/
SAMPLES
/
MPU
/
transit.adl
< prev
next >
Wrap
Text File
|
1988-01-22
|
10KB
|
576 lines
{*** TRANSITIONS ***}
Hitms =
(IF ($eq ($verb) %1) THEN
(IF %2 THEN
($move .ME %2)
($setg GO TRUE)
)
(IF %3 THEN
(($arg 3))
)
)
;
Synvb =
(IF ($eq ($verb) %1) THEN
($setg Verb %2)
)
;
road1(ACTION) =
(Hitms n gard1 0)
(Hitms s gard2 0)
(Hitms e road2 0)
(Hitms w road3 0)
;
road2(ACTION) =
(Hitms n gard1 0)
(Hitms s gard2 0)
(Hitms e road6 0)
(Hitms w road1 0)
;
DropKill =
($say "The drop would kill you.\n")
($setg MyLoc ($loc .ME))
($setg GO TRUE)
;
road3(ACTION) =
(Hitms n 0 DropKill)
(Hitms s 0 DropKill)
(Hitms e road1 0)
(Hitms w road7 Entr7)
;
road4(ACTION) =
(Hitms n farm1 0)
(Hitms s road6 0)
(Hitms e frst1 0)
(Hitms w gard1 0)
;
road5(ACTION) =
(Hitms n road6 0)
(Hitms s town1 0)
(Hitms e frst1 0)
(Hitms w gard2 0)
;
road6(ACTION) =
(Hitms n road4 0)
(Hitms s road5 0)
(Hitms e frst1 0)
(Hitms w road2 0)
;
road7(ACTION) =
($miss Tress Tress East7 West7 0 0 0 0 0 0)
;
East7 =
($setg GO TRUE)
(IF ($not @HWY7) THEN
($move .ME road3)
ELSE
(Dump7 ($cont road7))
($setg HWY7 ($minus @HWY7 1))
(Get7 ($cont Roadx))
)
;
West7 =
($setg GO TRUE)
(Dump7 ($cont road7))
($setg HWY7 ($plus @HWY7 1))
(Get7 ($cont Roadx))
;
Dump7 =
(IF ($link %1) THEN
(Dump7 ($link %1)) { start at bottom }
)
(IF ($ne %1 .ME) THEN { Everything else leaves }
($setp %1 RDLOC @HWY7) { Retain its location on HWY 7 }
($move %1 Roadx) { Put it in the box }
)
;
Get7 =
(IF %1 THEN
(Get7 ($link %1))
(IF ($eq ($prop %1 RDLOC) @HWY7) THEN
($move %1 road7)
)
)
;
Entr7 =
(Dump7 ($cont road7))
($setg HWY7 0)
(Get7 ($cont Roadx))
;
gard1(ACTION) =
(Hitms n gard1 0)
(Hitms s road1 0)
(Hitms e gard1 0)
(Hitms w gard1 0)
;
gard2(ACTION) =
(Hitms n road1 0)
(Hitms s gard2 0)
(Hitms e gard2 0)
(Hitms w gard2 0)
;
FLeave =
(IF ($pct 20) THEN
($move .ME road6)
)
($setg GO TRUE)
;
frst1(ACTION) =
($miss FLeave FLeave FLeave FLeave FLeave FLeave FLeave FLeave 0 0)
;
farm1 (ACTION) =
(Synvb enter north)
(Hitms n farm2 0)
(Hitms s road4 0)
(Hitms e farm3 0)
(Hitms w farm4 0)
(Hitms ne farm3 0)
(Hitms nw farm4 0)
;
farm2 (ACTION) =
(Synvb out s)
(Synvb enter n)
(Synvb east up)
(Hitms n farm6 0)
(Hitms s farm1 0)
(Hitms up farm7 0)
;
farm3 (ACTION) =
(Hitms n farm5 0)
(Hitms s farm1 0)
(Hitms e frst1 0)
(Hitms nw farm5 0)
(Hitms sw farm1 0)
;
farm4 (ACTION) =
(Hitms n farm5 0)
(Hitms s farm1 0)
(Hitms w gard1 0)
(Hitms ne farm5 0)
(Hitms se farm1 0)
;
farm5 (ACTION) =
(Hitms e farm3 0)
(Hitms w farm4 0)
(Hitms se farm3 0)
(Hitms sw farm4 0)
;
farm6 (ACTION) =
(Hitms out farm2 0)
(Hitms s farm2 0)
;
farm7 (ACTION) =
(Hitms e farm2 0)
(Hitms d farm2 PanL)
;
town1 (ACTION) =
(Hitms n road5 0)
(Hitms s town2 0)
(Hitms e town3 0)
(Hitms w town4 0)
;
town2 (ACTION) =
(Hitms n town1 0)
(Hitms e town5 0)
(Hitms w town6 0)
;
town3 (ACTION) =
(Hitms out town1 0)
(Hitms w town1 0)
;
town4 (ACTION) =
(Hitms e town1 0)
(Hitms out town1 0)
;
town5 (ACTION) =
(Hitms w town2 0)
(Hitms out town2 0)
;
town6 (ACTION) =
(Hitms e town2 0)
(Hitms out town2 0)
;
cel01 (ACTION) =
(Hitms n cel02 0)
(Hitms w cel04 0)
(Hitms u farm7 0)
;
cel02 (ACTION) =
(Hitms n cel05 0)
(Hitms s cel01 0)
(Hitms e cel20 0)
;
cel20(ACTION) =
(Hitms w cel02 0)
;
cel03 (ACTION) =
(Hitms s cel05 0)
(IF ($not ($prop dragon KILLED)) THEN
(Hitms w cel13 0)
(Hitms ne cel09 0)
(Hitms d cel09 0)
)
;
cel04 (ACTION) =
(Synvb down north)
(Hitms n cel10 0)
(Hitms e cel01 0)
(Hitms w cel08 0)
;
MV56= ($setg Cel6x 5);
MV76= ($setg Cel6x 7);
MV67=
(IF ($and ($ne @Cel6x 7) ($prop dragon AWAKE) ($not ($prop dragon KILLED)))
THEN
($say "The ice dragon blocks your attempt to cross!\n\n")
ELSE
($move .ME cel07)
)
($setg GO TRUE) { short circuit default error message }
;
MV65=
(IF ($and ($ne @Cel6x 5) ($prop dragon AWAKE) ($not ($prop dragon KILLED)))
THEN
($say "The ice dragon blocks your attempt to leave!\n")
ELSE
($move .ME cel05)
)
($setg GO TRUE) { short circuit default error message }
;
cel05 (ACTION) =
(Hitms n cel03 0)
(Hitms s cel02 0)
(Hitms ne cel06 MV56)
;
cel06 (ACTION) =
(Hitms e 0 MV67)
(Hitms sw 0 MV65)
(IF ($and ($not ($prop dragon KILLED))
($prop dragon AWAKE)
($eq ($loc .ME) cel06) {still here}
)
THEN
($setg MyLoc -1)
)
;
cel07 (ACTION) =
(Synvb out west)
(Hitms w cel06 MV76)
;
Thirst =
(IF ($eq ($loc .ME) desert) THEN
($say "The blazing sun is too much for you, I'm afraid.\n")
(die)
)
;
Move08 =
(IF @RBTouch THEN
(IF ($prop dragon KILLED) THEN
($move .ME field)
ELSE
($move .ME desert)
($sfus .ME Thirst 10)
)
ELSE
($say "You bump your nose against the painting.\n")
($setg MyLoc ($loc .ME))
)
($setg GO TRUE)
;
cel08 (ACTION) =
(Hitms e cel04 0)
(Hitms w 0 Move08)
;
Slippery =
($say "The waterfall is to slick for you to climb.\n")
($setg MyLoc ($loc .ME))
($setg GO TRUE)
;
CrackEntr =
($say "You slip through the crack in the waterfall.\n")
;
Get21 =
LOCAL t, t1;
($setg t ($cont riverx))
(WHILE @t DO
(IF ($eq ($prop @t Loc21) @RiverLoc) THEN
($setg t1 ($link @t))
($move @t cel21)
($setg t @t1)
ELSE
(Next t)
)
)
;
Dump21 =
LOCAL t, t1;
($setg t ($cont cel21))
(WHILE @t DO
(IF ($ne @t .ME) THEN
($setp @t Loc21 @RiverLoc)
($setg t1 ($link @t))
($move @t riverx)
($setg t @t1)
ELSE
(Next t)
)
)
;
Entr21 =
($setg RiverLoc 1)
(Get21)
;
cel09 (ACTION) =
(Hitms n cel21 Entr21)
(Hitms u 0 Slippery)
(Hitms s cel18 CrackEntr)
;
Move11 =
(IF ($prop dragon KILLED) THEN
(IF ($not ($prop wetsuit WORN)) THEN
($say "The pit is full of water!!!\n")
ELSE
($say "That water looks mighty dangerous. Are you sure? ")
(IF ($yorn) THEN
($say
"You leap into the pit and are immediately grabbed by a mighty
current which pulls you down, down, down... Soon the pressure
becomes too great for you to breathe, and the last thing you
remember is feeling somewhat like an elephant's footstool.\n"
)
(die)
)
)
($setg MyLoc ($loc .ME))
ELSE
($move .ME cel11)
)
($setg GO TRUE)
;
cel10 (ACTION) =
(Synvb up s)
(Hitms s cel04 0)
(Hitms d 0 Move11)
;
cel11 (ACTION) =
(IF ($and @GOVERB ($not ($prop [clear crystal] LIGHT))) THEN
($say
"You trip and fall into a pit that you were unable to see in the dark!\n"
)
(die)
)
(Hitms e cel12 0)
(Hitms w cel16 0)
;
cel12 (ACTION) =
(Hitms w cel11 0)
;
WaterEntr =
(IF ($gt ($prop .ME HAS) ($prop globe WEIGH)) THEN
(IF ($not ($prop wetsuit WORN)) THEN
($say
"Whatever you're carrying drags you down into the icy waters!\n"
)
(die)
)
)
;
cel13 (ACTION) =
(IF ($eq ($verb) down) THEN
(IF ($prop cel13 HOLED) THEN
(WaterEntr)
($say "You plunge into the icy waters!\n")
($move .ME cel14)
($setg GO TRUE)
($exit 1)
)
)
(Hitms e cel03 0)
(Hitms w cel19 0)
;
Drown =
(IF ($or ($eq ($loc .ME) cel14) ($eq ($loc .ME) cel17)) THEN
(IF ($not ($prop wetsuit WORN)) THEN
($say
"You can't hold your breath any longer. The last thing you
feel is the odd sensation of water entering your lungs.\n"
)
(die)
)
)
;
cel14 (ACTION) =
(IF ($eq ($verb) up) THEN
(IF ($prop cel13 HOLED) THEN
($say "You pop out through a hole in the ice!\n")
($move .ME cel13)
($setg GO TRUE)
($exit 1)
ELSE
($say "You are blocked by an icy roof above!\n")
)
)
(Hitms w cel15 0)
(Hitms e cel17 0)
($sfus .ME Drown 1)
;
cel15(ACTION) =
(Synvb up south)
(Synvb enter e)
(Hitms e cel14 WaterEntr)
(Hitms s cel16 0)
;
cel16(ACTION) =
(Synvb down north)
(Hitms n cel15 0)
(Hitms e cel11 0)
;
cel17(ACTION) =
(Hitms ne cel18 0)
(Hitms w cel14 0)
($sfus .ME Drown 1)
;
Swim =
($say "You dive into the icy waters.\n")
(WaterEntr)
;
cel18(ACTION) =
(Synvb enter sw)
(Hitms n cel09 0)
(Hitms sw cel17 Swim)
;
cel19(ACTION) =
(Hitms e cel13 0)
;
North21 =
(Dump21)
($setg RiverLoc ($plus @RiverLoc 1))
($setg GO TRUE)
($setp cel21 SEEN FALSE)
(Get21)
;
South21 =
(Dump21)
($setg GO TRUE)
($setg RiverLoc ($minus @RiverLoc 1))
($setp cel21 SEEN FALSE)
(IF ($not @RiverLoc) THEN
($move .ME cel09)
ELSE
(Get21)
)
;
CantClimb =
($say "The sides of the river bed are too steep for you to climb.\n")
($setg MyLoc ($loc .ME))
($setg GO TRUE)
;
GrateThere =
($say "The grate blocks your attempt to move that way.\n")
($setg MyLoc ($loc .ME))
($setg GO TRUE)
;
cel21(ACTION) =
(IF ($eq @RiverLoc GRATELOC) THEN
($miss South21 GrateThere CantClimb CantClimb 0 0 0 0 0 0)
ELSEIF ($eq @RiverLoc BEND1LOC) THEN
($miss CantClimb South21 CantClimb North21 0 0 0 0 0 0)
ELSEIF ($and ($gt @RiverLoc BEND1LOC) ($lt @RiverLoc BEND2LOC)) THEN
($miss CantClimb CantClimb South21 North21 0 0 0 0 0 0)
ELSEIF ($eq @RiverLoc BEND2LOC) THEN
($miss CantClimb North21 South21 CantClimb 0 0 0 0 0 0)
ELSEIF ($gt @RiverLoc BEND2LOC) THEN
($miss South21 North21 CantClimb CantClimb 0 0 0 0 0 0)
ELSE { RiverLoc < BEND1LOC }
($miss North21 South21 CantClimb CantClimb 0 0 0 0 0 0)
)
;
desert(ACTION) =
(Hitms n desert 0)
(Hitms s desert 0)
(Hitms e desert 0)
(Hitms w desert 0)
(Hitms ne desert 0)
(Hitms nw desert 0)
(Hitms se desert 0)
(Hitms sw desert 0)
;
field(ACTION) =
(Hitms n 0 ENDGAME)
;