forked from atperry7/pup_gearswap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PUP.lua
1559 lines (1321 loc) · 54.6 KB
/
PUP.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
----------------------------------------------------------------------------------------
-- __ __ _ __ _____ _
-- | \/ | | | / _| | __ \ | |
-- | \ / | __ _ ___| |_ ___ _ __ ___ | |_ | |__) | _ _ __ _ __ ___| |_ ___
-- | |\/| |/ _` / __| __/ _ \ '__| / _ \| _| | ___/ | | | '_ \| '_ \ / _ \ __/ __|
-- | | | | (_| \__ \ || __/ | | (_) | | | | | |_| | |_) | |_) | __/ |_\__ \
-- |_| |_|\__,_|___/\__\___|_| \___/|_| |_| \__,_| .__/| .__/ \___|\__|___/
-- | | | |
-- |_| |_|
-----------------------------------------------------------------------------------------
--[[
Originally Created By: Faloun
Programmers: Arrchie, Kuroganashi, Byrne
Testers:Arrchie, Kuroganashi, Haxetc, Patb, Whirlin, Petsmart
Contributors: Xilkk, Byrne, Blackhalo714
ASCII Art Generator: http://www.network-science.de/ascii/
]]
-- Initialization function for this job file.
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include("Mote-Include.lua")
end
function user_setup()
-- Alt-F10 - Toggles Kiting Mode.
--[[
F9 - Cycle Offense Mode (the offensive half of all 'hybrid' melee modes).
These are for when you are fighting with or without Pet
When you are IDLE and Pet is ENGAGED that is handled by the Idle Sets
]]
state.OffenseMode:options("MasterPet", "Master")
--[[
Ctrl-F9 - Cycle Hybrid Mode (the defensive half of all 'hybrid' melee modes).
Used when you are Engaged with Pet
Used when you are Idle and Pet is Engaged
]]
state.HybridMode:options("Normal", "Acc", "TP", "DT", "Regen", "Ranged")
--[[
Alt-F12 - Turns off any emergency mode
Ctrl-F10 - Cycle type of Physical Defense Mode in use.
F10 - Activate emergency Physical Defense Mode. Replaces Magical Defense Mode, if that was active.
]]
state.PhysicalDefenseMode:options("PetDT", "MasterDT")
--[[
Alt-F12 - Turns off any emergency mode
F11 - Activate emergency Magical Defense Mode. Replaces Physical Defense Mode, if that was active.
]]
state.MagicalDefenseMode:options("PetMDT")
--[[ IDLE Mode Notes:
F12 - Update currently equipped gear, and report current status.
Ctrl-F12 - Cycle Idle Mode.
Will automatically set IdleMode to Idle when Pet becomes Engaged and you are Idle
]]
state.IdleMode:options("Idle", "MasterDT")
--Various Cycles for the different types of PetModes
state.PetStyleCycleTank = M {"NORMAL", "DD", "MAGIC", "SPAM"}
state.PetStyleCycleMage = M {"NORMAL", "HEAL", "SUPPORT", "MB", "DD"}
state.PetStyleCycleDD = M {"NORMAL", "BONE", "SPAM", "OD", "ODACC"}
--The actual Pet Mode and Pet Style cycles
--Default Mode is Tank
state.PetModeCycle = M {"TANK", "DD", "MAGE"}
--Default Pet Cycle is Tank
state.PetStyleCycle = state.PetStyleCycleTank
--Toggles
--[[
Alt + E will turn on or off Auto Maneuver
]]
state.AutoMan = M(false, "Auto Maneuver")
--[[
Alt + D will turn on or off Lock Pet DT
(Note this will block all gearswapping when active)
]]
state.LockPetDT = M(false, "Lock Pet DT")
--[[
Alt + (tilda) will turn on or off the Lock Weapon
]]
state.LockWeapon = M(false, "Lock Weapon")
--[[
//gs c toggle setftp
]]
state.SetFTP = M(false, "Set FTP")
--[[
This will hide the entire HUB
//gs c hide hub
]]
state.textHideHUB = M(false, "Hide HUB")
--[[
This will hide the Mode on the HUB
//gs c hide mode
]]
state.textHideMode = M(false, "Hide Mode")
--[[
This will hide the State on the HUB
//gs c hide state
]]
state.textHideState = M(false, "Hide State")
--[[
This will hide the Options on the HUB
//gs c hide options
]]
state.textHideOptions = M(false, "Hide Options")
--[[
This will toggle the default Keybinds set up for any changeable command on the window
//gs c hide keybinds
]]
state.Keybinds = M(false, "Hide Keybinds")
--[[
Enter the slots you would lock based on a custom set up.
Can be used in situation like Salvage where you don't want
certain pieces to change.
//gs c toggle customgearlock
]]
state.CustomGearLock = M(false, "Custom Gear Lock")
--Example customGearLock = T{"head", "waist"}
customGearLock = T{}
send_command("bind !f7 gs c cycle PetModeCycle")
send_command("bind ^f7 gs c cycleback PetModeCycle")
send_command("bind !f8 gs c cycle PetStyleCycle")
send_command("bind ^f8 gs c cycleback PetStyleCycle")
send_command("bind !e gs c toggle AutoMan")
send_command("bind !d gs c toggle LockPetDT")
send_command("bind !f6 gs c predict")
send_command("bind ^` gs c toggle LockWeapon")
select_default_macro_book()
end
function file_unload()
send_command("unbind !f7")
send_command("unbind ^f7")
send_command("unbind !f8")
send_command("unbind ^f8")
send_command("unbind !e")
send_command("unbind !d")
send_command("unbind !f6")
send_command("unbind ^`")
end
function job_setup()
-- Adjust the X (horizontal) and Y (vertical) position here to adjust the window
setupTextWindow(0, 0)
end
function init_gear_sets()
--Table of Contents
---Gear Variables
---Master Only Sets
---Hybrid Only Sets
---Pet Only Sets
---Misc Sets
-------------------------------------------------------------------------
-- _____ __ __ _ _ _
-- / ____| \ \ / / (_) | | | |
--| | __ ___ __ _ _ __ \ \ / /_ _ _ __ _ __ _| |__ | | ___ ___
--| | |_ |/ _ \/ _` | '__| \ \/ / _` | '__| |/ _` | '_ \| |/ _ \/ __|
--| |__| | __/ (_| | | \ / (_| | | | | (_| | |_) | | __/\__ \
-- \_____|\___|\__,_|_| \/ \__,_|_| |_|\__,_|_.__/|_|\___||___/
-------------------------------------------------------------------------
--[[
This section is best ultilized for defining gear that is used among multiple sets
You can simply use or ignore the below
]]
Animators = {}
Animators.Range = "Animator P II"
Animators.Melee = "Animator P +1"
--Adjust to your reforge level
--Sets up a Key, Value Pair
Artifact_Foire = {}
Artifact_Foire.Head_PRegen = "Foire Taj +1"
Artifact_Foire.Body_WSD_PTank = "Foire Tobe +1"
Artifact_Foire.Hands_Mane_Overload = "Foire Dastanas +1"
Artifact_Foire.Legs_PCure = "Foire Churidars +1"
Artifact_Foire.Feet_Repair_PMagic = "Foire Babouches +1"
Relic_Pitre = {}
Relic_Pitre.Head_PRegen = "Pitre Taj +1" --Enhances Optimization
Relic_Pitre.Body_PTP = "Pitre Tobe +1" --Enhances Overdrive
Relic_Pitre.Hands_WSD = "Pitre Dastanas +1" --Enhances Fine-Tuning
Relic_Pitre.Legs_PMagic = "Pitre Churidars +1" --Enhances Ventriloquy
Relic_Pitre.Feet_PMagic = "Pitre Babouches +1" --Role Reversal
Empy_Karagoz = {}
Empy_Karagoz.Head_PTPBonus = "Karagoz Capello"
Empy_Karagoz.Body_Overload = "Karagoz Farsetto"
Empy_Karagoz.Hands = "Karagoz Guanti"
Empy_Karagoz.Legs_Combat = "Karagoz Pantaloni +1"
Empy_Karagoz.Feet_Tatical = "Karagoz Scarpe +1"
Visucius = {}
Visucius.PetDT = {
name = "Visucius's Mantle",
augments = {
"Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20",
"Accuracy+20 Attack+20",
"Pet: Accuracy+4 Pet: Rng. Acc.+4",
'Pet: "Regen"+10',
"Pet: Damage taken -5%"
}
}
Visucius.PetMagic = {
name = "Visucius's Mantle",
augments = {
"Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20",
"Accuracy+20 Attack+20",
"Pet: Accuracy+4 Pet: Rng. Acc.+4",
'Pet: "Regen"+10',
"Pet: Damage taken -5%"
}
}
--------------------------------------------------------------------------------
-- __ __ _ ____ _ _____ _
-- | \/ | | | / __ \ | | / ____| | |
-- | \ / | __ _ ___| |_ ___ _ __ | | | |_ __ | |_ _ | (___ ___| |_ ___
-- | |\/| |/ _` / __| __/ _ \ '__| | | | | '_ \| | | | | \___ \ / _ \ __/ __|
-- | | | | (_| \__ \ || __/ | | |__| | | | | | |_| | ____) | __/ |_\__ \
-- |_| |_|\__,_|___/\__\___|_| \____/|_| |_|_|\__, | |_____/ \___|\__|___/
-- __/ |
-- |___/
---------------------------------------------------------------------------------
--This section is best utilized for Master Sets
--[[
Will be activated when Pet is not active, otherwise refer to sets.idle.Pet
]]
sets.idle = {
-- Add your set here
}
-------------------------------------Fastcast
sets.precast.FC = {
-- Add your set here
}
-------------------------------------Midcast
sets.midcast = {} --Can be left empty
sets.midcast.FastRecast = {
-- Add your set here
}
-------------------------------------Kiting
sets.Kiting = {feet = "Hermes' Sandals"}
-------------------------------------JA
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck = "Magoraga Beads", body = "Passion Jacket"})
-- Precast sets to enhance JAs
sets.precast.JA = {} -- Can be left empty
sets.precast.JA["Tactical Switch"] = {feet = Empy_Karagoz.Feet_Tatical}
sets.precast.JA["Ventriloquy"] = {legs = Relic_Pitre.Legs_PMagic}
sets.precast.JA["Role Reversal"] = {feet = Relic_Pitre.Feet_PMagic}
sets.precast.JA["Overdrive"] = {body = Relic_Pitre.Body_PTP}
sets.precast.JA["Repair"] = {
-- Add your set here
}
sets.precast.JA["Maintenance"] = set_combine(sets.precast.JA["Repair"], {})
sets.precast.JA.Maneuver = {
-- Add your set here
}
sets.precast.JA["Activate"] = { back = "Visucius's Mantle" }
sets.precast.JA["Deus Ex Automata"] = sets.precast.JA["Activate"]
sets.precast.JA["Provoke"] = {
-- Add your set here
}
--Waltz set (chr and vit)
sets.precast.Waltz = {
-- Add your set here
}
sets.precast.Waltz["Healing Waltz"] = {}
-------------------------------------WS
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
-- Add your set here
}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS["Stringing Pummel"] = set_combine( sets.precast.WS, {
-- Add armor here specific to the weapon skill not included in the sets.precast.WS
}
)
sets.precast.WS["Stringing Pummel"].Mod = set_combine(sets.precast.WS, {
-- Add armor here specific to the weapon skill not included in the sets.precast.WS
}
)
sets.precast.WS["Victory Smite"] = set_combine( sets.precast.WS, {
-- Add armor here specific to the weapon skill not included in the sets.precast.WS
}
)
sets.precast.WS["Shijin Spiral"] = set_combine( sets.precast.WS, {
-- Add armor here specific to the weapon skill not included in the sets.precast.WS
}
)
sets.precast.WS["Howling Fist"] = set_combine( sets.precast.WS, {
-- Add armor here specific to the weapon skill not included in the sets.precast.WS
}
)
-------------------------------------Idle
--[[
Pet is not active
Idle Mode = MasterDT
]]
sets.idle.MasterDT = {
-- Add your set here
}
-------------------------------------Engaged
--[[
Offense Mode = Master
Hybrid Mode = Normal
]]
sets.engaged.Master = {
-- Add your set here
}
-------------------------------------Acc
--[[
Offense Mode = Master
Hybrid Mode = Acc
]]
sets.engaged.Master.Acc = {
-- Add your set here
}
-------------------------------------TP
--[[
Offense Mode = Master
Hybrid Mode = TP
]]
sets.engaged.Master.TP = {
-- Add your set here
}
-------------------------------------DT
--[[
Offense Mode = Master
Hybrid Mode = DT
]]
sets.engaged.Master.DT = {
-- Add your set here
}
----------------------------------------------------------------------------------
-- __ __ _ ___ _ ___ _
-- | \/ |__ _ __| |_ ___ _ _| _ \___| |_ / __| ___| |_ ___
-- | |\/| / _` (_-< _/ -_) '_| _/ -_) _| \__ \/ -_) _(_-<
-- |_| |_\__,_/__/\__\___|_| |_| \___|\__| |___/\___|\__/__/
-----------------------------------------------------------------------------------
--[[
These sets are designed to be a hybrid of player and pet gear for when you are
fighting along side your pet. Basically gear used here should benefit both the player
and the pet.
]]
--[[
Offense Mode = MasterPet
Hybrid Mode = Normal
]]
sets.engaged.MasterPet = {
-- Add your set here
}
-------------------------------------Acc
--[[
Offense Mode = MasterPet
Hybrid Mode = Acc
]]
sets.engaged.MasterPet.Acc = {
-- Add your set here
}
-------------------------------------TP
--[[
Offense Mode = MasterPet
Hybrid Mode = TP
]]
sets.engaged.MasterPet.TP = {
-- Add your set here
}
-------------------------------------DT
--[[
Offense Mode = MasterPet
Hybrid Mode = DT
]]
sets.engaged.MasterPet.DT = {
-- Add your set here
}
-------------------------------------Regen
--[[
Offense Mode = MasterPet
Hybrid Mode = Regen
]]
sets.engaged.MasterPet.Regen = {
-- Add your set here
}
----------------------------------------------------------------
-- _____ _ ____ _ _____ _
-- | __ \ | | / __ \ | | / ____| | |
-- | |__) |__| |_ | | | |_ __ | |_ _ | (___ ___| |_ ___
-- | ___/ _ \ __| | | | | '_ \| | | | | \___ \ / _ \ __/ __|
-- | | | __/ |_ | |__| | | | | | |_| | ____) | __/ |_\__ \
-- |_| \___|\__| \____/|_| |_|_|\__, | |_____/ \___|\__|___/
-- __/ |
-- |___/
----------------------------------------------------------------
-------------------------------------Magic Midcast
sets.midcast.Pet = {
-- Add your set here
}
sets.midcast.Pet.Cure = {
-- Add your set here
}
sets.midcast.Pet["Healing Magic"] = {
--Add your set here
}
sets.midcast.Pet["Elemental Magic"] = {
-- Add your set here
}
sets.midcast.Pet["Enfeebling Magic"] = {
-- Add your set here
}
sets.midcast.Pet["Dark Magic"] = {
-- Add your set here
}
sets.midcast.Pet["Divine Magic"] = {
-- Add your set here
}
sets.midcast.Pet["Enhancing Magic"] = {
-- Add your set here
}
-------------------------------------Idle
--[[
This set will become default Idle Set when the Pet is Active
and sets.idle will be ignored
Player = Idle and not fighting
Pet = Idle and not fighting
Idle Mode = Idle
]]
sets.idle.Pet = {
}
--[[
If pet is active and you are idle and pet is idle
Player = idle and not fighting
Pet = idle and not fighting
Idle Mode = MasterDT
]]
sets.idle.Pet.MasterDT = {
}
-------------------------------------Enmity
sets.pet = {} -- Not Used
--Equipped automatically
sets.pet.Enmity = {
--Add your set here
}
--[[
Activated by Alt+D or
F10 if Physical Defense Mode = PetDT
]]
sets.pet.EmergencyDT = {
--Add your set here
}
-------------------------------------Engaged for Pet Only
--[[
For Technical Users - This is layout of below
sets.idle[idleScope][state.IdleMode][ Pet[Engaged] ][CustomIdleGroups]
For Non-Technical Users:
If you the player is not fighting and your pet is fighting the first set that will activate is sets.idle.Pet.Engaged
You can further adjust this by changing the HyrbidMode using Ctrl+F9 to activate the Acc/TP/DT/Regen/Ranged sets
]]
--[[
Idle Mode = Idle
Hybrid Mode = Normal
]]
sets.idle.Pet.Engaged = {
--Add your set here
}
--[[
Idle Mode = Idle
Hybrid Mode = Acc
]]
sets.idle.Pet.Engaged.Acc = {
--Add your set here
}
--[[
Idle Mode = Idle
Hybrid Mode = TP
]]
sets.idle.Pet.Engaged.TP = {
--Add your set here
}
--[[
Idle Mode = Idle
Hybrid Mode = DT
]]
sets.idle.Pet.Engaged.DT = {
--Add your set here
}
--[[
Idle Mode = Idle
Hybrid Mode = Regen
]]
sets.idle.Pet.Engaged.Regen = {
--Add your set here
}
--[[
Idle Mode = Idle
Hybrid Mode = Ranged
]]
sets.idle.Pet.Engaged.Ranged = set_combine(sets.idle.Pet.Engaged, {
legs = Empy_Karagoz.Legs_Combat
})
-------------------------------------WS
--[[
WSNoFTP is the default weaponskill set used
]]
sets.midcast.Pet.WSNoFTP = {
-- Add your set here
}
--[[
If we have a pet weaponskill that can benefit from WSFTP
then this set will be equipped
]]
sets.midcast.Pet.WSFTP = {
-- Add your set here
}
--[[
Base Weapon Skill Set
Used by default if no modifier is found
]]
sets.midcast.Pet.WS = {}
--Chimera Ripper, String Clipper
sets.midcast.Pet.WS["STR"] = set_combine(sets.midcast.Pet.WSNoFTP, {
-- Add your gear here that would be different from sets.midcast.Pet.WSNoFTP
})
-- Bone crusher, String Shredder
sets.midcast.Pet.WS["VIT"] =
set_combine(sets.midcast.Pet.WSNoFTP, {
-- Add your gear here that would be different from sets.midcast.Pet.WSNoFTP
head = Empy_Karagoz.Head_PTPBonus, waist = "Incarnation Sash"
})
-- Cannibal Blade
sets.midcast.Pet.WS["MND"] = set_combine(sets.midcast.Pet.WSNoFTP, {
-- Add your gear here that would be different from sets.midcast.Pet.WSNoFTP
})
-- Armor Piercer, Armor Shatterer
sets.midcast.Pet.WS["DEX"] = set_combine(sets.midcast.Pet.WSNoFTP, {
-- Add your gear here that would be different from sets.midcast.Pet.WSNoFTP
})
-- Arcuballista, Daze
sets.midcast.Pet.WS["DEXFTP"] =
set_combine(sets.midcast.Pet.WSFTP, {
-- Add your gear here that would be different from sets.midcast.Pet.WSFTP
head = Empy_Karagoz.Head_PTPBonus, back = "Dispersal Mantle"
})
---------------------------------------------
-- __ __ _ _____ _
-- | \/ (_) / ____| | |
-- | \ / |_ ___ ___ | (___ ___| |_ ___
-- | |\/| | / __|/ __| \___ \ / _ \ __/ __|
-- | | | | \__ \ (__ ____) | __/ |_\__ \
-- |_| |_|_|___/\___| |_____/ \___|\__|___/
---------------------------------------------
-- Town Set
sets.idle.Town = {
-- Add your set here
}
-- Resting sets
sets.resting = {
-- Add your set here
}
sets.defense.MasterDT = sets.idle.MasterDT
sets.defense.PetDT = sets.pet.EmergencyDT
sets.defense.PetMDT = set_combine(sets.pet.EmergencyDT, {
--Gear added here will overwrite the slots within sets.pet.EmergencyDT
--Any slot not added will use the default slot from sets.pet.EmergencyDT
})
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == "WAR" then
set_macro_page(3, 1)
elseif player.sub_job == "NIN" then
set_macro_page(3, 1)
elseif player.sub_job == "DNC" then
set_macro_page(3, 1)
else
set_macro_page(3, 1)
end
end
------------------------------------------------------------------------------------------------------------------------
--------------------------------- DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU ARE DOING ---------------------------------
------------------------------------------------------------------------------------------------------------------------
-------------------------------
--------Global Variables-------
-------------------------------
Current_Maneuver = 0
OverCount = 0
NextWS = ""
Master_State = "Idle"
Pet_State = "Idle"
Hybrid_State = "Idle"
Flashbulb_Timer = 45
Strobe_Timer = 30
Strobe_Recast = 0
Flashbulb_Recast = 0
Flashbulb_Time = 0
Strobe_Time = 0
d_mode = false
time_start = os.time()
--Constants in case we decide to change names down the road, will be much easier
const_dd = "DD"
const_tank = "TANK"
const_mage = "MAGE"
const_PetModeCycle = "PetModeCycle"
const_PetStyleCycle = "PetStyleCycle"
const_stateIdle = "Idle"
const_stateHybrid = "Pet+Master"
const_stateEngaged = "Engaged"
const_stateOverdrive = "Overdrive"
const_petOnly = "Pet Only"
const_masterOnly = "Master Only"
--- SKILLCHAIN TABLE
SC = {}
SC["Valoredge Frame"] = {}
SC["Sharpshot Frame"] = {}
SC["Harlequin Frame"] = {}
SC["Stormwaker Frame"] = {}
SC["Valoredge Frame"]["Stringing Pummel"] = "String Shredder"
SC["Valoredge Frame"]["Victory Smite"] = "String Shredder"
SC["Valoredge Frame"]["Shijin Spiral"] = "Bone Crusher"
SC["Valoredge Frame"]["Howling Fist"] = "String Shredder"
SC["Sharpshot Frame"]["Stringing Pummel"] = "Armor Shatterer"
SC["Sharpshot Frame"]["Victory Smite"] = "Armor Shatterer"
SC["Sharpshot Frame"]["Shijin Spiral"] = "Armor Piercer"
SC["Sharpshot Frame"]["Howling Fist"] = "Arcuballista"
SC["Sharpshot Frame"]["Dragon Kick"] = "Armor Shatterer"
SC["Sharpshot Frame"]["One Inch Punch"] = "Daze"
SC["Sharpshot Frame"]["Spinning Attack"] = "Armor Shatterer"
SC["Sharpshot Frame"]["Base"] = "Arcuballista"
SC["Harlequin Frame"]["Stringing Pummel"] = "Slapstick"
SC["Harlequin Frame"]["Victory Smite"] = "Magic Mortar"
SC["Harlequin Frame"]["Shijin Spiral"] = "Slapstick"
SC["Harlequin Frame"]["Howling Fist"] = "Knockout"
SC["Stormwaker Frame"]["Stringing Pummel"] = "Slapstick"
SC["Stormwaker Frame"]["Victory Smite"] = "Magic Mortar"
SC["Stormwaker Frame"]["Shijin Spiral"] = "Slapstick"
SC["Stormwaker Frame"]["Howling Fist"] = "Knockout"
------------------------------------
------------Text Window-------------
------------------------------------
--Default To Set Up the Text Window
function setupTextWindow(pos_x, pos_y)
tb_name = "pup_gs_helper"
bg_visible = true
textinbox = " "
windower.text.create(tb_name)
-- table_name, x, y
windower.text.set_location(tb_name, pos_x, pos_y)
-- transparency, rgb
windower.text.set_bg_color(tb_name, 200, 40, 40, 55)
windower.text.set_color(tb_name, 255, 147, 161, 161)
windower.text.set_font(tb_name, "Arial")
windower.text.set_font_size(tb_name, 11)
windower.text.set_bold(tb_name, true)
windower.text.set_italic(tb_name, false)
windower.text.set_text(tb_name, textinbox)
windower.text.set_bg_visibility(tb_name, bg_visible)
windower.text.set_visibility(tb_name, true)
end
--Hanldles refreshing the current text window
function refreshWindow()
textinbox = " "
textColorNewLine = "\\cr \n"
textColorEnd = " \\cr"
textColor = "\\cs(125, 125, 0)"
--Testing with this variable can ignore for now, works as intended
test = state.textHideHUB.value
if state.textHideHUB.value == true then
textinbox = ''
windower.text.set_text(tb_name, textinbox)
return
end
if pet.isvalid then
drawPetInfo()
drawPetSkills()
end
if not state.textHideState.value then
textinbox = textinbox .. drawTitle(" State ")
textinbox = textinbox .. textColor .. "Pet Mode " .. ternary(state.Keybinds.value, "(ALT+F7)", "") .. " : " .. state.PetModeCycle.value .. textColorNewLine
textinbox = textinbox .. textColor .. "Pet Style " .. ternary(state.Keybinds.value, "(ALT+F8)", "") .. " : " .. state.PetStyleCycle.value .. textColorNewLine
-- textinbox = textinbox .. textColor .. "Master : " .. Master_State .. textColorNewLine
-- textinbox = textinbox .. textColor .. "Pet : " .. Pet_State .. textColorNewLine
textinbox = textinbox .. textColor .. "Hybrid : " .. Hybrid_State .. textColorNewLine
end
if not state.textHideMode.value then
textinbox = textinbox .. drawTitle(" Mode ")
textinbox = textinbox .. textColor .. "Idle Mode " .. ternary(state.Keybinds.value, "(CTRL+F12)", "") .. " : " .. tostring(state.IdleMode.current) .. textColorNewLine
textinbox = textinbox .. textColor .. "Offense Mode " .. ternary(state.Keybinds.value, "(F9)", "") .. " : " .. tostring(state.OffenseMode.current) .. textColorNewLine
textinbox = textinbox .. textColor .. "Physical Mode " .. ternary(state.Keybinds.value, "(CTRL-F10)", "") .. " : " .. tostring(state.PhysicalDefenseMode.current) .. textColorNewLine
textinbox = textinbox .. textColor .. "Hybrid Mode " .. ternary(state.Keybinds.value, "(CTRL-F9)", "") .. " : " .. tostring(state.HybridMode.current) .. textColorNewLine
end
if not state.textHideOptions.value then
textinbox = textinbox .. drawTitle(" Options ")
textinbox =
textinbox .. textColor .. "Auto Maneuver " .. ternary(state.Keybinds.value, "(ALT+E)", "") .. " : " .. ternary(state.AutoMan.value, "ON", "OFF") .. textColorNewLine
textinbox = textinbox .. textColor .. "Lock Pet DT Set " .. ternary(state.Keybinds.value, "(ALT+D)", "") .. " : " .. ternary(state.LockPetDT.value, "ON", "OFF") .. textColorNewLine
textinbox = textinbox .. textColor .. "Lock Weapon " .. ternary(state.Keybinds.value, "(ALT+~)", "") .. " : " .. ternary(state.LockWeapon.value, "ON", "OFF") .. textColorNewLine
textinbox = textinbox .. textColor .. "Weaponskill FTP: " .. ternary(state.SetFTP.value, "ON", "OFF") .. textColorNewLine
textinbox = textinbox .. textColor .. "Custom Gear Lock: " .. ternary(state.CustomGearLock.value, "ON", "OFF") .. textColorNewLine
end
--Debug Variables that are used for testing
if d_mode then
textinbox = textinbox .. drawTitle("DEBUG")
textinbox = textinbox .. textColor .. "Last State : " .. tostring(lastStateActivated) .. textColorNewLine
textinbox = textinbox .. textColor .. "Last State : " .. ternary(justFinishedWeaponSkill, "TRUE", "FALSE") .. textColorNewLine
textinbox = textinbox .. textColor .. "Master State : " .. Master_State .. textColorNewLine
textinbox = textinbox .. textColor .. "Pet State : " .. Pet_State .. textColorNewLine
end
windower.text.set_text(tb_name, textinbox)
end
--Handles drawing the Pet Info for the Text Box
function drawPetInfo()
textinbox = textinbox .. drawTitle(" Pet Info ")
textinbox = textinbox .. "- \\cs(0, 0, 125)HP : " .. pet.hp .. "/" .. pet.max_hp .. textColorNewLine
textinbox = textinbox .. "- \\cs(0, 125, 0)MP : " .. pet.mp .. "/" .. pet.max_mp .. textColorNewLine
textinbox = textinbox .. "- \\cs(255, 0, 0)TP : " .. tostring(pet.tp) ..textColorNewLine
textinbox = textinbox .. "- \\cs(255, 0, 0)WS Gear Lock : " .. ternary(startedPetWeaponSkillTimer and petWeaponSkillRecast <= 0 , "On", "Off") .. " ( " .. petWeaponSkillRecast .. " )" ..textColorNewLine
end
--This handles drawing the Pet Skills for the text box
function drawPetSkills()
--- Recast for enmity gears
textinbox = textinbox .. drawTitle(" Pet Skills ")
-- Strobe recast
if Strobe_Recast == 0 and (pet.attachments.strobe or pet.attachments["strobe II"]) then
if buffactive["Fire Maneuver"] then
textinbox = textinbox .. "\\cs(125, 125, 125)-\\cr \\cs(125,0,0)Strobe\\cr \n"
else
textinbox = textinbox .. "\\cs(125, 125, 125)- Strobe\\cr \n"
end
elseif pet.attachments.strobe or pet.attachments["strobe II"] then
textinbox = textinbox .. "\\cs(125, 125, 125)- Strobe (" .. Strobe_Recast .. ")\\cr \n"
end
-- Flashbulb recast
if Flashbulb_Recast == 0 and pet.attachments.flashbulb then
if buffactive["Light Maneuver"] then
textinbox = textinbox .. "\\cs(125, 125, 125)-\\cr \\cs(255,255,255)Flashbulb\\cr \n"
else
textinbox = textinbox .. "\\cs(125, 125, 125)- Flashbulb\\cr \n"
end
elseif pet.attachments.flashbulb ~= nil then
textinbox = textinbox .. "\\cs(125, 125, 125)- Flashbulb (" .. Flashbulb_Recast .. ")\\cr \n"
end
if not pet.attachments.strobe and not pet.attachments["strobe II"] and not pet.attachments.flashbulb then
textinbox = textinbox .. "\\cs(125, 125, 125)-No Skills To Track\\cr \n"
end
end
--Creates the Title for a section in the Text Screen
function drawTitle(title)
return "\\cs(255, 115, 0)" .. pad(tostring(title), 6, "=") .. "\\cr \n"
end
function msg(str)
send_command("@input /echo *-*-*-*-*-*-*-*-* " .. str .. " *-*-*-*-*-*-*-*-*")
end
------------------------------------
----------Utility Functions---------
------------------------------------
--Used to calculate the Hybrid State of you and your pet
function TotalSCalc()
if state.PetModeCycle.current == const_dd then
if buffactive["Overdrive"] then
Hybrid_State = const_stateOverdrive
elseif Master_State == const_stateIdle and Pet_State == const_stateIdle then
Hybrid_State = const_stateIdle
elseif Master_State == const_stateIdle and Pet_State == const_stateEngaged then
Hybrid_State = const_petOnly
elseif Master_State == const_stateEngaged and Pet_State == const_stateEngaged then
Hybrid_State = const_stateHybrid
elseif Master_State == const_stateEngaged and Pet_State == const_stateIdle then
Hybrid_State = const_masterOnly
end
elseif state.PetModeCycle.current == const_tank then
if Pet_State == const_stateIdle then
Hybrid_State = const_stateIdle
elseif state.PetStyleCycle.value ~= "DD" and state.PetStyleCycle.value ~= 'SPAM' then
Hybrid_State = const_tank
handle_set({'IdleMode', 'Idle'})
handle_set({'HybridMode', 'DT'})
end
elseif state.PetModeCycle.current == const_mage then
if Master_State == const_stateIdle then
Hybrid_State = const_stateIdle
else
Hybrid_State = const_masterOnly
handle_set({"OffenseMode", 'Master'})
end
end
end
--Attempts to determine the Puppet Mode and Style
function determinePuppetType()
local head = pet.head
local frame = pet.frame
local ValHead = "Valoredge Head"
local ValFrame = "Valoredge Frame"
local HarHead = "Harlequin Head"
local HarFrame = "Harlequin Frame"
local SharpHead = "Sharpshot Head"
local SharpFrame = "Sharpshot Frame"
local StormHead = "Stormwaker Head"
local StormFrame = "Stormwaker Frame"
local SoulHead = "Soulsoother Head"
local SpiritHead = "Spiritreaver Head"
--This is based mostly off of the frames from String Theory
--https://www.bg-wiki.com/bg/String_Theory#Automaton_Frame_Setups
--Determine Head first, then further determine by body and attachments
if head == HarHead then --Harlequin Predictions
if frame == HarFrame and (pet.attachments.strobe == true or pet.attachments.flashbulb == true) then --Magic Tank
handle_set({const_PetModeCycle, const_tank})
handle_set({const_PetStyleCycle, "MAGIC"})
elseif frame == HarFrame then -- Default
handle_set({const_PetModeCycle, const_dd})
handle_set({const_PetStyleCycle, "NORMAL"})
else
msg("Unable to determine Mode/Style for Puppet Head: (" .. head .. ") Puppet Frame: (" .. frame .. ")")
end
elseif head == ValHead then --Valoredge Predictions
if frame == SharpFrame then
if (pet.attachments.strobe == true or pet.attachments.flashbulb == true) then -- DD Tank
handle_set({const_PetModeCycle, const_tank})
handle_set({const_PetStyleCycle, const_dd})
else -- Default
handle_set({const_PetModeCycle, const_dd})
handle_set({const_PetStyleCycle, "NORMAL"})
end
elseif frame == ValFrame then -- Default Standard Tank
handle_set({const_PetModeCycle, const_tank})
handle_set({const_PetStyleCycle, "NORMAL"})
else
msg("Unable to determine Mode/Style for Puppet Head: (" .. head .. ") Puppet Frame: (" .. frame .. ")")
end
elseif head == SharpHead then -- Sharpshooter Prediction
if frame == SharpFrame then -- SPAM DD
if (pet.attachments.inhibitor == true or pet.attachments["inhibitor II"] == true) then
handle_set({const_PetModeCycle, const_dd})
handle_set({const_PetStyleCycle, "NORMAL"})
else
handle_set({const_PetModeCycle, const_dd})
handle_set({const_PetStyleCycle, "SPAM"})
end
else
msg("Unable to determine Mode/Style for Puppet Head: (" .. head .. ") Puppet Frame: (" .. frame .. ")")
end
elseif head == StormHead then --Stormwaker Prediction
if frame == StormFrame then -- RDM
handle_set({const_PetModeCycle, const_mage})
handle_set({const_PetStyleCycle, "SUPPORT"})
else