-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpreserve.cmd
58 lines (43 loc) · 1.54 KB
/
preserve.cmd
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
# debug 5
var action %1
set_creature:
var disectmobs $roomobjs
action var mobname $1 when ^@.*\s(\S+) (?:which|that) appears dead
var mobstotal
var ordinal first|second|third|fourth|fifth|sixth|seventh
eval disectmobs replace("%disectmobs", "You also see ", "")
eval disectmobs replace("%disectmobs", " and some junk", "")
eval disectmobs replace("%disectmobs", " and ", ", ")
eval disectmobs replace("%disectmobs", "\.", "")
eval disectmobs replace("%disectmobs", ", ", "|")
eval mobstotal countsplit("%disectmobs", "|")
var mobcurrent 0
count:
if (%mobcurrent >= %mobstotal) then { goto done }
var check %disectmobs[%mobcurrent]
if (matchre("%check", "dead")) then { goto preserve }
math mobcurrent add 1
goto count
preserve:
match wait_p ...
matchre done This ritual may only be performed on|rendered this corpse unusable|skinned creature is worthless for your purposes|Rituals do not work upon constructs|while it is still alive|You'll learn nothing further of value
matchre done You bend|You carefully|already been preserved|Roundtime
put #parse @%disectmobs[%mobcurrent]
pause 0.5
if ("%action" = "preserve") then
{
put perform preserve on %mobname
}
else
{
if "$guild" == "Necromancer" && $Thanatology.LearningRate < 32 then put perform dissection on %mobname
else put dissect %mobname
}
matchwait 3
goto preserve
wait_p:
pause 0.5
goto preserve
done:
put #parse PRESERVE DONE
exit