-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjail.cmd
More file actions
1677 lines (1667 loc) · 69.7 KB
/
jail.cmd
File metadata and controls
1677 lines (1667 loc) · 69.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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
#############################################################
# STANDALONE JAIL SCRIPT BY SHROOM
# RUN WHILE IN JAIL OR AFTER - DOES NOT MATTER
# WILL GET COIN, PAY YOUR FINE AND RECOVER YOUR GEAR
#############################################################
#debuglevel 5
var PLEAD guilty
var BIN_CONTAINER bag
var PAWN_CONTAINER haversack
var SAFE_CONTAINER backpack
var BACKUP_CONTAINER sack
#put #script abort all except jail
## TF ONLY VARIABLES
var CLANITEM YES
var CLAN_ITEM_NAME human skull
## DEFAULT VARIABLES
var fine 0
var copperfine 0
var bronzefine 0
var silverfine 0
var goldfine 0
var platfine 0
action instant var fine 0;var platfine 0;var goldfine 0;var silverfine 0;var bronzefine 0;var copperfine 0;if ($1) then evalmath platfine $1*10000;if ($2) then evalmath goldfine $2*1000;if ($3) then evalmath silverfine $3*100;if ($4) then evalmath bronzefine $4*10;if ($5) then var copperfine $5;evalmath fine %platfine+%goldfine+%silverfine+%bronzefine+%copperfine when I pronounce a fine upon you of (?:(\d+) platinum[,.]?)?(?:(?: and)? ?(\d+) gold[,.]?)?(?:(?: and)? ?(\d+) silver[,.]?)?(?:(?: and)? ?(\d+) bronze[,.]?)?(?:(?: and)? ?(\d+) copper\.)?
if ("$gamename" != "DRF") then var CLANITEM NO
if_1 then goto %1
############################################################################################
############################################################################################
# JAILED / DEBT PAYING ROUTINE #
# ROBUST AS A MOTHERFUCKER #
############################################################################################
############################################################################################
JAILED:
JAIL_CHECK:
action (jail) off
put #parse TAKING CARE OF BUSINESS
action instant goto PLEAD when ^The eyes of the court|PLEAD INNOCENT or PLEAD GUILTY|Your silence shall be taken|How do you plead\?|Shouldn't you be worrying|You don't seem to be able
var currentfine 0
#put #script pause %ScriptName
if ("$zoneid" = "1") then goto CROSSING_JAIL
if ("$zoneid" = "30") then goto HAVEN_JAIL
if ("$zoneid" = "42") then goto THEREN_JAIL
if ("$zoneid" = "47") then goto MUSPARI_JAIL
if ("$zoneid" = "61") then goto LETH_JAIL
if ("$zoneid" = "116") then goto HIB_JAIL
if ("$zoneid" = "107") then goto MERKRESH_JAIL
if ("$zoneid" = "67") then goto SHARD_JAIL
if ("$zoneid" = "69") then goto SHARD_JAIL
if ("$zoneid" = "99") then goto AESRY_JAIL
if ("$zoneid" = "90") then goto RATHA_JAIL
pause 0.2
goto JAILED
AESRY_JAIL:
AESRY.JAIL:
var CURRENT_CITY AESRY
echo Aesry JAIL
put #parse AESRY JAIL
goto INIT_JAIL
RATHA_JAIL:
RATHA.JAIL:
var CURRENT_CITY RATHA
echo Ratha JAIL
put #parse RATHA JAIL
var RATHA.JAIL 1
if ($roomid = 382) then var RATHA.JAIL 1
if ($roomid = 631) then var RATHA.JAIL 3
goto INIT_JAIL
MERKRESH_JAIL:
MERKRESH.JAIL:
var CURRENT_CITY MERKRESH
echo Mer'Kresh JAIL
put #parse MERKRESH JAIL
goto INIT_JAIL
MUSPARI_JAIL:
MUSPARI.JAIL:
var CURRENT_CITY MUSPARI
echo MUSPAR'I JAIL
put #parse MUSPARI JAIL
goto INIT_JAIL
THEREN_JAIL:
THEREN.JAIL:
var CURRENT_CITY THEREN
echo Theren JAIL
put #parse THEREN JAIL
goto INIT_JAIL
HAVEN_JAIL:
HAVEN.JAIL:
var CURRENT_CITY RIVERHAVEN
echo RIVERHAVEN JAIL
put #parse RIVERHAVEN JAIL
goto INIT_JAIL
LETH_JAIL:
LETH.JAIL:
var CURRENT_CITY LETH
echo LETH JAIL
put #parse LETH JAIL
goto INIT_JAIL
CROSSING_JAIL:
CROSSING.JAIL:
var CURRENT_CITY CROSSING
echo CROSSING JAIL
put #parse CROSS JAIL
goto INIT_JAIL
HIB_JAIL:
HIB.JAIL:
var CURRENT_CITY HIB
echo HIB JAIL
put #parse HIB JAIL
goto INIT_JAIL
SHARD_JAIL:
SHARD.JAIL:
var CURRENT_CITY SHARD
echo SHARD JAIL
put #parse SHARD JAIL
goto INIT_JAIL
INIT_JAIL:
math Jailed add 1
echo
echo *** YOU'VE BEEN JAILED IN %CURRENT_CITY! ***
echo
echo *** Taking care of business..
put #echo >log Orange **** ARRESTED IN %CURRENT_CITY ****
if (%Jailed = 1) then var JAIL %CURRENT_CITY
if (%Jailed = 2) then var JAIL2 %CURRENT_CITY
if (%Jailed = 3) then var JAIL3 %CURRENT_CITY
if (%Jailed = 4) then var JAIL4 %CURRENT_CITY
if ("$roomname" = "Guard House, Jail Cell") then goto JAIL_FORAGE
if ($zoneid = 1) && ($roomid = 23) then goto GET_SACK
if ($zoneid = 1) && ($roomid = 406) then goto PLEAD
if ($zoneid = 1) && !matchre("$roomid" , "(620|406|0)") then goto GET_SACK
if ("$roomname" = "The Great Tower, Cell") then goto JAIL_FORAGE
if ($zoneid = 67) && ($roomid = 528) then goto PLEAD
if ($zoneid = 67) && ($roomid = 527) then goto GET_SACK
if ($zoneid = 67) && !matchre("$roomid" , "(528|527|0|32)") then goto GET_SACK
if ("$roomname" = "Town Jail, The Cell") then goto JAIL_FORAGE
if ($zoneid = 30) && ($roomid = 270) then goto PLEAD
if ($zoneid = 30) && ($roomid = 76) then goto GET_SACK
if ($zoneid = 30) && !matchre("$roomid" , "(76|270|0)") then goto GET_SACK
if ("$roomname" = "Muspar'i, Jail Cell") then goto JAIL_FORAGE
if ($zoneid = 47) && ($roomid = 255) then goto PLEAD
if ($zoneid = 47) && ($roomid = 254) then goto GET_SACK
if ($zoneid = 47) && !matchre("$roomid" , "(255|254|0)") then goto GET_SACK
if ("$roomname" = "Theren Keep, Cell") then goto JAIL_FORAGE
if ($zoneid = 42) && ($roomid = 125) then goto PLEAD
if ($zoneid = 42) && ($roomid = 319) then goto GET_SACK
if ($zoneid = 42) && !matchre("$roomid" , "(319|125|0)") then goto GET_SACK
if ("$roomname" = "Gallows Tree, Cell") then goto JAIL_FORAGE
if ($zoneid = 61) && ($roomid = 180) then goto PLEAD
if ($zoneid = 61) && !matchre("$roomid" , "(181|0)") then goto GET_SACK
if ($zoneid = 107) && ($roomid = 268) then goto PLEAD
if ($zoneid = 107) && !matchre("$roomid" , "(306|268|0)") then goto GET_SACK
if ("$roomname" = "Justice Office, Cell") then goto JAIL_FORAGE
if ($zoneid = 116) && ($roomid = 202) then goto PLEAD
if ($zoneid = 99) && ($roomid = 163) then goto PLEAD
if ($zoneid = 99) && !matchre("$roomid" , "(161|0)") then goto GET_SACK
if matchre("$roomname", "Ratha, Jail") then var RATHA.JAIL 1;goto JAIL_FORAGE
if matchre("$roomname", "Malk'smo Holding Cell") then var RATHA.JAIL 3;goto JAIL_FORAGE
if ($zoneid = 90) && ($roomid = 349) then var RATHA.JAIL 1;goto PLEAD
if ($zoneid = 90) && ($roomid = 581) then var RATHA.JAIL 3;goto PLEAD
if ($zoneid = 90) && !matchre("$roomid" , "(581|349|0)") then goto GET_SACK
pause 0.0001
echo *** WAITING FOR SENTENCE! ***
JAIL_FORAGE:
pause 0.2
if (!$standing) then gosub STAND
if !matchre("$zoneid" , "(107|67|61|30|47)") then goto PLEAD_WAIT
gosub KICKEM
if ("$zoneid" = "67") then gosub collect dust bunny
if ("$zoneid" = "61") then gosub collect dust bunny
if ("$zoneid" = "30") then gosub collect coin
if ("$zoneid" = "47") then gosub collect coin
if ("$zoneid" = "107") then gosub collect coin
pause 0.5
goto JAIL_FORAGE
PLEAD_WAIT:
waitforre ^The eyes of the court|PLEAD INNOCENT or PLEAD GUILTY|Your silence shall be taken|How do you plead\?|Shouldn't you be worrying|You don't seem to be able
PLEAD:
if ("$roomname" = "The Great Tower, Cell") then goto JAIL_FORAGE
if ("$roomname" = "Guard House, Jail Cell") then goto JAIL_FORAGE
if ("$roomname" = "Town Jail, The Cell") then goto JAIL_FORAGE
if ("$roomname" = "Muspar'i, Jail Cell") then goto JAIL_FORAGE
if ("$roomname" = "Theren Keep, Cell") then goto JAIL_FORAGE
if ("$roomname" = "Gallows Tree, Cell") then goto JAIL_FORAGE
if ("$roomname" = "Justice Office, Cell") then goto JAIL_FORAGE
if ("$roomname" = "Ratha, Jail") then var RATHA.JAIL 1;goto JAIL_FORAGE
if ("$roomname" = "Malk'smo Holding Cell") then var RATHA.JAIL 3;goto JAIL_FORAGE
action remove ^The eyes of the court|PLEAD INNOCENT or PLEAD GUILTY|Your silence shall be taken|How do you plead\?|Shouldn't you be worrying|You don't seem to be able
if matchre("innocent", tolower("%PLEAD")) && ("$guild" = "Thief") then send khri cunning
pause 0.5
pause 0.3
send plead %PLEAD
pause 2
pause 0.5
echo FINE: %fine
var currentfine %fine
if matchre("innocent", tolower("%PLEAD")) && ("$guild" = "Thief") then send khri stop cunning
pause 0.4
if ($zoneid = 1) && ($roomid = 23) then goto STOCKS
GET_SACK:
pause 0.2
pause 0.1
matchre GET_SACK ^\.\.\.wait|^Sorry\,
matchre DEBT ^You glance down at your empty hands
matchre PLEAD ^You don't seem to be able to move
matchre STOCKS ^Given your helpless condition
matchre SACK small sack
send glance
matchwait 15
DEBT:
var fine 0
var wealth 0
echo
echo **** GETTING COIN FROM BANK TO PAY FINE ****
echo
gosub STAND
if matchre("$roomobjs","(\brat\b|monkey|\bcat\b|\bpig\b)") then
{
gosub put get $1
gosub stowing
}
pause 0.2
if ("$zoneid" = "42") then goto THEREN_JAIL_GET_FINE
gosub clear
if ("$guild" = "Necromancer") then gosub NECRO.PREP
if ("$zoneid" = "90") then
{
var GUARD 1guard
if ("$roomid" = "349") then var GUARD 1guard
if ("$roomid" = "581") then var GUARD 3guard
}
pause 0.1
TO_TELLER:
var plat 20
gosub AUTOMOVE teller
if ("$zoneid" = "107") then goto FINECHECK_QI
if ("$zoneid" = "99") then goto FINECHECK_QI
if ("$zoneid" = "90") then goto FINECHECK_QI
if ("$zoneid" = "61") then goto FINECHECK_ZOLUREN
if ("$zoneid" = "1") then goto FINECHECK_ZOLUREN
if ("$zoneid" = "30") then goto FINECHECK_THERENGIA
if ("$zoneid" = "34a") then goto FINECHECK_THERENGIA
if ("$zoneid" = "42") then goto FINECHECK_THERENGIA
if ("$zoneid" = "47") then goto FINECHECK_THERENGIA
if ("$zoneid" = "67") then goto FINECHECK_ILITHI
if ("$zoneid" = "116") then goto FINECHECK_FORFEDHDAR
pause
echo
echo *** CRITICAL ERROR!
echo *** UKNOWN JAIL LOCATION!!
echo
put #echo >Log Red *** CRITICAL ERROR!!!!
put #echo >Log Red *** UNKOWN JAIL LOCATION: Zone- $zoneid Room- $roomid
put #echo >Log Red *** PAY YOUR FINE MANUALLY!
pause 0.1
exit
FINECHECK_QI:
var LOCATION FINECHECK_QI
matchre SET_FINE Qi\.\s*\(([\d,]+) copper Lirums
send wealth
matchwait 8
goto NO_FINE
FINECHECK_THERENGIA:
var LOCATION FINECHECK_THERENGIA
matchre SET_FINE Therengia\.\s*\(([\d,]+) copper Lirums
send wealth
matchwait 8
goto NO_FINE
FINECHECK_ZOLUREN:
var LOCATION FINECHECK_ZOLUREN
matchre SET_FINE Zoluren\.\s*\(([\d,]+) copper Kronars
send wealth
matchwait 8
goto NO_FINE
FINECHECK_ILITHI:
var LOCATION FINECHECK_ILITHI
matchre SET_FINE Ilithi\.\s*\(([\d,]+) copper Dokoras
send wealth
matchwait 8
goto NO_FINE
FINECHECK_FORFEDHDAR:
var LOCATION FINECHECK_FORFEDHDAR
matchre SET_FINE Forfedhdar\.\s*\(([\d,]+) copper Dokoras
send wealth
matchwait 8
goto NO_FINE
SET_FINE:
pause 0.1
var fine $1
pause 0.1
eval fine replacere("%fine", ",", "")
eval fine replacere("%fine", " ", "")
echo ============
echo *** FINE: %fine
echo ============
math currentfine add %fine
if ("$zoneid" = "107") then goto CASHCHECK_QI
if ("$zoneid" = "99") then goto CASHCHECK_QI
if ("$zoneid" = "90") then goto CASHCHECK_QI
if ("$zoneid" = "61") then goto CASHCHECK_ZOLUREN
if ("$zoneid" = "1") then goto CASHCHECK_ZOLUREN
if ("$zoneid" = "30") then goto CASHCHECK_THERENGIA
if ("$zoneid" = "34a") then goto CASHCHECK_THERENGIA
if ("$zoneid" = "42") then goto CASHCHECK_THERENGIA
if ("$zoneid" = "47") then goto CASHCHECK_THERENGIA
if ("$zoneid" = "67") then goto CASHCHECK_ILITHI
if ("$zoneid" = "116") then goto CASHCHECK_FORFEDHDAR
##### CHECK CURRENT COINS ON YOU
CASHCHECK_QI:
var LOCATION CASHCHECK_QI
matchre NO_WEALTH ^No Lirums
matchre SET_WEALTH Lirums\s\(([\d,]+) copper Lirums\)\.
send wealth
matchwait 15
goto NO_WEALTH
CASHCHECK_THERENGIA:
var LOCATION CASHCHECK_THERENGIA
matchre NO_WEALTH ^No Lirums
matchre SET_WEALTH Lirums\s\(([\d,]+) copper Lirums\)\.
send wealth
matchwait 15
goto NO_WEALTH
CASHCHECK_ZOLUREN:
var LOCATION CASHCHECK_ZOLUREN
matchre NO_WEALTH ^No Kronars
matchre SET_WEALTH Kronars\s\(([\d,]+) copper Kronars\)\.
send wealth
matchwait 15
goto NO_WEALTH
CASHCHECK_ILITHI:
var LOCATION CASHCHECK_ILITHI
matchre NO_WEALTH ^No Dokoras
matchre SET_WEALTH Dokoras\s\(([\d,]+) copper Dokoras\)\.
send wealth
matchwait 15
goto NO_WEALTH
CASHCHECK_FORFEDHDAR:
var LOCATION CASHCHECK_FORFEDHDAR
matchre NO_WEALTH ^No Dokoras
matchre SET_WEALTH Dokoras\s\(([\d,]+) copper Dokoras\)\.
send wealth
matchwait 15
goto NO_WEALTH
SET_WEALTH:
var wealth $1
eval wealth replacere("%wealth", ",", "")
eval wealth replacere("%wealth", " ", "")
goto FINE_PROCESS
NO_WEALTH:
var wealth 0
FINE_PROCESS:
echo ================
echo *** WEALTH: %wealth
echo ================
pause 0.1
if (%fine > 10000) then
{
put #echo >Log Crimson *** Warning! Large Fines in %CURRENT_CITY - Heat is getting too much!
put #echo >Log Crimson *** Consider laying low for a few days or switching provinces
put #parse STEALING.TOO.HOT!
}
if (%wealth > %fine) then
{
echo =============================
echo *** Paying debt with cash on hand!
echo =============================
pause 0.4
goto PAY_DEBT
}
if (%fine > 250000) then goto BIGGER_FINE
if (%fine > 100000) then goto BIG_FINE
goto WITHDRAW
WITHDRAW:
var LOCATION WITHDRAW
if ($invisible = 1) then gosub stopinvis
pause 0.2
pause 0.1
matchre WITHDRAW ^\.\.\.wait|^Sorry\,
matchre BANK_INVIS ^How can you withdraw money when the clerk can't even see
matchre TO_TELLER ^You must be at a bank teller's window
matchre PAY_DEBT ^The clerk counts out
matchre NO_FUNDS we are not lending money|You don't have that much
matchre NO_FUNDS ^The clerk tells you\, \"You don't have that much money in your account\.
send withdraw %fine copper
matchwait 15
goto NO_FUNDS
BIG_FINE:
var LOCATION BIG_FINE
if ($invisible = 1) then gosub stopinvis
pause 0.2
pause 0.1
matchre BIG_FINE ^\.\.\.wait|^Sorry\,
matchre BANK_INVIS ^How can you withdraw money when the clerk can't even see
matchre TO_TELLER ^You must be at a bank teller's window
matchre PAY_DEBT ^The clerk counts out
matchre NO_FUNDS we are not lending money|You don't have that much
matchre NO_FUNDS ^The clerk tells you\, \"You don't have that much money in your account\.
send withdraw %plat plat
matchwait 15
goto NO_FUNDS
BANK_INVIS:
delay 0.001
if ("$guild" = "Necromancer") then
{
gosub PUT release eotb
pause 0.3
}
if ("$guild" = "Thief") then
{
gosub PUT khri stop silence vanish
pause 0.3
}
if ("$guild" = "Moon Mage") then
{
gosub PUT release rf
pause 0.3
}
pause 0.3
goto %LOCATION
BIGGER_FINE:
var LOCATION BIGGER_FINE
if (%fine > 200000) then var plat 25
if (%fine > 250000) then var plat 35
if (%fine > 350000) then var plat 40
if (%fine > 400000) then var plat 45
if (%fine > 450000) then var plat 50
if (%fine > 500000) then var plat 90
if (%fine > 900000) then var plat 120
if (%fine > 1200000) then var plat 150
if (%fine > 1500000) then var plat 200
if (%fine > 2000000) then var plat 300
goto BIG_FINE
NO_FINE:
echo
echo *** You have no fine
echo
goto RETURN_TO_JAIL
PAY_DEBT:
var LOCATION PAY_DEBT
echo
echo **** Paying off your debt! ***
echo
pause 0.3
# Walking to pay off the debt
gosub AUTOMOVE debt
if ($invisible = 1) then gosub stopinvis
pause 0.2
send pay %fine
pause
gosub AUTOMOVE teller
DONE_DEBT:
var LOCATION DONE_DEBT
pause 0.1
if ($invisible = 1) then gosub stopinvis
send deposit all
pause 0.1
RETURN_TO_JAIL:
echo
echo **** Heading back to jail now ****
echo
pause 0.5
if ("$zoneid" = "42") then goto THEREN_KEEP_JAIL
if ("$zoneid" = "47") then goto MUSPARI_JAIL_RETURN
if ("$zoneid" = "90") then goto RATHA_JAIL_RETURN
if ("$zoneid" = "67") then goto SHARD_JAIL_RETURN
if ("$zoneid" = "116") then goto HIB_JAIL_RETURN
# Walking to the Guard House
gosub AUTOMOVE guard
goto CLAN
MUSPARI_JAIL_RETURN:
gosub AUTOMOVE jail
goto CLAN
RATHA_JAIL_RETURN:
if ("%RATHA.JAIL" = "1") then gosub AUTOMOVE 1GUARD
if ("%RATHA.JAIL" = "3") then gosub AUTOMOVE 3GUARD
goto CLAN
HIB_JAIL_RETURN:
gosub AUTOMOVE 200
goto CLAN
SHARD_JAIL_RETURN:
gosub AUTOMOVE sentin
goto CLAN
RATHA_CHECK:
if ("$zoneid" = "90") && ("$roomid" = "349") then gosub AUTOMOVE 581
if ("$zoneid" = "90") && ("$roomid" = "581") then gosub AUTOMOVE 349
CLAN:
var fullhands 0
var removed 0
var removeCheck 0
var itemsRemoved 0
var item1 NULL
var item2 NULL
var savedleft NULL
var savedright NULL
CLAN_ITEM:
if (toupper("%CLANITEM" = "NO") then goto THE_SACK
if ("$gamename" = "DRF") && (toupper("%CLANITEM" = "YES") then send remove my %CLAN_ITEM_NAME
pause 0.3
THE_SACK:
if ($invisible = 1) then gosub stopinvis
pause 0.5
matchre THE_SACK ^\.\.\.wait|^Sorry\,|^I could not|^Please rephrase
matchre CHECK_LOC ^What were you
matchre SACK_PRE ^You reach for your sack and retrieve the equipment
matchre INV_CHECK ^You'll need to not be wearing anything
matchre INV_CHECK ^Realizing you're wearing too much
matchre DEBT paid off your debt to society
send get $charactername sack
matchwait 15
goto GET_SACK
CHECK_LOC:
if ($zoneid = 90) && ($roomid = 349) then
{
var RATHA.JAIL 3
gosub automove 581
goto THE_SACK
}
if ($zoneid = 90) && ($roomid = 581) then
{
var RATHA.JAIL 1
gosub automove 349
goto THE_SACK
}
echo *** OH NO! CAN'T FIND YOUR JAIL SACK!!! RECOVER YOUR GEAR MANUALLY!!
put #echo >Log Red *** CRITICAL ERROR!!! CAN'T FIND JAIL SACK!! RECOVER GEAR MANUALLY!!
exit
INVCHECK:
INV_CHECK:
echo
echo *** Removing worn items before grabbing sack!!
echo
if ("$lefthand" != "Empty") && ("$righthand" != "Empty") then goto CRIT.ERROR
pause 0.6
matchre THE_SACK You aren't wearing anything special
put inv
matchwait 2
matchre THE_SACK You aren't wearing anything special
matchre REMOVE_JAILITEM \b(spher|key|skull|sphere|gwethdesuan|(?<!wea)ring|toad|obsidian|band)
matchre REMOVE_ITEM (\S+)(\.)
put inv
matchwait 20
put #echo >Log Red *** Missing Match Label in INV_CHECK
put #log $datetime MISSING MATCH IN INV_CHECK ***
REMOVE_ITEM:
var wornItem $0
var removed yes
math removeCheck add 1
# eval wornItem replacere("%wornItem", " (?:with[^\|]*|\w+(?<!crack|bloodsoak|brand|hood|finger)ed[^\|]*|\w+(?<!glow|display|hang)ing[^\|]*)", "|")
if ("$lefthand" != "Empty") && ("$righthand" != "Empty") then goto CRIT.ERROR
gosub PUT remove my %wornItem
pause 0.5
pause 0.2
if %itemsRemoved = 0 then var item1 %wornItem
if %itemsRemoved = 1 then var item2 %wornItem
math itemsRemoved add 1
if (removeCheck > 2) then goto CRIT.ERROR
goto INV_CHECK
REMOVE_ITEM:
var wornItem $1
var removed 1
math removeCheck add 1
if ((%removeCheck > 2) && (%fullhands = 1)) then goto CRAZY_ERROR
if ((%removeCheck > 2) && (%fullhands = 0)) then goto CRIT_ERROR
# eval wornItem replacere("%wornItem", " (?:with[^\|]*|\w+(?<!crack|bloodsoak|brand|hood|finger)ed[^\|]*|\w+(?<!glow|display|hang)ing[^\|]*)", "|")
if (("$lefthand" != "Empty") && ("$righthand" != "Empty")) then goto CRIT_ERROR
if ("%wornItem" = "ring") && matchre("$righthandnoun", "ring") then gosub PUT remove my second %wornItem
else gosub PUT remove my %wornItem
pause 0.5
pause 0.2
if (%itemsRemoved = 0) then var item1 %wornItem
if (%itemsRemoved = 1) then var item2 %wornItem
math itemsRemoved add 1
if ((%removeCheck > 2) && (%fullhands = 1)) then goto CRAZY_ERROR
if ((%removeCheck > 2) && (%fullhands = 0)) then goto CRIT_ERROR
goto INV_CHECK
REMOVE_JAILITEM:
var jailitem $1
var removed 1
math removeCheck add 1
if ((%removeCheck > 2) && (%fullhands = 1)) then goto CRAZY_ERROR
if ((%removeCheck > 2) && (%fullhands = 0)) then goto CRIT_ERROR
if (("$lefthand" != "Empty") && ("$righthand" != "Empty")) then goto CRIT_ERROR
if ("%jailitem" = "ring") && matchre("$righthandnoun", "ring") then gosub PUT remove my second %jailitem
else gosub PUT remove my %jailitem
pause 0.5
pause 0.2
if (%itemsRemoved = 0) then var item1 %jailitem
if (%itemsRemoved = 1) then var item2 %jailitem
math itemsRemoved add 1
if ((%removeCheck > 2) && (%fullhands = 1)) then goto CRAZY_ERROR
if ((%removeCheck > 2) && (%fullhands = 0)) then goto CRIT_ERROR
goto INV_CHECK
CRIT_ERROR:
echo ========================================================
echo ** HANDS ARE TOO FULL OF ITEMS THAT PERSIST THROUGH JAIL
echo ** DROPPING ITEMS TEMPORARILY TO CLEAR INVENTORY BEFORE GETTING SACK
echo ** WILL PICK UP AFTER GETTING SACK
echo ** CONSIDER REDUCING AMOUNT OF ITEMS THAT PERSIST THROUGH JAIL
echo ** MOST ARE JUST STUPID FLUFF ANYWAY
echo ========================================================
pause
pause 2
var itemsRemoved 0
var fullhands 1
var savedright $righthandnoun
var savedleft $lefthandnoun
gosub EMPTY_RIGHT
gosub EMPTY_LEFT
goto INV_CHECK
CRAZY_ERROR:
echo ==============================================================
echo ** CONGRATS! YOU ARE THE FIRST PERSON IN RECORDED HISTORY TO EVER SEE THIS ERROR!
echo ** YOU HAVE 4 OR MORE ITEMS THAT PERSIST THROUGH JAIL... WTF M8?
echo ** YOU NEED TO REMOVE ALL YOUR ITEMS AND RECOVER YOUR GEAR MANUALLY
echo ** get <charactername> sack
echo ** PLEASE REDUCE THE AMOUNT OF ITEMS YOU HAVE THAT PERSIST THROUGH JAIL!
echo =============================================================
put #echo >Log Red ===========================================================
put #echo >Log Red * MAJOR CRITICAL ERROR! DO NOT PASS GO! DO NOT COLLECT 200!
put #echo >Log Red * YOU HAVE 72 HOURS TO RECOVER YOUR GEAR
put #echo >Log Red * YOU HAVE TOO MANY ITEMS THAT PERSIST THROUGH JAIL! (MORE THAN 4)
put #echo >Log Red * COULD NOT RECOVER YOUR JAIL SACK - DO NOT WANT TO LOSE YOUR ITEMS
put #echo >Log Red * REMOVE ALL YOUR WORN ITEMS AND RECOVER YOUR JAIL SACK MANUALLY
put #echo >Log Red * PLEASE REDUCE THE AMOUNT OF ITEMS THAT PERSIST THROUGH JAIL
put #echo >Log Red * MOST OF THEM ARE FLUFF ANYWAY - SCRIPT CAN HANDLE 4 MAX
put #echo >Log Red * REMOVE ALL WORN ITEMS AND RECOVER GEAR AT GUARD HOUSE
put #echo >Log Red =========================================================
pause 4
put WEAR $righthandnoun
pause 0.2
put WEAR $lefthandnoun
pause 0.2
put GET %savedleft
pause 0.4
put WEAR %savedleft
pause 0.4
put GET %savedright
pause 0.4
put WEAR %savedright
pause 0.5
exit
##################################################################################################
STOCKS:
echo
echo *** You got the stocks! Wait it out or plead for mercy
echo
pause
send plead release
waitforre ^You accept a sack and retrieve the equipment|^YOU HAVE BEEN
pause 0.5
pause 0.5
pause 0.2
if (!$standing) then gosub STAND
SACK_PRE:
pause 0.001
pause 0.1
if (toupper("%CLANITEM" = "YES") then gosub put wear %CLAN_ITEM_NAME
if (toupper("%CLANITEM" = "YES") then gosub put rub %CLAN_ITEM_NAME
pause 0.2
pause 0.1
if ("$righthand" != "Empty") then gosub put wear my $righthand
pause 0.2
gosub PUT open my %SAFE_CONTAINER
gosub PUT open my %BACKUP_CONTAINER
pause 0.2
pause 0.3
if ("%removed" = "yes") then
{
if ("%item1" != "null") then gosub PUT wear my %item1
if ("%item2" != "null") then gosub PUT wear my %item2
pause 0.1
pause 0.1
if matchre("$righthandnoun|$lefthandnoun", "ring") then gosub PUT wear my ring
if matchre("$righthandnoun|$lefthandnoun", "key") then gosub PUT wear my key
if matchre("$righthandnoun|$lefthandnoun", "toad") then gosub PUT wear my toad
if matchre("$righthandnoun|$lefthandnoun", "gwethdesuan") then gosub PUT wear my gweth
if matchre("$righthandnoun|$lefthandnoun", "obsidian") then gosub PUT wear my obsidian
if matchre("$righthandnoun|$lefthandnoun", "rat") then gosub PUT wear my rat
if matchre("$righthandnoun|$lefthandnoun", "rat") then gosub PUT stow my rat
if matchre("$righthandnoun|$lefthandnoun", "kitten") then gosub PUT wear my kitten
if matchre("$righthandnoun|$lefthandnoun", "kitten") then gosub PUT stow my kitten
if matchre("$righthandnoun|$lefthandnoun", "pig") then gosub PUT wear my pig
if matchre("$righthandnoun|$lefthandnoun", "pig") then gosub PUT stow my pig
if matchre("$roomobjs","(\bpig\b|kitten|\brat\b)") then gosub stow $1
pause 0.3
pause 0.01
pause 0.01
if matchre("$righthandnoun|$lefthandnoun", "ring") then gosub PUT wear my second ring
if matchre("$righthandnoun|$lefthandnoun", "rat") then gosub PUT wear my second rat
pause 0.3
pause 0.01
pause 0.01
if matchre("$righthandnoun|$lefthandnoun", "ring") then gosub PUT wear my third ring
pause 0.3
pause 0.01
pause 0.01
if matchre("$righthandnoun|$lefthandnoun", "ring") then gosub PUT wear my fourth ring
if matchre("$righthandnoun|$lefthandnoun", "kitten") then gosub PUT stow my kitten
if matchre("$righthandnoun|$lefthandnoun", "rat") then gosub PUT stow my rat
if matchre("$righthandnoun|$lefthandnoun", "pig") then gosub PUT stow my pig
pause 0.3
pause 0.01
pause 0.01
if matchre("$righthandnoun|$lefthandnoun", "ring") then gosub PUT wear my fifth ring
if matchre("$righthandnoun|$lefthandnoun", "ring") then gosub PUT put my ring in my %SAFE_CONTAINER
if matchre("$righthandnoun|$lefthandnoun", "rat") then gosub PUT put my rat in my %SAFE_CONTAINER
if matchre("$righthandnoun|$lefthandnoun", "pig") then gosub PUT put my pig in my %SAFE_CONTAINER
if matchre("$righthandnoun|$lefthandnoun", "kitten") then gosub PUT put my kitten in my %SAFE_CONTAINER
if matchre("$righthandnoun|$lefthandnoun", "ring") then gosub PUT put my second ring in my %SAFE_CONTAINER
pause 0.1
if matchre("$righthandnoun|$lefthandnoun", "ring") then gosub PUT put my third ring in my %SAFE_CONTAINER
if matchre("$righthandnoun|$lefthandnoun", "ring") then gosub PUT put my fourth ring in my %SAFE_CONTAINER
pause 0.1
}
pause 0.001
pause 0.001
if ("$righthand" != "Empty") then
{
if ("$righthandnoun" != "sack") then gosub PUT put my $righthandnoun in my %SAFE_CONTAINER
}
if ("$lefthand" != "Empty") then
{
if ("$lefthandnoun" != "sack") then gosub PUT put $lefthandnoun in my %SAFE_CONTAINER
}
pause 0.1
pause 0.1
if ("$righthand" != "Empty") || ("$lefthand" != "Empty") then
{
if ("$righthandnoun" != "sack") then gosub PUT put $righthandnoun in my %BACKUP_CONTAINER
if ("$lefthandnoun" != "sack") then gosub PUT put $lefthandnoun in my %BACKUP_CONTAINER
pause 0.2
}
SACK:
pause 0.1
pause 0.2
gosub PUT open my small sack
gosub JAIL.EMPTY small.sack
pause 0.5
pause 0.5
matchre PET \brat\b|kitten|\bpig\b
matchre STOW_IT backpack|duffel bag|haversack|knapsack
# matchre STOW_IT mining (\S+)(\.)
matchre ODD_ITEM khuj|quarterstaff|quarter staff|halberd|toad|key
matchre GET_SACK_ITEM (\S+)(?: with a.*)?(\.)
matchre NO_MORE_ITEMS ^There is nothing in there|^I could not find|^What were you
match SACK That is closed.
send look in my small sack
matchwait 15
put #echo >Log Red *** Missing match label in - SACK:
put #log $datetime MISSING MATCH IN SACK: ***
gosub stowing
goto NO_MORE_ITEMS
PET:
var item $0
pause 0.1
gosub PUT get %item
pause 0.5
send wear %item
pause 0.2
gosub stowing
pause 0.5
goto SACK
STOW_IT:
var item $0
send get %item from my small sack
pause 0.5
pause 0.2
send put my %item in my %SAFE_CONTAINER
pause 0.5
pause 0.1
if ("$lefthand" != "Empty") then gosub PUT my $lefthand in my %PAWN_CONTAINER
pause 0.1
pause 0.5
if ("$lefthand" != "Empty") then gosub PUT my $lefthand in my %BIN_CONTAINER
pause 0.2
goto SACK
ODD_ITEM:
var item $0
gosub GET %item from my small sack
pause 0.5
pause 0.2
send wear my %item
pause 0.5
pause 0.2
send put my $lefthand in my %SAFE_CONTAINER
pause 0.5
if ("$lefthand" != "Empty") then send put my $lefthand in my %BACKUP_CONTAINER
pause 0.4
if ("$lefthand" != "Empty") then send wear my $lefthand
pause 0.4
if ("$lefthand" = "Empty") then goto SACK
if ("$lefthand" != "Empty") then gosub PUT put $lefthandnoun in my %BIN_CONTAINER
if ("$lefthand" != "Empty") then gosub PUT put $lefthandnoun in my %PAWN_CONTAINER
pause 0.3
goto SACK
GET_SACK_ITEM:
pause 0.5
if $1 = there then goto NO_MORE_ITEMS
send get $1 from my small sack
pause 0.5
pause 0.1
pause 0.1
pause 0.1
pause 0.1
pause 0.1
if (("$1" = "backpack") || ("$1" = "cauldron")) then
{
pause 0.5
goto SACK
}
if ("$1" = ("obsidian") || ("$1" = "toad") || ("$1" = "rat") then
{
send wear my $1
pause 0.5
send stow my $1
pause 0.5
}
else
{
send put my $lefthand in my %SAFE_CONTAINER
pause 0.5
if ("$lefthand" != "Empty") then send put my $lefthand in my %BACKUP_CONTAINER
pause 0.4
if ("$lefthand" != "Empty") then send wear my $lefthand
pause 0.4
if ("$lefthand" = "Empty") then goto SACK
if ("$lefthand" != "Empty") then gosub PUT put $lefthandnoun in my %BIN_CONTAINER
if ("$lefthand" != "Empty") then gosub PUT put $lefthandnoun in my %PAWN_CONTAINER
pause 0.1
}
pause 0.5
goto SACK
NO_MORE_ITEMS:
pause 0.001
pause 0.001
pause 0.001
send drop my small sack
pause 0.2
pause 0.1
if matchre("$roomobjs","(\brat\b|monkey|\bcat\b|\bpig\b)") then
{
gosub put get $1
gosub stowing
}
pause 0.1
if ("$righthand" != "Empty") then gosub PUT put $righthandnoun in my %SAFE_CONTAINER
if ("$lefthand" != "Empty") then gosub PUT put $lefthandnoun in my %SAFE_CONTAINER
pause 0.2
if ("$righthand" != "Empty") then gosub PUT put $righthandnoun in my %BACKUP_CONTAINER
if ("$lefthand" != "Empty") then gosub PUT put $lefthandnoun in my %BACKUP_CONTAINER
pause 0.2
gosub PUT close my %SAFE_CONTAINER
gosub PUT close my %BACKUP_CONTAINER
echo
echo **** DONE WITH JAIL / SACK SEQUENCE ****
echo
gosub PUT rub my gweth
pause
if (!$standing) then gosub STAND
CHECKLOC:
if ("$zoneid" = "67") then goto SHARD_JAIL_DONE
if ("$zoneid" = "116") then goto HIB_JAIL_DONE
if ("$zoneid" = "107") then goto MERKRESH_JAIL_DONE
if ("$zoneid" = "61") then goto LETH_JAIL_DONE
if ("$zoneid" = "1") then goto CROSS_JAIL_DONE
if ("$zoneid" = "30") then goto HAVEN_JAIL_DONE
if ("$zoneid" = "42") then goto THEREN_JAIL_LEAVE
if ("$zoneid" = "47") then goto MUSPARI_JAIL_DONE
if ("$zoneid" = "90") then goto RATHA_JAIL_DONE
if ("$zoneid" = "99") then goto AESRY_JAIL_DONE
MERKRESH_JAIL_DONE:
gosub AUTOMOVE 55
put #script resume %ScriptName
put #parse TAKING CARE OF BUSINESS
goto JAIL_END
RATHA_JAIL_DONE:
gosub AUTOMOVE 51
put #script resume %ScriptName
put #parse TAKING CARE OF BUSINESS
goto JAIL_END
AESRY_JAIL_DONE:
gosub AUTOMOVE 76
put #script resume %ScriptName
put #parse TAKING CARE OF BUSINESS
goto JAIL_END
MUSPARI_JAIL_DONE:
gosub AUTOMOVE 48
put #script resume %ScriptName
put #parse TAKING CARE OF BUSINESS
goto JAIL_END
CROSS_JAIL_DONE:
gosub AUTOMOVE 42
put #script resume %ScriptName
put #parse TAKING CARE OF BUSINESS
goto JAIL_END
LETH_JAIL_DONE:
gosub AUTOMOVE portal
put #script resume %ScriptName
put #parse TAKING CARE OF BUSINESS
goto JAIL_END
HAVEN_JAIL_DONE:
gosub AUTOMOVE town
put #script resume %ScriptName
put #parse TAKING CARE OF BUSINESS
goto JAIL_END
SHARD_JAIL_DONE:
gosub AUTOMOVE 57
put #script resume %ScriptName
put #parse TAKING CARE OF BUSINESS
goto JAIL_END
HIB_JAIL_DONE:
gosub AUTOMOVE 75
put #script resume %ScriptName
put #parse TAKING CARE OF BUSINESS
goto JAIL_END
THEREN_JAIL_LEAVE:
save THEREN_JAIL_END
goto THEREN_KEEP_ESCAPE
THEREN_JAIL_GET_FINE:
save TO_TELLER
THEREN_KEEP_ESCAPE:
gosub AUTOMOVE 69
send jump moat
pause 3
THEREN_STUNNED_WAIT:
echo **** Stunned! Pausing to recover..
pause 10
if $stunned = 1 then goto THEREN_STUNNED_WAIT
pause 0.5
gosub STAND
pause 0.5
THEREN_MOAT_LEAVE:
var location THEREN_MOAT_LEAVE
gosub MOVE s
pause 2
goto %s
THEREN_KEEP_JAIL:
var location THEREN_KEEP_JAIL
pause 0.2
if ("$guild" = "Necromancer") then gosub NECRO.PREP
if ("$guild" = "Thief") then gosub KHRI.START silence
if ("$guild" = "Moon Mage") then gosub MOONIE.PREP
pause 0.1
pause 0.2
### TO KEEP THROUGH MOAT
gosub AUTOMOVE 102
gosub AUTOMOVE 112
gosub AUTOMOVE 116
gosub AUTOMOVE 161
gosub AUTOMOVE 137
gosub AUTOMOVE dungeon
gosub STAND
goto CLAN_ITEM
THEREN_JAIL_END:
THEREN_JAIL_DONE:
gosub AUTOMOVE 1
pause 2
JAIL_END:
pause 0.1
math totalFine add %fine
pause 0.1
put #echo >Log SkyBlue *** RECOVERED FROM JAIL VIA ~JAIL~ SCRIPT
put #echo >Log SkyBlue *** FINE PAID: %fine
if matchre("$roomobjs","(\brat\b|monkey|\bcat\b|\bpig\b)") then
{
gosub put get $1
gosub stowing
}
echo
echo *** FREE FROM JAIL!
echo
put #parse FREE FROM JAIL
put #parse DONE JAIL!
put #parse JAIL DONE!
put #parse FREE FROM JAIL
exit
NO.FUNDS:
NO_FUNDS:
put #echo >Log Red **** OUT OF MONEY TO PAY FINE! GET MORE MONEY!
echo ***********************************************
echo ** YOU DON'T HAVE ENOUGH MONEY TO PAY YOUR FINE!!!
echo ** GET SOME MORE MONEY FROM ANOTHER BANK!
echo ** PAY YOUR FINE MANUALLY AND GET YOUR GEAR FROM JAIL!
echo **********************************************
put #parse OUT.OF.FUNDS
exit
#######################################################################################
# END
#######################################################################################
##### AUTOMOVE SUBROUTINE #####
AUTOMOVE:
delay 0.0001
var Destination $0
var automovefailCounter 0
if $roomid = 0 then GOSUB MOVE_RANDOM
if (!$standing) then gosub AUTOMOVE.STAND