1
// Make it stay open or close
8
//Open door and close it
13
tmpargument = passage + 2
14
SetTargetToWhoeverIsInPassage
15
IfTargetCanOpenStuff //Only open for intelligent creatures
17
IfContentIs //Only open unlocked doors
22
tmpargument = passage + 2
31
tmpargument = passage + 2
32
SetTargetToWhoeverIsInPassage
34
tmpdistance = EXPSECRET
35
GiveExperienceToTarget
43
IfContentIs //Only close unlocked doors
51
tmpy = 491 // The unique code for an unlock order
58
// Handle the animation and sound
59
tmpargument = passage // Is the passage clear?
62
IfStateIs // State 0 ( Closed )
63
tmpargument = ACTIONMG //
65
tmpargument = 1 // Open it
68
tmpdistance = 11025 //
72
IfStateIs // State 1 ( Open )
73
tmpargument = ACTIONMJ //
75
tmpargument = 0 // Close it
78
tmpdistance = 11025 //
80
End // Finished with this character