-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactions.inc
1738 lines (1592 loc) · 57.7 KB
/
actions.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
|--Generic Actions on THF----------------
Sub Commands
/echo [${Time.Time24}] Command list:
/echo /attk -- Tells your team to target your target and engage in combat.
/echo /stickme -- Tells your team to stick to you. If they are too far, out of sight, or in the wrong zone they will notify you.
/echo /sticktar -- Tells your team to stick to your current target.
/echo /near -- Tells your team to notify you if they are not nearby. Useful to check if someone got stuck or lost while traveling.
/echo /healme -- Tells your healers to target you and begin healing. Any later commands will break this action. Example: /stickme will interrupt /healme.
/echo /cohtar -- Summon the targeted player with "Call of the Hero" (spell or item). It autodetects what item/spell is applicable.
/echo /coh or /bcoh -- Summon all raid members in the zone with "Call of the Hero" (spell or item) if they are not nearby.
/echo /cohteam or /bcohteam -- Summon only your team members (as set in the groups.inc file) in the zone with "Call of the Hero" (spell or item) if they are not nearby.
/echo /lootcorpse or /blootcorpse -- Clears player's own corpses from area.
/echo /showcorpse -- Reveals hidden/bugged corpses.
/echo /consentme -- Tells all players to give you consent for corpse dragging.
/echo /summoncorpses -- Summons all nearby player corpses. Will fail on those that have not consented you.
/echo /reznear or /breznear -- Rezzes all nearby player corpses. Requires Donor Gloves OR Staff of the Earthcrafter.
/echo /yes or /byes -- Accepts all pop-up window confirmations (quests, teleporting, etc).
/echo /gh or /bgh -- Ports to the Guild Hall using any available clicky item.
/echo /ghteam -- Uses the donor guild hall teleporter in rapid succession, commanding your team to use the teleporter NPCs one-by-one. **Must have team in very close proximity**
/echo /hoh or /bhoh -- Ports to Halls of Honor using the Portal Fragment.
/echo /vale or /bvale -- Ports to The Hidden Vale using either the Token of the Vale or the Symbol of the Hidden Vale.
/echo /forest or /bforest -- Ports to The Hidden Forest using the Queen Adrianne charm.
/echo /lootwhore -- **USE CAREFULLY** Checks every nearby NPC corpse for loot. It will loot all stackable items and _destroy all else_. Useful for farming stackable items.
/echo /chaos or /bchaos -- Will equip the mask walk the player onto the portal pad to enter The Temple of Marr to fight The Chaos. Once zoned, it will re-equip the previous mask.
/echo /settings or /bsettings -- Sets /tgb, /hidecorpse, /pet focus, /pet hold, /pet no taunt appropriately for all classes.
/echo /petweap -- *Be sure to have an available bag slot open* Use on a player. Will target the player's pet, move to the pet, summon pet weapons, and trade them to the pet, and then destroy the bag when done.
/echo /rzpetweap -- Targets player's pet, moves to pet, and summons then trades two Summoned: Staff of War to the pet. Must have spell memmed prior.
/echo /macros -- Runs the class macro on all players.
/echo /longbuff or /blongbuff -- Buffs the entire team with long-duration buffs.
/echo /shortbuff or /bshortbuff -- Buffs the entire team with short-duration buffs.
/echo /squelch /tarid -- Tells all players to target your target.
/echo /petattk -- Tells all players to target your target and send pets in to attack.
/echo /pethold -- Tells all players to place their pets on /pet hold.
/echo /aura or /baura -- Casts a player's aura using /say #auracast.
/echo /stats -- Brings up EMU server stats using /say #mystats.
/echo /hold or /bhold -- Halts all actions, stopping attack and calling pets back.
/echo /idle or /bidle -- Places all players in an idle mode where they check their buffs, pets, mana/hp levels, and spells - also does aoe mana regeneration with applicable items.
/echo /solo -- Engages mob in combat for this player only. Combat for a healer is defined as healing whomever the mob is targeting.
/echo /burn or /bburn -- Initiates all high-dps cooldown items/disciplines for burn mode.
/echo /killnear or /bkillnear -- Attempts to kill all nearby mobs, moving to the next when one dies until all are gone.
/echo /noselos or /bnoselos -- Tells the bard to stop twisting Selos. Useful to reduce movement speed of pets so that they do not overshoot their target and get riposted to death.
/echo /selos or /bselos -- Tells the bard to resume twisting Selos.
/echo /bufftargetl or /bbufftargetl -- Cast long-duration buffs ('l' for long) on the target.
/echo /bufftargets or /bbufftargets -- Cast short-duration buffs ('s' for short) on the target.
/echo /formgroups -- Tells group leaders to send out group invites, as designated in the groups.inc file. **Requires MQ2AutoGroup established for members to auto-accept group invites**
/echo /formraid -- Invites all group leaders to raid, as designated in the groups.inc file. **Requires MQ2AutoGroup established for members to auto-accept group invites**
/echo /faceme -- Tells all players to face you. Useful for door or boss positioning.
/echo /movetome -- Tells all players to move to your location without using /stick. **Careful! Is not zone-aware. A player that is not in the same zone will try to move to that location, regardless.**
/echo /stepforward -- Tells all players to walk straight ahead for 3 seconds. Useful for zoning.
/echo /clickobj or /bclickobj -- Tells all players to click the object in front of them, in the middle of their screen. Will fail if they are looking at the ground.
/echo /discon -- Will disconnect the player from EQBCServer so they cannot send/receive commands. Useful for focusing a player on a unique task, like healing or dps'ing an offtanked mob.
/echo /recon -- Will reconnect the player to EQBCServer so that they can send/receive commands.
/echo /nolisten -- Sets a player to ignore most broadcasted commands. Differs from /discon.
/echo /listen -- Sets a player to listen to all broadcasted commands. Is normally on by default. Differs from /recon.
/echo /aoestun -- Tells the enchanter to continuously cast various aoe stun spells. Useful for the Vasella fight in DSK3. Requires the spells to be memmed prior.
/echo /aoemez -- Tells the enchanter to rotate through nearby mobs, casting mez on them. Useful for the Vasella fight in DSK3.
/echo /autopeton or /bautopeton -- Sets player to use pets when engaging in combat. On by default.
/echo /autopetoff or /bautopetoff -- Sets player to not use pets when engaging in combat. Useful for ranged-only fights.
/echo /spamstake or /bspamstake -- Spams the Vampire Bane Earring until the mob is dead. Can be stopped prematurely with /interrupt. **Ends the macro when this command is run**
/echo /prenz or /bprenz -- Targets and trades 500pp to Friend of Prenz for access to the Plane of Tactics Zek boss instances.
/echo /autoposon or /bautoposon -- Enables AutoPosition for a melee character. This will automatically engage them into melee range when in combat. Can disable with /autoposoff.
/echo /autoposoff or /bautoposoff -- Disables AutoPosition for a melee character. This will no longer automatically engage them into melee range when in combat. Can be enabled with /autoposon.
/echo /autodiscon or /bautodiscon -- Enables AutoDisc for a tank character. This will automatically manage defensive discs for maximum up-time when in combat. Can disable with /autodiscoff.
/echo /autodiscoff or /bautodiscoff -- Disables AutoDisc for a tank character. This will no longer automatically manage defensive discs for maximum up-time when in combat. Can be enabled with /autodiscon.
/varset Action Nothing
/return
Sub Nothing
/return
Sub Stick
/if (${Arg1}!=${Me.ID}) {
/echo [${Time.Time24}] Sticking...
/if (${Spawn[${Arg1}].Distance}<200 && ${LineOfSight[${Me.Y},${Me.X},${Me.Z}:${Spawn[${Arg1}].Y},${Spawn[${Arg1}].X},${Spawn[${Arg1}].Z}]}) {
/face ID ${Arg1} fast
/stick ID ${Arg1} 10
} else {
/echo [${Time.Time24}] Can't see the stick target!
/bc I can't see ${Spawn[${Arg1}].CleanName}!
}
}
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub LootCorpse
/echo [${Time.Time24}] Looting my nearby corpses...
/declare g int local 1
/declare MaxDistance int local 100
/for g 1 to ${SpawnCount[${Me.CleanName}'s corps]}
/if (${ChangeAction}) /return
/if (${NearestSpawn[${g},${Me.CleanName}'s corps].Distance}<=${MaxDistance} && ${NearestSpawn[${g},${Me.CleanName}'s corps].ID}) {
/squelch /tar ID ${NearestSpawn[${g},${Me.CleanName}'s corps].ID}
/delay 3
/corpse
/delay 5
/lootall
/delay 10
}
/next g
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub SummonCorpses
/echo [${Time.Time24}] Summoning nearby corpses...
/consentme
/delay 10
/declare g int local 1
/declare MaxDistance int local 100
/for g 1 to ${SpawnCount[corps]}
/if (${ChangeAction}) /return
/if (${NearestSpawn[${g},corps].Distance}<=${MaxDistance} && ${NearestSpawn[${g},corps].ID}!=NULL) {
/squelch /tar ID ${NearestSpawn[${g},corps].ID}
/delay 3
/corpse
/delay 1
}
/next g
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub RezNear
/hidecorpse NPC
/if (!${Defined[TargetingTimer]}) /declare TargetingTimer timer local
/if (${Defined[DonorGloves]} || ${Defined[RezStick]}) {
/echo [${Time.Time24}] Rezzing nearby corpses...
/consentme
/delay 10
/declare g int local 1
/declare MaxDistance int local 100
/for g 1 to ${SpawnCount[corps]}
/if (${ChangeAction}) /return
/if (${NearestSpawn[${g},corps].Distance}<=${MaxDistance} && ${NearestSpawn[${g},corps].ID}!=NULL) {
/varset TargetingTimer 10
:RetryTargeting
/squelch /tar ID ${NearestSpawn[${g},corps].ID}
/delay 3
/if (${Target.ID}==${NearestSpawn[${g},corps].ID}) {
/corpse
/delay 5
/if (${Target.Distance}<15) {
/if (${Defined[DonorGloves]}) {
/call cast ${DonorGloves} item
} else /if (${Defined[RezStick]}) {
/call cast ${RezStick} item
}
}
} else /if (${TargetingTimer}>0) {
/goto :RetryTargeting
}
}
/next g
}
/showcorpse
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub Position
/if (${Me.Class.Name.Equal[Ranger]}) {
/face fast
/stick hold 55 moveback
/delay 10
/return
}
/if (${Me.Class.Name.Equal[Bard]} || ${Me.Class.Name.Equal[Beastlord]} || ${Me.Class.Name.Equal[Berserker]} || ${Me.Class.Name.Equal[Monk]} || ${Me.Class.Name.Equal[Rogue]}) {
/declare DistInit int local 18
/declare DistFinal int local 12
/declare Direction string local !front
} else /if (${Me.Class.Name.Equal[Warrior]} || ${Me.Class.Name.Equal[Paladin]} || ${Me.Class.Name.Equal[Shadow Knight]}) {
/declare DistInit int local 14
/declare DistFinal int local 6
/declare Direction string local front
}
/if (${Target.Distance}>18 && ${Defined[DistInit]}) {
/stick ${DistInit} moveback ${Direction}
} else {
/stick ${DistFinal} moveback ${Direction}
}
/delay 10
/return
Sub Yes
/notify ConfirmationDialogBox Yes_Button leftmouseup
/notify LargeDialogWindow LDW_YesButton leftmouseup
/notify TaskSelectWnd TSEL_AcceptButton leftmouseup
/notify GiveWnd GVW_Give_Button leftmouseup
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub GHTeleport
/if (${Zone.Name.NotEqual[Guild Hall]} && (${Defined[DonorGHCharm]} || ${Defined[LuckyGHCharm]})) {
/echo [${Time.Time24}] Clicking my heels three times...
/if (${Me.Casting.ID}) {
/interrupt
/delay 2
}
:ClearCursor
/if (${Cursor.ID}) {
/autoinventory
/delay 2
/goto :ClearCursor
}
/echo [${Time.Time24}] Casting Lucky Charm...
/if (!${Declared[CastAttempts]}) /declare CastAttempts int local 0
:Retry
/if (${ChangeAction}) /return
/varcalc CastAttempts ${CastAttempts}+1
/if (${Defined[DonorGHCharm]}) {
/call cast ${DonorGHCharm} item
} else {
/call cast ${LuckyGHCharm} item
}
/delay 5
/if (!${Spawn[npc ${Me.CleanName}].ID} && ${CastAttempts}<3) /goto :Retry
/if (${CastAttempts}==3) {
/varset CastAttempts 0
/return
}
:TargetingLoop
/if (!${Defined[TargetAttempts]}) /declare TargetAttempts int local 0
/squelch /tar npc ${Me.CleanName}
/delay 5
/varcalc TargetAttempts ${TargetAttempts}+1
/if (!${Target.ID} && !${ChangeAction} && ${TargetAttempts}<20) /goto :TargetingLoop
/hail
/delay 20
/if (${Defined[DonorGHCharm]}) {
/say enter
} else {
/notify LargeDialogWindow LDW_YesButton leftmouseup
}
}
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub GHTeleportTeam
/if (${Defined[DonorGHCharm]}) {
/declare n int local 0
/echo [${Time.Time24}] Sending the whole team to the Guild Hall...
/for n 1 to ${Team.Size}
/if (${Spawn[pc ${Team[${n}]}].ID} && ${Team[${n}].NotEqual[${Me.CleanName}]}) {
/call cast ${DonorGHCharm} item
/delay 3
/bct ${Team[${n}]} //squelch /tar npc ${Me.CleanName}`s
/delay 2
/bct ${Team[${n}]} //multiline ; /face fast;/say enter
}
/next n
/delay 10
/call cast ${DonorGHCharm} item
/delay 3
/squelch /tar npc ${Me.CleanName}`s
/delay 2
/say enter
}
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub HOHTeleport
/if (${Defined[HOHPortalFrag]}) {
/echo [${Time.Time24}] Gating to Halls of Honor.
/call cast ${HOHPortalFrag} item
}
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub ValeTeleport
/if (${Defined[ValeToken]}) {
/echo [${Time.Time24}] Gating to The Hidden Vale.
/call cast ${ValeToken} item
}
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub ForestTeleport
/if (${Defined[ForestCharm]}) {
/echo [${Time.Time24}] Gating to The Hidden Forest.
/call cast ${ForestCharm} item
}
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub LootNear
/echo [${Time.Time24}] Looting nearby enemies...
:LootLoop
/if (${NearestSpawn[corpse].Distance}<=60 && ${NearestSpawn[corpse].ID} != NULL) {
/squelch /tar ID ${NearestSpawn[corpse].ID}
/delay 3
/if (${Target.Distance} > 25) {
/stick hold 6
}
/lootall
/delay 5
/goto :LootLoop
}
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub LootWhore
/declare g int local
/declare h int local
/declare corpses int local ${SpawnCount[corpse]}
/declare items int local
/declare MaxDistance int local 100
/declare Unlootable int local 0
/declare TryTargeting int local 0
/declare LootGenerate int local 0
/echo Looting nearby enemies...
:LWNextCorpse
/if (${corpses}>0) {
/for g 1 to ${SpawnCount[corpse]}
/if (${ChangeAction}) /return
/if (${NearestSpawn[${g},corps].Distance}<=${MaxDistance} && ${NearestSpawn[${g},corps].ID}!=NULL && ${NearestSpawn[${g},corps].Guild.Length}<1) {
|-- Target Corpse --|
:LWGetTarget
/squelch /tar ID ${NearestSpawn[${g},corps].ID}
/delay 1
/if (!${Target.ID} || ${Target.ID}!=${NearestSpawn[${g},corps].ID}) {
/varcalc TryTargeting ${TryTargeting}+1
/if (${TryTargeting}>15) {
/varset TryTargeting 0
/goto :LWNextCorpse
}
/goto :LWGetTarget
} else {
|-- Move to Corpse --|
/face fast
:LWGetCloser
/if (${Target.Distance}>11) {
/moveto loc ${Target.Y} ${Target.X}
/delay 2
/goto :LWGetCloser
}
|-- Open Corpse Loot Window --|
:LWOpenLoot
/if (${Target.ID}) {
/loot
} else {
/goto :LWNextCorpse
}
/delay 2
/if (!${Corpse.Open}) {
/delay 1
/goto :LWOpenLoot
} else {
|-- Check for Items --|
:LWLootGenerate
/if (!${Corpse.Items}) {
/delay 2
/varcalc LootGenerate ${LootGenerate}+1
/if (${LootGenerate}<10) {
/goto :LWLootGenerate
} else {
/varset LootGenerate 0
/goto :LWCloseLoot
}
} else {
/if (${Corpse.Items}>0) {
|-- Loot Items --|
/varset items ${Corpse.Items}
/for h 1 to ${items}
:LWCursorGenerate
/if (${Corpse.Item[${h}].Stackable} && !${Corpse.Item[${h}].NoDrop}) /itemnotify loot${h} leftmouseup
/delay 2
/if (${Corpse.Item[${h}].Stackable} && !${Corpse.Item[${h}].NoDrop} && !${Cursor.ID}) {
/goto :LWCursorGenerate
} else {
:LWClearCursor
/if (${Cursor.NoDrop} || !${Cursor.Stackable}) {
/destroy
} else {
/autoinv
}
/delay 1
/if (${Cursor.ID}) /goto :LWClearCursor
}
/next h
}
}
}
}
} else {
/varcalc Unlootable ${Unlootable}+1
}
|-- Close Corpse Loot Window --|
:LWCloseLoot
/keypress esc
/if (${Corpse} && ${Corpse.Open}) {
/delay 1
/goto :LWCloseLoot
}
:LWStandingCheck
/if (!${Me.Standing}) {
/stand
/delay 1
}
/next g
}
/if (${NearestSpawn[corpse].Distance}<=${MaxDistance} && (${Unlootable}<${SpawnCount[corpse]})) {
/goto :LWNextCorpse
} else {
/varset ChangeAction TRUE
/varset Action Nothing
}
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub COHTar
/if (${Me.Gem[Call of the Hero]}>0) {
/echo [${Time.Time24}] Summoning ${Target.CleanName} from ${Target.Distance3D} units away.
/call WaitForSpellReady "Call of the Hero"
/call cast "Call of the Hero"
} else /if (${FindItemCount[Arion, the Skull of the Ancient]}) {
/echo [${Time.Time24}] Summoning ${Target.CleanName} from ${Target.Distance3D} units away.
/call cast "Arion, the Skull of the Ancient" item
} else /if (${FindItemCount[Orb of the Crimson Bull]}) {
/echo [${Time.Time24}] Summoning ${Target.CleanName} from ${Target.Distance3D} units away.
/call cast "Orb of the Crimson Bull" item
}
/if (${Action.Equal[COHTar]}) {
/varset ChangeAction TRUE
/varset Action Nothing
}
/return ${Macro.Return}
Sub COH
/delay 5
| build an array of all players who meet the criteria and are X distance away
| find random int
| summon array element using random int
| rebuild array. rinse and repeat.
/if (${Me.Gem[Call of the Hero]}==0 && ${FindItemCount[Arion, the Skull of the Ancient]}==0 && ${FindItemCount[Orb of the Crimson Bull]}==0) {
/varset ChangeAction TRUE
/varset Action Nothing
/varset Arg2
/return
}
/if (!${Defined[j]}) /declare j int local 1
/if (!${Defined[k]}) /declare k int local 0
/if (!${Defined[Beginning]}) /declare Beginning int local 1
/if (!${Defined[End]}) /declare End int local
/if (!${Defined[Prefix]}) /declare Prefix string local
/if (!${Defined[Suffix]}) /declare Suffix string local .Name
/if (!${Defined[COHItem]}) /declare COHItem string local
/if (!${Defined[COHRetryCount]}) /declare COHRetryCount int local 0
/if (!${Defined[SummonTar]}) /declare SummonTar int local 0
/if (${Arg2.Equal[Team]}) {
/varset End ${Team.Size}
/varset Prefix Team
/varset Suffix
} else /if (${Raid.Members}>0) {
/varset End ${Raid.Members}
/varset Prefix Raid.Member
} else /if (${Group}>0) {
/varset Beginning 0
/varset End ${Group}
/varset Prefix Group.Member
}
:COHLoop
/if (${Defined[TempTargetArray]}) {
/deletevar TempTargetArray
}
/if (${Defined[TargetArray]}) {
/deletevar TargetArray
}
/varset k 0
/declare TempTargetArray[${End}] int local UNDEFINED-ARRAY-ELEMENT
/for j ${Beginning} to ${End}
/if (${Spawn[=${${Prefix}[${j}]}].ID} && (${Spawn[=${${Prefix}[${j}]}].Distance3D}>50 || !${Spawn[=${${Prefix}[${j}]}].LineOfSight})) {
/varcalc k ${k}+1
/varset TempTargetArray[${k}] ${Spawn[=${${Prefix}[${j}]}].ID}
}
/next j
/if (${k}>0 && ${Action.Equal[COH]} && !${ChangeAction}) {
/declare TargetArray[${k}] int local UNDEFINED-ARRAY-ELEMENT
/varset k 0
/for j 1 to ${TempTargetArray.Size}
/if (${TempTargetArray[${j}]}>0) {
/varcalc k ${k}+1
/varset TargetArray[${k}] ${TempTargetArray[${j}]}
}
/next j
/if (${Defined[TargetArray]}) {
/varset SummonTar ${TargetArray[${Math.Calc[${Math.Rand[${Math.Calc[${TargetArray.Size}-1]}]}+1]}]}
/tar ID ${SummonTar}
/delay 3
/call COHTar
/delay 15
/if (${Macro.Return.NotEqual[CAST_INTERRUPTED]} && ${Action.Equal[COH]} && !${ChangeAction} && ${Target.ID}==${SummonTar} && ${Target.Distance}<15) /bct ${Spawn[id ${SummonTar}].Name} //multiline ; /stick end;/varset Arg2 ${Arg2};/varset Command COH;/varset ChangeAction TRUE
/if (${Action.Equal[COH]} && !${ChangeAction}) {
/next j
}
}
/if (${Action.Equal[COH]} && !${ChangeAction}) {
/goto :COHLoop
}
}
/varset Action Nothing
/if (!${ChangeAction}) {
/varset ChangeAction TRUE
/varset Arg2
/varset Command
}
/echo [${Time.Time24}] All done summoning.
/return
Sub BlockBuff(string BuffName, string BuffHolder)
/declare BuffSlot int local
/declare BuffWnd string local
/if (${BuffHolder.Equal[Pet]} && ${Me.Pet.ID} && ${Me.PetBuff[${BuffName}]}) {
/echo [${Time.Time24}] Removing ${BuffName} from pet...
/varcalc BuffSlot ${Me.PetBuff[${BuffName}]}-1
/varset BuffWnd PIW_PetBuff${BuffSlot}_Button
/notify PIW_BuffWindow ${BuffWnd} leftmouseup
} else /if (${BuffHolder.Equal[Me]} && ${Me.Buff[${BuffName}].ID}) {
/echo [${Time.Time24}] Removing ${BuffName} from self...
/varcalc BuffSlot ${Me.Buff[${BuffName}].ID}-1
/notify BuffWindow BW_Buff${BuffSlot}_Button leftmouseup
}
/return
Sub ZoneToChaos
/declare OrigMask int local ${Me.Inventory[3].ID}
/declare MastersMask int local
/declare TryToZoneTimer timer local
/if (${FindItemCount[Mask of the Masters]}>0) {
/varset MastersMask ${FindItem[Mask of the Masters].ID}
} else /if (${FindItemCount[Guise of the Masters]}>0) {
/varset MastersMask ${FindItem[Guise of the Masters].ID}
} else {
/return
}
/if (${Zone.Name.Equal[Halls of Honor]} && ${LineOfSight[${Me.Y},${Me.X},${Me.Z}:3,108,4]}) {
/if (${Me.Casting.ID}) {
/interrupt
/delay 2
}
/echo [${Time.Time24}] Equipping ${MastersMask}.
/exchange ${MastersMask} 3
/delay 2
/moveto loc 3 108
/varset TryToZoneTimer 100
:WaitForZone
/delay 2
/if (${Zone.Name.Equal[Temple of Marr]} || ${TryToZoneTimer}==0) {
/exchange ${OrigMask} 3
/if (${TryToZoneTimer}==0) /echo [${Time.Time24}] The event appears to be on time out. Original mask is now being worn.
} else {
/goto :WaitForZone
}
} else {
/echo [${Time.Time24}] already in Temple of Marr.
}
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub Settings
/echo [${Time.Time24}] Checking settings...
/if (${Me.Class.Name.Equal[Cleric]} || ${Me.Class.Name.Equal[Druid]} || ${Me.Class.Name.Equal[Shaman]}) {
/varset ClassType Healer
} else /if (${Me.Class.Name.Equal[Necromancer]} || ${Me.Class.Name.Equal[Magician]} || ${Me.Class.Name.Equal[Enchanter]} || ${Me.Class.Name.Equal[Wizard]}) {
/varset ClassType Ranged
} else {
/varset ClassType Melee
}
/if (${Me.Class.Name.Equal[Cleric]} || ${Me.Class.Name.Equal[Druid]} || ${Me.Class.Name.Equal[Shaman]} || ${Me.Class.Name.Equal[Enchanter]} || ${Me.Class.Name.Equal[Magician]} || ${Me.Class.Name.Equal[Ranger]}) {
/tgb on
} else {
/tgb off
}
/if (${Me.Pet.ID}) {
/pet focus on
/pet no taunt
/pet hold
}
/melee off
/hidecorpse looted
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub DetectGems
/if (!${Defined[SpellSet]}) /declare SpellSet string outer Group
/declare SpellsMemmed bool local FALSE
:DetectGems
/for j 1 to 9
/if (!${Defined[Gem${j}]}) /declare Gem${j} bool outer FALSE
/if (${Me.Gem[${j}].ID}) {
/varset Gem${j} TRUE
/varset SpellsMemmed TRUE
}
/next j
/if (!${SpellsMemmed}) {
/echo [${Time.Time24}] Memming spells
/memspellset ${SpellSet}
/delay 5
:WaitForMem
/if (${Window[SpellBookWnd].Open}) {
/delay 1
/goto :WaitForMem
}
/goto :DetectGems
}
/return
Sub Hold
/if (${Action.NotEqual[Killnear]}) {
/echo [${Time.Time24}] Holding...
/if (${Me.Pet.ID} && !${ChangeAction} && (${Spawn[${RaidTarg}].ID} && ${Spawn[${RaidTarg}].Type.Equal[NPC]})) /pet hold
/if (${Me.Class.Name.NotEqual[Bard]} && ${Me.Casting.ID}) {
/interrupt
}
/if (${Me.Combat}) /attack off
/if (${Me.AutoFire}) /autofire
/varset RaidTarg
/varset ChangeAction TRUE
/varset Action Nothing
}
/return
#Event WhoHas "#1# #*#'who has #2#"
#Event WhoIsMissing "#1# #*#'who is missing #2#"
#Event ManualWhoHas "#1# #*#'nolink who has #2#"
#Event ManualWhoIsMissing "#1# #*#'nolink who is missing #2#"
Sub Event_WhoHas
/declare CleanedLink string local ${Param2.Right[-51].Left[-2]}
/if (${FindItemCount[${CleanedLink}]}>0 || ${FindItemBankCount[${CleanedLink}]}>0) {
/echo [${Time.Time24}] I have ${Param2.Left[-1]}. ${FindItemCount[${CleanedLink}]} on me. ${FindItemBankCount[${CleanedLink}]} in the bank.
/bc I have ${Param2.Left[-1]}. ${FindItemCount[${CleanedLink}]} on me. ${FindItemBankCount[${CleanedLink}]} in the bank.
} else {
/echo [${Time.Time24}] Missing ${CleanedLink}.
}
/return
Sub Event_WhoIsMissing
/declare CleanedLink string local ${Param2.Right[-51].Left[-2]}
/if (${FindItemCount[${CleanedLink}]}==0 && ${FindItemBankCount[${CleanedLink}]}==0) {
/echo [${Time.Time24}] I have ${Param2.Left[-1]}. ${FindItemCount[${CleanedLink}]} on me. ${FindItemBankCount[${CleanedLink}]} in the bank.
/bc I am missing ${Param2.Left[-1]}
}
/return
Sub Event_ManualWhoHas
/declare CleanedName string local ${Param2.Left[-1]}
/if (${FindItemCount[${CleanedName}]}>0 || ${FindItemBankCount[${CleanedName}]}>0) {
/echo [${Time.Time24}] I have ${CleanedName}. ${FindItemCount[${CleanedName}]} on me. ${FindItemBankCount[${CleanedName}]} in the bank.
/bc I have ${CleanedName}. ${FindItemCount[${CleanedName}]} on me. ${FindItemBankCount[${CleanedName}]} in the bank.
} else { /echo [${Time.Time24}] Missing ${CleanedName}.
}
/return
Sub Event_ManualWhoIsMissing
/declare CleanedName string local ${Param2.Left[-1]}
/if (${FindItemCount[${CleanedName}]}==0 && ${FindItemBankCount[${CleanedName}]}==0) {
/echo [${Time.Time24}] I have ${CleanedName}. ${FindItemCount[${CleanedName}]} on me. ${FindItemBankCount[${CleanedName}]} in the bank.
/bc I am missing ${CleanedName}
}
/return
Sub Near
/if (!${Spawn[${Arg1}].ID} || ${Spawn[${Arg1}].Distance3D}>100) {
/bc I'm missing! Currently in ${Zone}.
}
/varset ChangeAction TRUE
/varset Action Nothing
/return
Sub HealMe
/if (${Me.Class.Name.Equal[Cleric]} || ${Me.Class.Name.Equal[Druid]} || ${Me.Class.Name.Equal[Shaman]}) {
/if (${Arg2.Length}>0) {
/varset HealTarg ${Arg2}
/squelch /tar ID ${HealTarg}
/delay 3
/varset Arg2
}
/call Combat
/call CheckLevels
/call CheckStatus
/doevents
}
/return
Sub CheckHP
/if (${Target.PctHPs}>=90) /call Interrupt
/return
Sub BalExp
|--Exp Levels----------------------------------------------------------------
/if (${Me.PctExp}<100) {
/if (${Window[AAWindow].Child[AAW_PercentCount].Text.Length}==4) {
/alternateadv on 50
}
} else {
/if (${Window[AAWindow].Child[AAW_PercentCount].Text.Length}<4) {
/alternateadv on 100
}
}
/delay 10
/varset ExpCheck ${Math.Calc[${Math.Rand[100]}+300+${Me.Class.ID}]}
/return
Sub PetWeapons
/if (${Me.Class.Name.NotEqual[Magician]} && !${Defined[PetToyBelt]}) /return
/declare Bag int local
/declare Slot int local
/declare BreakLoop int local 0
/declare PetOwner string local ${Target.CleanName}
/varset Action Nothing
|----Detect Spells---------------------------------------------------
/if (${Me.Gem[Summon: Ornaments of the Gods Rk. I]}>0 || (${Me.Class.Name.NotEqual[Magician]} && ${Defined[PetToyBelt]})) {
/declare PetKitSpell string local "Summon: Ornaments of the Gods Rk. I"
/declare PetWep string local "Summoned: Godly Mace"
/declare PetDag string local "Summoned: Godly Dagger"
/declare PetSwo string local "Summoned: Godly Blade"
}
/if (${Me.Gem[Summon: Ornaments of the Gods Rk. II]}>0) {
/declare PetKitSpell string local "Summon: Ornaments of the Gods Rk. II"
/declare PetWep string local "Summoned: Godly Mace of Deceit"
/declare PetDag string local "Summoned: Godly Dagger of Deceit"
/declare PetSwo string local "Summoned: Godly Blade of Deceit"
}
/if (${Me.Gem[Summon: Ornaments of the Gods Rk. III]}>0) {
/declare PetKitSpell string local "Summon: Ornaments of the Gods Rk. III"
/declare PetWep string local "Summoned: Godly Mace of Destruction"
/declare PetDag string local "Summoned: Godly Dagger of Destruction"
/declare PetSwo string local "Summoned: Godly Blade of Destruction"
}
/declare PetArmor1 string local "Summoned: Godly Muzzle"
/declare PetArmor2 string local "Summoned: Godly Belt"
/declare PetArmor3 string local "Godly Breastplate"
/declare PetArmor4 string local "Godly Greaves"
/declare PetArmor5 string local "Godly Helm"
/declare PetArmor6 string local "Godly Vambraces"
|-------------------------------------------------
/echo [${Time.Time24}] Summoning pet weapons for ${Target.CleanName}'s pet.
/squelch /tar ID ${Target.Pet.ID}
/if (${Target.Distance}>100) {
/echo [${Time.Time24}] Target is too far away!
/return
}
/if (!${Spawn[pc ${PetOwner}].Pet.ID}) {
/echo [${Time.Time24}] Owner doesn't have a pet!
/return
}
/face fast nolook
/stick on 6
:WaitForProximity
/delay 1
/if (${Target.Distance}>12) /goto :WaitForProximity
/stick end
|--------------------------------------------------
|-- Deck out target's pet
|--------------------------------------------------
:SummonToys
/if (${Me.Class.Name.NotEqual[Magician]}) {
/call cast ${PetToyBelt} item
} else {
/call WaitForSpellReady ${PetKitSpell}
/call cast ${PetKitSpell}
/if (${Macro.Return.Equal[CAST_INTERRUPTED]} || ${Macro.Return.Equal[CAST_FIZZLE]}) /goto :SummonToys
}
|-- Catch twin casts --
:PlaceBag
/autoinv
/delay 3
/if (${Cursor.Name.NotEqual[Phantom Satchel]}) /return
/if (${Cursor.ID}) /goto :PlaceBag
|-- Proceed only when the kit is confirmed in the inventory
/if (${FindItemCount[Phantom Satchel]}>0) {
/if (!${Window[InventoryWindow].Open}) /keypress Inventory
/varset Bag ${FindItem[${PetDag}].InvSlot.Pack}
/itemnotify ${InvSlot[${Bag}]} rightmouseup
/delay 3
/varset Slot ${FindItem[${PetDag}].InvSlot}
/itemnotify ${InvSlot[${Slot}]} leftmouseup
/delay 1
/varset BreakLoop 0
:OpenGiveWindowA1
/if (${BreakLoop} > 9) {
/echo [${Time.Time24}] Macro got stuck. Breaking PetWeap loop.
/return
}
/if (${Cursor.ID} && ${Cursor.NoRent}) {
/echo [${Time.Time24}] Giving (${Cursor.Name}) to (${Target.CleanName}).
/nomodkey /click left target
} else {
/autoinv
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowA1
}
/delay 1s ${Window[GiveWnd].Open}
/if (!${Window[GiveWnd].Open}) {
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowA1
}
/varset BreakLoop 0
:OpenGiveWindowA2
/if (${BreakLoop} > 9) {
/echo [${Time.Time24}] Macro got stuck. Breaking PetWeap loop.
/return
}
/varset Slot ${FindItem[${PetSwo}].InvSlot}
/itemnotify ${InvSlot[${Slot}]} leftmouseup
/delay 1
/if (${Cursor.ID} && ${Cursor.NoRent}) {
/echo [${Time.Time24}] Giving (${Cursor.Name}) to (${Target.CleanName}).
/nomodkey /click left target
} else {
/autoinv
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowA2
}
/if (!${Window[GiveWnd].Open}) {
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowA2
}
/varset BreakLoop 0
:OpenGiveWindowA3
/if (${BreakLoop} > 9) {
/echo [${Time.Time24}] Macro got stuck. Breaking PetWeap loop.
/return
}
/varset Slot ${FindItem[${PetArmor1}].InvSlot}
/itemnotify ${InvSlot[${Slot}]} leftmouseup
/delay 1
/if (${Cursor.ID} && ${Cursor.NoRent}) {
/echo [${Time.Time24}] Giving (${Cursor.Name}) to (${Target.CleanName}).
/nomodkey /click left target
} else {
/autoinv
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowA3
}
/if (!${Window[GiveWnd].Open}) {
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowA3
}
/varset BreakLoop 0
:OpenGiveWindowA4
/if (${BreakLoop} > 9) {
/echo [${Time.Time24}] Macro got stuck. Breaking PetWeap loop.
/return
}
/varset Slot ${FindItem[${PetArmor2}].InvSlot}
/itemnotify ${InvSlot[${Slot}]} leftmouseup
/delay 1
/if (${Cursor.ID} && ${Cursor.NoRent}) {
/echo [${Time.Time24}] Giving (${Cursor.Name}) to (${Target.CleanName}).
/nomodkey /click left target
} else {
/autoinv
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowA4
}
/if (!${Window[GiveWnd].Open}) {
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowA4
}
/notify GiveWnd GVW_Give_Button leftmouseup
/delay 5
/varset Slot ${FindItem[${PetArmor3}].InvSlot}
/itemnotify ${InvSlot[${Slot}]} leftmouseup
/delay 1
/varset BreakLoop 0
:OpenGiveWindowB1
/if (${BreakLoop} > 9) {
/echo [${Time.Time24}] Macro got stuck. Breaking PetWeap loop.
/return
}
/if (${Cursor.ID} && ${Cursor.NoRent}) {
/echo [${Time.Time24}] Giving (${Cursor.Name}) to (${Target.CleanName}).
/nomodkey /click left target
} else {
/autoinv
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowB1
}
/delay 1s ${Window[GiveWnd].Open}
/if (!${Window[GiveWnd].Open}) {
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowB1
}
/varset BreakLoop 0
:OpenGiveWindowB2
/if (${BreakLoop} > 9) {
/echo [${Time.Time24}] Macro got stuck. Breaking PetWeap loop.
/return
}
/varset Slot ${FindItem[${PetArmor4}].InvSlot}
/itemnotify ${InvSlot[${Slot}]} leftmouseup
/delay 1
/if (${Cursor.ID} && ${Cursor.NoRent}) {
/echo [${Time.Time24}] Giving (${Cursor.Name}) to (${Target.CleanName}).
/nomodkey /click left target
} else {
/autoinv
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowB2
}
/if (!${Window[GiveWnd].Open}) {
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowB2
}
/varset BreakLoop 0
:OpenGiveWindowB3
/if (${BreakLoop} > 9) {
/echo [${Time.Time24}] Macro got stuck. Breaking PetWeap loop.
/return
}
/varset Slot ${FindItem[${PetArmor5}].InvSlot}
/itemnotify ${InvSlot[${Slot}]} leftmouseup
/delay 1
/if (${Cursor.ID} && ${Cursor.NoRent}) {
/echo [${Time.Time24}] Giving (${Cursor.Name}) to (${Target.CleanName}).
/nomodkey /click left target
} else {
/autoinv
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowB3
}
/if (!${Window[GiveWnd].Open}) {
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowB3
}
/varset BreakLoop 0
:OpenGiveWindowB4
/if (${BreakLoop} > 9) {
/echo [${Time.Time24}] Macro got stuck. Breaking PetWeap loop.
/return
}
/varset Slot ${FindItem[${PetArmor6}].InvSlot}
/itemnotify ${InvSlot[${Slot}]} leftmouseup
/delay 1
/if (${Cursor.ID} && ${Cursor.NoRent}) {
/echo [${Time.Time24}] Giving (${Cursor.Name}) to (${Target.CleanName}).
/nomodkey /click left target
} else {
/autoinv
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowB4
}
/if (!${Window[GiveWnd].Open}) {
/varcalc BreakLoop ${BreakLoop}+1
/goto :OpenGiveWindowB4
}
/notify GiveWnd GVW_Give_Button leftmouseup
/delay 1