forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circlecheck.lic
747 lines (693 loc) · 30.2 KB
/
circlecheck.lic
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
=begin
Documentation: https://elanthipedia.play.net/Lich_script_repository#circlecheck
Circle Requirements are matched off of Elanthipedia
=end
custom_require.call(%w[common])
$Skills = [
{ name: 'Instinct', type: 'Survival' },
{ name: 'Evasion', type: 'Survival' },
{ name: 'Athletics', type: 'Survival' },
{ name: 'Stealth', type: 'Survival' },
{ name: 'Perception', type: 'Survival' },
{ name: 'Locksmithing', type: 'Survival' },
{ name: 'First Aid', type: 'Survival' },
{ name: 'Skinning', type: 'Survival' },
{ name: 'Outdoorsmanship', type: 'Survival' },
{ name: 'Thievery', type: 'Survival' },
{ name: 'Backstab', type: 'Survival' },
{ name: 'Thanatology', type: 'Survival' },
{ name: 'Forging', type: 'Lore' },
{ name: 'Outfitting', type: 'Lore' },
{ name: 'Engineering', type: 'Lore' },
{ name: 'Alchemy', type: 'Lore' },
{ name: 'Scholarship', type: 'Lore' },
{ name: 'Appraisal', type: 'Lore' },
{ name: 'Tactics', type: 'Lore' },
{ name: 'Mechanical Lore', type: 'Lore' },
{ name: 'Performance', type: 'Lore' },
{ name: 'Empathy', type: 'Lore' },
{ name: 'Enchanting', type: 'Lore' },
{ name: 'Trading', type: 'Lore' },
{ name: 'Attunement', type: 'Magic' },
{ name: 'Arcana', type: 'Magic' },
{ name: 'Targeted Magic', type: 'Magic' },
{ name: 'Debilitation', type: 'Magic' },
{ name: 'Warding', type: 'Magic' },
{ name: 'Augmentation', type: 'Magic' },
{ name: 'Utility', type: 'Magic' },
{ name: 'Sorcery', type: 'Magic' },
{ name: 'Summoning', type: 'Magic' },
{ name: 'Astrology', type: 'Magic' },
{ name: 'Theurgy', type: 'Magic' },
{ name: 'Inner Magic', type: 'Magic', generic: true },
{ name: 'Inner Fire', type: 'Magic', generic: true },
{ name: 'Melee Mastery', type: 'Mastery' },
{ name: 'Missile Mastery', type: 'Mastery' },
{ name: 'Parry Ability', type: 'Weapon', generic: true },
{ name: 'Small Edged', type: 'Weapon' },
{ name: 'Large Edged', type: 'Weapon' },
{ name: 'Twohanded Edged', type: 'Weapon' },
{ name: 'Twohanded Blunt', type: 'Weapon' },
{ name: 'Small Blunt', type: 'Weapon' },
{ name: 'Large Blunt', type: 'Weapon' },
{ name: 'Bow', type: 'Weapon' },
{ name: 'Slings', type: 'Weapon' },
{ name: 'Crossbow', type: 'Weapon' },
{ name: 'Polearms', type: 'Weapon' },
{ name: 'Heavy Thrown', type: 'Weapon' },
{ name: 'Offhand Weapon', type: 'Weapon', generic: true },
{ name: 'Brawling', type: 'Weapon' },
{ name: 'Light Thrown', type: 'Weapon' },
{ name: 'Staves', type: 'Weapon' },
{ name: 'Expertise', type: 'Weapon' },
{ name: 'Defending', type: 'Armor', generic: true },
{ name: 'Shield Usage', type: 'Armor' },
{ name: 'Light Armor', type: 'Armor' },
{ name: 'Chain Armor', type: 'Armor' },
{ name: 'Brigandine', type: 'Armor' },
{ name: 'Plate Armor', type: 'Armor' },
{ name: 'Conviction', type: 'Armor' }
]
$GuildReqs = {
'Empath' => {
specific_reqs: {
'Empathy' => [[10, 4], [30, 5], [100, 6], [150, 7], [200, 15]],
'Scholarship' => [[30, 3], [70, 4], [150, 5], [200, 13]],
'First Aid' => [[10, 2], [100, 3], [150, 4], [200, 10]],
'Outdoorsmanship' => [[30, 1], [150, 2], [200, 5]]
},
general_reqs: {
'Lore' => [
[[30, 3], [100, 4], [150, 5], [200, 13]],
[[10, 2], [70, 3], [150, 4], [200, 10]],
[[30, 2], [100, 3], [150, 4], [200, 10]]
],
'Magic' => [
[[30, 3], [100, 4], [150, 5], [200, 13]],
[[10, 2], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 2], [70, 3], [150, 4], [200, 10]],
[[10, 0], [30, 2], [100, 3], [150, 4], [200, 10]],
[[30, 0], [100, 3], [150, 4], [200, 10]]
],
'Survival' => [
[[10, 1], [70, 2], [100, 3], [150, 4], [200, 10]],
[[10, 1], [70, 2], [100, 3], [150, 4], [200, 10]],
[[30, 1], [70, 2], [150, 3], [200, 8]]
]
},
hard_reqs: ['Scholarship', 'Empathy', 'First Aid'],
restricted: ['Sorcery', 'Thievery']
},
'Thief' => {
specific_reqs: {
'Parry Ability' => [[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]],
'Stealth' => [[10, 2], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]],
'Thievery' => [[10, 2], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]],
'Inner Magic' => [[10, 1], [30, 2], [100, 3], [150, 4], [200, 10]]
},
general_reqs: {
'Armor' => [
[[70, 2], [150, 3], [200, 8]]
],
'Weapon' => [
[[30, 3], [100, 4], [150, 5], [200, 13]],
[[10, 1], [30, 2], [100, 3], [150, 4], [200, 10]]
],
'Lore' => [
[[10, 1], [30, 2], [100, 3], [150, 4], [200, 10]],
[[10, 1], [70, 2], [150, 3], [200, 8]],
[[30, 1], [70, 2], [100, 2], [150, 3], [200, 8]]
],
'Magic' => [
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 10]],
[[10, 0], [30, 0], [70, 2], [100, 2], [150, 4], [200, 8]]
],
'Survival' => [
[[10, 4], [30, 4], [70, 5], [100, 5], [150, 6], [200, 15]],
[[10, 4], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
[[10, 3], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
[[10, 3], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
[[10, 3], [30, 4], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 3], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]]
]
},
restricted: ['Offhand Weapon']
},
'Ranger' => {
specific_reqs: {
'Parry Ability' => [[10, 2], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]],
'Defending' => [[10, 1], [30, 2], [70, 2], [100, 3], [150, 4], [200, 10]],
'Instinct' => [[10, 2], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]]
},
general_reqs: {
'Lore' => [
[[10, 1], [30, 1], [70, 2], [100, 2], [150, 3], [200, 8]],
[[10, 0], [30, 1], [70, 1], [100, 2], [150, 2], [200, 5]]
],
'Magic' => [
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]],
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]],
[[10, 1], [30, 1], [70, 2], [100, 2], [150, 3], [200, 8]]
],
'Survival' => [
[[10, 4], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
[[10, 4], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
[[10, 3], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
[[10, 3], [30, 4], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 3], [30, 4], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]],
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]]
],
'Armor' => [
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 0], [30, 1], [70, 2], [100, 3], [150, 3], [200, 8]]
],
'Weapon' => [
[[10, 3], [30, 3], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 1], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]]
]
},
restricted: ['Sorcery', 'Offhand Weapon']
},
'Warrior Mage' => {
specific_reqs: {
'Parry Ability' => [[10, 2], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]],
'Defending' => [[10, 1], [30, 1], [70, 2], [100, 2], [150, 3], [200, 8]],
'Summoning' => [[10, 3], [30, 4], [70, 5], [100, 5], [150, 5], [200, 13]],
'Targeted Magic' => [[10, 4], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
'Scholarship' => [[10, 1], [30, 1], [70, 2], [100, 2], [150, 3], [200, 8]]
},
general_reqs: {
'Lore' => [
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]],
[[10, 2], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]],
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]]
],
'Magic' => [
[[10, 4], [30, 4], [70, 5], [100, 5], [150, 6], [200, 15]],
[[10, 4], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
[[10, 3], [30, 3], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 0], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 0], [30, 0], [70, 3], [100, 4], [150, 5], [200, 13]]
],
'Survival' => [
[[10, 1], [30, 1], [70, 2], [100, 2], [150, 3], [200, 8]],
[[10, 1], [30, 1], [70, 2], [100, 2], [150, 3], [200, 8]],
[[10, 1], [30, 1], [70, 1], [100, 2], [150, 2], [200, 5]],
[[10, 1], [30, 1], [70, 1], [100, 2], [150, 2], [200, 5]]
],
'Armor' => [
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]]
],
'Weapon' => [
[[10, 3], [30, 4], [70, 4], [100, 5], [150, 5], [200, 13]],
[[10, 0], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]],
[[10, 0], [30, 0], [70, 2], [100, 3], [150, 4], [200, 10]]
]
},
hard_reqs: ['Summoning'],
restricted: ['Sorcery', 'Thievery', 'Offhand Weapon']
},
'Paladin' => {
specific_reqs: {
'Conviction' => [[10, 3], [70, 4], [150, 5], [200, 13]],
'Defending' => [[30, 3], [100, 4], [150, 5], [200, 13]],
'Shield Usage' => [[30, 2], [100, 3], [150, 4], [200, 10]],
'Parry Ability' => [[30, 3], [100, 4], [150, 5], [200, 13]],
'Evasion' => [[10, 2], [70, 3], [150, 4], [200, 10]],
'Scholarship' => [[10, 1], [70, 2], [150, 3], [200, 8]],
'Tactics' => [[10, 1], [30, 2], [100, 3], [150, 4], [200, 10]]
},
general_reqs: {
'Armor' => [
[[10, 4], [100, 5], [150, 6], [200, 15]],
[[10, 2], [70, 3], [100, 4], [150, 5], [200, 13]]
],
'Magic' => [
[[10, 1], [70, 2], [150, 3], [200, 8]],
[[30, 1], [100, 2], [150, 3], [200, 8]],
[[70, 1], [150, 2], [200, 5]]
],
'Lore' => [
[[10, 2], [70, 3], [150, 4], [200, 10]],
[[10, 1], [30, 2], [100, 3], [150, 4], [200, 10]],
[[30, 1], [100, 2], [150, 3], [200, 8]]
],
'Survival' => [
[[10, 1], [70, 2], [150, 3], [200, 8]],
[[30, 1], [100, 2], [150, 3], [200, 8]],
[[70, 1], [150, 2], [200, 5]],
[[70, 1], [150, 2], [200, 5]]
],
'Weapon' => [
[[10, 3], [70, 4], [150, 5], [200, 13]],
[[10, 0], [30, 2], [70, 3], [150, 4], [200, 10]]
]
},
hard_reqs: ['Conviction', 'Evasion', 'Parry Ability', 'Defending'],
restricted: ['Sorcery', 'Thievery', 'Offhand Weapon']
},
'Cleric' => {
specific_reqs: {
'Parry Ability' => [[10, 2], [30, 3], [70, 3], [100, 3], [150, 4], [200, 10]],
'Shield Usage' => [[10, 1], [30, 2], [70, 2], [100, 3], [150, 4], [200, 10]],
'Theurgy' => [[10, 3], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
'Attunement' => [[10, 2], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]]
},
general_reqs: {
'Lore' => [
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]],
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 10]],
[[10, 0], [30, 0], [70, 2], [100, 3], [150, 3], [200, 8]]
],
'Magic' => [
[[10, 4], [30, 4], [70, 5], [100, 5], [150, 6], [200, 15]],
[[10, 4], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
[[10, 3], [30, 3], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 0], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 0], [30, 0], [70, 3], [100, 4], [150, 5], [200, 13]]
],
'Survival' => [
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]],
[[10, 1], [30, 1], [70, 2], [100, 2], [150, 3], [200, 8]],
[[10, 1], [30, 1], [70, 1], [100, 2], [150, 2], [200, 5]],
[[10, 1], [30, 1], [70, 1], [100, 2], [150, 2], [200, 5]]
],
'Armor' => [
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]]
],
'Weapon' => [
[[10, 3], [30, 3], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 0], [30, 0], [70, 2], [100, 2], [150, 3], [200, 8]]
]
},
hard_reqs: ['Theurgy', 'Parry', 'Shield Usage'],
restricted: ['Sorcery', 'Thievery', 'Offhand Weapon']
},
'Barbarian' => {
specific_reqs: {
'Parry Ability' => [[10, 4], [30, 4], [70, 4], [100, 4], [150, 5], [200, 13]],
'Expertise' => [[10, 4], [30, 5], [70, 5], [100, 5], [150, 6], [200, 15]],
'Tactics' => [[10, 1], [30, 1], [70, 2], [100, 2], [150, 3], [200, 8]],
'Inner Fire' => [[10, 1], [30, 2], [70, 3], [100, 3], [150, 3], [200, 8]],
'Evasion' => [[10, 3], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]]
},
general_reqs: {
'Lore' => [
[[10, 1], [30, 1], [70, 2], [100, 2], [150, 3], [200, 8]]
],
'Magic' => [
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]],
[[10, 0], [30, 0], [70, 2], [100, 2], [150, 3], [200, 8]]
],
'Survival' => [
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 3], [200, 8]],
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 3], [200, 8]],
[[10, 2], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]],
[[10, 1], [30, 1], [70, 2], [100, 2], [150, 2], [200, 5]]
],
'Armor' => [
[[10, 3], [30, 4], [70, 4], [100, 5], [150, 6], [200, 13]],
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 4], [200, 10]]
],
'Weapon' => [
[[10, 4], [30, 5], [70, 6], [100, 6], [150, 6], [200, 15]],
[[10, 4], [30, 5], [70, 6], [100, 6], [150, 6], [200, 15]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 4], [200, 10]]
],
'Mastery' => [
[[10, 4], [30, 5], [70, 6], [100, 6], [150, 6], [200, 15]]
]
},
hard_reqs: ['Evasion', 'Parry Ability', 'Expertise', 'Inner Fire', 'Tactics'],
restricted: ['Sorcery', 'Thievery', 'Targeted Magic', 'Offhand Weapon']
},
'Necromancer' => {
specific_reqs: {
'Thanatology' => [[10, 3], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
'Small Edged' => [[10, 1], [30, 2], [70, 2], [100, 2], [150, 2], [200, 5]],
'Targeted Magic' => [[10, 2], [30, 2], [70, 3], [100, 4], [150, 5], [200, 13]]
},
general_reqs: {
'Lore' => [
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 3], [200, 8]],
[[10, 2], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]]
],
'Magic' => [
[[10, 3], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
[[10, 3], [30, 3], [70, 4], [100, 5], [150, 6], [200, 15]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 0], [30, 0], [70, 3], [100, 4], [150, 5], [200, 13]]
],
'Survival' => [
[[10, 4], [30, 4], [70, 5], [100, 5], [150, 6], [200, 15]],
[[10, 4], [30, 4], [70, 5], [100, 5], [150, 6], [200, 15]],
[[10, 3], [30, 4], [70, 4], [100, 5], [150, 5], [200, 13]],
[[10, 3], [30, 4], [70, 4], [100, 5], [150, 5], [200, 13]],
[[10, 3], [30, 4], [70, 4], [100, 5], [150, 5], [200, 13]],
[[10, 3], [30, 3], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]]
],
'Armor' => [
[[10, 1], [30, 2], [70, 2], [100, 2], [150, 3], [200, 8]]
],
'Weapon' => []
},
hard_reqs: ['Thanatology']
},
'Moon Mage' => {
specific_reqs: {
'Astrology' => [[10, 3], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
'Scholarship' => [[10, 3], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]]
},
general_reqs: {
'Lore' => [
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]],
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]]
],
'Magic' => [
[[10, 4], [30, 4], [70, 5], [100, 6], [150, 7], [200, 18]],
[[10, 4], [30, 4], [70, 4], [100, 5], [150, 6], [200, 15]],
[[10, 3], [30, 4], [70, 4], [100, 5], [150, 5], [200, 13]],
[[10, 2], [30, 3], [70, 4], [100, 5], [150, 5], [200, 13]],
[[10, 0], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 0], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]]
],
'Survival' => [
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]],
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]],
[[10, 2], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]],
[[10, 0], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]]
],
'Armor' => [],
'Weapon' => []
},
hard_reqs: %w[Scholarship Astrology],
restricted: ['Thievery']
},
'Bard' => {
specific_reqs: {
'Performance' => [[10, 4], [30, 4], [70, 5], [100, 5], [150, 6], [200, 15]],
'Parry Ability' => [[10, 2], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
'Tactics' => [[10, 2], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]]
},
general_reqs: {
'Lore' => [
[[10, 3], [30, 3], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 3], [30, 3], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]]
],
'Magic' => [
[[10, 3], [30, 3], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 2], [70, 3], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 2], [70, 3], [100, 3], [150, 4], [200, 10]],
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 4], [200, 10]],
[[10, 0], [30, 0], [70, 2], [100, 3], [150, 3], [200, 8]]
],
'Survival' => [
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 4], [200, 10]],
[[10, 1], [30, 1], [70, 2], [100, 2], [150, 3], [200, 8]],
[[10, 1], [30, 1], [70, 1], [100, 2], [150, 2], [200, 5]],
[[10, 1], [30, 1], [70, 1], [100, 2], [150, 2], [200, 5]]
],
'Armor' => [
[[10, 2], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]]
],
'Weapon' => [
[[10, 3], [30, 3], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]]
]
},
hard_reqs: ['Performance', 'Parry Ability'],
restricted: ['Offhand Weapon']
},
'Trader' => {
specific_reqs: {
'Trading' => [[10, 4], [30, 5], [70, 6], [100, 6], [150, 7], [200, 15]],
'Appraisal' => [[10, 3], [30, 3], [70, 4], [100, 5], [150, 6], [200, 15]]
},
general_reqs: {
'Lore' => [
[[10, 3], [30, 3], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]],
[[10, 2], [30, 2], [70, 3], [100, 4], [150, 4], [200, 10]]
],
'Magic' => [],
'Survival' => [
[[10, 3], [30, 3], [70, 4], [100, 4], [150, 5], [200, 13]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]],
[[10, 2], [30, 3], [70, 3], [100, 4], [150, 4], [200, 10]],
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 4], [200, 10]],
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]],
[[10, 1], [30, 1], [70, 1], [100, 2], [150, 2], [200, 5]]
],
'Armor' => [
[[10, 2], [30, 3], [70, 3], [100, 3], [150, 4], [200, 10]],
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]]
],
'Weapon' => [
[[10, 1], [30, 2], [70, 2], [100, 3], [150, 3], [200, 8]]
]
},
hard_reqs: ['Appraisal', 'Trading'],
restricted: ['Offhand Weapon']
}
}
def main
arg_definitions = [
[
{ name: 'debug', regex: /debug/i, optional: true },
{ name: 'mode', options: %w[brief short next], optional: true, description: 'Only display requirements you don\'t meet' },
{ name: 'target', regex: /^\d+$/, optional: true, description: 'See requirements for a specific circle' }
]
]
args = parse_args(arg_definitions)
$debug_mode_cc = args.debug
# Check yaml settings to see if prettyprint is true
pretty_print = get_settings.circlecheck_prettyprint
level_target = [args.target.to_i, DRStats.circle + 1].max
requirements = all_requirements(level_target)
display_requirements(requirements, level_target, args.mode, pretty_print)
end
def display_requirements(requirements, level_target, brief, pretty_print)
can_circle = false
first_circle_seen = nil
column_headings_displayed = false
spacer_displayed = false
# Caclulate the TDPs gained at next level
# No TDPs earned for circling after 150
tdps = if DRStats.circle < 9
DRStats.circle + 51
elsif DRStats.circle < 150
DRStats.circle + 101
else
0
end
# If the user has yaml set to circlecheck_prettyprint
# then handle top of display. Otherwise display traditional.
if pretty_print
# Hash of column => spacing, which centralizes the formatting
# to handle display of circlecheck columns and allows us to easily
# edit column widths in an single spot.
column_spacing = {
1 => 16,
2 => 12,
3 => 6,
4 => 3,
5 => 8,
6 => 7,
7 => 2,
8 => 3
}
# This outputs the beginning section of circle check, which
# gives your current circle and your TDPs at next level.
DRC.message("___________________________________________________________")
_respond " Current Circle: <pushBold/>#{DRStats.circle}<popBold/>" +
" | Next Level TDPs: #{DRStats.tdps} <pushBold/>+ #{tdps}<popBold/> = #{DRStats.tdps + tdps}"
respond("")
# Set column headings for later display for prettyprint
column_headings =
"SKILL".center(column_spacing[1]) +
"CATEGORY".center(column_spacing[2]) +
"CIR".rjust(column_spacing[3]) +
" ".center(column_spacing[4]) +
"RANKS for CIR".rjust(20)
else
# Retain original formatting at top of display
respond("Your next level will award: #{tdps} TDPs")
end
new_target = 0
requirements.each do |skill, met_circle, missing_ranks, ranks|
first_circle_seen ||= met_circle
# Check if we're ready to circle. If so, display message.
# Also, if so, recognize that that our ;circlecheck readout
# should be targetting an additional circle (e.g. if we're
# currenly 30th circle but can circle to 31st, ;circlecheck
# should show us target skill for circle 32)
if first_circle_seen > DRStats.circle && !can_circle
echo("met_circle: #{met_circle} circle: #{DRStats.circle}") if $debug_mode_cc
can_circle = true
new_target = first_circle_seen + 1
DRC.message("***You're ready to circle!***")
DRC.message("")
end
# If we're in the first iteration of this loop, and user has
# prettyprint specified in yaml, display column headings,
# then recognize we've displayed column headings so we don't
# re-display them every loop.
if !column_headings_displayed && pretty_print
respond(column_headings)
column_headings_displayed = true
end
# This gives some space between the top set of skill(s) for target circle
# and the rest of the circlecheck readout.
if met_circle >= [level_target, new_target].max && !spacer_displayed
break if brief
spacer_displayed = true
respond('')
end
if pretty_print
# Break each skill string into skill name and skill category
# E.g. "Stealth (1st Survival)" becomes "Stealth" and "1st Survival"
# If this is a hard req, display hard req instead of category
if skill =~ /\(/i
sub_skill = skill.scan(/\(([A-z\.\s\-']+)\)/i).first.first
category = skill.split(/ \([A-z\.\s\-']+\)/i).first
else
sub_skill = skill
category = 'Hard Req'
end
# Calculate the percent remaining to next skill rank
# so we can display fractional amounts. Format so
# we can easily append decimal to current rank.
subtraction = (100 - DRSkill.getpercent(sub_skill).to_f) / 100.00
percent_remaining = format('%.2f', subtraction).sub(/^./, '')
# Formulate the needed ranks to target circle including
# fractional amount. Also prep total target ranks for proper display.
if subtraction == 1
needed_ranks = missing_ranks
else
needed_ranks = missing_ranks - 1
end
needed_ranks = needed_ranks.to_s + percent_remaining.to_s
missing_ranks_plus_ranks = "(" + (missing_ranks + ranks).to_s + ")"
# Handle formatting circlecheck output in column formatting.
case
when met_circle == 200
# If ranks are beyond what's needed for circle 200, add a +
# in front of the ranks to signify the amount beyond 200
# circle reqs.
needed_ranks_plus = "+" + needed_ranks.to_s
respond(
"#{sub_skill.center(column_spacing[1])}" + # Column 1 - Skill
"#{category.center(column_spacing[2])}" + # Column 2 - Category
"#{met_circle.to_s.rjust(column_spacing[3])} " + # Column 3 - Met circle
"-".center(column_spacing[4]) + # Column 4 - and need
"#{needed_ranks_plus.to_s.rjust(column_spacing[5])}" + # Column 5 - Needed Ranks
"#{missing_ranks_plus_ranks.to_s.rjust(column_spacing[6])} " + # Column 6 - Total Target Ranks
"|".ljust(column_spacing[7]) + # Column 7 - for
"#{met_circle.to_s.rjust(column_spacing[8])}" # Column 8 - Target circle
)
else
respond(
"#{sub_skill.center(column_spacing[1])}" + # Column 1 - Skill
"#{category.center(column_spacing[2])}" + # Column 2 - Category
"#{met_circle.to_s.rjust(column_spacing[3])} " + # Column 3 - Met circle
"-".center(column_spacing[4]) + # Column 4 - and need
"#{needed_ranks.to_s.rjust(column_spacing[5])}" + # Column 5 - Needed Ranks
"#{missing_ranks_plus_ranks.to_s.rjust(column_spacing[6])} " + # Column 6 - Total Target Ranks
"|".ljust(column_spacing[7]) + # Column 7 - for
"#{[met_circle + 1, level_target].max.to_s.rjust(column_spacing[8])}" # Column 8 - Target circle
)
end # Prettyprint display section
else # If yaml prettyprint not set, display original format
if met_circle == 200
respond("You have enough #{skill} for circle #{met_circle} and have exceeded it by #{missing_ranks} (#{ranks}) ranks")
else
respond("You have enough #{skill} for circle #{met_circle} and need #{missing_ranks} (#{missing_ranks + ranks}) ranks for circle #{[met_circle + 1, level_target].max}")
end
end
end
# Line delimiter for visual separation from game spam
DRC.message("___________________________________________________________")
end
def all_requirements(level_target)
guild = DRStats.guild
echo(guild) if $debug_mode_cc
reqs = $GuildReqs[guild]
echo("reqs: #{reqs}") if $debug_mode_cc
requirements = calc_requirements(reqs, 'Survival', level_target)
requirements += calc_requirements(reqs, 'Magic', level_target)
requirements += calc_requirements(reqs, 'Lore', level_target)
requirements += calc_requirements(reqs, 'Armor', level_target)
requirements += calc_requirements(reqs, 'Weapon', level_target)
requirements += calc_requirements(reqs, 'Mastery', level_target)
requirements = requirements.sort_by { |item| [item[1], item[2]] }
echo("reqs: #{requirements}") if $debug_mode_cc
requirements
end
def get_skills_by_type(type)
$Skills
.select { |skill| skill[:type] == type }
.map { |skill| [skill[:name], DRSkill.getrank(skill[:name]), DRSkill.getpercent(skill[:name])] }
.sort_by { |skill| [skill[1], skill[2]] }
.reverse
end
# ['skill', met_circle, missing_ranks, ranks]
def calc_requirement(skill_info, costs, level_target)
name, ranks = skill_info
echo("calc_requirement #{ranks}:#{costs}") if $debug_mode_cc
required_rank = 0
met_circle = 0
(1..200).each do |circle|
cost = costs.find { |cap, _| circle <= cap }.last
if required_rank + cost <= ranks || circle < level_target
met_circle = circle if required_rank + cost <= ranks
required_rank += cost
next
else
echo("circle #{circle}, cost:#{cost} ranks:#{ranks} required_rank:#{required_rank}") if $debug_mode_cc
return [name, met_circle, cost - (ranks - required_rank), ranks]
end
end
[name, 200, ranks - required_rank, ranks]
end
def calc_requirements(reqs, type, level_target)
requirements = []
skill_type_info = get_skills_by_type(type)
type_names = skill_type_info.map { |skill, _rank| skill }
echo(skill_type_info) if $debug_mode_cc
reqs[:specific_reqs].each do |skill_name, costs|
unless type_names.include?(skill_name)
echo("skipping #{skill_name}") if $debug_mode_cc
next
end
echo("calcing #{skill_name}") if $debug_mode_cc
skill_info = skill_type_info.find { |skill, _rank| skill == skill_name }
requirements << calc_requirement(skill_info, costs, level_target)
skill_type_info.reject! { |name, _| name == skill_name } if reqs[:hard_reqs].include?(skill_name)
end
echo("deleting generics: #{skill_type_info.select { |x| $Skills.find { |skill| x[0] == skill[:name] }[:generic] }}") if $debug_mode_cc
skill_type_info.reject! { |x| $Skills.find { |skill| x[0] == skill[:name] }[:generic] }
echo("deleting restricted: #{skill_type_info.select { |name, _| reqs[:restricted].include?(name) }}") if $debug_mode_cc
skill_type_info.reject! { |name, _| reqs[:restricted].include?(name) }
echo("remaining skills to match: #{skill_type_info}") if $debug_mode_cc
reqs[:general_reqs][type].each_with_index do |costs, i|
echo("costs #{costs}") if $debug_mode_cc
best_skill = skill_type_info.shift
best_skill[0] = "#{$Ordinals[i + 1]} #{type} (#{best_skill[0]})"
echo("formatted skill info #{best_skill}") if $debug_mode_cc
requirements << calc_requirement(best_skill, costs, level_target)
end
requirements
end
$Ordinals = { 1 => '1st', 2 => '2nd', 3 => '3rd', 4 => '4th', 5 => '5th', 6 => '6th', 7 => '7th', 8 => '8th', 9 => '9th' }
main