-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathInTheDark.mac
More file actions
1737 lines (1667 loc) · 63.4 KB
/
InTheDark.mac
File metadata and controls
1737 lines (1667 loc) · 63.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
|InTheDark.mac by Chatwiththisname BrokenRobotGames@gmail.com
|
|Redguides build for use with MQ2EasyFind
|
|Things to consider. Philter of Major Translocation x 3, Cloudy Potion x 20
#event Pole "#*#You can't fish without a fishing pole, go buy one.#*#"
#event Pole "#*#fishing pole in your primary hand.#*#"
#event poleBroke "#*#fishing pole broke#*#"
#event NoBait "#*#without fishing bait#*#"
#event noWater "#*#land sharks#*#"
#event castLine "#*#cast your line#*#"
#event moved "#*#go on your way#*#"
#event dryLand "#*#dry land to fish#*#"
#event drankAle "#*#You take a swig of Summoned: Ale#*#"
#event caughtNothing "#*#You didn't catch anything#*#"
#event spillBeer "#*#You spill your beer#*#"
#event holdingSomething "#*#You can't fish while holding something.#*#"
Sub Main
/if (${Bool[${Plugin[MQ2Bucles]}]}) {
/squelch /plugin MQ2Bucles unload noauto
/echo MQ2Bucles detected! This macro doesn't like it! Unloading ...
}
/call Declares
/call CheckThings
/call TakeInventory
/if (${BuyPotions}) {
/if (${Zone.ID} != 202) {
/echo ${Red}You need invisibility potions so you need to be in POK. This might not end well.
} else {
/call NavToLoc -88 -205 -157
/target id ${Spawn[npc Mirao].ID}
/delay 2s ${Target.ID}==${Spawn[npc Mirao].ID}
/invoke ${Target.RightClick}
/call BuyItem "Cloudy Potion" 20
/delay 1s
/cleanup
}
}
/if (${BuyBait}) {
/if (${Zone.ID} != 202) {
/if (${FindItemCount[Bait]}<50) {
/echo ${Red}I only have ${FindItemCount[Bait]} bait and it troubles me deeply. I wanted to buy some but I'm not in POK.
} else {
/echo ${Red}I only have ${FindItemCount[Bait]} bait and it concerns me. I wanted to buy some but I'm not in POK.
}
} else {
/call NavToLoc -27 1434 -125
:buymore
/if (!${Target.ID} || ${Target.ID} != ${Spawn[npc Ramos Jerwan].ID}) /target id ${Spawn[npc Ramos Jerwan].ID}
/delay 2s ${Target.ID}==${Spawn[npc Ramos Jerwan].ID}
/call BuyItem "Fishing Bait" ${Math.Calc[200-${FindItemCount[bait]}].Int}
/delay 1s
/cleanup
/if (${FindItemCount[bait]}<200) /goto :buymore
}
}
/if (${BuyPoles}) {
/if (${Zone.ID} != 202) {
/if (${FindItemCount[Fishing Pole]}<3) {
/echo ${Red}I only have ${FindItemCount[Fishing Pole]} and this may be an issue.
} else {
/if (!${FindItemCount[Fishing Pole]}) {
/echo ${Red}I don't have any fishing poles. How am I suppose to fish? Ending macro.
/end
}
}
} else {
/echo I need to purchase some fishing poles!
/call NavToLoc -27 1434 -125
:buymore2
/if (!${Target.ID} || ${Target.ID} != ${Spawn[npc Ramos Jerwan].ID}) /target id ${Spawn[npc Ramos Jerwan].ID}
/delay 2s ${Target.ID}==${Spawn[npc Ramos Jerwan].ID}
/call BuyItem "Fishing Pole" 1
/delay 1s
/cleanup
/if (${FindItemCount[Fishing Pole]}<10) /goto :buymore2
}
}
/call TaskCheck "Fish Eyes in The Dark"
/if (!${Macro.Return.Equal[TRUE]}) {
/call WhereAmI
}
/call GetStep
/if (${Me.XTarget}) {
/call FarmStuff
}
|** Corathus stuff **|
|** ZoneID == 365 **|
|** Corathus fishing hole=-62 1560 -86.6 heading=180 **|
|** Corathus to Nektulos Forest=-386 -140 -64 for zoneline **|
/if (!${StepCompleted[1]} || !${StepCompleted[2]} || !${StepCompleted[3]} || !${StepCompleted[5]}) {
/if (${Zone.ID} != 365) {
/if (${Zone.ID} == 202) {
/if (${Debugging}) /echo I'm in POK and need to look for Nektulos Forest.
/call CheckConnections "Nektulos Forest"
/if (${Debugging}) /echo I just checked for connections to Nektulos Forest. Was there one? ${Macro.Return}
/if (${Macro.Return.Equal[TRUE]}) {
/if (${Debugging}) /echo Calling EasyFind to travel to Nektulos Forest
/call EasyFind "Nektulos Forest"
}
}
|** if you're in Nektulos Forest?? **|
/if (${Zone.ID} == 25) {
/call CheckConnections "Corathus Creep"
/if (${Macro.Return.Equal[TRUE]}) {
/call EasyFind "Corathus Creep"
} else {
/echo ${Red}You are not in a zone connected to Corathus Creep! Please Relocate!
/endm
}
}
}
|** Corathus Creep **|
/if (${Zone.ID} != 365) {
/echo ${Red}Something went wrong. I'm supposed to have gone to ${Yellow}Corathus Creep${Red} but EasyFind has failed me.
/end
}
/if (${Zone.ID} == 365) {
/call NavToLoc -62 1560 -86.6
/face heading 180
/varset FishingHole "-62 1560 -86.6"
/varset FishingHeading 180
:keepFishing1
/if (!${StepCompleted[1]} || !${StepCompleted[2]} || !${StepCompleted[3]} || !${StepCompleted[5]}) {
/if (!${Me.XTarget}) {
/call GoFish
} else {
/call FarmStuff
}
/call GetStep
}
/if (${Zone.ID} == 365 && (!${StepCompleted[1]} || !${StepCompleted[2]} || !${StepCompleted[3]} || !${StepCompleted[5]})) /goto :keepFishing1
/if (${Zone.ID} != 365) {
/echo ${Yellow}Sadly, I appeared to have ${Red}DIED! ${Yellow}I'm sure my loss will be mourned. ${Red}Ending macro.
/endm
}
}
/varset nowater 0
/varset dryland 0
/cleanup
}
/call GetStep
|** Undershore stuff **|
|** ZoneID == 362
|** Undershore fishing hole=-1187 -517 -13 heading=-50 **|
/if (${Debugging}) /echo Step 7 Complete: ${StepCompleted[7]} \atLine: ${Macro.CurLine}
/if (!${StepCompleted[7]}) {
/if (${Zone.ID} != 362) {
/call CheckConnections "Undershore - 1"
/if (${Macro.Return.Equal[TRUE]}) {
/if (${Debugging}) /echo Calling EasyFind to travel to Undershore - 1
/call EasyFind "Undershore - 1"
}
}
/if (${Zone.ID} == 362) {
/if (${Debugging}) /echo I'm in Undershore, lets go fishing. \atLine: ${Macro.CurLine}
/call NavToLoc -1187 -517 -13
/face heading -50
/varset FishingHole "-1187 -517 -13"
/varset FishingHeading -50
:keepFishing2
/if (!${StepCompleted[7]}) {
/if (!${Me.XTarget}) {
/call GoFish
} else {
/call FarmStuff
}
/call GetStep
}
/if (${Zone.ID} == 362 && !${StepCompleted[7]}) /goto :keepFishing2
/if (${Zone.ID} != 362) {
/echo ${Yellow}Sadly, I appeared to have ${Red}DIED! ${Yellow}I'm sure my loss will be mourned. ${Red}Ending macro.
/endm
}
} else {
/echo ${Red}Something went wrong. I'm supposed to have gone to ${Yellow}Undershore - 1 ${Red}but EasyFind has failed me.
/end
}
/varset nowater 0
/varset dryland 0
/cleanup
}
|** Illisan stuff **|
|** ZoneID == 347
|** Illisan fishing hole=-175 241 -34 heading=-90 **|
|** MovetoRequired location /moveto loc -184 38 -46 **|
/if (!${StepCompleted[4]}) {
/if (${Zone.ID} != 347) {
/call CheckConnections "Ruins of Illsalin"
/if (${Macro.Return.Equal[TRUE]}) {
/call NavToLoc -1313 758 -17
/call MoveToWait -1560 728 -40
/call Zoning
} else {
/echo ${Red}You are not in a zone connected to ${Yellow}Ruins of Illisan!${Red} Please Relocate!
/endm
}
}
/if (${Zone.ID} == 347) {
/call MoveToWait -184 38 -46
/call NavToLoc -175 241 -34
/face heading -90
/call GetStep
/varset FishingHole "-175 241 -34"
/varset FishingHeading -90
:keepFishing3
/if (!${StepCompleted[4]}) {
/if (!${Me.XTarget}) {
/call GoFish
} else {
/call FarmStuff
}
/call GetStep
}
/if (${Zone.ID} == 347 && !${StepCompleted[4]}) /goto :keepFishing3
/if (${Zone.ID} != 347) {
/echo ${Yellow}Sadly, I appeared to have ${Red}DIED! ${Yellow}I'm sure my loss will be mourned. ${Red}Ending macro.
/endm
}
} else {
/echo ${Red}Something went wrong. I'm supposed to have gone to ${Yellow}Ruins of Illisan ${Red}but EasyFind has failed me.
/end
}
/varset nowater 0
/varset dryland 0
/cleanup
}
|** Stoneroot Falls stuff **|
|** ZoneID == 358 **|
|** Fishing hole=294 -1228 7 heading=-90 **|
/if (!${StepCompleted[6]}) {
/if (${Zone.ID} == 347) {
/call MoveToWait -184 38 -46
/call MoveToWait -70 34 -39
/call Zoning
}
/if (${Zone.ID} == 362) {
/call CheckConnections "Stoneroot Falls - 2"
/if (${Macro.Return.Equal[TRUE]}) {
/call EasyFind "Stoneroot Falls - 2"
} else {
/echo ${Red}You are not in a zone connected to ${Yellow}Stoneroot Falls! ${Red}Please Relocate!
/endm
}
}
/if (${Zone.ID} == 358) {
/call MoveToWait 294 -1228 7
/face heading -90
/call GetStep
/varset FishingHole "294 -1228 7"
/varset FishingHeading -90
:keepFishing4
/if (!${StepCompleted[6]}) {
/if (!${Me.XTarget}) {
/call GoFish
} else {
/call FarmStuff
}
/call GetStep
}
/if (${Zone.ID} == 358 && !${StepCompleted[6]}) /goto :keepFishing4
/if (${Zone.ID} != 358) {
/echo ${Yellow}Sadly, I appeared to have ${Red}DIED! ${Yellow}I'm sure my loss will be mourned. ${Red}Ending macro.
/endm
}
} else {
/echo ${Red}Something went wrong. I'm supposed to have gone to ${Yellow}Stone root falls ${Red}but EasyFind has failed me.
/end
}
/varset nowater 0
/varset dryland 0
/cleanup
}
/echo ${Yellow}Now for the turn-in!
/if (!${StepCompleted[8]} || !${StepCompleted[9]} || !${StepCompleted[10]} || !${StepCompleted[11]} || !${StepCompleted[12]} || !${StepCompleted[13]} || !${StepCompleted[14]}) {
|** Stoneroot Falls **|
/if (${Zone.ID} == 358) {
/call MoveToWait 335 -1289 2
/call CheckConnections "Undershore"
/if (${Macro.Return.Equal[TRUE]}) {
/call EasyFind "Undershore"
} else {
/echo ${Red}You are not in a zone connected to ${Yellow}Undershore! ${Red}Please Relocate!
/endm
}
}
|** Undershore **|
/if (${Zone.ID} == 362) {
/call CheckConnections "Corathus Creep - 1"
/if (${Macro.Return.Equal[TRUE]}) {
/call EasyFind "Corathus Creep - 1"
} else {
/echo ${Red}You are not in a zone connected to ${Yellow}Corathus Creep - 1! ${Red}Please Relocate!
/endm
}
}
|** Corathus Creep **|
/if (${Zone.ID} == 365) {
/call CheckConnections "Nektulos Forest"
/if (${Macro.Return.Equal[TRUE]}) {
/call EasyFind "Nektulos Forest"
} else {
/echo ${Red}You are not in a zone connected to ${Yellow}Nektulos Forest! ${Red}Please Relocate!
/endm
}
}
|** Nektulos Forest **|
/if (${Zone.ID} == 25) {
/call CheckConnections "Plane of Knowledge"
/if (${Macro.Return.Equal[TRUE]}) {
/call EasyFind "Plane of Knowledge"
} else {
/echo ${Red}You are not in a zone connected to ${Yellow}Nektulos Forest! ${Red}Please Relocate!
/endm
}
}
|** Plane of Knowledge **|
/if (${Zone.ID} == 202) {
/call NavToLoc -283 897 -93
/target id ${Spawn[npc Cedfer].ID}
/delay 2s ${Target.ID}
/call GiveItems "Common Bone Fish"
/call GiveItems "Common Angler Fish"
/call GiveItems "Common Blind Minnow"
/call GiveItems "Striped Cave Fish"
/call GiveItems "Vampire Flounder"
/call GiveItems "Deadly Crawfish"
/call GiveItems "Blind Catfish"
/delay 2s ${Cursor.ID}
/autoinv
/delay 2s !${Cursor.ID}
/echo \agCongrats on The Bone Rod
/if (!${Me.Inventory[mainhand].Name.Equal[${MyWeapon}]}) {
/call SwitchGear mainhand "${MyWeapon}"
}
/cleanup
/bc Done with InTheDark.mac
}
}
/return
Sub BuyItem(string itemToGet,int amount)
/echo ${Yellow}Buying ${Purple}${itemToGet} ${White}x${Green} ${amount}
/declare startingCount int local ${FindItemCount[${itemToGet}]}
/if (${Target.ID} && !${Window[MerchantWnd].Open}) {
/invoke ${Target.RightClick}
/delay 10s ${Window[MerchantWnd].Child[MW_ItemList].List[${itemToGet},2]}
/notify MerchantWnd MW_ItemList listselect ${Window[MerchantWnd].Child[MW_ItemList].List[${itemToGet},2]}
/delay 5
/nomodkey /notify MerchantWnd MW_Buy_Button leftmouseup
/delay 1s ${Window[QuantityWnd].Open}
/if (${Window[QuantityWnd].Open}) {
/notify QuantityWnd QTYW_Slider newvalue ${amount}
/notify QuantityWnd QTYW_Accept_Button leftmouseup
}
/delay 5s ${FindItemCount[${itemToGet}]}>${startingCount}
}
/return
Sub TakeInventory
/if (${FindItemCount[Cloudy Potion]} < 20) {
/if (${Me.Class.ShortName.Equal[NEC]} || ${Me.Class.ShortName.Equal[SHD]}) {
/if (!${Me.AltAbility[Cloak of Shadows]}) {
/varset BuyPotions TRUE
}
} else /if (${Me.Class.ShortName.Equal[BRD]}) {
/if (!${Me.AltAbility[Shauri's Sonorous Clouding]}) {
/varset BuyPotions TRUE
}
} else /if (${Me.Class.ShortName.Equal[MAG]} || ${Me.Class.ShortName.Equal[WIZ]} || ${Me.Class.ShortName.Equal[ENC]}) {
/if (!${Me.AltAbility[Perfected Invisibility]}) {
/if (!${Me.AltAbility[Group Perfected Invisibility]}) {
/varset BuyPotions TRUE
}
}
} else /if (${Me.Class.ShortName.Equal[SHM]}) {
/if (!${Me.AltAbility[Spirit Walk]}) {
/varset BuyPotions TRUE
}
} else /if (${Me.Class.ShortName.Equal[BST]}) {
/if (!${Me.AltAbility[Natural Invisibility]}) {
/varset BuyPotions TRUE
}
} else /if (${Me.Class.ShortName.Equal[RNG]} || ${Me.Class.ShortName.Equal[DRU]}) {
/if (${Me.AltAbility[Camouflage]}) {
/varset BuyPotions TRUE
}
} else {
/varset BuyPotions TRUE
}
}
/if (!${FindItemCount[Endless Worms]}) {
/if (${FindItemCount[Bait]} < 200) {
/varset BuyBait TRUE
}
} else {
/echo \ayI have Endless Worms so I don't need to buy bait.
}
/if (!${FindItemCount[Fisherman's Companion]}) {
/if (${FindItemCount[Fishing Pole]} < 10) {
/if (${Debugging}) /echo I only have ${FindItemCount[Fishing Pole]} poles and I want to have at least 5
/varset BuyPoles TRUE
}
} else {
/echo \ayI have Fisherman's Companion so I don't need to buy poles.
}
/return
Sub GiveItems(string itemToGive, int Amount)
/if (${Me.Invis}) {
/makemevisible
/delay 2s !${Me.Invis}
}
/if (!${Bool[${Amount}]}) /varset Amount 1
/if (${Debugging}) /echo "\aoGiving \ay${Amount} \aox \ap${itemToGive} \aoto \ag${Target.CleanName}"
/declare i int local 0
/keypress OPEN_INV_BAGS
/if (!${Window[InventoryWindow].Open}) /windowstate InventoryWindow open
/delay 10s ${Window[InventoryWindow].Open}
/delay 5
/for i 1 to ${Amount}
/nomodkey /ctrlkey /itemnotify ${FindItem[=${itemToGive}].InvSlot} leftmouseup
/invoke ${Target.LeftClick}
/delay 2s !${Cursor.ID}
/next i
/notify GiveWnd GVW_Give_Button leftmouseup
/delay 2s !${Window[GiveWnd].Open}
/return
Sub Combat
/if (${Debugging}) /echo Sub Combat Entry
/if (${Target.ID} && (${Target.Type.Equal[npc]} || ${Target.Type.Equal[pet]})) {
/if (${Navigation.Active}) /squelch /nav stop
/stick uw loose moveback behind 8
/setchattitle Killing ${Target.CleanName}
/if (${UseEQBC} && ${assistMe}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) killthis
/bca //target id ${Me.XTarget[1].ID}
/timed 10 /bca //pet attack
/timed 15 /bca //pet swarm
/timed 20 /bca //killthis
}
/killthis
:waitTillDead
/if (${Target.ID} && ${Me.CombatState.Equal[Combat]} && (${Target.Type.Equal[npc]} || ${Target.Type.Equal[pet]})) {
/if (!${Me.Combat}) /attack
/if (${Me.Class.CanCast}) {
/if (!${Defined[i]}) {
/declare i int local 0
}
/if (!${Me.Casting.ID}) {
/for i 1 to ${Me.NumGems}
/if (!${Me.XTarget}) /break
/if (${Me.Gem[${i}].ID}) {
/if (${Me.Gem[${i}].TargetType.Equal[Single]} && ${Me.Gem[${i}].SpellType.Equal[Detrimental]} !${Target.Buff[${Me.Gem[${i}].Name}].ID}) {
/cast ${i}
/delay 3s ${Me.Casting.ID}
/echo \agCasting \am${Me.Gem[${i}]} \aw--> \ar${Target.CleanName}
/delay ${Math.Calc[${Me.Gem[${i}].CastTime.TotalSeconds}+2].Int}s !${Me.Casting.ID}
}
}
/next i
}
}
/delay 10
/goto :waitTillDead
} else /if (${Target.Type.Equal[corpse]}) {
/target clear
/varset myTargetID 0
}
} else /if (${Me.XTarget[1].ID}) {
/if (${Spawn[id ${Me.XTarget[1].ID} radius 30 zradius 50].ID} && ${Spawn[id ${Me.XTarget[1].ID} radius 30 zradius 50].LineOfSight}) {
/if (${Navigation.Active}) /nav stop
/if (${UseEQBC} && ${assistMe}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target XTarget ${Spawn[id ${Me.XTarget[1].ID}].Name}
/bcaa //target id ${Me.XTarget[1].ID}
} else {
/target id ${Me.XTarget[1].ID}
}
/setchattitle Handling add, ${Spawn[${Me.XTarget[1].ID}].CleanName}
} else /if (${Spawn[id ${Me.XTarget[1].ID}].Distance} > 30 || !${Spawn[id ${Me.XTarget[1].ID} radius 30 zradius 50].LineOfSight}) {
/squelch /nav id ${Me.XTarget[1].ID}
/if (${UseEQBC} && !${Me.CombatState.Equal[Combat]}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target me and stick (FarmStuff1).
/bca //target id ${Me.ID}
/delay 5
/bca //stick 10 loose moveback uw
}
/setchattitle Navigating to add ${Spawn[id ${Me.XTarget[1].ID}].CleanName}
/while (${Spawn[${Me.XTarget[1].ID}].Distance} > 30) {
/if (!${Navigation.Active}) {
/squelch /nav id ${Me.XTarget[1].ID}
/if (${UseEQBC} && !${Me.CombatState.Equal[Combat]}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target me and stick (FarmStuff2).
/bca //target id ${Me.ID}
/delay 5
/bca //stick 10 loose moveback uw
}
}
/delay 10
/if (!${courseCorrection}) {
/squelch /nav id ${Me.XTarget[1].ID}
/varset courseCorrection ${courseCorrection.OriginalValue}
}
}
}
/if (${UseEQBC} && ${assistMe}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) killthis
/bca //target id ${Me.XTarget[1].ID}
/timed 10 /bca //pet attack
/timed 15 /bca //pet swarm
/timed 20 /bca //killthis
}
/killthis
/setchattitle Killing ${Target.CleanName}
/goto :waitTillDead
}
/if (${Debugging}) /echo Sub Combat Exit
/return
Sub ReturnToCampWait
/if (${Debugging}) /echo Sub ReturnToCampWait Entry
:ReturnToCamp
/if (${Math.Distance[${CampY}, ${CampX}, ${CampZ} : ${Spawn[id ${Me.XTarget[1].ID}].Y}, ${Spawn[id ${Me.XTarget[1].ID}].X}, ${Spawn[id ${Me.XTarget[1].ID}].Z}]} < ${CampRadius} && ${Me.XTarget} && ${Math.Distance[${Me.Y}, ${Me.X}, ${Me.Z} : ${CampY}, ${CampX}, ${CampZ}]} < ${CampRadius}) /return
/if (${Math.Distance[${Me.Y}, ${Me.X}, ${Me.Z} : ${CampY}, ${CampX}, ${CampZ}]} > 30) {
/if (${Debugging} && !${DebugRepeatTimer}) {
/echo \ayI'm More than 30 from camp. Returning to camp to wait for PullMob!
/varset DebugRepeatTimer ${DebugRepeatTimer.OriginalValue}
}
/if (!${Navigation.Active}) /nav loc ${CampY} ${CampX} ${CampZ}
/delay 5
/goto :ReturnToCamp
} else /if (${Math.Distance[${CampY}, ${CampX}, ${CampZ} : ${Spawn[id ${Me.XTarget[1].ID}].Y}, ${Spawn[id ${Me.XTarget[1].ID}].X}, ${Spawn[id ${Me.XTarget[1].ID}].Z}]} > ${CampRadius} && ${Me.XTarget}) {
/if (${Debugging}) {
/echo \atWaiting on ${Spawn[id ${Me.XTarget[1].ID}].Name} to arrive within ${CampRadius} of the camp location. CamptoMobDistance: ${Math.Distance[${CampY}, ${CampX}, ${CampZ} : ${Spawn[id ${Me.XTarget[1].ID}].Y}, ${Spawn[id ${Me.XTarget[1].ID}].X}, ${Spawn[id ${Me.XTarget[1].ID}].Z}]} > CampRadius: 60 && I have aggro: ${Me.XTarget}
/varset DebugRepeatTimer ${DebugRepeatTimer.OriginalValue}
}
/delay 5
/goto :ReturnToCamp
}
/if (${Debugging}) /echo Sub ReturnToCampWait Exit
/return
Sub CheckConnections(string Destination)
/if (${Debugging}) /echo Sub CheckConnections Entry
/declare i int local 0
/for i 0 to ${EasyFind.Items}
/if (${EasyFind.Item[${i}].Name.Equal[${Destination}]}) {
/if (${Debugging}) /echo Sub CheckConnections Exit
/return TRUE
}
/next i
/if (${Debugging}) /echo Sub CheckConnections Exit
/return FALSE
Sub EasyFind(Location)
/if (${Debugging}) /echo Sub EasyFind Entry
/setchattitle Traveling to ${Location}
/echo \ayUsing EasyFind to navigate to ${Location}
/declare i int local 0
:Traveling
/if (!${Navigation.Active}) {
/if (!${Window[FindLocationWnd].Open}) /keypress CTRL+F
/for i 1 to ${EasyFind.Items}
/if (${Window[FindLocationWnd].Child[FLW_FindLocationList].List[${i},2].Equal[${Location}]}) {
/notify FindLocationWnd FLW_FindLocationList listselect ${i}
/break
}
/next i
}
/delay 1s ${Navigation.Active}
/if (${startZone} == ${Zone.ID}) {
/if (${Location.Equal[${Zone}]}) /goto :Zone
/if (${Navigation.Active}) {
/if (${Me.XTarget[1].ID}) {
/if (${Navigation.Active}) /nav stop
/call FarmStuff
} else {
/if (${Zone.ID} != 202) {
/call CheckInvis
}
/call GroupDeathChk
/call GroupHealthChk
/call GroupEndChk
/call GroupManaChk
/call CheckMerc
}
/if (${Me.Combat} && !${Me.XTarget[1].ID} || ${Target.Type.Equal[corpse]}) /squelch /target clear
/delay 10
} else {
/if (${Me.XTarget[1].ID}) {
/if (${Navigation.Active}) /nav stop
/if (${UseEQBC}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target xtarget ${Spawn[id ${Me.XTarget[1].ID}].Name}
/bcaa //target id ${Me.XTarget[1].ID}
} else {
/target id ${Me.XTarget[1].ID}
}
/call FarmStuff
} else {
/if (${Zone.ID} != 202) {
/call CheckInvis
}
/call GroupDeathChk
/call GroupHealthChk
/call GroupEndChk
/call GroupManaChk
/call CheckMerc
}
/if (${Me.Combat} && !${Me.XTarget[1].ID}) /squelch /target clear
/echo startZone ${startZone} Zone.ID: ${Zone.ID}
/if (${startZone} == ${Zone.ID}) {
/goto :Traveling
}
/if (${UseEQBC} && !${Me.CombatState.Equal[Combat]}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target me and stick (WaitNav).
/bca //target id ${Me.ID}
/delay 5
/bca //stick 10 loose moveback uw behind
}
}
}
/if (${startZone} == ${Zone.ID}) /goto :Traveling
:Zone
/call Zoning
/if (${Debugging}) /echo Sub EasyFind Exit
/return
Sub MoveToWait(int Y, int X, int Z)
/if (${Debugging}) /echo Moving to ${Y} ${X} ${Z}
/if (${Debugging}) /echo Sub MoveToWait Entry
/moveto loc ${Y} ${X} ${Z}
/while (${MoveTo.Moving}) {
/delay 10
}
/if (${Debugging}) /echo Sub MoveToWait Exit
/return
Sub Zoning
/if (${Debugging}) /echo Sub Zoning Entry
:Zoning
/delay 2m ${Zone.ID}!=${startZone}
/target id ${Me.ID}
/delay 1s ${Target.ID}==${Me.ID}
/if (!${Navigation.MeshLoaded}) /goto :Zoning
/delay 5s
/varset startZone ${Zone.ID}
/squelch /target clear
/call CheckMesh
/if (${Debugging}) /echo Sub Zoning Exit
/return
Sub GetStep
/if (${Debugging}) /echo Sub GetStep Entry
/call OpenTaskWnd
/declare i int local 0
/for i 1 to ${StepCompleted.Size}
/if (${Window[TaskWnd].Child[TASK_TaskElementList].List[${i},2].Equal[Done]}) {
/if (!${StepCompleted[${i}]}) /echo ${Yellow}Setting Step ${i} as ${Green}completed
/varset StepCompleted[${i}] 1
} else {
/if (${Debugging}) /echo ${Yellow}Step ${i} is ${Red}not completed.
}
/next i
/if (${Debugging}) /echo Sub GetStep Exit
/return
Sub CheckThings
/if (${Debugging}) /echo Sub CheckThings Entry
/call CheckPlugin MQ2Nav
/call CheckMesh
/call CheckPlugin MQ2Melee
/call CheckPlugin MQ2EasyFind
|/call CheckPlugin MQ2EQBC
/if (${Endmac}) /end
/if (${Debugging}) /echo Sub CheckThings Exit
/return
Sub SwitchGear(string slot, string switchTo)
/if (!${Debugging}) /echo Sub SwitchGear Entry
/echo \aoSwitching \ap${switchTo} \aointo my \ay${slot}
/if (${FindItemCount[${switchTo}]}) {
/call OpenAllContainers
/delay 10
/nomodkey /ctrl /itemnotify ${FindItem[=${switchTo}].InvSlot} leftmouseup
/delay 2s ${Cursor.ID}
/nomodkey /itemnotify ${slot} leftmouseup
/delay 1s ${Me.Inventory[${slot}].Name.Equal[${switchTo}]}
/delay 1s ${Cursor.ID}
/autoinventory
}
/if (${Debugging}) /echo Sub SwitchGear Exit
/return
Sub FarmStuff(string Enemy)
/if (${Debugging}) /echo Farming Stuff Sub Entry
/if (${MyWeapon.Length}) {
/if (!${Me.Inventory[mainhand].Name.Equal[${MyWeapon}]}) {
/call SwitchGear mainhand "${MyWeapon}"
}
}
/varset CampX ${Me.X}
/varset CampY ${Me.Y}
/varset CampZ ${Me.Z}
/if (${Bool[${Enemy}]}) {
/varset FarmMob ${Enemy}
/if (${Debugging} && !${reportTarget}) {
/echo Looking for: ${FarmMob}
/varset reportTarget ${reportTarget.OriginalValue}
}
} else /if (!${reportTarget}) {
/echo Attacking anything I can get my grubby paws on.
/varset reportTarget ${reportTarget.OriginalValue}
}
:findMob
/if (${Target.Type.Equal[corpse]}) {
/if (${Target.ID} == ${myTargetID}) /varset myTargetID 0
/squelch /target clear
}
/if (${Window[RespawnWnd].Open}) /call GroupDeathChk
/if (!${Me.XTarget[1].ID}) {
/call GroupDeathChk
/call GroupHealthChk
/call GroupEndChk
/call GroupManaChk
}
/if (${Debugging}) /echo \aymyTargetID has an ID: ${Spawn[id ${myTargetID}].ID} - is a corpse: ${Spawn[id ${myTargetID}].Type.Equal[Corpse]} - I have an XTarget: !${Me.XTarget[1].ID}
/if (!${Spawn[id ${myTargetID}].ID} || ${Spawn[id ${myTargetID}].Type.Equal[Corpse]} && !${Me.XTarget[1].ID}) {
/if (${Debugging}) /echo "Getting a target!"
/varset myTargetID 0
/call TargetShortest
/if (${Debugging} && ${myTargetID}) /echo Target is ${Spawn[id ${myTargetID}]}
} else {
/if (${Debugging}) /echo \ayI have an XTarget so I'm going to set that as my target.
/varset myTargetID ${Me.XTarget[1].ID}
/call Combat
}
:navto
|/if (${Target.ID}) /squelch /target clear
/if (${Spawn[${myTargetID}].Distance} > ${If[${PullAbilityRange},${PullAbilityRange},1]} && !${Me.XTarget[1].ID} ${If[${PullRequiresLineOfSight}, || !${Spawn[${myTargetID}].LineOfSight},]}) {
/if (!${Spawn[${myTargetID}].ID}) {
/if (${Debugging}) /echo \ar My target ID was null, so I'm returning out of the sub.
/return
}
/if (${Debugging}) /echo \ayNavigating to ${Spawn[${myTargetID}].Name} ID: ${myTargetID} Distance: ${Spawn[${myTargetID}].Distance} > ${If[${PullAbilityRange},${PullAbilityRange},30]} - Line of Sight: ${Spawn[${myTargetID}].LineOfSight}
/call WaitNav ${myTargetID}
/delay 10
/echo Navigating to the enemy.
/goto :navto
} else /if (!${Target.ID} || ${Target.ID} != ${myTargetID} && ${Target.ID} != ${Me.ID} && ${myTargetID} != 0 && !${Me.XTarget[1].ID}) {
/target id ${myTargetID}
/if (${Navigation.Active}) /nav stop
}
/delay 5
/docommand ${If[${PullAbilityRange}>30,/stop,/stick moveback uw 10]}
/if (${Debugging}) /echo Sub FarmStuff Exit
/return
Sub TargetShortest
/if (${Debugging}) /echo Sub TargetShortest Entry
/declare PullTargetID int local 0
/declare Shortest int local 0
/if (!${Me.XTarget[1].ID}) {
|In order if I should even loop through to see how many mobs are in range I need to get a count based on my conditions
/declare MobsInRange int local ${SpawnCount[npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"]}
/if (${Debugging}) /echo There were ${MobsInRange} ${FarmMob} in radius of ${PullRange} and ZRad: ${ZRadius}.
/declare i int local 0
/declare j int local 1
/if (${MobsInRange}) {
/if (${MobsInRange} > 100) {
/if (!${Debugging}) /echo There were more than 100 mobs in range, cutting down the list.
/varset MobsInRange 100
}
|** PullList[#,1] = ID of mob, PullList[#,2] = PathLength **|
|I created an array and made it the size of the mobcount by the 2 to store each mob's ID and the length of their nav path
/declare PullList[${MobsInRange},2] int local 0
|I set i equal to 1 and I iterate through each mob
/for i 1 to ${MobsInRange}
|just in case something dies, I don't to result in NULL during my check producing results
|I also want to ignore mobs in the ignores section.
/if (${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].Name.NotEqual[NULL]} && !${Ini[${MobIgnore},${Zone.ShortName},Ignored].Find[${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].CleanName}|]}) {
|/echo \atFound one. Maybe, lets see if it has a path.
|If there is a path and only if there is a path will I enter the following block statement. This is done to avoid adding mobs to the array that don't have a path.
/if (${Navigation.PathExists[id ${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].ID}]} && ${Int[${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].Distance3D}]} <= ${Int[${Navigation.PathLength[id ${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].ID}]}]}) {
|** Before I add them to the pull list, let me also check that they still have 100% Hps. **|
/if (${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].PctHPs} == 100) {
|Now that I know this mob has a Navigation path, I need to add it to the array where ${j} is incremented only if I add a mob's ID and Path Length
|/echo Adding a mob to the pullList
/varset PullList[${j},1] ${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].ID}
/varset PullList[${j},2] ${Int[${Navigation.PathLength[id ${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].ID}]}]}
|If this is the first mob I've added to the array, it is now my target and it has the shortest path.
/if (${j}==1) {
/varset PullTargetID ${PullList[${j},1]}
/varset Shortest ${PullList[${j},2]}
} else /if (${PullList[${j},2]} < ${Shortest}) {
|Otherwise if the mob I added has a PathLength shorter that the current shortest Nav Path, make it my target and set it as the shortest.
/varset PullTargetID ${PullList[${j},1]}
/varset Shortest ${PullList[${j},2]}
}
|Since I added a mob I need to increment j by 1 in the PullList Array.
/varcalc j ${j}+1
}
} else {
/if (${Debugging}) {
/echo \at${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].Name} was not a valid pull target.
/echo \ar${Navigation.PathExists[id ${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].ID}]} && ${Int[${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].Distance3D}]} <= ${Int[${Navigation.PathLength[id ${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].ID}]}]})
}
}
}
|Check the next mob in the NearestSpawn meeting my conditions loop
/next i
|Now that I've exited the loop, the PullTargetID variable is the one I want to navigate to and kill.
/varset myTargetID ${PullTargetID}
|Set the chattitle of the MQ2 window to the macro's status (Suggestion by Kaen01)
/setchattitle Going to kill ${Spawn[id ${myTargetID}].CleanName}!
} else /if (${Me.Standing}) {
/if (!${Me.Casting.ID} && !${SitDelay}) {
/sit
/varset SitDelay ${SitDelay.OriginalValue}
}
}
} else {
/varset myTargetID ${Me.XTarget[1].ID}
/if (${Debugging}) /echo \atI had an XTarget and have set myTargetID: ${myTargetID} - ${Spawn[${myTargetID}].Name}
}
/if (${Debugging}) /echo Sub TargetShortest exit
/return
| --------------------------------------------------------------------------------------------
| SUB: GroupDeathChk
| --------------------------------------------------------------------------------------------
Sub GroupDeathChk
/if (${Debugging}) /echo Sub GroupDeathChk Entry
/if (${Me.State.Equal[DEAD]}) {
/echo \arYOU~ have died! Waiting for YOU to get off your face.
/setchattitle "You died, waiting for rez!"
/while (${Me.State.Equal[DEAD]} ) {
/delay 10
}
}
/if (${Me.XTarget[1].ID}) /return
/if (${Group}) {
/declare i int local
/for i 1 to ${Group}
/if (${Group.Member[${i}].State.Equal[DEAD]} ) {
/echo ${Group.Member[${i}].Name} has died. Waiting for them to get off their face.
/setchattitle "${Group.Member[${i}].Name} has died. Waiting for Rez"
/if (!${Me.XTarget[1].ID}) {
/if (${UseEQBC}) {
/bccmd names
}
/while (${Group.Member[${i}].State.Equal[DEAD]} && !${Me.XTarget[1].ID}) {
/if ((${Me.Standing}) && (!${Me.Casting.ID}) && (!${Me.Mount.ID})) /sit
/if (${UseEQBC}) {
/if (!${Defined[j]}) /declare j int local
/for j 0 to ${Group}
/if (${j} != ${i}) {
/if (${Debugging}) /echo \ayConnected to the server? : ${EQBC.Names.Find[${Group.Member[${j}].Name}]}
/if (${Group.Member[${j}].State.Equal[Stand]} && !${Group.Member[${j}].Type.Equal[Mercenary]} && !${Group.Member[${j}].State.Equal[DEAD]} && ${EQBC.Names.Find[${Group.Member[${j}].Name}]}) {
/echo ${Group.Member[${j}].Name} was connected to EQBC and not sitting. So I'm going to get them to sit.
/bct ${Group.Member[${j}].Name} //sit
}
}
/next j
}
/delay 10
}
/if (${UseEQBC}) {
/bcaa //stand
}
}
}
/next i
}
/if (${Debugging}) /echo Sub GroupDeathChk Exit
/return
Sub WhereAmI
/if (${Debugging}) /echo Sub WhereAmI Entry
/if (${Zone.ID} != 202) {
/call TaskCheck "Fish Eyes in the Dark"
/if (!${Macro.Return.Equal[TRUE]}) {
/echo \arYou need to be in Plane of Knowledge to get the task from Cedfer
/call EasyFind "Plane of Knowledge"
/delay 1s ${Navigation.Active}
/if (!${Navigation.Active}) {
/echo "${Red}You are not in Plane of Knowledge or a connecting zone. Ending macro."
/endm
}
}
} else {
/call TaskCheck "Fish Eyes in the Dark"
/if (!${Macro.Return.Equal[TRUE]}) {
/call GetTask
}
}
/if (${Debugging}) /echo Sub WhereAmI Exit
/return
Sub GetTask
/if (${Debugging}) /echo Sub GetTask Entry
/squelch /target clear
/call NavToLoc -283 897 -93
/target id ${Spawn[npc Cedfer].ID}
/delay 2s ${Target.ID}
/say Fish
/delay 5
/call AcceptTask
/delay 1s
/call TaskCheck "Fish Eyes in the Dark"
/if (${Debugging}) /echo Sub GetTask Exit
/return
Sub AcceptTask
/if (${Debugging}) /echo Sub AcceptTask Entry
/delay 5s ${Window[TaskSelectWnd].Open}
/notify TaskSelectWnd TSEL_AcceptButton leftmouseup
/delay 5s !${Window[TaskSelectWnd].Open}
/delay 5
/if (${Debugging}) /echo Sub AcceptTaskExit
/return
Sub CheckMerc
/if (${Debugging}) /echo Sub CheckMerc Entry
/if (${Mercenary.State.Equal[DEAD]} && ${UseMerc}) {
/echo Your mercenary has died. Waiting to be able to revive them.
:waitForMerc
/if (${Group} && ${Window[MMGW_ManageWnd].Child[MMGW_SuspendButton].Tooltip.Equal[Revive your current mercenary.]} && ${Window[MMGW_ManageWnd].Child[MMGW_SuspendButton].Enabled}) /notify MMGW_ManageWnd MMGW_SuspendButton leftmouseup
/if (${Mercenary.State.Equal[DEAD]} && !${Me.XTarget[1].ID}) /goto :waitForMerc
}
/if (${Debugging}) /echo Sub CheckMerc Exit
/return
Sub NavToLoc(int Y,int X,int Z)
/if (${Debugging}) /echo Sub NavToLoc Entry
/if (${Debugging}) /echo Entering Sub NavToLoc for ${Y} ${X} ${Z} at Line: ${Macro.CurLine}
/while (${Math.Distance[${Me.Y}, ${Me.X}, ${Me.Z}: ${Y}, ${X}, ${Z}]} > 15) {
/if (${Navigation.Active}) {
/if (${Me.XTarget[1].ID}) {
/if (${Navigation.Active}) /nav stop
/call FarmStuff
} else {
/if (${Zone.ID} != 202) {
/call CheckInvis
}
/call GroupDeathChk
/call GroupHealthChk
/call GroupEndChk
/call GroupManaChk
/call CheckMerc
}
/if (${Me.Combat} && !${Me.XTarget[1].ID}) /squelch /target clear
/delay 10
} else {
/if (${Me.XTarget[1].ID}) {
/if (${Navigation.Active}) /nav stop
/call FarmStuff
} else {
/if (${Zone.ID} != 202) {
/call CheckInvis
}
/call GroupDeathChk
/call GroupHealthChk
/call GroupEndChk
/call GroupManaChk
/call CheckMerc
}
/if (${Me.Combat} && !${Me.XTarget[1].ID}) /squelch /target clear
/nav loc ${Y} ${X} ${Z}
}
}
/if (${Navigation.Active}) /nav stop
/if (${Debugging}) /echo Sub NavToLoc Exit
/return
Sub WaitNav(NavTargetID)
/if (${Debugging}) /echo Sub WaitNav Entry
/if (${Debugging}) /echo \agEntering Sub WaitNav for ${Spawn[id ${NavTargetID}].Y} ${Spawn[id ${NavTargetID}].X} ${Spawn[id ${NavTargetID}].Z} at Line: ${Macro.CurLine}
/if (!${Spawn[id ${NavTargetID}].ID}) /return
/while (${Spawn[id ${NavTargetID}].Distance} > ${If[${PullAbilityRange},${PullAbilityRange},30]} || !${Spawn[${myTargetID}].LineOfSight}) {
/if (!${Spawn[id ${NavTargetID}].ID}) /return
/if (${Navigation.Active}) {
/if (${Me.XTarget[1].ID}) {
/if (${Navigation.Active}) /nav stop
/call FarmStuff
} else {
/if (${Zone.ID} != 202) {
/call CheckInvis