-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFarm.mac
More file actions
1663 lines (1609 loc) · 67.7 KB
/
Farm.mac
File metadata and controls
1663 lines (1609 loc) · 67.7 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
|||||||||||||||||||||||||||||||||||||||||||||||||||
|Farm.mac by Chatwiththisname
|v1.21 ~ Initial release 2/15/2018
| ~ Ignores Update 3/15/2018
| ~ Now generates a quick list of named, merchants,
| bankers, and NPCs, as well as a permanent ignore list
| that you can easily copy/paste from other list per zone.
| ~ Now features /permignore to add things to the permanent
| ignore list in FarmMobIgnored.ini [${Zone.ShortName}]
| Ignores=|mob1|mob2|mob3| etc. NOTE: /ignorethese and
| /ignorethis is temporary and uses alert lists which reset
| when you leave. You can access a list of temporarily ignored
| mobs by typing /alert list 1
| ~ 3/15/2018
| ~ Now includes a UseEQBC & assistMe boolean in the declares sub found
| in the last sub of the code. UseEQBC will tell your crew to follow
| you every time you issue a navigation command. assistMe will tell
| your crew to target the same mobs, and assist with killing it.
| This assumes you are farming lowbie crap, and thus there is no
| required hp for engaging, it's immediate and often your group will
| engage first because the macro runner is waiting for the navigation
| path to finish. If you just want them to follow you for EXP or loot
| just turn on UseEQBC, if you want them to help kill, turn on assistMe
| WARNING: You -definitely- look like a bot with assistMe this lol.
| ~ Now verifies your starting zone and will end the macro if you change zones
| now includes useCamp boolean to know if you want to /exit when you leave
| your starting zone. If UseEQBC is TRUE it will /exit all other toons on
| the EQBC Server, that said, make sure that's what you want to do when using
| this feature.
| ~ 1/15/2019
| ~ Was an issue with new PullAbility setup and PullAbilityRange being read when
| there was no PullAbility setup. Fixed it so that it wouldn't stop at 150 default
| before reissuing nav.
| ~ Added a basic check for mob to already have a debuff on it before casting a spell....
| my BL was chain casting slow. Thought I had added this already, but guess not.
| ~ If you cut a name out of the FarmMobIgnored.ini list and paste it into the ignore list, it
| won't repopulate into it's respective list again, should help see what you haven't put on the
| permanent ignore list.
| ~ Creatures on the NamedList should not longer also populate the NPC list in FarmMobIgnored.ini
| ~ Found the elusive "there are no spawns matching: (0-200) any" bug, where it would get stuck in
| a loop. and made corrections to two while loops to break out if the player didn't have a
| target, or the spawn didn't exist anymore.
|
|Usage: /mac Farm radius target ~~ /mac farm 500 pyrilen
| /mac farm radius ~~ /mac farm 1000
|
|
|Purpose: Will kill and move anything forever in a radius
| near you. It -WILL- navigate the entire zone.
| IE: Used in RSS I started at entrance, come back
| an hour later and I was doing the raid mobs.
|
| If you provide it a target's partial/full name it will
| only hunt down those creatures. But it will react to adds.
|
| /ignorethis to ignore your current target only.
| /ignorethese to ignore all spawns with your targets full name.
| /permignore to permanently ignore all spawns with your targets full name.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
#bind AddToIgnore /ignorethese
#bind AddThisIgnore /ignorethis
#bind PermIgnore /permignore
#bind FarmCommand /farm
|#bind showignored /showignored
Sub Main(int Param0, string Param1)
/declare PullRange int outer ${Param0}
/declare FarmMob string outer ${Param1}
/declare i int local 2
/while (${Defined[Param${i}]}) {
/varset FarmMob "${FarmMob} ${Param${i}}"
/varcalc i ${i}+1
/if (!${Defined[Param${i}]}) /break
}
/call Declares ${Param0} "${Param1}"
/if (${Bool[${FarmMob}]}) {
/echo Attempting to farm ${FarmMob}.
} else {
/echo Attacking anything I can get my grubby paws on.
}
/echo Usage: /mac farm radius mobstring, example: /mac farm 10000 cave bear
/call GenerateList
/if (${Debugging}) /delay 2s
/if (${UseEQBC} && !${Me.CombatState.Equal[Combat]}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target me and stick (WaitNav).
/bcg //target id ${Me.ID}
/delay 5
/bcg //stick 10 loose moveback uw behind
}
/while (${EverQuest.GameState.Equal[INGAME]}) {
/if (${Zone.ID} != ${startZone}) /break
/if (!${Paused}) {
/if (!${Me.Pet.ID} && ${Me.Class.CanCast}) {
/call SummonPet
}
/call Farmstuff "${FarmMob}"
}
/call BindCheck
}
/if (${useLogOut} && ${Zone.ID} != ${startZone}) {
/if (${UseEQBC}) /bcg //exit
/exit
}
/return
:OnExit
/squelch /nav stop
/squelch /alias /showignored delete
/if (${Debugging}) /invoke ${Macro.Undeclared}
/setchattitle MQ2
/end
Sub TargetShortest
/declare PullTargetID int local 0
/declare Shortest int local 0
/if (!${Me.XTarget[1].ID}) {
/declare MobsInRange int local ${SpawnCount[npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"]}
/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 **|
/declare PullList[${MobsInRange},2] int local 0
/for i 1 to ${MobsInRange}
/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}|]}) {
/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}]}]}) {
/if (${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].PctHPs} == 100) {
/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 (${j}==1) {
/varset PullTargetID ${PullList[${j},1]}
/varset Shortest ${PullList[${j},2]}
} else /if (${PullList[${j},2]} < ${Shortest}) {
/varset PullTargetID ${PullList[${j},1]}
/varset Shortest ${PullList[${j},2]}
}
/varcalc j ${j}+1
}
} else {
/if (${Debugging}) {
/squelch /echo \at${NearestSpawn[${i},npc noalert 1 targetable radius ${PullRange} zradius ${ZRadius} "${FarmMob}"].Name} was not a valid pull target.
/squelch /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}]}]}
}
}
}
/next i
/if (${PullTargetID}) {
/varset myTargetID ${PullTargetID}
/setchattitle Going to kill ${Spawn[id ${myTargetID}].CleanName}!
}
} else /if (${Me.Standing}) {
/if (!${Me.Casting.ID} && !${SitDelay} && !${Me.Moving} && !${Me.Mount.ID}) {
/sit
/varset SitDelay ${SitDelay.OriginalValue}
}
}
} else /if (!${Me.XTarget[1].Type.Equal[Corpse]}) {
/varset myTargetID ${Me.XTarget[1].ID}
}
/return
| --------------------------------------------------------------------------------------------
| SUB: GroupManaChk
| --------------------------------------------------------------------------------------------
Sub GroupManaChk
/if (${Me.XTarget[1].ID}) /return
/if (!${Me.Combat}) {
/setchattitle "Group Mana Check"
/if (${Me.PctMana} < ${MedAt} && ${Me.Class.CanCast} && !${Me.State.Equal[DEAD]}) {
/echo \arYOU are low on mana!
/setchattitle "Waiting on YOUR mana to reach ${MedTill}%"
/if (!${Me.XTarget[1].ID}) {
/if (${UseEQBC}) {
/bccmd names
}
/while (${Me.PctMana} < ${MedTill} && !${Me.XTarget[1].ID} && !${Me.State.Equal[DEAD]}) {
/doevents
/if (${Me.Standing} && !${Me.Casting.ID} && !${Me.Mount.ID} && !${SitDelay}) {
/sit
/varset SitDelay ${SitDelay.OriginalValue}
}
/if (${UseEQBC}) {
/if (!${Defined[j]}) /declare j int local
/for j 1 to ${Group}
/if (${Debugging}) /echo \ayConnect to the server? : ${EQBC.Names.Find[${Group.Member[${j}].Name}]}
/if (${Group.Member[${j}].State.Equal[Stand]} && !${Group.Member[${j}].Type.Equal[Mercenary]} && ${EQBC.Names.Find[${Group.Member[${j}].Name}]} && !${SitDelay}) {
/bct ${Group.Member[${j}].Name} //sit
/varset SitDelay ${SitDelay.OriginalValue}
}
/next j
}
/call BindCheck
/delay 2
}
/if (${UseEQBC}) {
/bcga //stand
}
}
}
/if (${Group}) {
/declare i int local
/for i 1 to ${Group}
/if ((${Group.Member[${i}].PctMana} < ${MedAt}) && ${Group.Member[${i}].Class.CanCast} && !${Group.Member[${i}].State.Equal[DEAD]}) {
/doevents
/echo \ar${Group.Member[${i}].Name} is low on mana!
/setchattitle "Waiting on ${Group.Member[${i}].Name}'s mana to reach ${MedTill}%"
/if (!${Me.XTarget[1].ID}) {
/if (${UseEQBC}) {
/bccmd names
}
/while (${Group.Member[${i}].PctMana} < ${MedTill} && !${Me.XTarget[1].ID} && !${Group.Member[${i}].State.Equal[DEAD]}) {
/if (${Me.Standing} && !${Me.Casting.ID} && !${Me.Mount.ID} && !${Me.Moving}) {
/sit
/varset SitDelay ${SitDelay.OriginalValue}
}
/if (${UseEQBC}) {
/if (!${Defined[j]}) /declare j int local
/for j 1 to ${Group}
/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}]} && !${SitDelay}) {
/if (${Debugging}) /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
/varset SitDelay ${SitDelay.OriginalValue}
}
/next j
}
/call BindCheck
/delay 2
}
/if (${UseEQBC}) {
/bcga //stand
}
}
}
/next i
}
}
/return
| --------------------------------------------------------------------------------------------
| SUB: GroupHealthChk
| --------------------------------------------------------------------------------------------
Sub GroupHealthChk
/if (${Me.XTarget[1].ID}) /return
/setchattitle "GroupHealthCheck"
/if (!${Me.Combat}) {
/if (${Me.PctHPs} < ${HealAt} && !${Me.State.Equal[DEAD]}) {
/echo \arYOU are low on Health!
/setchattitle "Waiting on YOUR health to reach ${HealTill}%"
/if (!${Me.XTarget[1].ID}) {
/if (${UseEQBC}) {
/bccmd names
}
/while (${Me.PctHPs} < ${HealTill} && !${Me.XTarget[1].ID} && !${Me.State.Equal[DEAD]}) {
/doevents
/if (${Me.Standing} && !${Me.Moving} && !${Me.Casting.ID} && !${Me.Mount.ID} && !${SitDelay}) {
/sit
/varset SitDelay ${SitDelay.OriginalValue}
}
/if (${UseEQBC}) {
/if (!${Defined[j]}) /declare j int local
/for j 1 to ${Group}
/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}]} && !${SitDelay}) {
/if (${Debugging}) /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
/varset SitDelay ${SitDelay.OriginalValue}
}
/next j
}
/call BindCheck
/delay 2
}
/if (${UseEQBC}) {
/bcga //stand
}
}
}
/if (${Group}) {
/declare i int local
/for i 1 to ${Group}
/if (${Group.Member[${i}].ID}) {
/if (${Group.Member[${i}].PctHPs} < ${HealAt} && !${Group.Member[${i}].State.Equal[DEAD]}) {
/echo ${Group.Member[${i}].Name} is low on Health!
/setchattitle "Waiting on ${Group.Member[${i}].Name} health to reach ${HealTill}%"
/if (!${Me.XTarget[1].ID}) {
/if (${UseEQBC}) {
/bccmd names
}
/while (${Group.Member[${i}].PctHPs} < ${HealTill} && !${Me.XTarget[1].ID} && !${Group.Member[${i}].State.Equal[DEAD]}) {
/doevents
/if (${Me.Standing} && !${Me.Moving} && !${Me.Casting.ID} && !${Me.Mount.ID} && !${SitDelay}) {
/sit
/varset SitDelay ${SitDelay.OriginalValue}
}
/if (${UseEQBC}) {
/if (!${Defined[j]}) /declare j int local
/for j 0 to ${Group}
/if (!${SitDelay} && ${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
/varset SitDelay ${SitDelay.OriginalValue}
}
/next j
}
/call BindCheck
/delay 2
}
/if (${UseEQBC}) {
/bcga //stand
}
}
}
}
/next i
}
}
/return
| --------------------------------------------------------------------------------------------
| SUB: GroupEndChk
| --------------------------------------------------------------------------------------------
Sub GroupEndChk
/if (${Me.XTarget[1].ID}) /return
/setchattitle "GroupEnduranceCheck"
/if (!${Me.Combat}) {
/if (${Me.PctEndurance} < ${MedEndAt} && !${Me.State.Equal[DEAD]}) {
/echo \arYOU are low on Endurance!
/setchattitle "Waiting on YOUR Endurance to reach ${MedEndTill}%"
/if (!${Me.XTarget[1].ID}) {
/if (${UseEQBC}) {
/bccmd names
}
/while (${Me.PctEndurance} < ${MedEndTill} && !${Me.XTarget[1].ID} && !${Me.State.Equal[DEAD]}) {
/doevents
/if (${Me.Standing} && !${Me.Moving} && !${Me.Casting.ID} && !${Me.Mount.ID} && !${SitDelay}) {
/sit
/varset SitDelay ${SitDelay.OriginalValue}
}
/if (${UseEQBC}) {
/if (!${Defined[j]}) /declare j int local
/for j 1 to ${Group}
/if (!${SitDelay} && ${Group.Member[${j}].State.Equal[Stand]} && !${Group.Member[${j}].Type.Equal[Mercenary]} && ${EQBC.Names.Find[${Group.Member[${j}].Name}]}) {
/bct ${Group.Member[${j}].Name} //sit
/varset SitDelay ${SitDelay.OriginalValue}
}
/next j
}
/call BindCheck
/delay 2
}
/if (${UseEQBC}) {
/bcga //stand
}
}
}
/if (${Group}) {
/declare i int local
/for i 1 to ${Group}
/if (${Group.Member[${i}].ID}) {
/if (${Group.Member[${i}].PctEndurance} < ${MedEndAt} && !${Group.Member[${i}].State.Equal[DEAD]}) {
/echo \ar${Group.Member[${i}].Name} is low on Endurance!
/setchattitle "Waiting on ${Group.Member[${i}].Name} Endurance to reach ${MedEndTill}%"
/if (!${Me.XTarget[1].ID}) {
/if (${UseEQBC}) {
/bccmd names
}
/while (${Group.Member[${i}].PctEndurance} < ${MedEndTill} && !${Me.XTarget[1].ID} && !${Group.Member[${i}].State.Equal[DEAD]}) {
/doevents
/if (${Me.Standing} && !${Me.Moving} && !${Me.Casting.ID} && !${Me.Mount.ID}) {
/sit
/varset SitDelay ${SitDelay.OriginalValue}
}
/if (${UseEQBC}) {
/if (!${Defined[j]}) /declare j int local
/for j 0 to ${Group}
/if (!${SitDelay} && ${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
/varset SitDelay ${SitDelay.OriginalValue}
}
/next j
}
/call BindCheck
/delay 2
}
/if (${UseEQBC}) {
/bcga //stand
}
}
}
}
/next i
}
}
/return
| --------------------------------------------------------------------------------------------
| SUB: GroupDeathChk
| --------------------------------------------------------------------------------------------
Sub GroupDeathChk
/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]} ) {
/call BindCheck
/delay 2
}
}
/if (${Me.XTarget[1].ID}) /return
/if (${Group}) {
/declare i int local
/for i 1 to ${Group}
/if (${Group.Member[${i}].Mercenary} && !${Group.Member[${i}].ID}) {
/echo Mercenary is dead.
/while (!${Group.Member[${i}].ID}) {
/if (!${Window[MMGW_ManageWnd].Open}) {
/merc
} else {
/if (${Window[MMGW_ManageWnd].Child[MMGW_SuspendButton].Text.Equal[Revive]}) {
/notify MMGW_ManageWnd MMGW_SuspendButton leftmouseup
/delay 1s
/break
}
}
/delay 5
}
}
/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}) {
/doevents
/if (${Me.Standing} && !${Me.Moving} && !${Me.Casting.ID} && !${Me.Mount.ID} && !${SitDelay}) {
/sit
/varset SitDelay ${SitDelay.OriginalValue}
}
/if (${UseEQBC}) {
/if (!${Defined[j]}) /declare j int local
/for j 0 to ${Group}
/if (${j} != ${i}) {
/if (${Debugging}) /echo \ayConnect 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}]} && !${SitDelay}) {
/bct ${Group.Member[${j}].Name} //sit
/varset SitDelay ${SitDelay.OriginalValue}
}
}
/next j
}
/call BindCheck
/delay 2
}
}
}
/next i
}
/return
Sub WaitNav(NavTargetID, distance)
/if (${Debugging} && ${distance}) /echo Distance from mob nav target to stop: ${distance}
:keepGoing
/call BindCheck
/if (${Debugging}) /echo NavTest Variables: [SpawnHasID]${Spawn[id ${NavTargetID}].ID} [Distance from mob]${Spawn[id ${NavTargetID}].Distance} > [Distance To Stop]${If[${distance},${distance},20]} || [Line Of Sight]!${Spawn[id ${NavTargetID}].LineOfSight}
/if (${Spawn[id ${NavTargetID}].ID} && (${Spawn[id ${NavTargetID}].Distance} > ${If[${distance},${distance},20]} || !${Spawn[id ${NavTargetID}].LineOfSight})) {
/if (${Navigation.Active}) {
/if (${Me.XTarget[1].ID}) {
/if (${Navigation.Active}) /squelch /nav stop
/call FarmStuff
} else {
/call GroupDeathChk
/call GroupHealthChk
/call GroupEndChk
/call GroupManaChk
/call CheckMerc
}
/if (${Me.Combat} && !${Me.XTarget[1].ID}) /squelch /target clear
/if (!${courseCorrection}) {
/if (${Navigation.PathExists[id ${NavTargetID}]}) /squelch /nav id ${NavTargetID}
/varset courseCorrection ${courseCorrection.OriginalValue}
}
/delay 5
} else {
/if (${Me.XTarget[1].ID}) {
/if (${Navigation.Active}) /squelch /nav stop
/if (${UseEQBC}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target xtarget ${Spawn[id ${Me.XTarget[1].ID}].Name}
/bcga //target id ${Me.XTarget[1].ID}
} else {
/target id ${Me.XTarget[1].ID}
}
/call FarmStuff
} else /if (!${Target.ID} && ${Spawn[${myTargetID}].LineOfSight} && ${Spawn[${myTargetID}].Distance3D} < 100) {
/target id ${myTargetID}
/delay 2s ${Target.ID}==${myTargetID}
/killthis
} else {
/call GroupDeathChk
/call GroupHealthChk
/call GroupEndChk
/call GroupManaChk
/call CheckMerc
}
/if (${Me.Combat} && !${Me.XTarget[1].ID}) /squelch /target clear
/if (${Navigation.PathExists[id ${NavTargetID}]}) /squelch /nav id ${NavTargetID}
/if (${UseEQBC} && !${Me.CombatState.Equal[Combat]}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target me and stick (WaitNav).
/bcg //target id ${Me.ID}
/delay 5
/bcg //stick 10 loose moveback uw behind
}
}
}
/if (${Spawn[id ${NavTargetID}].ID} && (${Spawn[id ${NavTargetID}].Distance} > ${If[${distance},${distance},20]} || !${Spawn[id ${NavTargetID}].LineOfSight})) /goto :keepGoing
/if (${Debugging}) /echo Stopped Distance from Target: ${Spawn[id ${NavTargetID}].Distance}
/if (${Navigation.Active}) /squelch /nav stop
:target
/call BindCheck
/if (${UseEQBC} && ${assistMe}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target NavTarget ${Spawn[id ${NavTargetID}].Name}
/bcga //target id ${NavTargetID}
} else {
/target id ${NavTargetID}
}
/delay 2s ${Target.ID}==${NavTargetID}
/if (${Target.ID} != ${NavTargetID} && ${Spawn[id ${NavTargetID}].ID}) {
/goto :target
}
/return
Sub NavToLoc(int Y,int X,int Z)
/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 {
/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 {
/call GroupDeathChk
/call GroupHealthChk
/call GroupEndChk
/call GroupManaChk
/call CheckMerc
}
/if (${Me.Combat} && !${Me.XTarget[1].ID}) /squelch /target clear
/if (${Navigation.PathExists[loc ${Y} ${X} ${Z}]}) /nav loc ${Y} ${X} ${Z}
}
}
/if (${Navigation.Active}) /nav stop
/return
Sub FarmStuff(string Enemy)
/if (${Bool[${Enemy}]}) {
/varset FarmMob "${Enemy}"
/if (${Debugging} && !${reportTarget}) {
/echo Looking for: ${FarmMob}
/varset reportTarget ${reportTarget.OriginalValue}
}
} else /if (!${reportTarget}) {
/squelch /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} || !${Window[RespawnWnd].Open}) {
/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}) {
/varset myTargetID 0
/call TargetShortest
/if (${Debugging} && ${myTargetID} && ${Spawn[id ${myTargetID}].Type.NotEqual[corpse]}) /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 (${Debugging}) /echo ${Spawn[${myTargetID}].Distance} > ${If[${PullAbilityRange},${PullAbilityRange},1]} && !${Me.XTarget[1].ID} ${If[${PullRequiresLineOfSight}, || !${Spawn[${myTargetID}].LineOfSight},]}
/if (${Spawn[${myTargetID}].Distance} > ${If[${PullAbilityRange},${PullAbilityRange},1]} && !${Me.XTarget[1].ID} ${If[${PullRequiresLineOfSight}, || !${Spawn[id ${myTargetID}].LineOfSight},]}) {
/if (!${Bool[${Spawn[${myTargetID}].ID}]}) {
|/if (${Debugging}) /echo \ar My target ID was null, so I'm returning out of the sub.
/varset myTargetID 0
/return
}
/echo \ayNavigating to \aw--> \ap${Spawn[${myTargetID}].CleanName}
/call WaitNav ${myTargetID} ${PullAbilityRange}
/delay 10
/goto :navto
} else /if (!${Target.ID} && ${Target.ID} != ${myTargetID} && ${Target.ID} != ${Me.ID} && ${myTargetID} != 0 && !${Me.XTarget[1].ID}) {
/if (${Debugging}) /echo I'm targeting ${Spawn[${myTargetID}].CleanName} ID: ${myTargetID}
/if (${UseEQBC} && ${assistMe}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target myTargetID ${Spawn[id ${myTargetID}].Name}
/bcga //target id ${myTargetID}
} else {
/target id ${myTargetID}
}
/delay 1s ${Target.ID}==${myTargetID}
}
/delay 5
/if (${PullCommand.Length}) {
/call PullAbility
} else {
/call WaitNav ${myTargetID} 20
/call Combat
}
/return
Sub Combat
/if (${Target.ID} && (${Target.Type.Equal[npc]} || ${Target.Type.Equal[pet]})) {
/if (${Navigation.Active}) /squelch /nav stop
/if (!${Me.Class.PureCaster}) /stick uw loose moveback behind 8
/setchattitle Killing ${Target.CleanName}
/if (${UseEQBC} && ${assistMe}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) killthis
/timed 10 /bcg //pet attack
/timed 15 /bcg //pet swarm
/timed 20 /bcg //killthis
}
/pet attack
/pet swarm
/killthis
:waitTillDead
/if (${Navigation.Active}) /squelch /nav stop
/call BindCheck
/if (${Me.Sitting}) /stand
/if (${Target.ID} && ${Me.CombatState.Equal[Combat]} && ${Target.Type.Equal[npc]}) {
/if (!${Me.Combat}) /attack
/if (${Me.Class.CanCast}) {
/if (${CastDetrimental}) {
/if (${Navigation.PathExists[id ${Target.ID}]}) {
/while (!${Target.LineOfSight}) {
/call WaitNav ${Target.ID} ${Math.Calc[${Target.Distance}*0.80].Int}
/delay 2
/call BindCheck
/if (!${myTargetID} || !${Spawn[id ${myTargetID}].ID}) /break
}
} else {
/while (!${Target.LineOfSight}) {
/if (!${MoveTo.Moving}) /moveto id ${Target.ID}
/delay 3s ${Target.LineOfSight}
/stop
/call BindCheck
/if (!${myTargetID} || !${Spawn[id ${myTargetID}].ID}) /break
}
}
/call CastDetrimentalSpells
}
}
/delay 3
/goto :waitTillDead
} else /if (${Target.Type.Equal[corpse]}) {
/squelch /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}) /squelch /nav stop
/if (${UseEQBC} && ${assistMe}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target XTarget ${Spawn[id ${Me.XTarget[1].ID}].Name}
/bcga //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}) {
/if (${Navigation.PathExists[id ${Me.XTarget[1].ID}]}) /squelch /nav id ${Me.XTarget[1].ID}
/if (${UseEQBC} && !${Me.CombatState.Equal[Combat]}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target me and stick (FarmStuff1).
/bcg //target id ${Me.ID}
/delay 5
/bcg //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}) {
/if (${Navigation.PathExists[id ${Me.XTarget[1].ID}]}) /squelch /nav id ${Me.XTarget[1].ID}
/if (${UseEQBC} && !${Me.CombatState.Equal[Combat]}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) target me and stick (FarmStuff2).
/bcg //target id ${Me.ID}
/delay 5
/bcg //stick 10 loose moveback uw
}
}
/delay 10
/if (!${courseCorrection}) {
/if (${Navigation.PathExists[id ${Me.XTarget[1].ID}]}) /squelch /nav id ${Me.XTarget[1].ID}
/varset courseCorrection ${courseCorrection.OriginalValue}
}
}
}
/if (${UseEQBC} && ${assistMe}) {
/if (${Debugging}) /bc (Line: ${Macro.CurLine}) killthis
/timed 10 /bcg //pet attack
/timed 15 /bcg //pet swarm
/timed 20 /bcg //killthis
}
/pet attack
/pet swarm
/killthis
/setchattitle Killing ${Target.CleanName}
/goto :waitTillDead
}
/return
Sub CastDetrimentalSpells
/declare i int local 0
/if (!${Me.Casting.ID}) {
/for i 1 to 13
/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}) {
/if (${Target.Buff[${Me.Gem[${i}].Name}].ID}) /continue
/if (${Me.GemTimer[${i}]}) /continue
/if (${Target.ID}) /face fast
/if (${Target.ID}) /cast ${i}
/if (${Target.ID}) /delay 3s ${Me.Casting.ID}
/if (${Target.ID}) /echo \agCasting \am${Me.Gem[${i}]} \aw--> \ar${Target.CleanName}
/if (${Target.ID}) /delay ${Math.Calc[${Me.Gem[${i}].CastTime.TotalSeconds}+2].Int}s !${Me.Casting.ID}
}
}
/next i
}
/return
Sub CastHealingSpells
/if (${Me.Group}) {
/declare i int local 0
/for i 1 to 13
/if (${Me.Gem[${i}].ID}) {
/if (${Me.Gem[${i}].TargetType.Equal[Single]} && ${Me.Gem[${i}].SpellType.Equal[Benificial]}) {
}
}
/next i
}
/return
Sub PullAbility
/docommand ${If[${PullAbilityRange}>30,/if (${Navigation.Active}) /nav stop,/if (!${Me.Class.PureCaster}) /stick moveback uw 10]}
:PullAbility
/call BindCheck
/if (${Spawn[${myTargetID}].Distance} > ${If[${PullAbilityRange},${PullAbilityRange},1]} && !${Me.XTarget[1].ID} || !${Spawn[${myTargetID}].LineOfSight}) /return
|/if (${Debugging}) /echo \ayPull Ability - Ability: ${Me.AbilityReady[${PullAbility}]} || Spell: ${Me.SpellReady[${PullAbility}]} || AltAbility: ${Me.AltAbilityReady[${PullAbility}]} || CombatAbility: ${Me.CombatAbilityReady[${PullAbility}]}
/if (${Me.AbilityReady[${PullAbility}]} || ${Me.SpellReady[${PullAbility}]} || ${Me.AltAbilityReady[${PullAbility}]} || ${Me.CombatAbilityReady[${PullAbility}]} || ${PullAbility.Equal[pet]} || !${FindItem[=${PullAbility}].TimerReady}) {
/if (${Debugging}) /echo \arShould be issuing the PullCommand ${PullCommand}
/if (!${Me.XTarget} && ${PullAbility.NotEqual[pet]}) {
/docommand ${PullCommand}
} else /if (${PullAbility.Equal[pet]}) {
/call PetPull
}
}
/if (${Me.XTarget}) {
/squelch /target id ${Me.XTarget[1].ID}
/delay 2s ${Target.ID}==${Me.XTarget[1].ID}
/if (${Target.ID} != ${myTargetID}) /varset myTargetID ${Target.ID}
/call Combat
} else /if (${Spawn[id ${myTargetID}].Type.NotEqual[Corpse]} && ${Spawn[id ${myTargetID}].ID}) {
|/if (${Debugging}) /echo \aymyTargetID not a corpse: ${Spawn[id ${myTargetID}].Type.NotEqual[Corpse]} - Has an ID: ${Spawn[id ${myTargetID}].ID} == ${myTargetID}
/delay 1s ${Me.XTarget[1].ID}
/goto :PullAbility
}
/return
Sub CheckMerc
/if (${Mercenary.State.Equal[DEAD]} && ${UseMerc}) {
/echo Your mercenary has died. Waiting to be able to revive them.
:waitForMerc
/call BindCheck
/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
/delay 2s
/if (${Mercenary.State.Equal[DEAD]} && !${Me.XTarget[1].ID}) /goto :waitForMerc
}
/return
Sub SummonPet
/if (${Debugging}) /echo Entering Sub SummonPet
/if (${Me.Pet.ID} || !${Me.Class.CanCast}) /return
/declare i int local 0
/for i 1 to 13
/if (${Me.Gem[${i}].ID} && ${Me.Gem[${i}].Category.Equal[Pet]} && ${Me.Gem[${i}].TargetType.Equal[Self]}) {
/cast ${i}
/delay 3s ${Me.Casting.ID}
/echo \agCasting \aw---> \am${Me.Gem[${i}]} \aw<---
/delay ${Math.Calc[${Me.Gem[${i}].CastTime.TotalSeconds}+2].Int}s !${Me.Casting.ID}
}
/if (${Debugging}) /echo Checked ${i} to be a pet spell.
/next i
/return
Sub BuffPet
/return
Sub XTargetCheck
/declare i int local
/for i 1 to ${Me.XTarget}
/if (${Me.XTarget[${i}].TargetType.Equal[Auto Hater]}) /return TRUE
/next i
/return FALSE
Sub Bind_AddToIgnore
/alert add 1 ${Target.CleanName}
/varset myTargetID 0
/squelch /target clear
/return
Sub Bind_AddThisIgnore
/alert add 1 ${Target.Name}
/varset myTargetID 0
/squelch /target clear
/delay 5
/return
Sub Bind_PermIgnore
/echo \ap${Target.CleanName} \ayadded to the permanent ignore list on FarmMobIgnored.ini
/ini "FarmMobIgnored.ini" "${Zone.ShortName}" "Ignored" "${If[${Bool[${Ini[FarmMobIgnored.ini,${Zone.ShortName},Ignored]}]},${Ini[FarmMobIgnored.ini,${Zone.ShortName},Ignored]},]}${Target.CleanName}|"
/varset myTargetID 0
/squelch /target clear
/return
Sub GenerateList
/declare i int local
/echo \ayGetting Named Mobs currently up in ${Zone}.
/if (!${Ini[FarmMobIgnored.ini,${Zone.ShortName},Ignored].Length}) /ini "FarmMobIgnored.ini" "${Zone.ShortName}" "Ignored" "|"
/for i 1 to ${SpawnCount[npc named]}
/if (${NearestSpawn[${i},npc named].Name.NotEqual[NULL]}) {
/if (!${Ini[FarmMobIgnored.ini,${Zone.ShortName},NamedList].Find[${NearestSpawn[${i},npc named].CleanName}]} && !${Ini[FarmMobIgnored.ini,${Zone.ShortName},Ignored].Find[${NearestSpawn[${i},NPC named].CleanName}]}) {
/if (${Ini[FarmMobIgnored.ini,${Zone.ShortName},NamedList].Length} < 1900) {
/echo \ayFound - \ar${NearestSpawn[${i},npc named].CleanName}
/ini "FarmMobIgnored.ini" "${Zone.ShortName}" "NamedList" "${If[${Bool[${Ini[FarmMobIgnored.ini,${Zone.ShortName},NamedList]}]},${Ini[FarmMobIgnored.ini,${Zone.ShortName},NamedList]},]}${NearestSpawn[${i},npc named].CleanName}|"
}
}
}
/next i
/echo \ayGetting Merchants currently up in ${Zone}.
/if (!${Ini[FarmMobIgnored.ini,${Zone.ShortName},Merchants].Length}) /ini "FarmMobIgnored.ini" "${Zone.ShortName}" "Merchants" "|"
/for i 1 to ${SpawnCount[Merchant]}
/if (${NearestSpawn[${i},Merchant].Name.NotEqual[NULL]}) {
/if (!${Ini[FarmMobIgnored.ini,${Zone.ShortName},Merchants].Find[${NearestSpawn[${i},Merchant].CleanName}]} && !${Ini[FarmMobIgnored.ini,${Zone.ShortName},Ignored].Find[${NearestSpawn[${i},Merchant].CleanName}]}) {
/if (${Ini[FarmMobIgnored.ini,${Zone.ShortName},Merchants].Length} < 1900) {
/echo \ayFound - \ar${NearestSpawn[${i},Merchant].CleanName}
/ini "FarmMobIgnored.ini" "${Zone.ShortName}" "Merchants" "${If[${Bool[${Ini[FarmMobIgnored.ini,${Zone.ShortName},Merchants]}]},${Ini[FarmMobIgnored.ini,${Zone.ShortName},Merchants]},]}${NearestSpawn[${i},Merchant].CleanName}|"
} else {
/echo The Merchants list was too large and was cut short.
/break
}
}
}
/next i
/echo \ayGetting Bankers currently up in ${Zone}.
/if (!${Ini[FarmMobIgnored.ini,${Zone.ShortName},Bankers].Length}) /ini "FarmMobIgnored.ini" "${Zone.ShortName}" "Bankers" "|"
/for i 1 to ${SpawnCount[Banker]}
/if (${NearestSpawn[${i},Banker].Name.NotEqual[NULL]}) {
/if (!${Ini[FarmMobIgnored.ini,${Zone.ShortName},Bankers].Find[${NearestSpawn[${i},Banker].CleanName}]} && !${Ini[FarmMobIgnored.ini,${Zone.ShortName},Ignored].Find[${NearestSpawn[${i},Banker].CleanName}]}) {
/if (${Ini[FarmMobIgnored.ini,${Zone.ShortName},Bankers].Length} < 1900) {
/echo \ayFound - \ar${NearestSpawn[${i},Banker].CleanName}
/ini "FarmMobIgnored.ini" "${Zone.ShortName}" "Bankers" "${If[${Bool[${Ini[FarmMobIgnored.ini,${Zone.ShortName},Bankers]}]},${Ini[FarmMobIgnored.ini,${Zone.ShortName},Bankers]},]}${NearestSpawn[${i},Banker].CleanName}|"
} else {
/echo The Bankers list was too large and was cut short.
/break
}
}
}
/next i
/echo \ayGetting Objects currently up in ${Zone}.
/if (!${Ini[FarmMobIgnored.ini,${Zone.ShortName},Objects].Length}) /ini "FarmMobIgnored.ini" "${Zone.ShortName}" "Objects" "|"
/for i 1 to ${SpawnCount[Object]}
/if (${NearestSpawn[${i},Object].Name.NotEqual[NULL]}) {
/if (!${Ini[FarmMobIgnored.ini,${Zone.ShortName},Objects].Find[${NearestSpawn[${i},Object].CleanName}]} && !${Ini[FarmMobIgnored.ini,${Zone.ShortName},Ignored].Find[${NearestSpawn[${i},Object].CleanName}]}) {
/if (${Ini[FarmMobIgnored.ini,${Zone.ShortName},Objects].Length} < 1900) {
/echo \ayFound - \ar${NearestSpawn[${i},Object].CleanName}
/ini "FarmMobIgnored.ini" "${Zone.ShortName}" "Objects" "${If[${Bool[${Ini[FarmMobIgnored.ini,${Zone.ShortName},Objects]}]},${Ini[FarmMobIgnored.ini,${Zone.ShortName},Objects]},]}${NearestSpawn[${i},Object].CleanName}|"
} else {
/echo The Objects list was too large and was cut short.
/break
}
}
}
/next i
/echo \ayGetting NPCs currently up in ${Zone}.
/if (!${Ini[FarmMobIgnored.ini,${Zone.ShortName},NPCs].Length}) /ini "FarmMobIgnored.ini" "${Zone.ShortName}" "NPCs" "|"
/for i 1 to ${SpawnCount[npc]}
/if (${NearestSpawn[${i},NPC].Name.NotEqual[NULL]} && !${NearestSpawn[${i},NPC].Named}) {
/if (!${Ini[FarmMobIgnored.ini,${Zone.ShortName},NPCs].Find[${NearestSpawn[${i},NPC].CleanName}]} && !${Ini[FarmMobIgnored.ini,${Zone.ShortName},NamedList].Find[${NearestSpawn[${i},NPC].CleanName}]} && !${Ini[FarmMobIgnored.ini,${Zone.ShortName},Ignored].Find[${NearestSpawn[${i},NPC].CleanName}]}) {
/if (${Ini[FarmMobIgnored.ini,${Zone.ShortName},NPCs].Length} < 1900) {
/echo \ayFound - \ar${NearestSpawn[${i},NPC].CleanName}
/ini "FarmMobIgnored.ini" "${Zone.ShortName}" "NPCs" "${If[${Bool[${Ini[FarmMobIgnored.ini,${Zone.ShortName},NPCs]}]},${Ini[FarmMobIgnored.ini,${Zone.ShortName},NPCs]},]}${NearestSpawn[${i},NPC].CleanName}|"
} else {
/echo The NPCs list was too large and was cut short.
/break
}
}
}
/next i
/echo \agDone, list is stored in FarmMobIgnored.ini
/return
Sub GetRangedInfo
|If I have a bow and arrow set, or if My Ranged item is a throwing item -- Lets set ammo and ranged type.
/if ((${Me.Inventory[11].Type.Equal[Archery]} && ${Me.Inventory[22].Type.Equal[Arrow]}) || ${Me.Inventory[11].Type.Find[Throwing]} && ${Me.Inventory[22].Type.Find[Throwing]}) {
|Set the ammo and AmmoRange
/if (${Me.Inventory[22].Type.Equal[Arrow]}) {
/if (${Debugging}) /echo MyAmmo: ${Me.Inventory[22].Name}
/declare MyAmmo string outer ${Me.Inventory[22].Name}
/declare AmmoRange int outer ${FindItem[${MyAmmo}].Range}
} else /if (${Me.Inventory[11].Type.Find[Throwing]}) {
/if (${Debugging}) /echo MyAmmo: ${Me.Inventory[11].Name}
/declare MyAmmo string outer ${Me.Inventory[11].Name}
/declare AmmoRange int outer ${FindItem[${MyAmmo}].Range}
} else {
/declare MyAmmo string outer NULL
/declare AmmoRange int outer 0
}
/if (${Debugging}) /echo ${FindItem[${MyAmmo}].Range}
|Set the ranged type.
/if (${Me.Inventory[11].Type.Equal[Archery]}) {
/if (${Debugging}) /echo Setting Ranged type to Archery
/declare RangedType int outer 1
} else /if (${Me.Inventory[11].Type.Find[Throwing]}) {
/if (${Debugging}) /echo Setting Ranged type to Throwing
/declare RangedType int outer 2
} else {
/declare RangedType int outer 0
}
|If Ranged type is Archery then get the range of the bow and combine it with the range of the arrow.
/if (${RangedType} == 1) {
/varcalc AmmoRange ${AmmoRange}+${Me.Inventory[11].Range}
/echo Total Range with Archery is: ${AmmoRange}
} else /if (${RangedType} == 2) {
/echo Total Range with Throwing is: ${AmmoRange}
} else {
/varset AmmoRange 20
}
}
/return
Sub RangedPull
/if (${Debugging}) /echo Entering RangedPullSub ${Macro.CurLine}
/if (!${FindItemCount[${MyAmmo}]}) {
/echo Out of Ammo!
/varset PullCommand
}
/if (${Debugging}) /echo Does the Spawn have an ID: ${Spawn[id ${myTargetID}].ID} && Is the spawn alive: ${Spawn[id ${myTargetID}].Type.NotEqual[Corpse]}
/if (${Spawn[id ${myTargetID}].ID} && ${Spawn[id ${myTargetID}].Type.NotEqual[Corpse]}) {
/if (${Debugging}) /echo Distance to Spawn: ${Spawn[id ${myTargetID}].Distance3D} > Ranged Max Distance: ${AmmoRange} || Have LineOfSight: !${Spawn[id ${myTargetID}].LineOfSight}
/if (${Spawn[id ${myTargetID}].Distance3D} > ${AmmoRange} || !${Spawn[id ${myTargetID}].LineOfSight}) {
/call WaitNav ${myTargetID} ${Math.Calc[${AmmoRange}*0.90].Int}
}
/if (${Spawn[id ${myTargetID}].Distance3D} < ${AmmoRange} && ${Spawn[id ${myTargetID}].Distance3D} > 35 && ${Spawn[id ${myTargetID}].LineOfSight}) {
/target id ${myTargetID}
/delay 1s ${Target.ID}==${myTargetID}
/declare PullTimer timer local 100
/if (${Target.ID}) /face fast
/autofire on
:waitForMob
/call BindCheck
/if (${Target.Distance} > 40) {
/delay 2
/if (${PullTimer}) {
/if (${Debugging}) /echo PullTimer: ${PullTimer}
/goto :waitForMob