-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.cmd
2852 lines (2831 loc) · 121 KB
/
base.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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#debuglevel 10
goto end.of.file
##########################################################################################
#############################
# MAIN ACTIONS
#############################
################################################################################################
#################################
###GENIEHUNTER WEAPON CONTROL
### SORT GOSUB
### USAGE:
### var skills Medium_Edged|Heavy_Edged|Long_Bow
### var count 3
### gosub sort %skills %count
### echo %sort
sort:
var items $1
var count $2
math count subtract 1
var i 0
if %count < 1 then var count 16
SORT.I:
var j %i
math j add 1
SORT.J:
if $%items(%j).Ranks < $%items(%i).Ranks or ($%items(%j).Ranks = $%items(%i).Ranks and $%items(%j).LearningRate < $%items(%i).LearningRate) then
{
var itemi %items(%i)
var itemj %items(%j)
eval items replace("%items", "%items(%i)", "temp2")
eval items replace("%items", "%items(%j)", "temp1")
eval items replace("%items", "temp1", "%itemi")
eval items replace("%items", "temp2", "%itemj")
}
math j add 1
if %j <= %count then goto SORT.J
math i add 1
if %i < %count then goto SORT.I
var sort %items
return
#############################
SORT2:
skillcheck1:
gosub sort %skills %count
pause .1
if $%sort(%ix).LearningRate > %maxexp then
{
evalmath ix (%ix + 1)
goto skillcheck1
}
if $%sort(%ix).LearningRate < %globalexp then
{
if "%sort(%ix)" = "%priorskill" then
{
evalmath ix (%ix + 1)
goto skillcheck1
}
#gosub %sort(%ix)
var priorskill %sort(%ix)
evalmath i (%ix + 1)
#put .geniehunter multi %%sort(%ix)
return
}
if %ix != %countskills then
{
evalmath ix (%ix + 1)
var ix 1
goto skillcheck1
}
if %ix = %countskills then
{
evalmath ix (%ix + 1)
var ix 16
goto skillcheck1
}
return
##############################################################
LEAVE.SEACAVES:
gosub automove exit
send go exit portal
wait
RETURN
TO.SEACAVE:
TO.SEACAVES:
gosub automove portal
pause 0.5
send go meeting portal
wait
RETURN
##########################################
#### DUMPS TRASH
##########################################
EMPTY.PACK.CHECK:
var bag $1
action var contents $1 when ^You rummage through .+ and see (.*)\.
put rummage my %bag
waitforre ^You rummage
eval contents replace("%contents", ", ", "|")
eval contents replace("%contents", " and ", "|")
var contents |%contents|
eval total count("%contents", "|")
Loop:
eval item element("%contents", 1)
eval number count("%contents", "|%item")
var count 0
gosub RemoveLoop
action setvariable item $1 when ^@a .* (\S+)$
put #parse @%item
counter set %count
if contains("%trash", "%item") then gosub storeitem
if %contents != "|" then goto Loop
RETURN
RemoveLoop:
eval number count("%contents", "|%item|")
eval contents replace("%contents", "|%item|", "|")
eval contents replace("%contents", "||" "|")
evalmath count %count + %number
if !contains("%contents", "|%item|") then RETURN
goto RemoveLoop
storeitem:
counter subtract 1
pause 0.2
send get my %item
pause 0.2
if contains("$roomobjs","driftwood log") then GOSUB putmy %item in log
if contains("$roomobjs"," bucket of viscous gloop") then GOSUB putmy %item in bucket
if contains("$roomobjs","waste bin") then GOSUB putmy %item in bin
if contains("$roomobjs","oak crate") then GOSUB putmy %item in crate
if contains("$roomobjs","firewood bin") then GOSUB putmy %item in bin
else put drop my %item
pause 0.2
pause 0.1
pause 0.1
if %c = 0 then RETURN
goto storeitem
putmy:
if matchre("%item", "(%skins)") then put bund
if "%item" = "rib" then put bund
if "%item" = "barb" then put bund
pause 0.1
matchre RETURN You drop|You put
matchre putmydrop What were you
if contains("$roomobjs","driftwood log") then
{
put put my %item in log
matchwait
}
if contains("$roomobjs"," bucket of viscous gloop") then
{
put put my %item in bucket
matchwait
}
if contains("$roomobjs","waste bin") then
{
put put my %item in bucket
matchwait
}
if contains("$roomobjs","oak crate") then
{
put put my %item in crate
matchwait
}
send drop my %item
matchwait
putmydrop:
send drop my %item
RETURN
###############################################################################################################################
#SEARCHES THE GROUND FOR AMMO / WEAPONS / ARMOR
stowAmmo:
delay 0.001
#gosub BLEEDERCHECK
if contains("$righthand","(partisan|shield|light crossbow|buckler|lumpy bundle|halberd|mistwood longbow|gloomwood khuj|halberd)") && ("$lefthand" != "Empty") then gosub wear my $1
if contains("$lefthand","(partisan|shield|light crossbow|buckler|lumpy bundle|halberd|mistwood longbow|gloomwood khuj|halberd)") && ("$righthand" != "Empty") then gosub wear my $1
if contains("$roomobjs","(double-stringed crossbow|repeating crossbow|bloodwood dako'gi crossbow|forester's crossbow|bamboo crossbow|forester's bow|battle bow|assassin's crossbow") then gosub stow $1
if contains("$roomobjs","(basilisk head arrow\b|cane arrow\b|bone-tipped arrow\b|barbed arrow\b|stone-tipped arrow\b|serrated-bodkin arrow\b|razor-edged arrow|razor-tipped arrow\b)") then gosub STOWARROW
if contains("$roomobjs","(river rock|river rocks|small rock|spider-carved rock)") then gosub STOWROCK
if contains("$roomobjs","(angiswaerd bolt|basilisk bolt|ice-adder bolt|drake-fang bolt|jagged-horn bolt|leafhead bolt|barbed bolt)") then gosub STOWBOLT
if matchre("$roomobjs","throwing blade") then gosub STOWBLADE
if matchre("$roomobjs","telothian bola") then gosub STOW bola
if matchre("$roomobjs","silver-edged star") then gosub STOWSTARS
if matchre("$roomobjs","quartzite stone shard") then gosub STOW shard
if matchre("$roomobjs","(ironwood shield|wooden shield)") then gosub stow $1
if matchre("$roomobjs","(elongated stones|granite stone|panther-carved stone|goblin-carved stones|unicorn-carved stone)") then gosub stow stone
if matchre("$roomobjs","(pyrite clump|smoky-quartz clump)") then gosub stow clump
if matchre("$roomobjs","sleek quadrello") then gosub stow quadrello
if matchre("$roomobjs","small shield|azure-scale shield") then gosub stow shield
if matchre("$roomobjs","stones") then gosub stow stones
if matchre("$roomobjs","hand claws") then gosub stow hand claw
if matchre("$roomobjs","T'Kashi mirror flamberge") then gosub stow mirror flamberge
if matchre("$roomobjs","T'Kashi mirror flail") then gosub stow mirror flail
if matchre("$roomobjs","mirror blade") then gosub stow mirror blade
if matchre("$roomobjs","mirror knife") then gosub stow mirror knife
if matchre("$roomobjs","Nisha short bow") then gosub stow nisha bow
if matchre("$roomobjs","razor-sharp damascus steel sabre") then gosub stow sabre
if matchre("$roomobjs","glaes and kertig-alloy katana capped with an ornate dragonfire amber pommel") then gosub stow katana
if !matchre("$roomobjs","(mirror axe|stonebow|pasabas|briquet|battle bow|akabo|mallet|throwing spike|steel scimitar|thrusting blade|flail|kneecapper|spear|hammer|throwing hammer|bone club|javelin|tago|staff sling|bludgeon|quarrel|short bow|\btelo\b|flamberge|flail|nightstick|khuj|iltesh|ngalio|hirdu bow|halberd|mirror blade|katana|morning star|war club|shadowy-black sling|staff sling|mattock|leathers|balaclava|helmet|helm|gauntlets|mail gloves|sniper's crossbow|light crossbow|targe\b|great helm|throwing axe|throwing club|bastard sword|jambiya|katar|throwing blade|composite bow|bola|short bow)") then RETURN
gosub stow $1
pause 0.1
goto stowAmmo
STOWSTARS:
delay 0.001
pause 0.1
pause 0.001
if matchre("$roomobjs","silver-edged star") then
{
send stow star
send stow star
waitforre ^You|^I|^What|^Sorry|^Stow|...wait
}
pause 0.1
pause 0.1
pause 0.001
if contains("$roomobjs","silver-edged star") then goto STOWSTARS
RETURN
STOWBLADE:
delay 0.001
pause 0.1
pause 0.001
if matchre("$roomobjs","throwing blade") then
{
send stow throwing blade
send stow throwing blade
waitforre ^You|^I|^What|^Sorry|^Stow|...wait
}
pause 0.1
pause 0.1
pause 0.001
if contains("$roomobjs","throwing blade") then goto stowblade
RETURN
STOWARROW:
delay 0.001
pause 0.1
if matchre("$roomobjs","(basilisk head arrow\b|cane arrow\b|bone-tipped arrow\b|barbed arrow\b|stone-tipped arrow\b|serrated-bodkin arrow\b|razor-edged arrow|razor-tipped arrow\b)") then
{
gosub stow $1
gosub stow $1
}
pause 0.1
pause 0.1
if matchre("$roomobjs","(basilisk head arrow\b|cane arrow\b|bone-tipped arrow\b|barbed arrow\b|stone-tipped arrow\b|serrated-bodkin arrow\b|razor-edged arrow|razor-tipped arrow\b)") then goto stowarrow
RETURN
STOWBOLT:
delay 0.001
pause 0.1
if matchre("$roomobjs","(angiswaerd bolt|basilisk bolt|ice-adder bolt|leafhead bolt|barbed bolt|crossbow bolt)") then
{
gosub stow $1
gosub stow $1
}
pause 0.1
pause 0.1
if matchre("$roomobjs","(angiswaerd bolt|basilisk bolt|ice-adder bolt|leafhead bolt|barbed bolt)") then goto STOWBOLT
RETURN
STOWROCK:
delay 0.001
pause 0.1
if matchre("$roomobjs","a small rock") then
{
put stow small rock
put stow small rock
}
pause 0.1
pause 0.1
if contains("$roomobjs","a small rock") then goto STOWROCK
RETURN
#### MAIN STOW ROUTINE
STOWING:
delay 0.0001
var LOCATION STOWING
if matchre("$righthand" "$lefthand" ,"grass") then put drop grass
if matchre("$righthand" "$lefthand" ,"grass") then put drop grass
if "$righthand" = "grass" then put drop grass
if "$righthand" = "vine" then put drop vine
if "$lefthand" = "vine" then put drop vine
if "$righthandnoun" = "rope" then put coil my rope
if "$righthand" = "bundle" || "$lefthand" = "bundle" then put wear bund;drop bun
#if matchre("$righthandnoun","(crossbow|bow|short bow)") then gosub unload
if matchre("$righthandnoun","(block|granite block)") then put drop block
if matchre("$lefthandnoun","(block|granite block)") then put drop block
if matchre("$righthand","(partisan|shield|buckler|lumpy bundle|halberd|staff|longbow|khuj)") then gosub wear my $1
if matchre("$lefthand","(partisan|shield|buckler|lumpy bundle|halberd|staff|longbow|khuj)") then gosub wear my $1
if matchre("$lefthand","(longbow|khuj)") then gosub stow my $1 in my %SHEATH
if "$righthand" != "Empty" then GOSUB STOW right
if "$lefthand" != "Empty" then GOSUB STOW left
RETURN
STOW:
var LOCATION STOW1
var todo $0
STOW1:
delay 0.0001
if "$righthand" = "vine" then put drop vine
if "$lefthand" = "vine" then put drop vine
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre WEBBED ^You can't do that while entangled in a web
matchre STUNNED ^You are still stunned
matchre STOW2 not designed to carry anything|any more room|no matter how you arrange|^That's too heavy|too thick|too long|too wide|^But that's closed|I can't find your container|^You can't
matchre RETURN ^Wear what\?|^Stow what\? Type 'STOW HELP' for details\.
matchre RETURN ^You put
matchre RETURN ^You open
matchre RETURN needs to be
matchre RETURN ^You stop as you realize
matchre RETURN ^But that is already in your inventory\.
matchre RETURN ^That can't be picked up
matchre LOCATION.unload ^You should unload the
matchre LOCATION.unload ^You need to unload the
put stow %todo
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN STOW! (base.inc) ***
put #echo >$Log Crimson $datetime Stow = %todo
put #log $datetime MISSING MATCH IN STOW (base.inc)
STOW2:
delay 0.0001
var LOCATION STOW2
matchre RETURN ^Wear what\?|^Stow what\?
matchre RETURN ^You put
matchre RETURN ^But that is already in your inventory\.
matchre stow3 any more room|no matter how you arrange|^That's too heavy|too thick|too long|too wide|not designed to carry anything|^But that's closed
matchre LOCATION.unload ^You should unload the
matchre LOCATION.unload ^You need to unload the
put stow %todo in my %DEFAULT.CONTAINER
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN STOW2! (base.inc) ***
put #echo >$Log Crimson $datetime Stow = %todo
put #log $datetime MISSING MATCH IN STOW2 (base.inc)
STOW3:
delay 0.0001
var LOCATION STOW3
if "$lefthandnoun" = "bundle" then put drop bun
if "$righthandnoun" = "bundle" then put drop bun
matchre open.thing ^But that's closed
matchre RETURN ^Wear what\?|^Stow what\?
matchre RETURN ^You put
matchre RETURN ^But that is already in your inventory\.
matchre STOW4 any more room|no matter how you arrange|^That's too heavy|too thick|too long|too wide|not designed to carry anything|^But that's closed
matchre LOCATION.unload ^You should unload the
matchre LOCATION.unload ^You need to unload the
put stow %todo in my %BOX.CONTAINER
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN STOW3! (base.inc) ***
put #echo >$Log Crimson $datetime Stow = %todo
put #log $datetime MISSING MATCH IN STOW3 (base.inc)
STOW4:
delay 0.0001
var LOCATION stow4
var bagsFull 1
if "$lefthandnoun" = "bundle" then put drop bun
if "$righthandnoun" = "bundle" then put drop bun
matchre open.thing ^But that's closed
matchre RETURN ^Wear what\?|^Stow what\?
matchre RETURN ^You put your
matchre RETURN ^But that is already in your inventory\.
matchre REM.WEAR any more room|no matter how you arrange|^That's too heavy|too thick|too long|too wide
matchre LOCATION.unload ^You should unload the
matchre LOCATION.unload ^You need to unload the
put stow %todo in my %GEM.CONTAINER
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN STOW4! (base.inc) ***
put #echo >$Log Crimson $datetime Stow = %todo
put #log $datetime MISSING MATCH IN STOW4 (base.inc)
OPEN.THING:
put open %BOX.CONTAINER
put open %DEFAULT.CONTAINER
pause 0.2
goto STOWING
REM.WEAR:
put rem bund
put drop bund
wait
pause 0.5
goto WEAR1
#### FILL GEM POUCHES
GEM_POUCHES:
GEM.POUCHES:
gosub get my gem pouch
pause 0.1
gosub put tie my pouch
pause 0.1
pause 0.1
var fill %DEFAULT.CONTAINER
gosub FILL.POUCH
pause 0.1
var fill %BOX.CONTAINER
gosub FILL.POUCH
pause 0.1
var fill %GEM.CONTAINER
gosub FILL.POUCH
pause 0.1
send stow my pouch
pause 0.1
RETURN
FILL.POUCH:
delay 0.0001
pause 0.1
matchre NEW.POUCH ^The pouch is too full to fit|^The gem pouch is too full|You can't fill anything|^The pouch is too full
matchre RETURN ^You fill|^There aren't|^You open your|^What were you
put fill my gem pouch with my %fill
matchwait 10
RETURN
NEW.POUCH:
delay 0.0001
pause 0.1
send open my %GEMPOUCH.CONTAINER
pause 0.5
pause 0.5
send put my pouch in my %GEMPOUCH.CONTAINER
pause 0.1
pause 0.5
send close my %GEMPOUCH.CONTAINER
pause 0.5
pause 0.1
GET.POUCH:
pause 0.2
send get my gem pouch
pause 0.5
send tie my pouch
pause 0.3
pause 0.1
RETURN
#### EMPTY HANDS
EMPTY_HANDS:
delay 0.0001
if ("$lefthand" != "Empty") then gosub STOW my $lefthandnoun
if ("$righthand" != "Empty") then gosub STOW my $righthandnoun
RETURN
#### EMPTY LEFT HAND
EMPTY_LEFT:
delay 0.0001
var LOCATION EMPTY_LEFT_1
EMPTY_LEFT_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre STUNNED ^You are still stunned
matchre WEBBED ^You can't do that while entangled in a web
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre RETURN ^You drop
matchre RETURN ^Having no further use for .*\, you discard it\.
matchre RETURN ^Your left hand is already empty\.
matchre RETURN ^What were you referring to\?
matchre RETURN ^Please rephrase that command\.
matchre RETURN ^I could not find what you were referring to\.
send empty left
matchwait
#### EMPTY RIGHT HAND
EMPTY_RIGHT:
delay 0.0001
var LOCATION EMPTY_RIGHT_1
EMPTY_RIGHT_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre STUNNED ^You are still stunned
matchre WEBBED ^You can't do that while entangled in a web
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre RETURN ^You drop
matchre RETURN ^Having no further use for .*\, you discard it\.
matchre RETURN ^Your right hand is already empty\.
matchre RETURN ^What were you referring to\?
matchre RETURN ^Please rephrase that command\.
matchre RETURN ^I could not find what you were referring to\.
send empty right
matchwait
### ORDERING SUB, FOR SHOPS
ORDER:
delay 0.0001
var order $0
var LOCATION ORDER_1
if ("$righthand" != "Empty") then gosub put put $righthand in my %CRAFTING.CONTAINER
if ("$leftthand" != "Empty") then gosub put put $lefthand in my %CRAFTING.CONTAINER
pause 0.5
ORDER_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre WEBBED ^You can't do that while entangled in a web
matchre STUNNED ^You are still stunned
matchre ORDER_1 ^The attendant says\,\s*\"You can purchase .*\.\s*Just order it again and we'll see it done\!\"
matchre RETURN ^The attendant takes some coins from you and hands you .*\.
send order %order
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN ORDER! (base.inc) ***
put #echo >$Log Crimson $datetime Order = %order
put #log $datetime MISSING MATCH IN ORDER! (base.inc)
RETURN
#### PUT SUB
PUT:
delay 0.0001
var command $0
var LOCATION PUT_1
PUT_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre WEBBED ^You can't do that while entangled in a web
matchre STUNNED ^You are still stunned
matchre PUT_STOW ^You need a free hand
matchre WAIT ^\[Enter your command again if you want to\.\]
matchre RETURN_CLEAR ^You (?:hand|slide|get|work|pull|lob|spread|shuffle|attach|push|not|will|move|put|now|scan|wear|sling|slowly|whisper|lean|tap|spin|filter|pick|silently|slip|realize|stop|open|close|need|drop|place|shouldn't|knock|grab|fade|toss|pour|set|add|offer|search|circle|fake|weave|shove|carefully|attach|remove|tie|try|must|wave|sit|fail|turn|are|can't|aren't|glance|bend|kneel|carefully|quietly|sense|exhale|blow|begin|rub|sprinkle|twist|struggle|vigorously) .*(?:\.|\!|\?)
matchre RETURN_CLEAR ^But (that|you) .*(?:\.|\!|\?)
matchre RETURN_CLEAR ^The|^That|too injured
matchre RETURN_CLEAR ^You're
matchre RETURN_CLEAR ^Roundtime\:?|^\[Roundtime\:?|^\(Roundtime\:?
matchre RETURN_CLEAR ^I could not find what you were referring to\.
matchre RETURN_CLEAR ^Please rephrase that command\.
matchre RETURN_CLEAR ^That is already|has already
matchre RETURN_CLEAR ^Tie it off
matchre RETURN_CLEAR ^What are you trying to attack\?
matchre RETURN_CLEAR ^At what are you trying to
matchre RETURN_CLEAR ^What were you referring to\?
matchre RETURN_CLEAR ^.* what\?
matchre RETURN_CLEAR ^Your (?:actions|dance|fingers|song).*\.
matchre RETURN_CLEAR ^You sense that you are as pure of spirit as you can be\, and you are ready for whatever rituals might face you\.
matchre RETURN_CLEAR ^Subservient type|^The shadows|^Close examination|^Try though
matchre RETURN_CLEAR ^USAGE\:
matchre RETURN_CLEAR ^Allows a Moon Mage
matchre RETURN_CLEAR ^A slit across the door
matchre RETURN_CLEAR ^You.*analyze
matchre RETURN_CLEAR ^Having no further use for .*\, you discard it\.
matchre RETURN_CLEAR ^You don't have a .* coin on you\!\s*The .* spider looks at you in forlorn disappointment\.
matchre RETURN_CLEAR ^The .* spider turns away\, looking like it's not hungry for what you're offering\.
matchre RETURN_CLEAR ^Brother Durantine nods slowly\.
matchre RETURN_CLEAR ^Durantine waves a small censer over a neatly-wrapped package and intones a short prayer before he hands it to you\.
matchre RETURN_CLEAR ^After a moment\, .*\.
matchre RETURN_CLEAR ^Quietly touching your lips with the tips of your fingers as you kneel\, you make the Cleric's sign with your hand\.
matchre RETURN_CLEAR ^Maybe you should stand up\.
matchre RETURN_CLEAR ^The clerk counts out .*\.
matchre RETURN_CLEAR ^The gem pouch
matchre RETURN_CLEAR ^An attendant
matchre RETURN_CLEAR ^The .* is not damaged enough to warrant repair\.
matchre RETURN_CLEAR ^There is no more room in .*\.
matchre RETURN_CLEAR ^There is nothing in there\.
matchre RETURN_CLEAR ^In the .* you see .*\.
matchre RETURN_CLEAR ^This spell cannot be targeted\.
matchre RETURN_CLEAR ^You cannot figure out how to do that\.
matchre RETURN_CLEAR ^You will now store .* in your .*\.
matchre RETURN_CLEAR ^That tool does not seem suitable for that task\.
matchre RETURN_CLEAR ^There isn't any more room in .* for that\.
matchre RETURN_CLEAR ^\[Ingredients can be added by using ASSEMBLE Ingredient1 WITH Ingredient2\]
matchre RETURN_CLEAR ^\s*LINK ALL CANCEL\s*\- Breaks all links
matchre RETURN_CLEAR STOW HELP
matchre RETURN_CLEAR ^This ritual may only be performed on a corpse\.
matchre RETURN_CLEAR ^There is nothing else to face\!
matchre RETURN_CLEAR ^There aren't
matchre RETURN_CLEAR ^An offer
matchre RETURN_CLEAR ^That area
matchre RETURN_CLEAR ^Ylono (?:looks|frowns|shrugs|smiles) .*(?:\.|\!|\?)
matchre RETURN_CLEAR ^Malik (?:nods|shakes) .*(?:\.|\!|\?)
matchre RETURN_CLEAR ^Obvious exits
matchre RETURN_CLEAR ^Obvious paths
matchre RETURN_CLEAR ^But the merchant can't see you|are invisible|^Doing that would
matchre STAND ^You should stand up first\.
# matchre RETURN_CLEAR ^
matchre RETURN ^\s*Encumbrance\s*\:
send %command
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN PUT! ***
put #echo >$Log Crimson $datetime Command = %command
put #echo >Log Crimson $datetime *** MISSING MATCH IN PUT! ***
put #echo >Log Crimson $datetime Command = %command
put #log $datetime MISSING MATCH IN PUT
RETURN
PUT_STOW:
delay 0.0001
gosub EMPTY_HANDS
goto PUT_1
#### GET SUB
GET:
delay 0.0001
var get $0
var LOCATION GET1
GET1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre WAIT ^You struggle with .* great weight but can't quite lift it\!
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre WEBBED ^You can't do that while entangled in a web
matchre STUNNED ^You are still stunned
matchre HOLD1 ^But that is already in your inventory\.
matchre RETURN ^Get what\?
matchre RETURN ^I could not find what you were referring to\.
matchre RETURN ^What were you referring to\?
matchre RETURN ^You (?:get|grab|pick|pull|push|twist|carefully|are already) .*(?:\.|\!|\?)?
matchre RETURN ^As best it can\, .* moves in your direction\.
send get %get
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN GET! (base.inc) ***
put #echo >$Log Crimson $datetime Get = %get
put #log $datetime MISSING MATCH IN GET (base.inc)
RETURN
REM:
REMOVE:
var LOCATION REMOVE1
var remove $0
REMOVE1:
matchre RETURN ^You take
matchre RETURN ^You slide
matchre RETURN ^You sling
matchre RETURN ^You slip
matchre RETURN ^Roundtime
matchre RETURN ^You remove
matchre RETURN ^You pull off
matchre RETURN ^You pull your
matchre RETURN ^Remove what\?
matchre RETURN ^You count out
matchre RETURN ^You work your way out of
matchre RETURN ^You aren't wearing
matchre RETURN ^What were you referring to\?
matchre RETURN ^You loosen the straps securing
put remove %remove
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN REMOVE! (base.inc) ***
put #echo >$Log Crimson $datetime Remove = %remove
put #log $datetime MISSING MATCH IN Remove (base.inc)
RETURN
#### HOLD SUB
HOLD:
delay 0.0001
var get $0
var LOCATION HOLD1
HOLD1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre WAIT ^You struggle with .* great weight but can't quite lift it\!
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre WEBBED ^You can't do that while entangled in a web
matchre STUNNED ^You are still stunned
matchre RETURN ^You are not experienced
matchre RETURN ^You (?:sling|slide|work|slip|loosen|get|take|pull|remove|are already) .*(?:\.|\!|\?)?
matchre RETURN ^Get what\?
matchre RETURN ^Hold hands with whom\?
matchre RETURN ^What were you referring to\?
matchre RETURN ^I could not find what you were referring to\.
send hold %get
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN HOLD! (base.inc) ***
put #echo >$Log Crimson $datetime Get = %get
put #log $datetime MISSING MATCH IN HOLD (base.inc)
RETURN
#### WEAR SUB
WEAR:
delay 0.0001
var stow $0
var LOCATION WEAR1
WEAR1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre WEBBED ^You can't do that while entangled in a web
matchre STUNNED ^You are still stunned
matchre STOW1 ^You can't wear that\!
matchre STOW1 ^You can't wear any more items like that\.
matchre STOW1 ^You need at least one free hand for that\.
matchre STOW1 ^This .* can't fit over the .* you are already wearing which also covers and protects your .*\.
matchre RETURN ^You (?:sling|put|slide|slip|attach|work|strap|hang|are already) .*(?:\.|\!|\?)?
matchre RETURN ^What were you referring to\?
matchre RETURN ^Wear what\?
send wear %stow
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN WEAR! (base.inc) ***
put #echo >$Log Crimson $datetime Stow = %stow
put #log $datetime MISSING MATCH IN WEAR (base.inc)
RETURN
#### DOUBLE PUT SUB
PUT_IT:
delay 0.0001
var putit $0
var LOCATION PUT_IT_1
PUT_IT_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre WEBBED ^You can't do that while entangled in a web
matchre STUNNED ^You are still stunned
matchre RETURN ^You (?:hand|slide|get|work|pull|shuffle|attach|push|move|put|now|scan|wear|sling|whisper|lean|tap|spin|filter|pick|silently|slip|realize|stop|open|close|need|drop|place|shouldn't|knock|grab|fade|toss|pour|set|add|offer|search|circle|fake|weave|shove|carefully|attach|remove|tie|try|must|wave|sit|fail|turn|are|can't|aren't|glance|bend|kneel|carefully|quietly|sense|exhale|blow|begin|rub|sprinkle|twist|struggle|vigorously) .*(?:\.|\!|\?)
matchre RETURN ^Please rephrase that command\.
matchre RETURN ^.* what\?
matchre RETURN ^I could not find what you were referring to\.
matchre RETURN ^What were you referring to\?
send put %putit
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN PUT_IT! (base.inc) ***
put #echo >$Log Crimson $datetime PutIt = %putit
put #log $datetime MISSING MATCH IN PUT_IT (base.inc)
RETURN
#### COMBAT ATTACK SUBS
ATTACK:
delay 0.0001
if ($stamina < 85) then gosub STAMINA_WAIT
var LOCATION ATTACK_1
ATTACK_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre STUNNED ^You are still stunned
matchre WEBBED ^You can't do that while entangled in a web
matchre CALMED ^Strangely\, you don\'t feel like fighting right now\.
matchre RETURN ^Roundtime\:?|^\[Roundtime\:?|^\(Roundtime\:?
matchre RETURN ^You can not slam with .*\!
matchre RETURN ^There is nothing else to face
matchre RETURN ^You aren't close enough to attack
matchre RETURN ^You turn to face
matchre RETURN ^You spin around to face
matchre RETURN ^You stop advancing because
matchre RETURN ^At what are you trying to .*\?
matchre RETURN ^You need two hands to wield this weapon\!
send attack
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN ATTACK! (base.inc) ***
put #log $datetime MISSING MATCH IN ATTACK (base.inc)
goto ATTACK
DRAW:
delay 0.0001
var LOCATION DRAW_1
DRAW_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre WEBBED ^You can't do that while entangled in a web
matchre STUNNED ^You are still stunned
matchre RETURN ^Roundtime\:?|^\[Roundtime\:?|^\(Roundtime\:?
matchre RETURN ^There is nothing else to face
matchre RETURN ^You aren't close enough to attack
matchre RETURN ^You turn to face
matchre RETURN ^You spin around to face
matchre RETURN ^You stop advancing because
matchre RETURN ^At what are you trying to .*\?
send draw
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN DRAW! (base.inc) ***
put #log $datetime MISSING MATCH IN DRAW (base.inc)
goto DRAW
#### DODGE AND PARRY
DODGE:
delay 0.0001
var LOCATION DODGE_1
DODGE_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre STUNNED ^You are still stunned
matchre WEBBED ^You can't do that while entangled in a web
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre RETURN ^But you are already dodging\!
matchre RETURN ^You move into a position to dodge\.
# matchre DODGE ^Roundtime\:?|^\[Roundtime\:?|^\(Roundtime\:?
send dodge
matchwait
PARRY:
delay 0.0001
var LOCATION PARRY_1
PARRY_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre STUNNED ^You are still stunned
matchre WEBBED ^You can't do that while entangled in a web
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre RETURN ^You are already in a position to parry\.
matchre RETURN ^You move into a position to parry\.
# matchre PARRY ^Roundtime\:?|^\[Roundtime\:?|^\(Roundtime\:?
send parry
matchwait
STAND_RET:
put stand
pause 0.5
RETREAT:
var LOCATION RETREAT
matchre RETREAT ^You stop advancing
matchre 2RETREAT ^You retreat back to pole range\.
matchre 2RETREAT ^You sneak back out
matchre STAND_RET ^You must stand first\.
matchre RETURN ^You retreat from combat\.
matchre RETURN ^You are already as far away as you can get\!
matchre RETURN ^You try to
matchre RETURN revealing your hiding place\!
put retreat
matchwait 10
put #echo >$Log Crimson $datetime *** MISSING MATCH IN RETREAT! (base.inc) ***
put #log $datetime MISSING MATCH IN RETREAT (base.inc)
2RETREAT:
var LOCATION 2RETREAT
matchre RETURN ^You stop advancing
matchre RETURN ^You retreat from combat\.
matchre RETURN ^You retreat back to pole range\.
matchre RETURN ^You sneak back out
matchre RETURN ^You are already as far away as you can get\!
matchre RETURN ^You try to
matchre RETURN revealing your hiding place\!
put retreat
goto retry
matchwait 10
put #echo >$Log Crimson $datetime *** MISSING MATCH IN RETREAT! (base.inc) ***
put #log $datetime MISSING MATCH IN RETREAT (base.inc)
#### WAIT FOR STAMINA
STAMINA_WAIT:
delay 0.0001
put #echo Crimson **************************************************
put #echo Crimson ***** STAMINA IS LOW. WAITING TO REGAIN IT. *****
put #echo Crimson **************************************************
if ($stamina < 85) then waiteval ($stamina > 90)
RETURN
#### RANGED ATTACK SUBS
LOAD:
delay 0.0001
if (!$standing) then gosub STAND
var LOCATION LOAD_1
LOAD_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre STUNNED ^You are still stunned\.
matchre WEBBED ^You can't do that while entangled in a web\.
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre AIM ^You reach into your .* to load .*\.
matchre AIM ^You load .* in your hand\.
matchre AIM ^.* is already loaded with
matchre LOAD_RETRIEVE ^You don't have the (?:right|proper) ammunition
matchre LOAD_RETRIEVE ^As you try to
matchre LOAD_STOW ^.* in your left hand
send load
matchwait
LOAD_STOW:
delay 0.0001
gosub STOW left
goto LOAD
LOAD_RETRIEVE:
delay 0.0001
gosub RETRIEVE_CHECK
goto LOAD
AIM:
delay 0.0001
if (!$standing) then gosub STAND
if ($hidden) && ("$Guild" = "Paladin") then gosub UNHIDE
var LOCATION AIM_1
AIM_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre STUNNED ^You are still stunned\.
matchre WEBBED ^You can't do that while entangled in a web\.
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre AIM_WAIT ^You begin to target
matchre AIM_WAIT ^You are already targetting that\!
matchre RETURN ^I could not find what you were referring to\.
matchre RETURN ^What are you trying to attack\?
matchre RETURN ^\[You're .*balanced?\]
matchre RETURN ^There is nothing else to face
matchre RETURN ^You aren't close enough to attack
matchre RETURN ^You turn to face
matchre RETURN ^You spin around to face
matchre RETURN ^You stop advancing because
send aim
matchwait
AIM_WAIT:
delay 0.0001
matchre FIRE ^You think you have your best shot possible now\.
matchre AIM ^You stop concentrating on aiming your weapon\.
matchwait
FIRE:
delay 0.0001
if (!$standing) then gosub STAND
var LOCATION FIRE_1
FIRE_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre STUNNED ^You are still stunned\.
matchre WEBBED ^You can't do that while entangled in a web\.
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre FIRE_1 ^How can you poach if you are not hidden\?
matchre RETURN ^You were aiming at a different target\, but you fire anyway\.
matchre RETURN ^I could not find what you were referring to\.
matchre RETURN ^\[You're .*balanced?\]
matchre RETURN ^There is nothing else to face
matchre RETURN ^You aren't close enough to attack
matchre RETURN ^You turn to face
matchre RETURN ^You spin around to face
matchre RETURN ^You stop advancing because
matchre RETURN ^Roundtime\:?|^\[Roundtime\:?|^\(Roundtime\:?
if ($hidden) then send poach
else send fire
matchwait
#### FACING SUBS
FACE:
delay 0.0001
gosub FACE_NEXT
goto ASSESS
FACE_NEXT:
delay 0.0001
var LOCATION FACE_NEXT_1
FACE_NEXT_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre WEBBED ^You can't do that while entangled in a web
matchre STUNNED ^You are still stunned
matchre RETURN ^You turn
matchre RETURN ^There is nothing else to face\!
matchre RETURN ^What were you referring to\?
matchre RETURN ^Face what\?
send face next
matchwait
#### PREP
PREP_SPELL:
if $mana < 70 then goto return
PREP:
var location PREP1
var todo $0
PREP1:
matchre return ^You begin chanting a prayer
matchre return ^You direct your attention toward the heavens
matchre return ^You close your eyes and breathe deeply,
matchre return ^You trace an arcane sigil in the air,
matchre return ^Heatless orange flames blaze between your fingertips
matchre return ^Your eyes darken to black as a starless night
matchre return ^You raise your (arms|palms) skyward
matchre return ^You are already preparing
matchre return ^You begin chanting
matchre return ^Icy blue frost crackles up your arms
matchre return ^You make a careless gesture as you chant the words
matchre return ^Tiny tendrils of lightning jolt between your hands
matchre return ^The wailing of lost souls accompanies your preparations
matchre return ^Your skin briefly withers and tightens, becoming gaunt
matchre return ^Images of streaking stars falling from the heavens flash across your vision
matchre return ^A nagging sense of desperation guides your hands through the motions
matchre return ^You hastily shout the arcane phrasings needed to prepare
matchre return ^You deftly waggle your fingers in the precise motions needed to prepare
matchre return ^With great force, you slap your hands together before you and slowly pull them apart,
matchre return ^With no small amount of effort, you slowly recall the teachings
matchre return ^You struggle against your bindings to prepare
matchre return ^You have already
matchre return ^You raise one hand before you and concentrate
matchre return ^As you begin to focus on preparing
matchre return ^That won't affect your current attunement very much\.
put prepare %todo
matchwait 4
return
#### TM SPELL SUBS
TARGET_PREP:
delay 0.0001
var targetprep $0
var LOCATION TARGET_PREP_1
TARGET_PREP_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre WEBBED ^You can't do that while entangled in a web
matchre STUNNED ^You are still stunned
matchre TARGET_RELEASE ^You are not engaged to anything\, so you must specify a target to focus on\!
matchre TARGET_RELEASE ^There is no need to target a .*\. It is already dead\.
matchre TARGET_RELEASE ^I could not find what you were referring to\.
matchre TARGET_RELEASE ^This spell cannot be targeted\.
matchre RETURN ^You begin to weave mana lines into a target pattern around .*\.
matchre RETURN ^You begin chanting a psalm to invoke the .* spell\.
send target %targetprep
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN TARGET_PREP! (base.inc) ***
put #log $datetime MISSING MATCH IN TARGET_PREP (base.inc)
RETURN
TARGET_WAIT:
delay 0.0001
matchre TARGET_RELEASE ^Your concentration slips for a moment, and your spell is lost\.
matchre TARGET_RELEASE ^Your secondary spell pattern dissipates because your target is dead, but the main spell remains intact\.
matchre TARGET_RELEASE ^Your target pattern dissipates because .* is dead\, but the main spell remains intact\.
matchre TARGET_RELEASE ^Your pattern dissipates with the loss of your target\.
matchre TARGET_CAST ^You feel fully prepared to cast your spell\.
matchre TARGET_CAST ^Your target pattern has finished forming around the area\.
matchre TARGET_CAST ^The formation of the target pattern around .* has completed\.
matchre TARGET_CAST ^Your formation of a targeting pattern around .* has completed\.
matchwait
TARGET_CAST:
delay 0.0001
var LOCATION TARGET_CAST_1
TARGET_CAST_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre STUNNED ^You are still stunned
matchre WEBBED ^You can't do that while entangled in a web
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre TARGET_RELEASE ^You don't have a spell prepared\!
matchre TARGET_RELEASE ^.* is already dead, so that's a bit pointless\.
matchre TARGET_RELEASE ^Your secondary spell pattern dissipates because your target is dead, but the main spell remains intact\.
matchre TARGET_RELEASE ^Your target pattern dissipates because the .* is dead\, but the main spell remains intact\.
matchre RETURN ^Roundtime\:?|^\[Roundtime\:?|^\(Roundtime\:?
matchre RETURN ^Focus the power of justice on whom\?
matchre RETURN ^You gesture
send cast
matchwait
TARGET_RELEASE:
delay 0.0001
gosub RELEASE
RETURN
#### HUNT SUB
HUNT:
delay 0.0001
var LOCATION HUNT_1
HUNT_1:
matchre WAIT ^\.\.\.wait|^Sorry\,
matchre STUNNED ^You are still stunned
matchre WEBBED ^You can't do that while entangled in a web
matchre IMMOBILE ^You don't seem to be able to move to do that
matchre RETURN ^You find yourself unable to hunt in this area\.
matchre RETURN ^You take note of all the tracks in the area\, so that you can hunt anything nearby down\.
send hunt
matchwait
##### CRITTER APPRAISAL SUB
APPRAISE_CRITTER:
delay 0.0001
var critter NULL
if matchre("$monsterlist" , "$KnownMonsters") then var critter $0
if ("%critter" = "NULL") then RETURN
gosub APPRAISE %critter quick
RETURN
##### APPRAISAL SUB
APPRAISE:
delay 0.0001
var appraise $0
var LOCATION APPRAISE_1
APPRAISE_1: