-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUtility.inc
2783 lines (2774 loc) · 126 KB
/
Utility.inc
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
#### MASTER UTILITY SUBS BY PELIC
#### SHROOM'S VERSION
#### Version 7.0
#### Last Update: Nov 18, 2022
##########################################
## THIS SCRIPT IS JUST USED AS A BASE INCLUDE FOR COMMON SUBS
### YOU DO NOT HAVE TO SET OR USE THESE VARIABLES - THIS WAS JUST USED FOR TESTING PURPOSES
if ("$charactername" = "Shroom") then
{
# Steal from XING or LETH?
var stealing SHARD
# Log window to use
put #tvar Log Log
# Container variables
var container backpack
var boxstore vortex
var sheathcontainer archeologist's toolbelt
var DEFAULT.CONTAINER %container
var BOX.CONTAINER %boxstore
var SHEATH %sheathcontainer
}
if "$charactername" = "Raidboss" then
{
# Steal from XING or LETH?
var stealing LETH
# Log window to use
put #tvar Log Log
# Container variables
var container lootsack
var boxstore bottomless bag
var sheathcontainer hip pouch
var DEFAULT.CONTAINER %container
var BOX.CONTAINER %boxstore
var SHEATH %sheathcontainer
}
if "$charactername" = "Healbitch" then
{
# Steal from XING or LETH?
var stealing LETH
# Log window to use
put #tvar Log Log
# Container variables
var container haversack
var boxstore backpack
var sheathcontainer hip pouch
var DEFAULT.CONTAINER %container
var BOX.CONTAINER %boxstore
var SHEATH %sheathcontainer
}
if "$charactername" = "Fuku" then
{
# Steal from XING or LETH?
var stealing LETH
# Log window to use
put #tvar Log Log
# Container variables
var container haversack
var boxstore backpack
var sheathcontainer hip pouch
var DEFAULT.CONTAINER %container
var BOX.CONTAINER %boxstore
var SHEATH %sheathcontainer
}
if "$charactername" = "Illuminati" then
{
# Steal from XING or LETH?
var stealing LETH
# Log window to use
put #tvar Log Log
# Container variables
var container haversack
var boxstore backpack
var sheathcontainer hip pouch
var DEFAULT.CONTAINER %container
var BOX.CONTAINER %boxstore
var SHEATH %sheathcontainer
}
if "$charactername" = "Hashish" then
{
# Steal from XING or LETH?
var stealing LETH
# Log window to use
put #tvar Log Log
# Container variables
var container carryall
var boxstore duffel bag
var sheathcontainer oilcloth bag
var DEFAULT.CONTAINER %container
var BOX.CONTAINER %boxstore
var SHEATH %sheathcontainer
}
if "$charactername" = "Hvinir" then
{
# Steal from XING or LETH?
var stealing LETH
# Log window to use
put #tvar Log Log
# Container variables
var container carryall
var boxstore duffel bag
var sheathcontainer oilcloth bag
var DEFAULT.CONTAINER %container
var BOX.CONTAINER %boxstore
var SHEATH %sheathcontainer
}
var skinables \b(antenna|ashu'a|barb|beak|(?<!divination )bones?|bristle|carapace|clay strip|catgut|pelt|claw|collarbone|ear|(?<!golden )eye|eyeball|(?<!curving )fang|feather|foreclaw|foreleg|(?<!iron |Iron )fragment|furry tuft|gland|hair|(?<!verdant )heart|(?<!wrapped in lava-drake )hide|hoof|horn(?! (crossbow|bow|latchbow|sling))|(?<!capped with a viciously sharp warklin )impaler|mandible|milk-tooth|mosshair|paw|pseudopod|quill|remnant|rib|sac|scale|scalp|shell|skin|sliver|(?<!book |along the )spine|spinneret|stinger|tail(?!brush|band)|talon|tentacle|toenail|tongue|(?<!angiswaerd |ivory )tooth|tusk|tusks|vertebra|(?<!wyvern )wing|(?<!farmer's )hand)\b
var skins malchata rib|scale|barb|claw
var retry.command.triggers ^\.\.\.wait\s+\d+\s+sec(?:onds?|s)?\.?$|^Sorry\,|^You are still stunned|^You don't seem to be able to move to do that|^You can't do that while entangled in a web|^You struggle against the shadowy webs to no avail\.|^You struggle with .* great weight but can't quite lift it\!|^You attempt that, but end up getting caught in an invisible box\.|^Sorry, you may|^It's all a blur\!|You notice a single flea leap off of your|Something tickles under your arm|Several fleas the size of rice-grains swarm|Your feet are suddenly consumed by the painful biting|A tremendous itching begins|A slight tickle precedes a painful itch
var boxtype brass|copper|deobar|driftwood|iron|ironwood|mahogany|oaken|pine|steel|wooden
var boxes coffer|crate|strongbox|caddy|casket|skippet|trunk|chest
put #var sellGems 0
goto endof
DEATH.ACTIONS:
DEATH.DEACTIVATE:
action clear
return
CLEARHANDS:
delay 0.0005
# debuglevel 10
if matchre("$righthand $lefthand", "%ALLWEAPONS") then if !matchre("%WEAPON", "$charactername|NULL") then gosub SHEATH
if matchre("$righthand $lefthand", "$SBWEAPON") then gosub SHEATH
if matchre("$righthand $lefthand", "$LBWEAPON") then gosub SHEATH
if matchre("$righthand $lefthand", "$THBWEAPON") then gosub SHEATH
if matchre("$righthand $lefthand", "$SEWEAPON") then gosub SHEATH
if matchre("$righthand $lefthand", "$LEWEAPON") then gosub SHEATH
if matchre("$righthand $lefthand", "$THEWEAPON") then gosub SHEATH
if matchre("$righthand $lefthand", "$HTWEAPON") then gosub STOW my $HTWEAPON
if matchre("$righthand $lefthand", "$LTWEAPON") then gosub STOW my $LTWEAPON
if matchre("$righthand $lefthand", "$RANGED.BOW") then
{
gosub UNLOAD
gosub WEAR $RANGED.BOW
}
if matchre("$righthand $lefthand", "$RANGED.BOW") then gosub STOW $RANGED.BOW
if matchre("$righthand $lefthand", "$RANGED.SLINGS") then
{
gosub UNLOAD
gosub WEAR $RANGED.SLINGS
}
if matchre("$righthand $lefthand", "$RANGED.SLINGS") then gosub STOW $RANGED.SLINGS
if matchre("$righthand $lefthand", "$RANGED.CROSSBOW") then
{
gosub UNLOAD
gosub WEAR $RANGED.CROSSBOW
}
if matchre("$righthand $lefthand", "$RANGED.CROSSBOW") then gosub STOW $RANGED.CROSSBOW
if matchre("$righthand $lefthand", "$POLEARMS") then gosub WEAR $POLEARMS
if matchre("$righthand $lefthand", "$POLEARMS") then gosub STOW $POLEARMS
if matchre("$righthand $lefthand", "$STAVES") then gosub WEAR $STAVES
if matchre("$righthand $lefthand", "$STAVES") then gosub STOW $STAVES
if matchre("$righthand $lefthand", "$varshield") then gosub WEAR $varshield
if matchre("$roomobjs" , "%ALLWEAPONS") then gosub STOW $1
if matchre("$roomobjs" , "$LTWEAPON") then gosub STOW $LTWEAPON
if matchre("$roomobjs" , "$HTWEAPON") then gosub STOW $HTWEAPON
if matchre("$roomobjs" , "%MAINARROW") then gosub STOW %MAINARROW
if matchre("$roomobjs" , "%MAINARROW") then gosub STOW %MAINARROW
if matchre("$roomobjs" , "%MAINARROW") then gosub STOW %MAINARROW
if matchre("$roomobjs" , "%MAINARROW") then gosub STOW %MAINARROW
if ("$lefthand" != "Empty") then gosub STOW left
# debuglevel 0
return
#### EMPTY HANDS SUB
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
gosub stowing
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! (utility.inc) ***
put #echo >$Log Crimson $datetime Order = %order
put #log $datetime MISSING MATCH IN ORDER! (utility.inc)
return
PUT:
var putaction $0
var LOCATION PUT_1
PUT_1:
matchre PUT_1 ^\.\.\.wait|^Sorry,|^You are still stunned\.
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 can't pick that up with your hands that damaged\.|^Both your hands are missing\!
matchre PUT_UNTIE ^You should untie
matchre PUT_ROLL_IT ^You should roll it up
matchre PUT_STOW ^You need a free hand|^Free one of your hands|^That will be hard with both your hands full\!
matchre PUT_STAND ^You should stand up first\.|^Maybe you should stand up\.
matchre WAIT ^\[Enter your command again if you want to\.\]
matchre RETURN (^You'?r?e?|^As|^With|^Using).*(?:\.|\!|\?)?
matchre RETURN (You'?r?e?|As|With|Using) (?:accept|adeptly|add|adjust|allow|already|are|aren't|ask|cut|attach|attempt|.+ to|.+ fan|bash|begin|bend|blow|breathe|briefly|bring|bundle|cannot|can't|carefully|cautiously|chop|circle|clasp|close|collect|collector's|corruption|count|combine|come|dance|decide|dodge|don't|drum|draw|effortlessly|eyes|gracefully|deftly|desire|detach|drop|drape|exhale|fade|fail|fake|feel(?! fully rested)|feint|fill|find|filter|focus|form|fumble|gaze|gesture|giggle|gingerly|get|glance|grab|hand|hang|have|icesteel|inhale|insert|kiss|kneel|knock|leap|lean|let|lose|lift|loosen|lob|load|move|must|mutter|mind|not|now|need|offer|open|parry|place|pick|push|pout|pour|put|pull|prepare|press|quietly|quickly|raise|read|reach|ready|realize|recall|remain|release|remove|retreat|reverently|rock|roll|rub|scan|search|secure|sense|set|sheathe|shield|should|shouldn't|shove|silently|sit|skin|slide|sling|slip|slow|slowly|spin|spread|sprinkle|start|stop|strap|struggle|swiftly|swing|switch|tap|take|the|though|tie|tilt|toss|trace|try|tug|turn|twist|unload|untie|vigorously|wave|wear|weave|whisper|whistle|will|wink|wring|work|yank|you|zills) .*(?:\.|\!|\?)?
matchre RETURN ^Brother Durantine|^Durantine|^Mags|^Ylono|^Malik|^Kilam|^Ragge|^Randal|^Catrox|^Kamze|^Unspiek|^Wyla|^Ladar|^Dagul|^Granzer|^Gemsmith|^Fekoeti|^Diwitt|(?:An|The|A) attendant|^The clerk|A Dwarven|^.*He says,
matchre RETURN ^The(.*)?(clerk|teller|attendant|mortar|pestle|tongs|bowl|riffler|hammer|gem|book|page|lockpick|sconce|voice|waters|contours|person|is|has|are|slides|fades|hinges|spell|not)
matchre RETURN ^It('s)?(?:'s|a|and|the)?\s+?(?:would|will|is|a|already|dead|keen|practiced|graceful|stealthy|resounding|full|has)
matchre RETURN ^Roundtime\:?|^\[Roundtime\:?|^\(Roundtime\:?|^\[Roundtime|^Roundtime|\[Roundtime
matchre RETURN ^That('s)?\s+?(?:is|has|was|a|cannot|area|can't|won't|would|already|tool|will|cost|too)
matchre RETURN ^With(?: (a|and|the))?\s+?(?:keen|practiced|graceful|stealthy|resounding)
matchre RETURN ^This (is a .+ spell|is an exclusive|spell|ritual)
matchre RETURN ^The .*(is|has|are|slides|fades|hinges|spell|not|vines|antique|(.+) spider|pattern)
matchre RETURN ^There('s)?\s+?(?:is(n't)?|does(n't)?|already|no|not)
matchre RETURN ^But (?:that|you|you're|you've|the)
matchre RETURN ^Obvious (?:exits|paths)
matchre RETURN ^There's no room|any more room|no matter how you arrange|have all been used\.
matchre RETURN ^That's too heavy|too thick|too long|too wide|not designed to carry|cannot hold any more
matchre RETURN ^(You|I) can't|^Tie what\?|^You just can't|As you attempt to place your
matchre RETURN suddenly leaps toward you|and flies towards you|with a flick
matchre RETURN ^Brushing your fingers|^Sensing your intent|^Quietly touching your lips
matchre RETURN Lucky for you\!\s*That isn't damaged\!|I will not repair something that isn't broken\.
matchre RETURN I'm sorry, but I don't work on those|There isn't a scratch on that, and I'm not one to rob you\.
matchre RETURN I don't work on those here\.|I don't repair those here|Please don't lose this ticket\!
matchre RETURN ^Please rephrase that command\.|^I could not find|^Perhaps you should|^I don't|^Weirdly,|That can't
matchre RETURN \[You're|\[This is|too injured
matchre RETURN ^Moving|Brushing|Recalling|Unaware
matchre RETURN ^.*\[Praying for \d+ sec\.\]
matchre RETURN ^.+ is not in need|^That is closed\.
matchre RETURN ^What (?:were you|is it)
matchre RETURN ^In the name of love\?|^Play on|^(.+) what\?
matchre RETURN ^It's kind of wet out here\.
matchre RETURN ^Some (?:polished|people|tarnished|.* zills)
matchre RETURN ^(\S+) has accepted
matchre RETURN ^Subservient type|^The shadows|^Close examination|^Try though
matchre RETURN ^USAGE\:|^Using your|^You.*analyze
matchre RETURN ^Allows a Moon Mage|^Smoking commands are
matchre RETURN ^A (?:slit|pair|shadow) .*(?:\.|\!|\?)?
matchre RETURN ^Your (?:actions|dance|nerves) .*(?:\.|\!|\?)?
matchre RETURN ^Having no further use for .*, you discard it\.
matchre RETURN ^After a moment, .*\.
matchre RETURN ^.* (?:is|are) not in need of cleaning\.
matchre RETURN \[Type INVENTORY HELP for more options\]|\[Use INVENTORY HELP for more options\.\]
matchre RETURN ^A vortex|^A chance for|^In a flash|^It is locked|^An aftershock
matchre RETURN ^In the .* you see .*\.
matchre RETURN .* (?:Dokoras|Kronars|Lirums)
matchre RETURN ^You will now store .* in your .*\.
matchre RETURN ^\[Ingredients can be added by using ASSEMBLE Ingredient1 WITH Ingredient2\]
matchre RETURN ^\s\*LINK ALL CANCEL\s\*- Breaks all links
matchre RETURN ^Stalking is an inherently stealthy endeavor, try being out of sight\.
matchre RETURN ^You're already stalking|^There aren't any
matchre RETURN ^An offer|shakes (his|her) head
matchre RETURN ^Tie it off when it's empty\?
matchre RETURN ^But the merchant can't see you|are invisible
matchre RETURN Page|^As the world|^Obvious|^A ravenous energy
matchre RETURN ^In the|^The attendant|^That is already open\.|^Your inner
matchre RETURN ^(.+) hands you|^Searching methodically|^But you haven't prepared a symbiosis\!
matchre RETURN ^Illustrations of complex,|^It is labeled|^Your nerves
matchre RETURN ^The lockpick|^Doing that|is not required to continue crafting
matchre RETURN ^Without (any|a|the)|^Wouldn't (it|that|you)
matchre RETURN ^Weirdly, you can't manage
matchre RETURN ^Hold hands with whom\?
matchre RETURN ^Something in the area interferes
matchre RETURN ^With a .+ to your voice,
matchre RETURN ^Turning your focus solemnly inward
matchre RETURN ^Slow, rich tones form a somber introduction
matchre RETURN ^Images of streaking stars falling from the heavens
matchre RETURN ^Strangely, you don't feel like fighting right now\.
matchre RETURN ^With .* movements you prepare your body for the .* spell\.
matchre RETURN ^A strong wind swirls around you as you prepare the .* spell\.
matchre RETURN ^Roundtime\:?|^\[Roundtime\:?|^\(Roundtime\:?|^\[Roundtime|^Roundtime
matchre RETURN ^Shadow and light collide wildly around you as you prepare the .* spell\.
matchre RETURN ^The wailing of lost souls accompanies your preparations of the .* spell\.
matchre RETURN ^A soft breeze surrounds your body as you confidently prepare the .* spell\.
matchre RETURN ^Light withdraws from around you as you speak arcane words for the .* spell\.
matchre RETURN ^Tiny tendrils of lightning jolt between your hands as you prepare the .* spell\.
matchre RETURN ^Low, hummed tones form a soft backdrop for the opening notes of the .* enchante\.
matchre RETURN ^Heatless orange flames blaze between your fingertips as you prepare the .* spell\.
matchre RETURN ^Throwing your head back, you release a savage roar and growl words for the .* spell\.
matchre RETURN ^Entering a trance-like state, your hands begin to tremble as you prepare the .* spell\.
matchre RETURN ^Glowing geometric patterns arc between your upturned palms as you prepare the .* spell\.
matchre RETURN ^Focusing intently, you slice seven straight lines through the air as you invoke the .* spell.\.
matchre RETURN ^Accompanied with a flash of light, you clap your hands sharply together in preparation of the .* spell\.
matchre RETURN ^Icy blue frost crackles up your arms with the ferocity of a blizzard as you begin to prepare the .* spell\!
matchre RETURN ^A radiant glow wreathes your hands as you weave lines of light into the complicated pattern of the .* spell\.
matchre RETURN ^Kaleidoscopic ribbons of light swirl between your outstretched hands, coalescing into a spectral wildling spider\.
matchre RETURN ^Darkly gleaming motes of sanguine light swirl briefly about your fingertips as you gesture while uttering the .* spell\.
matchre RETURN ^As you begin to solemnly intone the .* spell a blue glow swirls about forming a nimbus that surrounds your entire being\.
matchre RETURN ^As you slam your fists together and inhale sharply, a glowing outline begins to form and a matrix of blue and white motes surround you\.
matchre RETURN ^In one fluid motion, you bring your palms close together and a fiery crimson mist begins to burn within them as you prepare the .* spell\.
matchre RETURN ^The first gentle notes of .* waft from you with delicate ease, riddled with low tones that gradually give way to a higher\-pitched theme\.
matchre RETURN ^Droplets of water coalesce around your fingertips as your arms undulate like gracefully flowing river currents to form the pattern of the .* spell\.
matchre RETURN ^Inhaling deeply, you adopt a cyclical rhythm in your breaths to reflect the ebb and flow of the natural world and steel yourself to prepare the .* spell\.
matchre RETURN ^Calmly reaching out with one hand, a silvery-blue beam of light descends from the sky to fill your upturned palm with radiance as you prepare the .* spell\.
matchre RETURN ^Turning your head slightly and gazing directly ahead with a calculating stare, tiny sparks of crystalline light flash around your eyes as you prepare the .* spell\.
matchre RETURN ^You take up a handful of dirt in your palm to prepare the .* spell\. As you whisper arcane words, you gently blow the dust away and watch as it becomes swirling motes of glittering light that veil your hands in a pale aura\.
send %putaction
matchwait 20
echo * MISSING MATCH IN PUT! ***
put #echo >Log Crimson *** MISSING MATCH IN PUT! (%scriptname.cmd) ***
put #echo >Log Crimson Command = %putaction
put #log $datetime MISSING MATCH IN PUT! Command = %putaction (%scriptname.cmd)
return
PUT_ROLL_IT:
delay 0.00001
put roll my %putaction
pause 0.4
goto PUT_1
PUT_UNTIE:
delay 0.00001
eval putaction replacere("%putaction", "\bget\b", "")
eval putaction replacere("%putaction", "\bmy\b", "")
put untie %putaction
pause 0.4
return
PUT_STOW:
gosub EMPTY_HANDS
goto PUT_1
PUT_STAND:
gosub stand
goto PUT_1
#### DOUBLE PUT SUB
PUT_IT:
delay 0.0001
var putit $0
var LOCATION PUT_IT_1
PUT_IT_1:
matchre WAIT ^\.\.\.wait|^Sorry\,|^Please wait\.
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'?r?e?|As|With) (?:accept|adeptly|add|adjust|allow|already|are|aren't|ask|cut|attach|attempt|.+ to|.+ fan|bash|begin|bend|blow|breathe|briefly|bring|bundle|cannot|can't|carefully|cautiously|chop|circle|clasp|close|collect|collector's|corruption|count|combine|come|dance|decide|dodge|don't|drum|draw|effortlessly|eyes|gracefully|deftly|desire|detach|drop|drape|exhale|fade|fail|fake|feel(?! fully rested)|feint|fill|find|filter|focus|form|fumble|gaze|gesture|giggle|gingerly|get|glance|grab|hand|hang|have|icesteel|inhale|insert|kiss|kneel|knock|leap|lean|let|lose|lift|loosen|lob|load|move|must|mutter|mind|not|now|need|offer|open|parry|place|pick|push|pout|pour|put|pull|prepare|press|quietly|quickly|raise|read|reach|ready|realize|recall|remain|release|remove|retreat|reverently|rock|roll|rub|scan|search|secure|sense|set|sheathe|shield|should|shouldn't|shove|silently|sit|skin|slide|sling|slip|slowly|spin|spread|sprinkle|start|stop|strap|struggle|swiftly|swing|switch|tap|take|the|though|tie|tilt|toss|trace|try|tug|turn|twist|unload|untie|vigorously|wave|wear|weave|whisper|whistle|will|wink|wring|work|yank|you|zills) .*(?:\.|\!|\?)?
matchre RETURN ^The .* (is|are|slides)
matchre RETURN ^Without (any|a)
matchre RETURN ^Please rephrase that command\.
matchre RETURN ^Perhaps you should be holding that first\.
matchre RETURN ^.* what\?
matchre RETURN ^What do you want
matchre RETURN ^I could not find what you were referring to\.
matchre RETURN ^What were you referring to\?
send put %putit
matchwait 20
put #echo >Log Crimson *** MISSING MATCH IN PUT_IT! (ubercombat.cmd) ***
put #echo >Log Crimson PutIt = %putit
put #log $datetime MISSING MATCH IN PUT_IT (ubercombat.cmd)
return
#### GET SUB
GET_IT:
delay 0.0001
var todo $0
var LOCATION GET_IT_1
GET_IT_1:
matchre WAIT ^\.\.\.wait|^Sorry\,|^Please wait\.
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 HOLD_1 ^But that is already in your inventory\.
matchre RETURN ^Get what\?|Brushing
matchre RETURN ^You carefully remove .* from the bundle\.
matchre RETURN ^I could not find what you were referring to\.
matchre RETURN ^What were you referring to\?
matchre RETURN ^What do you want
matchre UNTIE_IT ^You should untie
matchre RETURN You'?r?e? (?:hand|slip|put|get|.+ to|.+ fan|can't|leap|tug|quickly|dance|gracefully|reverently|breathe|switch|deftly|swiftly|untie|sheathe|strap|slide|desire|raise|sling|pull|drum|trace|wear|tap|recall|press|hang|gesture|push|move|whisper|lean|tilt|cannot|mind|drop|drape|loosen|work|lob|spread|not|fill|will|now|slowly|quickly|spin|filter|need|shouldn't|pour|blow|twist|struggle|place|knock|toss|set|add|search|circle|fake|weave|shove|try|must|wave|sit|fail|turn|already|glance|bend|swing|chop|bash|dodge|feint|draw|parry|carefully|quietly|sense|begin|rub|sprinkle|stop|combine|take|decide|insert|lift|retreat|load|fumble|exhale|yank|allow|have|are|wring|icesteel|scan|vigorously|adjust|bundle|ask|form|lose|remove|accept|pick|silently|realize|open|grab|fade|offer|tap|aren't|kneel|don\'t|close|let|find|attempt|tie|roll|attach|feel(?! fully rested)|read|reach|gingerly|come|effortlessly|corruption|count|secure|detach|unload|briefly|zills|remain|release|shield) .*(?:\.|\!|\?)?
matchre RETURN ^As best it can\, .* moves in your direction\.
matchre RETURN ^The .* (is|are|slides|decays)
matchre RETURN ^Without (any|a)|Brushing|^Please rephrase
matchre RETURN suddenly leaps toward you|and flies towards you|with a flick
if ($UC_Bonded = 1) then
{
put invoke
pause 0.2
pause 0.1
if !matchre("$righthand|$lefthand", "%todo") then put get %todo
return
}
else send get %todo
matchwait 20
put #echo >Log Crimson *** MISSING MATCH IN GET_IT! (ubercombat.cmd) ***
put #echo >Log Crimson Get = %todo
put #log $datetime MISSING MATCH IN GET_IT (ubercombat.cmd)
return
#### UNTIE SUB
UNTIE_IT:
delay 0.0001
var LOCATION UNTIE_IT
UNTIE_IT_1:
matchre WAIT ^\.\.\.wait|^Sorry\,|^Please wait\.
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 HOLD_1 ^But that is already in your inventory\.
matchre RETURN ^Get what\?|Brushing
matchre RETURN ^Untie what\?
matchre RETURN ^You carefully remove .* from the bundle\.
matchre RETURN ^I could not find what you were referring to\.
matchre RETURN ^What were you referring to\?
matchre RETURN ^What do you want
matchre RETURN You'?r?e? (?:hand|slip|put|get|.* to|can't|quickly|switch|deftly|swiftly|untie|sheathe|strap|slide|desire|raise|sling|pull|drum|trace|wear|tap|recall|press|hang|gesture|push|move|whisper|lean|tilt|cannot|mind|drop|drape|loosen|work|lob|spread|not|fill|will|now|slowly|quickly|spin|filter|need|shouldn't|pour|blow|twist|struggle|place|knock|toss|set|add|search|circle|fake|weave|shove|try|must|wave|sit|fail|turn|already|can\'t|glance|bend|swing|chop|bash|dodge|feint|draw|parry|carefully|quietly|sense|begin|rub|sprinkle|stop|combine|take|decide|insert|lift|retreat|load|fumble|exhale|yank|allow|have|are|wring|icesteel|scan|vigorously|adjust|bundle|ask|form|lose|remove|accept|pick|silently|realize|open|grab|fade|offer|aren't|kneel|don\'t|close|let|find|attempt|tie|roll|attach|feel(?! fully rested)|read|reach|gingerly|come|effortlessly|corruption|count|secure|unload|remain|release|shield) .*(?:\.|\!|\?)?
matchre RETURN ^As best it can\, .* moves in your direction\.
matchre RETURN suddenly leaps toward you|and flies towards you|with a flick
send untie %todo
matchwait 20
put #echo >Log Crimson *** MISSING MATCH IN UNTIE! (ubercombat.cmd) ***
put #echo >Log Crimson Get = %todo
put #log $datetime MISSING MATCH IN UNTIE (ubercombat.cmd)
return
#### GET SUB
GET:
delay 0.0001
pause 0.1
var todo $0
var LOCATION GET1
GET1:
if ($standing = 0) then gosub STAND
pause 0.1
matchre WAIT ^\.\.\.wait|^Sorry\,|^Please wait\.
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 HOLD_1 ^But that is already in your inventory\.
matchre RETURN ^Get what\?|Brushing
matchre RETURN ^You carefully remove .* from the bundle\.
matchre RETURN ^I could not find what you were referring to\.
matchre RETURN ^What were you referring to\?
matchre RETURN ^What do you want
matchre UNTIE_IT ^You should untie
matchre RETURN You'?r?e? (?:hand|slip|put|get|.* to|can't|might|quickly|switch|deftly|swiftly|untie|sheathe|strap|slide|desire|raise|sling|pull|drum|trace|wear|tap|recall|press|hang|gesture|push|move|whisper|lean|tilt|cannot|mind|drop|drape|loosen|work|lob|spread|not|fill|will|now|slowly|quickly|spin|filter|need|shouldn't|pour|blow|twist|struggle|place|knock|toss|set|add|search|circle|fake|weave|shove|try|must|wave|sit|fail|turn|already|can\'t|glance|bend|swing|chop|bash|dodge|feint|draw|parry|carefully|quietly|sense|begin|rub|sprinkle|stop|combine|take|decide|insert|lift|retreat|load|fumble|exhale|yank|allow|have|are|wring|icesteel|scan|vigorously|adjust|bundle|ask|form|lose|remove|accept|pick|silently|realize|open|grab|fade|offer|aren't|kneel|don\'t|close|let|find|attempt|tie|roll|attach|feel(?! fully (rested|prepared))|read|reach|gingerly|come|corruption|count|secure|unload|remain|release|shield) .*(?:\.|\!|\?)?
matchre RETURN ^As best it can\, .* moves in your direction\.
matchre RETURN ^The .* (is|are|slides)
matchre RETURN ^Without (any|a)|Brushing
matchre RETURN suddenly leaps toward you|and flies towards you|with a flick
send get %todo
matchwait 20
put #echo >Log Crimson *** MISSING MATCH IN GET! (ubercombat.cmd) ***
put #echo >Log Crimson Get = %todo
put #log $datetime MISSING MATCH IN GET (ubercombat.cmd)
return
GET2:
delay 0.0001
pause 0.1
var LOCATION GET3
GET3:
if ($standing = 0) then gosub STAND
pause 0.1
matchre WAIT ^\.\.\.wait|^Sorry\,|^Please wait\.
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 HOLD_1 ^But that is already in your inventory\.
matchre RETURN ^Get what\?|Brushing
matchre RETURN ^You carefully remove .* from the bundle\.
matchre RETURN ^I could not find what you were referring to\.
matchre RETURN ^What were you referring to\?
matchre RETURN ^What do you want
matchre UNTIE_IT ^You should untie
matchre RETURN You'?r?e? (?:hand|slip|put|get|.* to|can't|might|quickly|switch|deftly|swiftly|untie|sheathe|strap|slide|desire|raise|sling|pull|drum|trace|wear|tap|recall|press|hang|gesture|push|move|whisper|lean|tilt|cannot|mind|drop|drape|loosen|work|lob|spread|not|fill|will|now|slowly|quickly|spin|filter|need|shouldn't|pour|blow|twist|struggle|place|knock|toss|set|add|search|circle|fake|weave|shove|try|must|wave|sit|fail|turn|already|can\'t|glance|bend|swing|chop|bash|dodge|feint|draw|parry|carefully|quietly|sense|begin|rub|sprinkle|stop|combine|take|decide|insert|lift|retreat|load|fumble|exhale|yank|allow|have|are|wring|icesteel|scan|vigorously|adjust|bundle|ask|form|lose|remove|accept|pick|silently|realize|open|grab|fade|offer|aren't|kneel|don\'t|close|let|find|attempt|tie|roll|attach|feel(?! fully (rested|prepared))|read|reach|gingerly|come|corruption|count|secure|unload|remain|release|shield) .*(?:\.|\!|\?)?
matchre RETURN ^As best it can\, .* moves in your direction\.
matchre RETURN ^The .* (is|are|slides)
matchre RETURN ^Without (any|a)|Brushing
matchre RETURN suddenly leaps toward you|and flies towards you|with a flick
send get %todo from my portal
matchwait 20
put #echo >Log Crimson *** MISSING MATCH IN GET! (ubercombat.cmd) ***
put #echo >Log Crimson Get = %todo
put #log $datetime MISSING MATCH IN GET (ubercombat.cmd)
return
#### HOLD SUB
HOLD:
delay 0.0001
var todo $0
var LOCATION HOLD_1
HOLD_1:
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 (?:get|sling|slide|slip|work|loosen|take|pull|remove|grab|pick|pull|push|twist|carefully|are|loosen) .*(?:\.|\!|\?)?
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 %todo
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN HOLD! (utility.inc) ***
put #echo >$Log Crimson $datetime Get = %todo
put #log $datetime MISSING MATCH IN HOLD (utility.inc)
return
REM:
REMOVE:
var LOCATION REMOVE_1
var todo $0
REMOVE_1:
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 %todo
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN REMOVE! (utility.inc) ***
put #echo >$Log Crimson $datetime Remove = %todo
put #log $datetime MISSING MATCH IN Remove (utility.inc)
RETURN
###############################################################################################################################
#SEARCHES THE GROUND FOR AMMO / WEAPONS / ARMOR
stowAmmo:
delay 0.001
#gosub BLEEDERCHECK
if !matchre($righthand|$lefthand, "Empty") then gosub EMPTY_HANDS
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|crossbow 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)") 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("$righthandnoun|$lefthandnoun", "zills") then put wear my zill
if matchre("$righthand","(grass|braided grass)") then put drop my grass
if matchre("$lefthand","(grass|braided grass)") then put drop my grass
if matchre("$righthand","(vine|braided vine)") then put drop my vine
if matchre("$lefthand","(vine|braided vine)") then put drop my 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 STOW_1
var todo $0
STOW_1:
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 STOW_2 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! (utility.inc) ***
put #echo >$Log Crimson $datetime Stow = %todo
put #log $datetime MISSING MATCH IN STOW (utility.inc)
STOW_2:
delay 0.0001
var LOCATION STOW_2
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 RETURN ^You stop as you realize
matchre STOW_3 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 %container
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN STOW2! (utility.inc) ***
put #echo >$Log Crimson $datetime Stow = %todo
put #log $datetime MISSING MATCH IN STOW2 (utility.inc)
STOW_3:
delay 0.0001
var LOCATION STOW_3
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 RETURN ^You stop as you realize
matchre STOW_4 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 %boxstore
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN STOW3! (utility.inc) ***
put #echo >$Log Crimson $datetime Stow = %todo
put #log $datetime MISSING MATCH IN STOW3 (utility.inc)
STOW_4:
delay 0.0001
var LOCATION STOW_4
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 RETURN ^You stop as you realize
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 %sheathcontainer
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN STOW4! (utility.inc) ***
put #echo >$Log Crimson $datetime Stow = %todo
put #log $datetime MISSING MATCH IN STOW4 (utility.inc)
OPEN_THING:
pause 0.1
send open %boxstore
send open %container
pause 0.5
goto STOWING
REM_WEAR:
put rem bund
put drop bund
wait
pause 0.5
goto WEAR_1
#### WEAR SUB
WEAR:
delay 0.0001
var todo $0
var LOCATION WEAR_1
WEAR_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 STOW_1 ^You can't wear that\!
matchre STOW_1 ^You can't wear any more items like that\.
matchre STOW_1 ^You need at least one free hand for that\.
matchre STOW_1 ^This .* can't fit over the .* you are already wearing which also covers and protects your .*\.
matchre RETURN ^You (?:sling|put|drape|slide|slip|attach|work|strap|hang|are already) .*(?:\.|\!|\?)?
matchre RETURN ^What were you referring to\?
matchre RETURN ^Wear what\?
send wear %todo
matchwait 15
put #echo >$Log Crimson $datetime *** MISSING MATCH IN WEAR! (utility.inc) ***
put #echo >$Log Crimson $datetime Stow = %todo
put #log $datetime MISSING MATCH IN WEAR (utility.inc)
return
################################################################################################
### HUNTING SCRIPT WEAPON CONTROL - SORT GOSUB
### SORTS WEAPONS BY SKILL LEVEL - TRAINS LOWEST TO HIGHEST
### 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 .hunter 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
#### DUMPS TRASH SUB
EMPTY.PACK.CHECK:
var bag $0
pause 0.0001
echo *** EMPTYING %bag
var contents null
action var contents $1 when ^You rummage through .+ and see (.*)\.
action var contents $1 when ^In the .* you see (.*)\.
send look in my %bag
waitforre ^In the .* you see|^There is nothing in there\.|^You rummage
action remove ^In the .* you see (.*)\.|^You rummage through .+ and see (.*)\.
if "%contents" = "null" then return
pause 0.0001
eval contents replace("%contents" , ", " , "|")
eval contents replace("%contents" , " and a" , "|a")
eval contents replace("%contents" , " and an" , "|an")
eval contents replace("%contents" , " and some" , "|some")
eval contents replace("%contents"," with a miner's lamp on it", "")
eval contents replace("%contents"," with a wax label on it", "")
eval contents replace("%contents"," on it", "")
var contents |%contents|
eval total count("%contents", "|")
BAG.EMPTY.Loop:
pause 0.1
eval item element("%contents", 1)
eval number count("%contents", "|%item")
var count 0
gosub BAG.EMPTY.RemoveLoop
action setvariable item $1 when ^@(?:an?|some).* (\S+)$
put #parse @%item
counter set %count
if matchre("%TRASH", "%item") then gosub BAG.EMPTY.ItemAction
if contains("%TRASH", "%item") then gosub BAG.EMPTY.ItemAction
# if contains("%STEAL.LIST", "%contents") then gosub BAG.EMPTY.ItemAction
# if matchre(("%ALT1|%ALT2|%ALT3|%ALT4|%ALT5|%ALT6|%ALT7|%ALT8|%ALT9"), "%item") then gosub BAG.EMPTY.ItemAction
# if contains("%STEAL.LIST", "%item") then gosub %BINORPAWN %item
if "%contents" != "|" then goto BAG.EMPTY.Loop
return
BAG.EMPTY.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 BAG.EMPTY.RemoveLoop
BAG.EMPTY.ItemAction:
gosub storeitem %item
if %c < 1 then return
goto BAG.EMPTY.ItemAction
storeitem:
counter subtract 1
var dumpster NULL
echo
echo **** Dumping: %item
echo
pause 0.1
pause 0.2
gosub GET %item from my %bag
if matchre("$roomobjs", "trash receptacle") then var dumpster receptacle
if matchre("$roomobjs", "a bucket of viscous gloop|a waste bucket") then var dumpster bucket
if matchre("$roomobjs", "a large stone turtle") then var dumpster turtle
if matchre("$roomobjs", "a tree hollow") then var dumpster hollow
if matchre("$roomobjs", "an oak crate") then var dumpster crate
if matchre("$roomobjs", "a driftwood log") then var dumpster log
if matchre("$roomobjs", "a disposal bin|a waste bin|firewood bin") then var dumpster bin
if matchre("$roomobjs", "ivory urn") then var dumpster urn
if matchre("$roomobjs", "a waste basket") then var dumpster basket
if matchre("$roomobjs", "a bottomless pit") then var dumpster pit
if matchre("$roomobjs", "trash receptacle") then var dumpster receptacle
if matchre("$roomname", "^\[Garden Rooftop, Medical Pavilion\]") then var dumpster gutter
pause 0.1
if ("%dumpster" != "NULL") then gosub PUT put %item in %dumpster
if ("%dumpster" = "NULL") then put drop my %item
pause 0.2
pause 0.1
pause 0.1
if (%c < 1) then return
goto storeitem
#####################################
# THE FALLEN SEACAVES SUBS
###################################
LEAVE.SEACAVE:
LEAVE.SEACAVES:
if ("$zoneid" = "150") then gosub automove exit
send go portal
pause 0.5
pause 0.1
RETURN
TO.SEACAVE:
TO.SEACAVES:
GO.SEACAVE:
GO.SEACAVES:
gosub automove portal
pause 0.5
send go meeting portal
pause 0.5
pause 0.1
RETURN
##################################
# BOXES CHECK
DISARM.CHECK:
pause 0.1
#if matchre("$roomobjs", "%boxes") then goto GET_BOX
BOX.CONTAINER.CHECK:
pause 0.1
matchre BOX.CONTAINER.CHECK ^\.\.\.wait\s+\d+\s+sec(?:onds?|s)?\.?|^Sorry\,
matchre DISARM.ON (coffer|trunk|chest|strongbox|skippet|caddy|crate|casket|box)
matchre BOX.CONTAINER.CHECK2 Encumbrance
send look in my %DEFAULT.CONTAINER;enc
matchwait
BOX.CONTAINER.CHECK2:
pause 0.1
matchre BOX.CONTAINER.CHECK2 ^\.\.\.wait\s+\d+\s+sec(?:onds?|s)?\.?|^Sorry\,
matchre DISARM.ON (coffer|trunk|chest|strongbox|skippet|caddy|crate|casket|box)
matchre BOX.CONTAINER.CHECK3 Encumbrance
send look in my %BOX.CONTAINER;enc
matchwait
BOX.CONTAINER.CHECK3:
pause 0.1
matchre BOX.CONTAINER.CHECK2 ^\.\.\.wait\s+\d+\s+sec(?:onds?|s)?\.?|^Sorry\,
matchre DISARM.ON (coffer|trunk|chest|strongbox|skippet|caddy|crate|casket|box)
matchre RETURN Encumbrance
send look in my %GEM.CONTAINER;enc
matchwait
DISARM.ON:
var BOXES ON
return
###################################################################################
#### COMBAT ATTACK SUBS
ATTACK:
delay 0.0001
if ($stamina < 35) 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 (?:put|must|need|can|turn|aren't|stop|spin|drop|set|are|slip|carefully) .*\.
matchre RETURN ^There is nothing else to face
matchre RETURN ^At what are you trying to .*\?
matchre RETURN ^You need two hands to wield this weapon\!
send attack
matchwait 15