-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathraw-svo.config.lua
2384 lines (2269 loc) · 99.6 KB
/
raw-svo.config.lua
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
-- Svof (c) 2011-2015 by Vadim Peretokin
-- Svof is licensed under a
-- Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
-- You should have received a copy of the license along with this
-- work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
pl.dir.makepath(getMudletHomeDir() .. "/svo/config")
-- conf has actual values, config data for them
wait_tbl = {
[0] = {n = 0.7, m = "Systems lag tolerance level set to normal."},
[1] = {n = 1.1, m = "The lag level was set to \"decent\" - make sure to set it to normal when it clears up."},
[2] = {n = 1.9, m = "The lag level was set to \"severe\" - make sure to set it to normal when it clears up."},
[3] = {n = 3.5, m = "The lag level was set to \"awfully terrible\" - make sure to set it to normal when it clears up. Don't even think about fighting in this lag."},
[4] = {n = 3.5, m = "The lag level was set to \"you're on a mobile in the middle of nowhere\" - make sure to set it to normal when it clears up. Don't even think about fighting in this lag. Don't use this for bashing with dor either - use 3 instead. This is more useful for scripts that rely on do - enchanting and etc."}
}
local conf_printinstallhint = function (which)
assert(config_dict[which] and config_dict[which].type, which.." is missing a type")
if config_dict[which].type == "boolean" then
echof("Use %s to answer.", tostring(green("vconfig "..which.." yep/nope")))
elseif config_dict[which].type == "string" then
echof("Use %s to answer.", tostring(green("vconfig "..which.." (option)")))
elseif config_dict[which].type == "number" and config_dict[which].percentage then
echof("Use %s to answer.", tostring(green("vconfig "..which.." (percent)")))
elseif config_dict[which].type == "number" then
echof("Use %s to answer.", tostring(green("vconfig "..which.." (number)")))
end
end
local conf_installhint = function (which)
assert(config_dict[which] and config_dict[which].type, which.." is missing a type")
if config_dict[which].type == "boolean" then
return "Use vconfig "..which.." yep/nope to answer."
elseif config_dict[which].type == "string" then
return "Use vconfig "..which.." (option) to answer."
elseif config_dict[which].type == "number" and config_dict[which].percentage then
return "Use vconfig "..which.." (percent) to answer."
elseif config_dict[which].type == "number" then
return "Use vconfig "..which.." (number) to answer."
else return ""
end
end
config_dict = pl.OrderedMap {
#conf_name = "blockcommands"
{$(conf_name) = {
vconfig2 = true,
type = "boolean",
onenabled = function ()
echof("<0,250,0>Will%s block your commands in slow curing mode (aeon/retardation) if the system is doing something.", getDefaultColor())
if not denyCurrentSend then echof("Warning: your version of Mudlet doesn't support this, so blockcommands won't actually work. Update to 1.2.0+") end
end,
ondisabled = function () echof("<250,0,0>Won't%s block your commands in slow curing mode, but instead allow them to override what the system is doing.", getDefaultColor())
if not denyCurrentSend then echof("Warning: your version of Mudlet doesn't support this, so blockcommands won't actually work.") end end,
onshow = function (defaultcolour)
fg(defaultcolour)
if denyCurrentSend then
echo "Override commands in slow-curing mode.\n" return
else
echo "Override commands in slow-curing mode (requires Mudlet 1.2.0+).\n" return end
end,
installstart = function () conf.blockcommands = true end,
}},
#conf_name = "autoslick"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Automatically prioritise slickness",
onenabled = function () echof("<0,250,0>Will%s automatically swap asthma herb priority in times of danger - when you have paralysis or impatience above asthma in prios, and you have asthma+slickness on you, getting hit with a herbstack.", getDefaultColor()) end,
ondisabled = function ()
if swapped_asthma then
svo.prio_swap("asthma", "herb", svo.swapped_asthma)
svo.swapped_asthma = nil
svo.echof("Swapped asthma priority back down.")
end
echof("<250,0,0>Won't%s automatically swap asthma herb priority in times of danger.", getDefaultColor()) end,
installstart = function () conf.autoslick = true end
}},
#conf_name = "focus"
{$(conf_name) = {
type = "boolean",
vconfig1 = "focus",
onenabled = function () echof("<0,250,0>Will%s use Focus to cure.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use Focus to cure.", getDefaultColor()) end,
installstart = function () conf.focus = nil end,
installcheck = function () echof("Can you make use of the Focus skill?") end
}},
#conf_name = "siprandom"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s sip by random vial IDs of a potion - note that this requires the elist sorter to know which vial IDs have which potions - and you'll need to check 'elist' after a vial runs out.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s make use of random vials - will be sipping the first available one by name.", getDefaultColor()) end,
}},
#conf_name = "autoclasses"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s automatically enable the classes you seem to be fighting (used for class tricks).", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s automatically enable classes that you seem to be fighting (you can use tn/tf class instead).", getDefaultColor()) end,
vconfig2 = true,
onshow = function (defaultcolour)
fg(defaultcolour)
if conf.autoclasses then
echo "Will auto-enable classes.\n"
else
echo "Won't auto-enable classes.\n"
end
end,
}},
#conf_name = "havelifevision"
{$(conf_name) = {
type = "boolean",
onenabled = function () defences.enablelifevision() echof("<0,250,0>Have%s Lifevision mask - added it to defup/keepup.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Don't%s have Lifevision mask - won't be adding it to defup/keepup.", getDefaultColor()) end,
}},
#conf_name = "autoarena"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s automatically enable/disable arena mode as you enter into the arena.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s automatically enable/disable arena mode as you enter/leave the arena..", getDefaultColor()) end,
}},
#conf_name = "haveshroud"
{$(conf_name) = {
type = "boolean",
onenabled = function () defences.enableshroud() echof("<0,250,0>Have%s a Shroudcloak - added it to defup/keepup.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Don't%s have a Shroudcloak - won't be adding it to defup/keepup.", getDefaultColor()) end,
}},
#conf_name = "focuswithcadmus"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Use Focus while you have cadmus",
onshow = function (defaultcolour)
fg(defaultcolour)
echo "Use Focus while you have cadmus"
if conf.focuswithcadmus then
echo" ("
echoLink("adjust affs", "svo.config.set'cadmusaffs'", "View, enable and disable afflictions for which focus is allowed to be used while you've got cadmus")
fg(defaultcolour) echo ")"
end
echo"\n"
resetFormat()
end,
onenabled = function () echof("<0,250,0>Will%s focus for mental afflictions when you've got cadmus (this'll give you a physical affliction when you do).", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s focus when you've got cadmus.", getDefaultColor()) end,
}},
#conf_name = "cadmusaffs"
{$(conf_name) = {
type = "custom",
onmenu = function ()
local underline = setUnderline; _G.setUnderline = function () end
echofn("Afflictions for which we will use focus even though we have ")
underline(true)
setFgColor(unpack(getDefaultColorNums))
echoLink("cadmus", '', "Cadmus will give you a physical affliction if you focus with it (and still cure the mental one)", true)
underline(false)
echo(":\n")
local temp = prio.getlist("focus")
-- clear gaps so we can sort and display in 2 columns
local t = {}
for _, focusaff in ipairs(temp) do t[#t+1] = focusaff end
table.sort(t) -- display alphabetically
for i = 1, #t, 2 do
local focusaff, nextaff = t[i], t[i+1]
if me.cadmusaffs[focusaff] then
dechoLink(" <153,204,204>[<0,204,0>X<153,204,204>]", [[$(sys).me.cadmusaffs["]]..focusaff..[["] = false; $(sys).config.set'cadmusaffs']], "Click to stop focusing for "..focusaff.." when you have camus", true)
setFgColor(unpack(getDefaultColorNums))
echo(string.format(" %s", focusaff))
else
dechoLink(" <153,204,204>[<0,204,0> <153,204,204>]", [[$(sys).me.cadmusaffs["]]..focusaff..[["] = true; $(sys).config.set'cadmusaffs']], "Click to start focusing for "..focusaff.." when you have camus and are able to focus", true)
setFgColor(unpack(getDefaultColorNums))
echo(string.format(" %s", focusaff))
end
-- equal out the spacing on the second column
echo((" "):rep(30-#focusaff))
if nextaff and me.cadmusaffs[nextaff] then
dechoLink(" <153,204,204>[<0,204,0>X<153,204,204>]", [[$(sys).me.cadmusaffs["]]..nextaff..[["] = false; $(sys).config.set'cadmusaffs']], "Click to stop focusing for "..nextaff.." when you have camus", true)
setFgColor(unpack(getDefaultColorNums))
echo(string.format(" %s\n", nextaff))
elseif nextaff then
dechoLink(" <153,204,204>[<0,204,0> <153,204,204>]", [[$(sys).me.cadmusaffs["]]..nextaff..[["] = true; $(sys).config.set'cadmusaffs']], "Click to start focusing for "..nextaff.." when you have camus and are able to focus", true)
setFgColor(unpack(getDefaultColorNums))
echo(string.format(" %s\n", nextaff))
end
end
_G.setUnderline = underline
echo'\n'
end
}},
#conf_name = "lyre"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Lyre mode",
onenabled = function () defs.keepup("lyre", "on") echof("Lyre mode <0,250,0>ON%s.", getDefaultColor()) end,
ondisabled = function () defs.keepup("lyre", "off") app("off", true) echof("Lyre mode <250,0,0>OFF%s.", getDefaultColor()) end,
}},
#conf_name = "ninkharsag"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Experimental Nin'kharsag tracking",
onenabled = function () echof("Experimental Nin'kharsag tracking <0,250,0>enabled%s - will attempt to work out which affs Nin'kharsag hides, and diagnose otherwise.", getDefaultColor()) end,
ondisabled = function () echof("Experimental Nin'kharsag <250,0,0>disabled%s.", getDefaultColor()) end,
}},
#conf_name = "shipmode"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Ship mode",
onenabled = function () signals.newroom:connect(sk.check_shipmode) echof("Ship mode <0,250,0>enabled%s - this will allow the system to work properly with the 2-3 line prompts.", getDefaultColor()) end,
ondisabled = function () signals.newroom:disconnect(sk.check_shipmode) echof("Ship mode <250,0,0>disabled%s.", getDefaultColor()) end,
}},
#conf_name = "lyrecmd"
{$(conf_name) = {
type = "string",
onset = function ()
dict.lyre.physical.action = conf.lyrecmd
echof("Will use the '%s' for the Lyre mode.", tostring(conf.lyrecmd))
end
}},
#conf_name = "commandseparator"
{$(conf_name) = {
type = "string",
onset = function ()
echof("Will use <0,250,0>%s%s as the in-game command separator.", tostring(conf.commandseparator), getDefaultColor())
end
}},
#conf_name = "buckawns"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Have buckawns",
onenabled = function () echof("<0,250,0>Do%s have buckawns.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Don't%s have buckawns.", getDefaultColor()) end,
installstart = function () conf.buckawns = nil end,
installcheck = function () echof("Have you got the buckawns artifact?") end
}},
#conf_name = "burrowpause"
{$(conf_name) = {
type = "boolean",
onenabled = function () signals.gmcproominfo:connect(sk.check_burrow_pause) echof("<0,250,0>Will%s auto-pause when we burrow.", getDefaultColor()) end,
ondisabled = function () signals.gmcproominfo:disconnect(sk.check_burrow_pause) echof("<250,0,0>Won't%s auto-pause when we burrow.", getDefaultColor()) end,
installstart = function () conf.burrowpause = true end,
}},
#conf_name = "freevault"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Vaulting doesn't take balance",
onenabled = function ()
if conf.freevault and dict.riding.physical.balanceful_act then
dict.riding.physical.balanceless_act = true
dict.riding.physical.balanceful_act = nil
signals.dragonform:emit()
elseif not conf.freevault and dict.riding.physical.balanceless_act then
dict.riding.physical.balanceless_act = nil
dict.riding.physical.balanceful_act = true
signals.dragonform:emit()
end
echof("<0,250,0>Do%s have balanceless vaulting.", getDefaultColor())
end,
ondisabled = function ()
if conf.freevault and dict.riding.physical.balanceful_act then
dict.riding.physical.balanceless_act = true
dict.riding.physical.balanceful_act = nil
signals.dragonform:emit()
elseif not conf.freevault and dict.riding.physical.balanceless_act then
dict.riding.physical.balanceless_act = nil
dict.riding.physical.balanceful_act = true
signals.dragonform:emit()
end
echof("<250,0,0>Don't%s have balanceless vaulting.", getDefaultColor())
end,
}},
#conf_name = "deathsight"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Have deathsight",
onenabled = function () echof("<0,250,0>Do%s have deathsight.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Don't%s have deathsight.", getDefaultColor()) end,
installstart = function () conf.deathsight = nil end,
installcheck = function () echof("Have you got the deathsight skill?") end
}},
#if skills.chivalry then
#conf_name = "rage"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = function (defaultcolour)
fg(defaultcolour)
echo "Use rage ("
echoLink("view scenarios", "svo.config.set'ragefunc'", "View, enable and disable scenarios in which rage will be used")
fg(defaultcolour) echo ")\n"
resetFormat()
end,
onenabled = function () echof("<0,250,0>Will%s use of Rage.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use of Rage.", getDefaultColor()) end,
installstart = function () conf.rage = nil end,
installcheck = function () echof("Can you make use of the Rage skill?") end
}},
#conf_name = "ragefunc"
{$(conf_name) = {
type = "custom",
onmenu = function ()
local underline = setUnderline; _G.setUnderline = function () end
echof("Scenarios to use rage in:")
local sortednames = keystolist(rage)
table.sort(sortednames)
local longestfname = longeststring(sortednames)
for i = 1, #sortednames do
local fname = sortednames[i]
local t = rage[fname]
if not me.disabledragefunc[fname] then
if dechoLink then
dechoLink(" <153,204,204>[<0,204,0>X<153,204,204>]", [[$(sys).me.disabledragefunc["]]..fname..[["] = true; svo.config.set'ragefunc']], "Disable "..fname, true)
else
decho(" <153,204,204>[<0,204,0>X<153,204,204>]")
end
setFgColor(unpack(getDefaultColorNums))
echo(string.format(" %-"..longestfname.."s - %s\n", fname, tostring(t.desc)))
else
if dechoLink then
dechoLink(" <153,204,204>[<0,204,0> <153,204,204>]", [[$(sys).me.disabledragefunc["]]..fname..[["] = false; svo.config.set'ragefunc']], "Enable "..fname, true)
else
decho(" <153,204,204>[<0,204,0> <153,204,204>]")
end
setFgColor(unpack(getDefaultColorNums))
echo(string.format(" %-"..longestfname.."s - %s\n", fname, tostring(t.desc)))
end
end
_G.setUnderline = underline
showprompt()
end
}},
#end
#conf_name = "tree"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = function (defaultcolour)
fg(defaultcolour)
echo "Use tree ("
echoLink("view scenarios", "svo.config.set'treefunc'", "View, enable and disable scenarios in which tree will be used")
fg(defaultcolour) echo ")\n"
resetFormat()
end,
onenabled = function () echof("<0,250,0>Will%s use of tree.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use of tree.", getDefaultColor()) end,
installstart = function () conf.tree = nil end,
installcheck = function () echof("Do you have a Tree tattoo?") end
}},
#conf_name = "treebalance"
{$(conf_name) = {
type = "number",
min = 0,
max = 100000,
onset = function ()
if conf.treebalance == 0 then
echof("Will use the default settings for tree balance length.")
else
echof("Set tree balance to be %ds - if it doesn't come back after that, I'll reset it.", conf.treebalance)
end
end,
installstart = function () conf.treebalance = 0 end
}},
#conf_name = "restore"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = function (defaultcolour)
fg(defaultcolour)
echo "Use restore ("
echoLink("view scenarios", "svo.config.set'restorefunc'", "View, enable and disable scenarios in which restore will be used")
fg(defaultcolour) echo ")\n"
resetFormat()
end,
onenabled = function () echof("<0,250,0>Will%s use Restore to cure limbs when necessary.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use Restore to cure.", getDefaultColor()) end,
installstart = function () conf.restore = nil end,
installcheck = function () echof("Can you make use of the Restore skill?") end
}},
#conf_name = "dragonheal"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = function (defaultcolour)
fg(defaultcolour)
echo "Use dragonheal ("
echoLink("view scenarios", "svo.config.set'dragonhealfunc'", "View, enable and disable scenarios in which dragonheal will be used")
fg(defaultcolour) echo ")\n"
resetFormat()
end,
onenabled = function () echof("<0,250,0>Will%s use dragonheal to cure when necessary.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use dragonheal to cure.", getDefaultColor()) end,
installstart = function () conf.dragonheal = nil end,
installcheck = function () echof("Can you make use of the Dragonheal?") end
}},
#if skills.venom then
#conf_name = "shrugging"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = function (defaultcolour)
fg(defaultcolour)
echo "Use shrugging ("
echoLink("view scenarios", "svo.config.set'shruggingfunc'", "View, enable and disable scenarios in which shrugging will be used")
fg(defaultcolour) echo ")\n"
resetFormat()
end,
onenabled = function () echof("<0,250,0>Will%s use shrugging to cure when necessary.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use shrugging to cure.", getDefaultColor()) end,
installstart = function () conf.shrugging = nil end,
installcheck = function () echof("Can you make use of the shrugging?") end
}},
#end
#conf_name = "breath"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Auto-enable breathing on Kai Choke",
onenabled = function () echof("<0,250,0>Will%s automatically enabling breathing against Kai Choke and to check for asthma.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use survival breathing.", getDefaultColor()) end,
installstart = function () conf.breath = nil end,
installcheck = function () echof("Can you make use of the survival breath skill?") end
}},
#conf_name = "ignoresinglebites"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Ignore single serpent bites",
onenabled = function () echof("<0,250,0>Will%s ignore all serpent bites that deliver only one affliction - most likely they'll be illusions, but may also be not against a smart Serpent who realizes that you're ignoring. So if you see them only biting, that's a warning sign that they're *really* biting, and you'd want to toggle this off & diagnose.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s ignore serpent bites that deliver only one affliction.", getDefaultColor()) end
}},
#conf_name = "ignoresinglestabs"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Ignore single serpent doublestabs",
onenabled = function () echof("<0,250,0>Will%s ignore all serpent doublestabs that deliver only one affliction (most likely they'll be illusions, but may also be not).", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s ignore serpent doublestabs that deliver only one affliction.", getDefaultColor()) end
}},
#conf_name = "efficiency"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = "Have survival efficiency",
onenabled = function () echof("<0,250,0>Have%s survival efficiency - tree tattoo balance will take shorter to come back.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Don't%s have efficiency - tree tattoo balance will take longer to come back.", getDefaultColor()) end,
installstart = function () conf.efficiency = nil end,
installcheck = function () echof("Do you have the survival efficiency skill?") end
}},
#conf_name = "clot"
{$(conf_name) = {
type = "boolean",
vconfig1 = "clot",
onenabled = function () echof("<0,250,0>Will%s use clot to control bleeding.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use clot for bleeding.", getDefaultColor()) end,
installstart = function () conf.clot = nil end,
installcheck = function () echof("Can you make use of the Clot skill?") end
}},
#conf_name = "insomnia"
{$(conf_name) = {
type = "boolean",
vconfig1 = "insomnia",
onenabled = function () echof("<0,250,0>Will%s use the Insomnia skill for insomnia.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use the Insomnia skill for insomnia, and will use cohosh instead.", getDefaultColor()) end,
installstart = function () conf.insomnia = nil end,
installcheck = function () echof("Can you make use of the Insomnia skill?") end
}},
#conf_name = "thirdeye"
{$(conf_name) = {
type = "boolean",
vconfig1 = "thirdeye",
onenabled = function () echof("<0,250,0>Will%s use the thirdeye skill for thirdeye instead of echinacea.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use the thirdeye skill for thirdeye, and will use echinacea instead.", getDefaultColor()) end,
installstart = function () conf.thirdeye = nil end,
installcheck = function () echof("Can you make use of the Thirdeye skill?") end
}},
#if skills.shindo then
#conf_name = "shindodeaf"
{$(conf_name) = {
type = "boolean",
vconfig1 = "shindodeaf",
onenabled = function () echof("<0,250,0>Will%s use the Shindo deaf skill for deaf.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use the Shindo deaf skill for deaf.", getDefaultColor()) end,
installstart = function () conf.shindodeaf = nil end,
installcheck = function () echof("Would you like to use Shindo deaf for deafness?") end
}},
#conf_name = "shindoblind"
{$(conf_name) = {
type = "boolean",
vconfig1 = "shindoblind",
onenabled = function () echof("<0,250,0>Will%s use the Shindo blind skill for blind.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use the Shindo blind skill for blind.", getDefaultColor()) end,
installstart = function () conf.shindoblind = nil end,
installcheck = function () echof("Would you like to use Shindo blind for blindness?") end
}},
#end
#if skills.kaido then
#conf_name = "kaidodeaf"
{$(conf_name) = {
type = "boolean",
vconfig1 = "kaidodeaf",
onenabled = function () echof("<0,250,0>Will%s use the kaido deaf skill for deaf.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use the kaido deaf skill for deaf.", getDefaultColor()) end,
installstart = function () conf.kaidodeaf = nil end,
installcheck = function () echof("Would you like to use kaido deaf for deafness?") end
}},
#conf_name = "kaidoblind"
{$(conf_name) = {
type = "boolean",
vconfig1 = "kaidoblind",
onenabled = function () echof("<0,250,0>Will%s use the kaido blind skill for blind.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use the kaido blind skill for blind.", getDefaultColor()) end,
installstart = function () conf.kaidoblind = nil end,
installcheck = function () echof("Would you like to use kaido blind for blindness?") end
}},
#end
#if skills.chivalry or skills.shindo or skills.kaido or skills.metamorphosis then
#conf_name = "fitness"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = function (defaultcolour)
fg(defaultcolour)
echo "Use fitness ("
echoLink("view scenarios", "svo.config.set'fitnessfunc'", "View, enable and disable scenarios in which fitness will be used")
fg(defaultcolour) echo ")\n"
resetFormat()
end,
onenabled = function () echof("<0,250,0>Will%s use of Fitness.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s use of Fitness.", getDefaultColor()) end,
installstart = function () conf.fitness = nil end,
installcheck = function () echof("Can you make use of the Fitness skill?") end
}},
#conf_name = "fitnessfunc"
{$(conf_name) = {
type = "custom",
onmenu = function ()
local underline = setUnderline; _G.setUnderline = function () end
echof("Scenarios to use fitness in:")
local sortednames = keystolist(fitness)
table.sort(sortednames)
local longestfname = longeststring(sortednames)
for i = 1, #sortednames do
local fname = sortednames[i]
local t = fitness[fname]
if not me.disabledfitnessfunc[fname] then
if dechoLink then
dechoLink(" <153,204,204>[<0,204,0>X<153,204,204>]", [[$(sys).me.disabledfitnessfunc["]]..fname..[["] = true; svo.config.set'fitnessfunc']], "Disable "..fname, true)
else
decho(" <153,204,204>[<0,204,0>X<153,204,204>]")
end
setFgColor(unpack(getDefaultColorNums))
echo(string.format(" %-"..longestfname.."s - %s\n", fname, tostring(t.desc)))
else
if dechoLink then
dechoLink(" <153,204,204>[<0,204,0> <153,204,204>]", [[$(sys).me.disabledfitnessfunc["]]..fname..[["] = false; svo.config.set'fitnessfunc']], "Enable "..fname, true)
else
decho(" <153,204,204>[<0,204,0> <153,204,204>]")
end
setFgColor(unpack(getDefaultColorNums))
echo(string.format(" %-"..longestfname.."s - %s\n", fname, tostring(t.desc)))
end
end
_G.setUnderline = underline
showprompt()
end
}},
#end
#conf_name = "moss"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s make use of moss/potash to heal.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s make use of moss/potash to heal.", getDefaultColor()) end,
installstart = function ()
conf.moss = nil end,
installcheck = function ()
echof("Do you want to make use of moss/potash to heal?") end,
}},
#conf_name = "showchanges"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s show changes in health/mana on the prompt.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s show changes in health/mana on the prompt.", getDefaultColor()) end,
onshow = function (defaultcolour)
fg(defaultcolour)
echo("Show h/m changes (in "..tostring(conf.changestype).." format).\n")
end,
installstart = function () conf.showchanges = nil end,
installcheck = function () echof("Do you want to show changes about your health/mana in the prompt?") end
}},
#conf_name = "changestype"
{$(conf_name) = {
type = "string",
check = function (what)
if what == "full" or what == "short" or what == "fullpercent" or what == "shortpercent" then return true end
end,
onset = function ()
echof("Will use the %s health/mana loss echoes.", conf.changestype)
end,
installstart = function () conf.changestype = "shortpercent" end
}},
#conf_name = "showbaltimes"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s show balance times for balance, equilibrium and herbs.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s show balance times.", getDefaultColor()) end,
onshow = function (defaultcolour)
fg(defaultcolour)
echo "Show how long balances took.\n"
end,
installstart = function () conf.showbaltimes = true end,
-- installcheck = function () echof("Do you want to show how long your balances take?") end
}},
#conf_name = "showafftimes"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s show how long afflictions took to cure.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s show times for curing afflictions.", getDefaultColor()) end,
onshow = function (defaultcolour)
fg(defaultcolour)
echo "Show how quickly afflictions are cured.\n"
end,
installstart = function () conf.showafftimes = true end,
}},
#conf_name = "doubledo"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s do actions twice under stupidity.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s do actions twice under stupidity.", getDefaultColor()) end,
onshow = "Double do actions in stupidity",
vconfig2 = true
}},
#conf_name = "repeatcmd"
{$(conf_name) = {
type = "number",
min = 0,
max = 100000,
onset = function ()
if conf.repeatcmd == 0 then echof("Will not repeat commands.")
elseif conf.repeatcmd == 1 then echof("Will repeat each command one more time.")
else echof("Will repeat each command %d more times.", conf.repeatcmd)
end end,
installstart = function () conf.repeatcmd = 0 end
}},
#if not skills.tekura then
#conf_name = "parry"
{$(conf_name) = {
type = "boolean",
vconfig1 = "parry",
onenabled = function () echof("<0,250,0>Will%s make use of parry.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s make use of parry.", getDefaultColor()) end,
installstart = function () conf.parry = nil end,
installcheck = function () echof("Are you able to use parry?") end
}},
#else
#conf_name = "guarding"
{$(conf_name) = {
type = "boolean",
vconfig1 = "guarding",
onenabled = function () echof("<0,250,0>Will%s make use of guarding.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s make use of guarding.", getDefaultColor()) end,
installstart = function () conf.guarding = nil end,
installcheck = function () echof("Are you able to use guarding?") end
}},
#end
#conf_name = "singleprompt"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onshow = function (defaultcolour)
fg(defaultcolour)
if conf.singleprompt then
echo(string.format("Use a singleprompt%s", (conf.singlepromptblank and ' (with a blank line)' or '')))
else
echo("Not using a singleprompt")
end
echo'.\n'
resetFormat()
end,
onenabled = function ()
echof("<0,250,0>Enabled%s the use of a single prompt.", getDefaultColor())
sk.enable_single_prompt()
end,
ondisabled = function ()
echof("<250,0,0>Disabled%s the use a single prompt.", getDefaultColor())
if moveprompt then killTrigger(moveprompt) end
if bottomprompt then bottomprompt:hide(); bottomprompt.reposition = function() end end
setBorderBottom(0)
bottom_border = 0
end
}},
#conf_name = "singlepromptsize"
{$(conf_name) = {
type = "number",
min = 0,
max = 100,
onset = function ()
if bottomprompt then
bottomprompt:setFontSize(conf.singlepromptsize)
if conf.singleprompt then
-- svo.config.set("singleprompt", "off", false)
-- svo.config.set("singleprompt", "on", false)
if moveprompt then killTrigger(moveprompt) end
if bottomprompt then bottomprompt:hide(); bottomprompt.reposition = function() end end
setBorderBottom(0)
bottom_border = 0
sk.enable_single_prompt()
clearWindow("bottomprompt")
end
end
echof("Will be displaying the font at size %d.", conf.singlepromptsize)
end
}},
#conf_name = "singlepromptblank"
{$(conf_name) = {
type = "boolean",
onenabled = function ()
echof("<0,250,0>Enabled%s the single prompt to show a blank line for the prompt.", getDefaultColor())
config.set("singlepromptkeep", false, false)
end,
ondisabled = function ()
echof("<250,0,0>Disabled%s the blank line, will be deleting the prompt instead.", getDefaultColor())
end
}},
#conf_name = "singlepromptkeep"
{$(conf_name) = {
type = "boolean",
onenabled = function ()
echof("<0,250,0>Enabled%s the single prompt to keep the prompt%s.", getDefaultColor(), (conf.singleprompt and '' or ' (when vconfig singleprompt is on)'))
config.set("singlepromptblank", false, false)
end,
ondisabled = function ()
echof("<250,0,0>Disabled%s keeping the prompt, will be removing it.", getDefaultColor())
end
}},
#conf_name = "waitherbai"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onenabled = function () echof("<0,250,0>Will%s pause eating of herbs while checking herb-cured illusions.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s pause eating of herbs while checking herb-cured illusions.", getDefaultColor()) end,
onshow = function (defaultcolour)
fg(defaultcolour) echo ("Don't eat while checking herb-cured illusions.\n")
end,
installstart = function () conf.waitherbai = true end
}},
#conf_name = "waitparalysisai"
{$(conf_name) = {
type = "boolean",
vconfig2 = true,
onenabled = function () echof("<0,250,0>Will%s wait for balance/eq to confirm a suspect paralysis instead of accepting it - so if we get a suspect paralysis while off bal/eq, we'll cure other things and check the paralysis when we can.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s wait for balance/eq to confirm a possible paralysis - if we get one off bal/eq, we'll eat bloodroot asap. Otherwise if we have bal/eq, we'll check first.", getDefaultColor()) end,
onshow = function (defaultcolour)
fg(defaultcolour) echo ("Wait for balance/eq to check suspicious paralysis.\n")
end,
installstart = function () conf.waitparalysisai = false end
}},
#conf_name = "commandecho"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s show commands the system is doing.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s show commands the system is doing.", getDefaultColor()) end,
onshow = function (defaultcolour)
fg(defaultcolour) echo ("Show system commands ("..tostring(conf.commandechotype)..")\n")
end,
installstart = function () conf.commandecho = true end
}},
#conf_name = "commandechotype"
{$(conf_name) = {
type = "string",
check = function (what)
if what == "plain" or what == "fancy" or what == "fancynewline" then return true end
end,
onset = function ()
echof("Will use the %s command echoes.", conf.commandechotype)
end,
installstart = function () conf.commandechotype = "fancy" end
}},
#conf_name = "curemethod"
{$(conf_name) = {
type = "string",
check = function (what)
if table.contains({"conconly", "transonly", "preferconc", "prefertrans", "prefercustom"}, what) then return true end
end,
onset = function ()
signals.curemethodchanged:emit()
if conf.curemethod == "conconly" then
echof("Will only use the usual Concoctions herbs/potions/salve for curing.")
elseif conf.curemethod == "transonly" then
echof("Will only use Transmutation minerals for curing.")
elseif conf.curemethod == "preferconc" then
echof("Will use Concoctions and Transmutation cures as you have them, but prefer Concoctions cures.")
elseif conf.curemethod == "prefertrans" then
echof("Will use Concoctions and Transmutation cures as you have them, but prefer Transmutation cures.")
elseif conf.curemethod == "prefercustom" then
echof("Will use your preferred Concoctions or Transmutation cures, falling back to the alternatives if you run out. See 'vshow curelist' for the adjustment menu.")
else
echof("Will use Concoctions and Transmutation cures as you have them.")
end
end,
-- onshow: done in vshow
installstart = function () conf.curemethod = nil end,
installcheck = function () echof("Would you like to use Concoctions or Transmutation cures?\n\n You can answer with 'conconly' - which'll mean that you'd like to use Concoctions cures only, 'transonly' - which'll mean that you'd like to use Transmutation cures only, 'preferconc' - prefer Concoctions cures, but fall back to Transmutation cures should you run out, and lastly, 'prefertrans' - prefer Transmutation cures, but fall back to Concoctions should you run out.") end
}},
#conf_name = "customprompt"
{$(conf_name) = {
type = "string",
vconfig2 = true,
onset = function ()
if conf.customprompt == "none" or conf.customprompt == "off" or conf.customprompt == "of" then
conf.customprompt = false
echof("Custom prompt disabled.")
elseif conf.customprompt == "on" then
if conf.oldcustomprompt ~= "off" and conf.oldcustomprompt ~= "of" then
conf.customprompt = conf.oldcustomprompt
cp.makefunction()
echof("Custom prompt restored.")
if innews then
innews = false
echof("Disabled the news status and re-enabled the prompt.")
end
else
echof("You haven't set a custom prompt before, so we can't revert back to it. Set it with 'vconfig customprompt <prompt line>.")
conf.customprompt = false
end
else
cp.makefunction()
conf.oldcustomprompt = conf.customprompt
echof("Custom prompt enabled and set; will replace the standard one with yours now.")
end
end,
installstart = function () conf.customprompt = nil; conf.setdefaultprompt = nil end
}},
#conf_name = "relight"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s auto-relight non-artifact pipes.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s auto-relight pipes.", getDefaultColor()) end,
installstart = function () conf.relight = true end,
installcheck = function () echof("Should we keep non-artifact pipes lit?") end
}},
#conf_name = "gagrelight"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s hide relighting of pipes.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s hide relighting pipes.", getDefaultColor()) end,
onshow = function (defaultcolour)
fg(defaultcolour)
echo(string.format("Re-light pipes quietly%s.\n", not conf.relight and " (when relighting is on)" or ""))
end,
installstart = function () conf.gagrelight = true end,
installcheck = function () echof("Should we hide it when pipes are relit (it can get spammy)?") end
}},
#conf_name = "gagotherbreath"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s hide others breathing.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s hide others breathing.", getDefaultColor()) end,
onshow = "Completely gag others breathing",
installstart = function () conf.gagotherbreath = true end
}},
#conf_name = "gagbreath"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s hide the breathing defence.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s hide the breathing defence.", getDefaultColor()) end,
onshow = "Completely gag breathing",
installstart = function () conf.gagbreath = true end,
-- installcheck = function () echof("Should we hide it when you use the breathing defence?") end
}},
#conf_name = "gageqbal"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Will%s hide the 'you're off eq/bal' messages.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s hide the 'you're off eq/bal' messages.", getDefaultColor()) end,
onshow = "Completely gag off eq/bal messages",
installstart = function () conf.gageqbal = true end,
installcheck = function () echof("Should we hide the messages you get when you try and spam something off balance or equilibrium?") end
}},
#conf_name = "gagserverside"
{$(conf_name) = {
type = "boolean",
onshow = function (defaultcolour)
fg(defaultcolour)
echo("Gag Svof's use of serverside priorities/toggles.\n")
end,
onenabled = function () echof("<0,250,0>Will%s hide info lines from the serverside curing system.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s hide info lines from the serverside curing system.", getDefaultColor()) end,
installstart = function () conf.gagserverside = true end,
}},
#conf_name = "gagservercuring"
{$(conf_name) = {
type = "boolean",
onshow = function (defaultcolour)
fg(defaultcolour)
echo("Gag serverside [CURING] messages.\n")
end,
onenabled = function () echof("<0,250,0>Will%s hide serverside's [CURING] messages.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Won't%s hide serverside's [CURING] messages.", getDefaultColor()) end,
installstart = function () conf.gagservercuring = false end,
}},
#conf_name = "ccto"
{$(conf_name) = {
type = "string",
onset = function ()
conf.ccto = conf.ccto:lower()
if conf.ccto == "pt" or conf.ccto == "party" then
echof("Will report stuff to party.")
elseif conf.ccto == "clt" then
echof("Will report stuff to the current selected clan.")
elseif conf.ccto:find("^tell %w+") then
echof("Will report stuff to %s via tells.", conf.ccto:match("^tell (%w+)"):title())
elseif conf.ccto == "ot" then
echof("Will report stuff to the Order channel.")
elseif conf.ccto == "team" then
echof("Will report stuff to the team channel.")
elseif conf.ccto == "army" then
echof("Will report stuff to the army channel.")
elseif conf.ccto == "echo" then
echof("Will echo ccto stuff back to you, instead of announcing it anywhere.")
else
echof("Will report stuff to the %s clan.", conf.ccto)
end
end,
vconfig2 = true,
onshow = function (defaultcolour)
fg(defaultcolour)
echo(string.format("Reporting stuff to %s.\n", tostring(conf.ccto)))
end,
installstart = function ()
conf.ccto = "pt" end
}},
#if skills.woodlore then
#conf_name = "weapon"
{$(conf_name) = {
type = "string",
onset = function ()
conf.weapon = conf.weapon:lower()
echof("Set your weapon to '%s'.", conf.weapon)
end,
vconfig2 = true,
onshow = string.format("Using a %s as a weapon", (conf.weapon and tostring(conf.weapon) or "(nothing)")),
installstart = function ()
conf.weapon = nil end,
installcheck = function ()
echof("Are you using a spear or a trident as a weapon?") end
}},
#end
#if skills.metamorphosis then
#conf_name = "transmorph"
{$(conf_name) = {
type = "boolean",
onenabled = function () echof("<0,250,0>Have%s transmorph - won't go human between morphing.", getDefaultColor()) end,
ondisabled = function () echof("<250,0,0>Don't%s have transmorph - will go human between morphing.", getDefaultColor()) end,
onshow = "Have transmorph",
installstart = function () conf.transmorph = nil end,
installcheck = function () echof("Do you have the Metamorphosis Transmorph skill?") end
}},
#conf_name = "morphskill"
{$(conf_name) = {
type = "string",
check = function (what)
return sk.validmorphskill(what)
end,
onset = function ()
conf.morphskill = conf.morphskill:lower()