-
Notifications
You must be signed in to change notification settings - Fork 9
/
MultiBotInit.lua
2632 lines (2209 loc) · 99.6 KB
/
MultiBotInit.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- MULTIBAR --
local tMultiBar = MultiBot.addFrame("MultiBar", -262, 144, 36)
tMultiBar:SetMovable(true)
-- LEFT --
local tLeft = tMultiBar.addFrame("Left", -76, 2, 32)
-- TANKER --
tLeft.addButton("Tanker", -170, 0, "ability_warrior_shieldbash", MultiBot.tips.tanker.master)
.doLeft = function(pButton)
if(MultiBot.isTarget()) then MultiBot.ActionToGroup("@tank do attack my target") end
end
-- ATTACK --
local tButton = tLeft.addButton("Attack", -136, 0, "Interface\\AddOns\\MultiBot\\Icons\\attack.blp", MultiBot.tips.attack.master)
tButton.doRight = function(pButton)
MultiBot.ShowHideSwitch(pButton.parent.frames["Attack"])
end
tButton.doLeft = function(pButton)
if(MultiBot.isTarget()) then MultiBot.ActionToGroup("do attack my target") end
end
local tAttack = tLeft.addFrame("Attack", -138, 34)
tAttack:Hide()
local tButton = tAttack.addButton("Attack", 0, 0, "Interface\\AddOns\\MultiBot\\Icons\\attack.blp", MultiBot.tips.attack.attack)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButtonWithTarget(pButton.parent.parent, "Attack", pButton.texture, "do attack my target")
end
tButton.doLeft = function(pButton)
if(MultiBot.isTarget()) then MultiBot.ActionToGroup("do attack my target") end
end
local tButton = tAttack.addButton("Ranged", 0, 30, "Interface\\AddOns\\MultiBot\\Icons\\attack_ranged.blp", MultiBot.tips.attack.ranged)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButtonWithTarget(pButton.parent.parent, "Attack", pButton.texture, "@ranged do attack my target")
end
tButton.doLeft = function(pButton)
if(MultiBot.isTarget()) then MultiBot.ActionToGroup("@ranged do attack my target") end
end
local tButton = tAttack.addButton("Melee", 0, 60, "Interface\\AddOns\\MultiBot\\Icons\\attack_melee.blp", MultiBot.tips.attack.melee)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButtonWithTarget(pButton.parent.parent, "Attack", pButton.texture, "@melee do attack my target")
end
tButton.doLeft = function(pButton)
if(MultiBot.isTarget()) then MultiBot.ActionToGroup("@melee do attack my target") end
end
local tButton = tAttack.addButton("Healer", 0, 90, "Interface\\AddOns\\MultiBot\\Icons\\attack_healer.blp", MultiBot.tips.attack.healer)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButtonWithTarget(pButton.parent.parent, "Attack", pButton.texture, "@healer do attack my target")
end
tButton.doLeft = function(pButton)
if(MultiBot.isTarget()) then MultiBot.ActionToGroup("@healer do attack my target") end
end
local tButton = tAttack.addButton("Dps", 0, 120, "Interface\\AddOns\\MultiBot\\Icons\\attack_dps.blp", MultiBot.tips.attack.dps)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButtonWithTarget(pButton.parent.parent, "Attack", pButton.texture, "@dps do attack my target")
end
tButton.doLeft = function(pButton)
if(MultiBot.isTarget()) then MultiBot.ActionToGroup("@dps do attack my target") end
end
local tButton = tAttack.addButton("Tank", 0, 150, "Interface\\AddOns\\MultiBot\\Icons\\attack_tank.blp", MultiBot.tips.attack.tank)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButtonWithTarget(pButton.parent.parent, "Attack", pButton.texture, "@tank do attack my target")
end
tButton.doLeft = function(pButton)
if(MultiBot.isTarget()) then MultiBot.ActionToGroup("@tank do attack my target") end
end
-- MODE --
local tButton = tLeft.addButton("Mode", -102, 0, "Interface\\AddOns\\MultiBot\\Icons\\mode_passive.blp", MultiBot.tips.mode.master).setDisable()
tButton.doRight = function(pButton)
MultiBot.ShowHideSwitch(pButton.parent.frames["Mode"])
end
tButton.doLeft = function(pButton)
if(MultiBot.OnOffSwitch(pButton)) then
MultiBot.ActionToGroup("co +passive,?")
else
MultiBot.ActionToGroup("co -passive,?")
end
end
local tMode = tLeft.addFrame("Mode", -104, 34)
tMode:Hide()
tMode.addButton("Passive", 0, 0, "Interface\\AddOns\\MultiBot\\Icons\\mode_passive.blp", MultiBot.tips.mode.passive)
.doLeft = function(pButton)
if(MultiBot.SelectToGroup(pButton.parent.parent, "Mode", pButton.texture, "co +passive,?")) then
pButton.parent.parent.buttons["Mode"].setEnable().doLeft = function(pButton)
if(MultiBot.OnOffSwitch(pButton)) then
MultiBot.ActionToGroup("co +passive,?")
else
MultiBot.ActionToGroup("co -passive,?")
end
end
end
end
tMode.addButton("Grind", 0, 30, "Interface\\AddOns\\MultiBot\\Icons\\mode_grind.blp", MultiBot.tips.mode.grind)
.doLeft = function(pButton)
if(MultiBot.SelectToGroup(pButton.parent.parent, "Mode", pButton.texture, "grind")) then
pButton.parent.parent.buttons["Mode"].setEnable().doLeft = function(pButton)
if(MultiBot.OnOffSwitch(pButton)) then
MultiBot.ActionToGroup("grind")
else
MultiBot.ActionToGroup("follow")
end
end
end
end
-- STAY|FOLLOW --
tLeft.addButton("Stay", -68, 0, "Interface\\AddOns\\MultiBot\\Icons\\command_follow.blp", MultiBot.tips.stallow.stay)
.doLeft = function(pButton)
if(MultiBot.ActionToGroup("stay")) then
pButton.parent.buttons["Follow"].doShow()
pButton.doHide()
end
end
tLeft.addButton("Follow", -68, 0, "Interface\\AddOns\\MultiBot\\Icons\\command_stay.blp", MultiBot.tips.stallow.follow).doHide()
.doLeft = function(pButton)
if(MultiBot.ActionToGroup("follow")) then
pButton.parent.buttons["Stay"].doShow()
pButton.doHide()
end
end
-- FLEE --
local tButton = tLeft.addButton("Flee", -34, 0, "Interface\\AddOns\\MultiBot\\Icons\\flee.blp", MultiBot.tips.flee.master)
tButton.doRight = function(pButton)
MultiBot.ShowHideSwitch(pButton.parent.frames["Flee"])
end
tButton.doLeft = function(pButton)
MultiBot.ActionToGroup("flee")
end
local tFlee = tLeft.addFrame("Flee", -36, 34)
tFlee:Hide()
local tButton = tFlee.addButton("Flee", 0, 0, "Interface\\AddOns\\MultiBot\\Icons\\flee.blp", MultiBot.tips.flee.flee)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButton(pButton.parent.parent, "Flee", pButton.texture, "flee")
end
tButton.doLeft = function(pButton)
MultiBot.ActionToGroup("flee")
end
local tButton = tFlee.addButton("Ranged", 0, 30, "Interface\\AddOns\\MultiBot\\Icons\\flee_ranged.blp", MultiBot.tips.flee.ranged)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButton(pButton.parent.parent, "Flee", pButton.texture, "@ranged flee")
end
tButton.doLeft = function(pButton)
MultiBot.ActionToGroup("@ranged flee")
end
local tButton = tFlee.addButton("Melee", 0, 60, "Interface\\AddOns\\MultiBot\\Icons\\flee_melee.blp", MultiBot.tips.flee.melee)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButton(pButton.parent.parent, "Flee", pButton.texture, "@melee flee")
end
tButton.doLeft = function(pButton)
MultiBot.ActionToGroup("@melee flee")
end
local tButton = tFlee.addButton("Healer", 0, 90, "Interface\\AddOns\\MultiBot\\Icons\\flee_healer.blp", MultiBot.tips.flee.healer)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButton(pButton.parent.parent, "Flee", pButton.texture, "@healer flee")
end
tButton.doLeft = function(pButton)
MultiBot.ActionToGroup("@healer flee")
end
local tButton = tFlee.addButton("Dps", 0, 120, "Interface\\AddOns\\MultiBot\\Icons\\flee_dps.blp", MultiBot.tips.flee.dps)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButton(pButton.parent.parent, "Flee", pButton.texture, "@dps flee")
end
tButton.doLeft = function(pButton)
MultiBot.ActionToGroup("@dps flee")
end
local tButton = tFlee.addButton("Tank", 0, 150, "Interface\\AddOns\\MultiBot\\Icons\\flee_tank.blp", MultiBot.tips.flee.tank)
tButton.doRight = function(pButton)
MultiBot.SelectToGroupButton(pButton.parent.parent, "Flee", pButton.texture, "@tank flee")
end
tButton.doLeft = function(pButton)
MultiBot.ActionToGroup("@tank flee")
end
local tButton = tFlee.addButton("Target", 0, 180, "Interface\\AddOns\\MultiBot\\Icons\\flee_target.blp", MultiBot.tips.flee.target)
tButton.doRight = function(pButton)
MultiBot.SelectToTargetButton(pButton.parent.parent, "Flee", pButton.texture, "flee")
end
tButton.doLeft = function(pButton)
MultiBot.ActionToTarget("flee")
end
-- FORMATION --
local tButton = tLeft.addButton("Format", -0, 0, "Interface\\AddOns\\MultiBot\\Icons\\formation_near.blp", MultiBot.tips.format.master)
tButton.doRight = function(pButton)
MultiBot.ActionToGroup("formation")
end
tButton.doLeft = function(pButton)
MultiBot.ShowHideSwitch(pButton.parent.frames["Format"])
end
local tFormat = tLeft.addFrame("Format", -2, 34)
tFormat:Hide()
tFormat.addButton("Arrow", 0, 0, "Interface\\AddOns\\MultiBot\\Icons\\formation_arrow.blp", MultiBot.tips.format.arrow)
.doLeft = function(pButton)
MultiBot.SelectToGroup(pButton.parent.parent, "Format", pButton.texture, "formation arrow")
end
tFormat.addButton("Queue", 0, 30, "Interface\\AddOns\\MultiBot\\Icons\\formation_queue.blp", MultiBot.tips.format.queue)
.doLeft = function(pButton)
MultiBot.SelectToGroup(pButton.parent.parent, "Format", pButton.texture, "formation queue")
end
tFormat.addButton("Near", 0, 60, "Interface\\AddOns\\MultiBot\\Icons\\formation_near.blp", MultiBot.tips.format.near)
.doLeft = function(pButton)
MultiBot.SelectToGroup(pButton.parent.parent, "Format", pButton.texture, "formation near")
end
tFormat.addButton("Melee", 0, 90, "Interface\\AddOns\\MultiBot\\Icons\\formation_melee.blp", MultiBot.tips.format.melee)
.doLeft = function(pButton)
MultiBot.SelectToGroup(pButton.parent.parent, "Format", pButton.texture, "formation melee")
end
tFormat.addButton("Line", 0, 120, "Interface\\AddOns\\MultiBot\\Icons\\formation_line.blp", MultiBot.tips.format.line)
.doLeft = function(pButton)
MultiBot.SelectToGroup(pButton.parent.parent, "Format", pButton.texture, "formation line")
end
tFormat.addButton("Circle", 0, 150, "Interface\\AddOns\\MultiBot\\Icons\\formation_circle.blp", MultiBot.tips.format.circle)
.doLeft = function(pButton)
MultiBot.SelectToGroup(pButton.parent.parent, "Format", pButton.texture, "formation circle")
end
tFormat.addButton("Chaos", 0, 180, "Interface\\AddOns\\MultiBot\\Icons\\formation_chaos.blp", MultiBot.tips.format.chaos)
.doLeft = function(pButton)
MultiBot.SelectToGroup(pButton.parent.parent, "Format", pButton.texture, "formation chaos")
end
tFormat.addButton("Shield", 0, 210, "Interface\\AddOns\\MultiBot\\Icons\\formation_shield.blp", MultiBot.tips.format.shield)
.doLeft = function(pButton)
MultiBot.SelectToGroup(pButton.parent.parent, "Format", pButton.texture, "formation shield")
end
-- BEASTMASTER --
tLeft.addButton("Beast", -0, 0, "ability_mount_swiftredwindrider", MultiBot.tips.beast.master).doHide()
.doLeft = function(pButton)
MultiBot.ShowHideSwitch(pButton.parent.frames["Beast"])
end
local tBeast = tLeft.addFrame("Beast", -2, 34)
tBeast:Hide()
tBeast.addButton("Release", 0, 0, "spell_nature_spiritwolf", MultiBot.tips.beast.release)
.doLeft = function(pButton)
MultiBot.ActionToTargetOrGroup("cast 2641")
end
tBeast.addButton("Revive", 0, 30, "ability_hunter_beastsoothe", MultiBot.tips.beast.revive)
.doLeft = function(pButton)
MultiBot.ActionToTargetOrGroup("cast 982")
end
tBeast.addButton("Heal", 0, 60, "ability_hunter_mendpet", MultiBot.tips.beast.heal)
.doLeft = function(pButton)
MultiBot.ActionToTargetOrGroup("cast 48990")
end
tBeast.addButton("Feed", 0, 90, "ability_hunter_beasttraining", MultiBot.tips.beast.feed)
.doLeft = function(pButton)
MultiBot.ActionToTargetOrGroup("cast 6991")
end
tBeast.addButton("Call", 0, 120, "ability_hunter_beastcall", MultiBot.tips.beast.call)
.doLeft = function(pButton)
MultiBot.ActionToTargetOrGroup("cast 883")
end
-- CREATOR --
tLeft.addButton("Creator", -0, 0, "inv_helmet_145a", MultiBot.tips.creator.master).doHide()
.doLeft = function(pButton)
MultiBot.ShowHideSwitch(pButton.parent.frames["Creator"])
MultiBot.frames["MultiBar"].frames["Units"]:Hide()
end
local tCreator = tLeft.addFrame("Creator", -2, 34)
tCreator:Hide()
tCreator.addButton("Warrior", 0, 0, "Interface\\AddOns\\MultiBot\\Icons\\addclass_warrior.blp", MultiBot.tips.creator.warrior)
.doLeft = function(pButton)
SendChatMessage(".playerbot bot addclass warrior", "SAY")
end
tCreator.addButton("Warlock", 0, 30, "Interface\\AddOns\\MultiBot\\Icons\\addclass_warlock.blp", MultiBot.tips.creator.warlock)
.doLeft = function(pButton)
SendChatMessage(".playerbot bot addclass warlock", "SAY")
end
tCreator.addButton("Shaman", 0, 60, "Interface\\AddOns\\MultiBot\\Icons\\addclass_shaman.blp", MultiBot.tips.creator.shaman)
.doLeft = function(pButton)
SendChatMessage(".playerbot bot addclass shaman", "SAY")
end
tCreator.addButton("Rogue", 0, 90, "Interface\\AddOns\\MultiBot\\Icons\\addclass_rogue.blp", MultiBot.tips.creator.rogue)
.doLeft = function(pButton)
SendChatMessage(".playerbot bot addclass rogue", "SAY")
end
tCreator.addButton("Priest", 0, 120, "Interface\\AddOns\\MultiBot\\Icons\\addclass_priest.blp", MultiBot.tips.creator.priest)
.doLeft = function(pButton)
SendChatMessage(".playerbot bot addclass priest", "SAY")
end
tCreator.addButton("Paladin", 0, 150, "Interface\\AddOns\\MultiBot\\Icons\\addclass_paladin.blp", MultiBot.tips.creator.paladin)
.doLeft = function(pButton)
SendChatMessage(".playerbot bot addclass paladin", "SAY")
end
tCreator.addButton("Mage", 0, 180, "Interface\\AddOns\\MultiBot\\Icons\\addclass_mage.blp", MultiBot.tips.creator.mage)
.doLeft = function(pButton)
SendChatMessage(".playerbot bot addclass mage", "SAY")
end
tCreator.addButton("Hunter", 0, 210, "Interface\\AddOns\\MultiBot\\Icons\\addclass_hunter.blp", MultiBot.tips.creator.hunter)
.doLeft = function(pButton)
SendChatMessage(".playerbot bot addclass hunter", "SAY")
end
tCreator.addButton("Druid", 0, 240, "Interface\\AddOns\\MultiBot\\Icons\\addclass_druid.blp", MultiBot.tips.creator.druid)
.doLeft = function(pButton)
SendChatMessage(".playerbot bot addclass druid", "SAY")
end
tCreator.addButton("DeathKnight", 0, 270, "Interface\\AddOns\\MultiBot\\Icons\\addclass_deathknight.blp", MultiBot.tips.creator.deathknight)
.doLeft = function(pButton)
SendChatMessage(".playerbot bot addclass dk", "SAY")
end
tCreator.addButton("Inspect", 0, 300, "Interface\\AddOns\\MultiBot\\Icons\\filter_none.blp", MultiBot.tips.creator.inspect)
.doLeft = function(pButton)
local tName = UnitName("target")
if(tName == nil or tName == "Unknown Entity") then return SendChatMessage("I dont have a Target.", "SAY") end
InspectUnit(tName)
end
local tButton = tCreator.addButton("Init", 0, 330, "inv_misc_enggizmos_27", MultiBot.tips.creator.init)
tButton.doRight = function(pButton)
if(GetNumRaidMembers() > 0) then
for i = 1, GetNumRaidMembers() do
local tName = UnitName("raid" .. i)
if(MultiBot.isRoster("players", tName)) then SendChatMessage(MultiBot.doReplace(MultiBot.info.player, "NAME", tName), "SAY")
elseif(MultiBot.isRoster("members", tName)) then SendChatMessage(MultiBot.doReplace(MultiBot.info.member, "NAME", tName), "SAY")
elseif(tName ~= UnitName("player")) then SendChatMessage(".playerbot bot init=auto " .. tName, "SAY")
end
end
return
end
if(GetNumPartyMembers() > 0) then
for i = 1, GetNumPartyMembers() do
local tName = UnitName("party" .. i)
if(MultiBot.isRoster("players", tName)) then SendChatMessage(MultiBot.doReplace(MultiBot.info.player, "NAME", tName), "SAY")
elseif(MultiBot.isRoster("members", tName)) then SendChatMessage(MultiBot.doReplace(MultiBot.info.member, "NAME", tName), "SAY")
elseif(tName ~= UnitName("player")) then SendChatMessage(".playerbot bot init=auto " .. tName, "SAY")
end
end
return
end
SendChatMessage(MultiBot.info.group, "SAY")
end
tButton.doLeft = function(pButton)
local tName = UnitName("target")
if(tName == nil or tName == "Unknown Entity") then return SendChatMessage(MultiBot.info.target, "SAY") end
if(MultiBot.isRoster("players", tName)) then return SendChatMessage(MultiBot.info.players, "SAY") end
if(MultiBot.isRoster("members", tName)) then return SendChatMessage(MultiBot.info.members, "SAY") end
SendChatMessage(".playerbot bot init=auto " .. tName, "SAY")
end
-- UNITS --
local tButton = tMultiBar.addButton("Units", -38, 0, "inv_scroll_04", MultiBot.tips.units.master)
tButton.roster = "players"
tButton.filter = "none"
tButton.doRight = function(pButton)
-- MEMBERBOTS --
for i = 1, 50 do
local tName, tRank, tIndex, tLevel, tClass = GetGuildRosterInfo(i)
-- Ensure that the Counter is not bigger than the Amount of Members in Guildlist
if(tName ~= nil and tLevel ~= nil and tClass ~= nil and tName ~= UnitName("player")) then
local tMember = MultiBot.addMember(tClass, tLevel, tName)
if(tMember.state == false)
then tMember.setDisable()
else tMember.setEnable()
end
tMember.doRight = function(pButton)
if(pButton.state == false) then return end
SendChatMessage(".playerbot bot remove " .. pButton.name, "SAY")
if(pButton.parent.frames[pButton.name] ~= nil) then pButton.parent.frames[pButton.name]:Hide() end
pButton.setDisable()
end
tMember.doLeft = function(pButton)
if(pButton.state) then
if(pButton.parent.frames[pButton.name] ~= nil) then MultiBot.ShowHideSwitch(pButton.parent.frames[pButton.name]) end
else
SendChatMessage(".playerbot bot add " .. pButton.name, "SAY")
pButton.setEnable()
end
end
else
break
end
end
-- FRIENDBOTS --
for i = 1, 50 do
local tName, tLevel, tClass = GetFriendInfo(i)
-- Ensure that the Counter is not bigger than the Amount of Members in Friendlist
if(tName ~= nil and tLevel ~= nil and tClass ~= nil and tName ~= UnitName("player")) then
local tFriend = MultiBot.addFriend(tClass, tLevel, tName)
if(tFriend.state == false)
then tFriend.setDisable()
else tFriend.setEnable()
end
tFriend.doRight = function(pButton)
if(pButton.state == false) then return end
SendChatMessage(".playerbot bot remove " .. pButton.name, "SAY")
if(pButton.parent.frames[pButton.name] ~= nil) then pButton.parent.frames[pButton.name]:Hide() end
pButton.setDisable()
end
tFriend.doLeft = function(pButton)
if(pButton.state) then
if(pButton.parent.frames[pButton.name] ~= nil) then MultiBot.ShowHideSwitch(pButton.parent.frames[pButton.name]) end
else
SendChatMessage(".playerbot bot add " .. pButton.name, "SAY")
pButton.setEnable()
end
end
else
break
end
end
pButton.doLeft(pButton, pButton.roster, pButton.filter)
end
tButton.doLeft = function(pButton, oRoster, oFilter)
local tUnits = pButton.parent.frames["Units"]
local tTable = nil
for key, value in pairs(tUnits.buttons) do value:Hide() end
for key, value in pairs(tUnits.frames) do value:Hide() end
tUnits.frames["Control"]:Show()
if(oRoster == nil and oFilter == nil) then MultiBot.ShowHideSwitch(tUnits)
elseif(oRoster ~= nil) then pButton.roster = oRoster
elseif(oFilter ~= nil) then pButton.filter = oFilter
end
if(pButton.filter ~= "none")
then tTable = MultiBot.index.classes[pButton.roster][pButton.filter]
else tTable = MultiBot.index[pButton.roster]
end
local tButton = nil
local tFrame = nil
local tIndex = 0
if(tTable ~= nil)
then pButton.limit = table.getn(tTable)
else pButton.limit = 0
end
pButton.from = 1
pButton.to = 10
for i = 1, pButton.limit do
tIndex = (i - 1)%10 + 1
tFrame = tUnits.frames[tTable[i]]
tButton = tUnits.buttons[tTable[i]]
tButton.setPoint(0, (tUnits.size + 2) * (tIndex - 1))
if(tFrame ~=nil) then tFrame.setPoint(-34, (tUnits.size + 2) * (tIndex - 1) + 2) end
if(pButton.from <= i and pButton.to >= i) then
if(tFrame ~= nil and tButton.state) then tFrame:Show() end
tButton:Show()
end
end
if(pButton.limit < pButton.to)
then tUnits.frames["Control"].setPoint(-2, (tUnits.size + 2) * pButton.limit)
else tUnits.frames["Control"].setPoint(-2, (tUnits.size + 2) * pButton.to)
end
if(pButton.limit < 11)
then tUnits.frames["Control"].buttons["Browse"]:Hide()
else tUnits.frames["Control"].buttons["Browse"]:Show()
end
end
local tUnits = tMultiBar.addFrame("Units", -40, 38)
tUnits:Hide()
local tControl = tUnits.addFrame("Control", -2, 0)
tControl:Show()
-- UNITS:FILTER --
local tButton = tControl.addButton("Filter", 0, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_none.blp", MultiBot.tips.units.filter)
tButton.doRight = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent, "Filter", "Interface\\AddOns\\MultiBot\\Icons\\filter_none.blp")
tButton.doLeft(tButton, nil, "none")
end
tButton.doLeft = function(pButton)
MultiBot.ShowHideSwitch(pButton.parent.frames["Filter"])
end
local tFilter = tControl.addFrame("Filter", -30, 2)
tFilter:Hide()
tFilter.addButton("DeathKnight", 0, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_deathknight.blp", MultiBot.tips.units.deathknight)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Filter", pButton.texture)
tButton.doLeft(tButton, nil, "DeathKnight")
end
tFilter.addButton("Druid", -26, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_druid.blp", MultiBot.tips.units.druid)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Filter", pButton.texture)
tButton.doLeft(tButton, nil, "Druid")
end
tFilter.addButton("Hunter", -52, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_hunter.blp", MultiBot.tips.units.hunter)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Filter", pButton.texture)
tButton.doLeft(tButton, nil, "Hunter")
end
tFilter.addButton("Mage", -78, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_mage.blp", MultiBot.tips.units.mage)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Filter", pButton.texture)
tButton.doLeft(tButton, nil, "Mage")
end
tFilter.addButton("Paladin", -104, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_paladin.blp", MultiBot.tips.units.paladin)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Filter", pButton.texture)
tButton.doLeft(tButton, nil, "Paladin")
end
tFilter.addButton("Priest", -130, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_priest.blp", MultiBot.tips.units.priest)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Filter", pButton.texture)
tButton.doLeft(tButton, nil, "Priest")
end
tFilter.addButton("Rogue", -156, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_rogue.blp", MultiBot.tips.units.rogue)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Filter", pButton.texture)
tButton.doLeft(tButton, nil, "Rogue")
end
tFilter.addButton("Shaman", -182, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_shaman.blp", MultiBot.tips.units.shaman)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Filter", pButton.texture)
tButton.doLeft(tButton, nil, "Shaman")
end
tFilter.addButton("Warlock", -208, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_warlock.blp", MultiBot.tips.units.warlock)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Filter", pButton.texture)
tButton.doLeft(tButton, nil, "Warlock")
end
tFilter.addButton("Warrior", -234, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_warrior.blp", MultiBot.tips.units.warrior)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Filter", pButton.texture)
tButton.doLeft(tButton, nil, "Warrior")
end
tFilter.addButton("None", -260, 0, "Interface\\AddOns\\MultiBot\\Icons\\filter_none.blp", MultiBot.tips.units.none)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Filter", pButton.texture)
tButton.doLeft(tButton, nil, "none")
end
-- UNITS:ROSTER --
local tButton = tControl.addButton("Roster", 0, 30, "Interface\\AddOns\\MultiBot\\Icons\\roster_players.blp", MultiBot.tips.units.roster)
tButton.doRight = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent, "Roster", "Interface\\AddOns\\MultiBot\\Icons\\roster_players.blp")
tButton.doLeft(tButton, "players")
end
tButton.doLeft = function(pButton)
MultiBot.ShowHideSwitch(pButton.parent.frames["Roster"])
end
local tRoster = tControl.addFrame("Roster", -30, 32)
tRoster:Hide()
tRoster.addButton("Friends", 0, 0, "Interface\\AddOns\\MultiBot\\Icons\\roster_friends.blp", MultiBot.tips.units.friends)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Roster", pButton.texture)
pButton.parent.parent.buttons["Invite"].setEnable()
pButton.parent.parent.frames["Invite"]:Hide()
tButton.doLeft(tButton, "friends")
end
tRoster.addButton("Members", -26, 0, "Interface\\AddOns\\MultiBot\\Icons\\roster_members.blp", MultiBot.tips.units.members)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Roster", pButton.texture)
pButton.parent.parent.buttons["Invite"].setEnable()
pButton.parent.parent.frames["Invite"]:Hide()
tButton.doLeft(tButton, "members")
end
tRoster.addButton("Players", -52, 0, "Interface\\AddOns\\MultiBot\\Icons\\roster_players.blp", MultiBot.tips.units.players)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Roster", pButton.texture)
pButton.parent.parent.buttons["Invite"].setEnable()
pButton.parent.parent.frames["Invite"]:Hide()
tButton.doLeft(tButton, "players")
end
tRoster.addButton("Actives", -78, 0, "Interface\\AddOns\\MultiBot\\Icons\\roster_actives.blp", MultiBot.tips.units.actives)
.doLeft = function(pButton)
local tButton = MultiBot.frames["MultiBar"].buttons["Units"]
MultiBot.Select(pButton.parent.parent, "Roster", pButton.texture)
pButton.parent.parent.buttons["Invite"].setDisable()
pButton.parent.parent.frames["Invite"]:Hide()
tButton.doLeft(tButton, "actives")
end
-- UNITS:BROWSE --
local tButton = tControl.addButton("Invite", 0, 60, "Interface\\AddOns\\MultiBot\\Icons\\invite.blp", MultiBot.tips.units.invite).setEnable()
tButton.doRight = function(pButton)
if(GetNumRaidMembers() > 0 or GetNumPartyMembers() > 0) then
return SendChatMessage(".playerbot bot remove *", "SAY")
else
MultiBot.timer.invite.roster = MultiBot.frames["MultiBar"].buttons["Units"].roster
MultiBot.timer.invite.needs = table.getn(MultiBot.index[MultiBot.timer.invite.roster])
MultiBot.timer.invite.index = 1
MultiBot.auto.invite = true
SendChatMessage(MultiBot.info.starting, "SAY")
end
end
tButton.doLeft = function(pButton)
if(pButton.state) then MultiBot.ShowHideSwitch(pButton.parent.frames["Invite"]) end
end
local tInvite = tControl.addFrame("Invite", -30, 62)
tInvite:Hide()
tInvite.addButton("Party+5", 0, 0, "Interface\\AddOns\\MultiBot\\Icons\\invite_party_5.blp", MultiBot.tips.units.inviteParty5)
.doLeft = function(pButton)
if(MultiBot.auto.invite) then return SendChatMessage(MultiBot.info.wait, "SAY") end
local tRaid = GetNumRaidMembers()
local tParty = GetNumPartyMembers()
MultiBot.timer.invite.roster = MultiBot.frames["MultiBar"].buttons["Units"].roster
MultiBot.timer.invite.needs = MultiBot.IF(tRaid > 0, 5 - tRaid, MultiBot.IF(tParty > 0, 4 - tParty, 4))
MultiBot.timer.invite.index = 1
MultiBot.auto.invite = true
pButton.parent:Hide()
SendChatMessage(MultiBot.info.starting, "SAY")
end
tInvite.addButton("Raid+10", 56, 0, "Interface\\AddOns\\MultiBot\\Icons\\invite_raid_10.blp", MultiBot.tips.units.inviteRaid10)
.doLeft = function(pButton)
if(MultiBot.auto.invite) then return SendChatMessage(MultiBot.info.wait, "SAY") end
local tRaid = GetNumRaidMembers()
local tParty = GetNumPartyMembers()
MultiBot.timer.invite.roster = MultiBot.frames["MultiBar"].buttons["Units"].roster
MultiBot.timer.invite.needs = 10 - MultiBot.IF(tRaid > 0, tRaid, MultiBot.IF(tParty > 0, tParty + 1, 1))
MultiBot.timer.invite.index = 1
MultiBot.auto.invite = true
pButton.parent:Hide()
SendChatMessage(MultiBot.info.starting, "SAY")
end
tInvite.addButton("Raid+25", 82, 0, "Interface\\AddOns\\MultiBot\\Icons\\invite_raid_25.blp", MultiBot.tips.units.inviteRaid25)
.doLeft = function(pButton)
if(MultiBot.auto.invite) then return SendChatMessage(MultiBot.info.wait, "SAY") end
local tRaid = GetNumRaidMembers()
local tParty = GetNumPartyMembers()
MultiBot.timer.invite.roster = MultiBot.frames["MultiBar"].buttons["Units"].roster
MultiBot.timer.invite.needs = 25 - MultiBot.IF(tRaid > 0, tRaid, MultiBot.IF(tParty > 0, tParty + 1, 1))
MultiBot.timer.invite.index = 1
MultiBot.auto.invite = true
pButton.parent:Hide()
SendChatMessage(MultiBot.info.starting, "SAY")
end
tInvite.addButton("Raid+40", 108, 0, "Interface\\AddOns\\MultiBot\\Icons\\invite_raid_40.blp", MultiBot.tips.units.inviteRaid40)
.doLeft = function(pButton)
if(MultiBot.auto.invite) then return SendChatMessage(MultiBot.info.wait, "SAY") end
local tRaid = GetNumRaidMembers()
local tParty = GetNumPartyMembers()
MultiBot.timer.invite.roster = MultiBot.frames["MultiBar"].buttons["Units"].roster
MultiBot.timer.invite.needs = 40 - MultiBot.IF(tRaid > 0, tRaid, MultiBot.IF(tParty > 0, tParty + 1, 1))
MultiBot.timer.invite.index = 1
MultiBot.auto.invite = true
pButton.parent:Hide()
SendChatMessage(MultiBot.info.starting, "SAY")
end
tControl.addButton("Browse", 0, 90, "Interface\\AddOns\\MultiBot\\Icons\\browse.blp", MultiBot.tips.units.browse)
.doLeft = function(pButton)
local tMaster = MultiBot.frames["MultiBar"].buttons["Units"]
local tFrom = tMaster.from + 10
local tTo = tMaster.to + 10
if(tMaster.filter ~= "none")
then tTable = MultiBot.index.classes[tMaster.roster][tMaster.filter]
else tTable = MultiBot.index[tMaster.roster]
end
local tUnits = tMaster.parent.frames["Units"]
local tButton = nil
local tFrame = nil
local tIndex = 0
if(tFrom > tMaster.limit) then
tFrom = 1
tTo = 10
end
if(tTo > tMaster.limit) then
tTo = tMaster.limit
end
for i = 1, tMaster.limit do
tFrame = tUnits.frames[tTable[i]]
tButton = tUnits.buttons[tTable[i]]
if(tMaster.from <= i and tMaster.to >= i) then
if(tFrame ~= nil) then tFrame:Hide() end
tButton:Hide()
end
if(tFrom <= i and tTo >= i) then
tIndex = tIndex + 1
if(tFrame ~= nil and tButton.state) then tFrame:Show() end
tButton:Show()
end
end
tMaster.from = tFrom
tMaster.to = tTo
tUnits.frames["Control"].setPoint(-2, (tUnits.size + 2) * tIndex)
end
-- MAIN --
local tButton = tMultiBar.addButton("Main", 0, 0, "inv_gizmo_02", MultiBot.tips.main.master)
tButton:RegisterForDrag("RightButton")
tButton:SetScript("OnDragStart", function()
MultiBot.frames["MultiBar"]:StartMoving()
end)
tButton:SetScript("OnDragStop", function()
MultiBot.frames["MultiBar"]:StopMovingOrSizing()
end)
tButton.doLeft = function(pButton)
MultiBot.ShowHideSwitch(pButton.parent.frames["Main"])
end
local tMain = tMultiBar.addFrame("Main", -2, 38)
tMain:Hide()
tMain.addButton("Coords", 0, 0, "inv_gizmo_03", MultiBot.tips.main.coords)
.doLeft = function(pButton)
MultiBot.frames["MultiBar"].setPoint(-262, 144)
MultiBot.inventory.setPoint(-700, -144)
MultiBot.spellbook.setPoint(-802, 302)
MultiBot.talent.setPoint(-104, -276)
MultiBot.reward.setPoint(-754, 238)
MultiBot.itemus.setPoint(-860, -144)
MultiBot.iconos.setPoint(-860, -144)
MultiBot.stats.setPoint(-60, 560)
end
tMain.addButton("Masters", 0, 34, "mail_gmicon", MultiBot.tips.main.masters).setDisable()
.doLeft = function(pButton)
if(MultiBot.GM == false) then return SendChatMessage(MultiBot.info.rights, "SAY") end
if(MultiBot.OnOffSwitch(pButton)) then
MultiBot.doRepos("Right", 38)
MultiBot.frames["MultiBar"].frames["Masters"]:Hide()
MultiBot.frames["MultiBar"].buttons["Masters"]:Show()
else
MultiBot.doRepos("Right", -38)
MultiBot.frames["MultiBar"].frames["Masters"]:Hide()
MultiBot.frames["MultiBar"].buttons["Masters"]:Hide()
end
end
tMain.addButton("Creator", 0, 68, "inv_helmet_145a", MultiBot.tips.main.creator).setDisable()
.doLeft = function(pButton)
if(MultiBot.OnOffSwitch(pButton)) then
MultiBot.doRepos("Tanker", -34)
MultiBot.doRepos("Attack", -34)
MultiBot.doRepos("Mode", -34)
MultiBot.doRepos("Stay", -34)
MultiBot.doRepos("Follow", -34)
MultiBot.doRepos("Flee", -34)
MultiBot.doRepos("Format", -34)
MultiBot.doRepos("Beast", -34)
MultiBot.frames["MultiBar"].frames["Left"].frames["Creator"]:Hide()
MultiBot.frames["MultiBar"].frames["Left"].buttons["Creator"]:Show()
else
MultiBot.doRepos("Tanker", 34)
MultiBot.doRepos("Attack", 34)
MultiBot.doRepos("Mode", 34)
MultiBot.doRepos("Stay", 34)
MultiBot.doRepos("Follow", 34)
MultiBot.doRepos("Flee", 34)
MultiBot.doRepos("Format", 34)
MultiBot.doRepos("Beast", 34)
MultiBot.frames["MultiBar"].frames["Left"].frames["Creator"]:Hide()
MultiBot.frames["MultiBar"].frames["Left"].buttons["Creator"]:Hide()
end
end
tMain.addButton("Beast", 0, 102, "ability_mount_swiftredwindrider", MultiBot.tips.main.beast).setDisable()
.doLeft = function(pButton)
if(MultiBot.OnOffSwitch(pButton)) then
MultiBot.doRepos("Tanker", -34)
MultiBot.doRepos("Attack", -34)
MultiBot.doRepos("Mode", -34)
MultiBot.doRepos("Stay", -34)
MultiBot.doRepos("Follow", -34)
MultiBot.doRepos("Flee", -34)
MultiBot.doRepos("Format", -34)
MultiBot.frames["MultiBar"].frames["Left"].frames["Beast"]:Hide()
MultiBot.frames["MultiBar"].frames["Left"].buttons["Beast"]:Show()
else
MultiBot.doRepos("Tanker", 34)
MultiBot.doRepos("Attack", 34)
MultiBot.doRepos("Mode", 34)
MultiBot.doRepos("Stay", 34)
MultiBot.doRepos("Follow", 34)
MultiBot.doRepos("Flee", 34)
MultiBot.doRepos("Format", 34)
MultiBot.frames["MultiBar"].frames["Left"].frames["Beast"]:Hide()
MultiBot.frames["MultiBar"].frames["Left"].buttons["Beast"]:Hide()
end
end
--[[
local tButton = tMain.addButton("Language", 0, 34, "Interface\\AddOns\\MultiBot\\Icons\\language_none.blp", MultiBot.tips.main.lang.master).setDisable()
tButton.doRight = function(pButton)
MultiBot.auto.language = MultiBot.OnOffSwitch(pButton) == false
end
tButton.doLeft = function(pButton)
if(MultiBot.auto.language == true) then return SendChatMessage(MultiBot.info.language, "SAY") end
MultiBot.ShowHideSwitch(pButton.parent.frames["Language"])
end
local tFrame = tMain.addFrame("Language", -36, 36)
tFrame:Hide()
tFrame.addButton("deDE", 0, 0, "Interface\\AddOns\\MultiBot\\Icons\\language_deDE.blp", MultiBot.tips.main.lang.deDE)
.doLeft = function(pButton)
MultiBot.Select(pButton.parent.parent, "Language", pButton.texture)
MultiBot.doSlash("/reload")
MultiBot.language = "deDE"
end
tFrame.addButton("enGB", -30, 0, "Interface\\AddOns\\MultiBot\\Icons\\language_enGB.blp", MultiBot.tips.main.lang.enGB)
.doLeft = function(pButton)
MultiBot.Select(pButton.parent.parent, "Language", pButton.texture)
MultiBot.doSlash("/reload")
MultiBot.language = "enGB"
end
tFrame.addButton("None", -60, 0, "Interface\\AddOns\\MultiBot\\Icons\\language_none.blp", MultiBot.tips.main.lang.none)
.doLeft = function(pButton)
MultiBot.Select(pButton.parent.parent, "Language", pButton.texture)
MultiBot.doSlash("/reload")
MultiBot.language = "none"
end
]]--
tMain.addButton("Release", 0, 136, "achievement_bg_xkills_avgraveyard", MultiBot.tips.main.release).setDisable()
.doLeft = function(pButton)
if(MultiBot.OnOffSwitch(pButton)) then
MultiBot.auto.release = true
else
MultiBot.auto.release = false
end
end
tMain.addButton("Stats", 0, 170, "inv_scroll_08", MultiBot.tips.main.stats).setDisable()
.doLeft = function(pButton)
if(GetNumRaidMembers() > 0) then return SendChatMessage(MultiBot.info.stats, "SAY") end
if(MultiBot.OnOffSwitch(pButton)) then
MultiBot.auto.stats = true
for i = 1, GetNumPartyMembers() do SendChatMessage("stats", "WHISPER", nil, UnitName("party" .. i)) end
MultiBot.stats:Show()
else
MultiBot.auto.stats = false
for key, value in pairs(MultiBot.stats.frames) do value:Hide() end
MultiBot.stats:Hide()
end
end
local tButton = tMain.addButton("Reward", 0, 204, "Interface\\AddOns\\MultiBot\\Icons\\reward.blp", MultiBot.tips.main.reward).setDisable()
tButton.doRight = function(pButton)
if(table.getn(MultiBot.reward.rewards) > 0 and table.getn(MultiBot.reward.units) > 0) then MultiBot.reward:Show() end
end
tButton.doLeft = function(pButton)
MultiBot.reward.state = MultiBot.OnOffSwitch(pButton)
end
tMain.addButton("Reset", 0, 238, "inv_misc_tournaments_symbol_gnome", MultiBot.tips.main.reset)
.doLeft = function(pButton)
MultiBot.ActionToTargetOrGroup("reset botAI")
end
tMain.addButton("Actions", 0, 272, "inv_helmet_02", MultiBot.tips.main.action)
.doLeft = function(pButton)
MultiBot.ActionToTargetOrGroup("reset")
end
-- GAMEMASTER --
local tButton = tMultiBar.addButton("Masters", 38, 0, "mail_gmicon", MultiBot.tips.game.master).doHide()
tButton.doRight = function(pButton)
MultiBot.doSlash("/MultiBot", "")
end
tButton.doLeft = function(pButton)
MultiBot.ShowHideSwitch(pButton.parent.frames["Masters"])
end
local tMasters = tMultiBar.addFrame("Masters", 36, 38)
tMasters:Hide()
tMasters.addButton("NecroNet", 0, 0, "achievement_bg_xkills_avgraveyard", MultiBot.tips.game.necronet).setDisable()
.doLeft = function(pButton)
if(pButton.state) then
MultiBot.necronet.state = false
for key, value in pairs(MultiBot.necronet.buttons) do value:Hide() end
pButton.setDisable()
else
MultiBot.necronet.cont = 0
MultiBot.necronet.area = 0
MultiBot.necronet.zone = 0
MultiBot.necronet.state = true
pButton.setEnable()
end
end
tMasters.addButton("Portal", 0, 34, "inv_box_02", MultiBot.tips.game.portal)