-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmcatch.cmd
More file actions
98 lines (86 loc) · 2.4 KB
/
cmcatch.cmd
File metadata and controls
98 lines (86 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
include library.cmd
include helibrary.cmd
var critterlist spriggan|gremlin|sprite|boggle|welkin
var critterrooms 28|29|30|31|32|33|34|35
var roomcount 8
var shrineroom 31
var storage $gamestorage
action goto END when ^Without warning, .* spontaneously combusts! Ack!
action put #echo >Log Yellow Caught one! Won $1. when The helper places (.*) in your hand\.
gosub STOWALL
if (("$righthand") = "Empty") && ("$lefthand" = "Empty")) then
else
{
put #echo Yellow Could not empty hands! Address and restart script!
put #play JustArrived
exit
}
MAIN:
if ("$righthand" = "Empty") then
{
put look
if matchre("$roomobjs", "\b%critterlist\b") then
{
var critter $0
echo critter: %critter
gosub STAND
gosub GETCRITTER
gosub STAND
}
else
{
var searchcount 0
gosub CRITTERSEARCH
goto MAIN
}
}
if ("$righthand" != "Empty") then
{
if ($roomid != %shrineroom) then gosub MOVE %shrineroom
}
if ("$righthand" != "Empty") then gosub PUTCRITTER
pause .1
goto MAIN
CRITTERSEARCH:
if (%searchcount > %roomcount) then return
if ($roomid != %critterrooms(%searchcount)) then gosub MOVE %critterrooms(%searchcount)
#put #echo >Log %critterrooms(%searchcount) searchcount: %searchcount roomcount: %roomcount
put look
if (matchre("$roomobjs", "%critterlist")) then return
else
{
math searchcount add 1
goto CRITTERSEARCH
}
GETCRITTERP:
pause
GETCRITTER:
matchre GETCRITTERP %waitstring
match RETURN What were you referring to?
match RETURN You try, but you're too distracted by your impending doom to concentrate!
match RETURN Roundtime:
put get %critter
matchwait 2
return
PUTCRITTERP:
pause
PUTCRITTER:
matchre PUTCRITTERP %waitstring
match PUTSUCCESS A helper runs up to you and says, "Thank you friend! Here's a token of our appreciation for returning our lost
match RETURN What were you referring to?
put put my $righthandnoun on worktable
matchwait 2
return
PUTSUCCESS:
if ("$righthand" = "Empty") then gosub SWAP
gosub TAPSHORTEN $righthand
if (%storage != 0) then gosub PUTITEM %shorttap in my %storage
else gosub STOWALL
if ("$righthand" != "Empty") then
{
put #echo Yellow Could not empty hands! Address and restart script!
put #play JustArrived
exit
}
return
END: