-
Notifications
You must be signed in to change notification settings - Fork 0
/
autoloader.xml
4110 lines (4037 loc) · 295 KB
/
autoloader.xml
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
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<HBProfile>
<Name>[WQ] World Quest Auto Loader ($Rev: 0 $)</Name>
<MinDurability>0.2</MinDurability>
<MinFreeBagSlots>1</MinFreeBagSlots>
<MinLevel>101</MinLevel>
<MaxLevel>200</MaxLevel>
<MailGrey>false</MailGrey>
<MailWhite>true</MailWhite>
<MailGreen>true</MailGreen>
<MailBlue>true</MailBlue>
<MailPurple>true</MailPurple>
<SellGrey>true</SellGrey>
<SellWhite>false</SellWhite>
<SellGreen>false</SellGreen>
<SellBlue>false</SellBlue>
<SellPurple>false</SellPurple>
<TargetElites>true</TargetElites>
<Vendors>
<Vendor Name="Gentle Rosh" Type="Food" Entry="91457" X="-811.0851" Y="6098.343" Z="7.00528" />
<Vendor Name="Cleave Thunderhill" Type="Repair" Entry="89257" X="-790.5798" Y="6109.849" Z="4.647335" />
<Vendor Name="Vestulio the Servant" Type="Repair" Entry="90638" X="1402.411" Y="7129.866" Z="60.92487" />
<Vendor Name="Enchanted Claw of Ceruledan" Type="Repair" Entry="89938" X="624.4566" Y="6616.471" Z="61.76412" />
<Vendor Name="Falara Nightsong" Type="Repair" Entry="89640" X="-89.1441" Y="6951.358" Z="14.10535" />
<Vendor Name="Galica Bravepaw" Type="Repair" Entry="97858" X="4069.965" Y="4410.103" Z="768.1867" />
<Vendor Name="Lucas Sigmund" Type="Repair" Entry="94100" X="4494.187" Y="4865.437" Z="662.1328" />
<Vendor Name="Bar'tu Silverstream" Type="Repair" Entry="97869" X="5114.556" Y="4973.081" Z="752.5872" />
<Vendor Name="Shale Greyfeather" Type="Repair" Entry="99905" X="4106.347" Y="4405.938" Z="768.1934" />
<Vendor Name="De'tu Frostwing" Type="Repair" Entry="97865" X="4814.677" Y="3915.732" Z="826.8667" />
<Vendor Name="Cale Fireheart" Type="Repair" Entry="97876" X="3935.39" Y="3899.267" Z="905.3173" />
<Vendor Name="Crafty Palu" Type="Repair" Entry="108537" X="6470.426" Y="4746.604" Z="12.73519" />
<Vendor Name="Adaleigh Mae Nelson" Type="Food" Entry="108534" X="6455.857" Y="4732.254" Z="13.12072" />
<Vendor Name="Darbrul" Type="Repair" Entry="99205" X="5867.962" Y="4547.085" Z="614.298" UsableWhen="IsQuestCompleted(40229)" />
<Vendor Name="Supplier Barleyfoot" Type="Repair" Entry="110521" X="3211.746" Y="3086.97" Z="440.2122" />
<Vendor Name="Tinkmaster Overspark" Type="Repair" Entry="90866" X="3395.593" Y="3077.832" Z="526.3278" UsableWhen="IsQuestCompleted(38060)" />
<Vendor Name="Supplier Barleyfoot" Type="Repair" Entry="110521" X="2702.516" Y="2855.519" Z="308.8194" />
<Vendor Name="Hankerin Ferinale" Type="Repair" Entry="98109" X="2832.689" Y="903.7344" Z="77.96029" UsableWhen="Me.IsAlliance" />
<Vendor Name="Provisioner Sheldon" Type="Repair" Entry="110534" X="4099.574" Y="2940.889" Z="27.33306" UsableWhen="Me.IsHorde && IsQuestCompleted(39801)" />
<Vendor Name="Quartermaster Ricard" Type="Repair" Entry="91535" X="3974.075" Y="2892.368" Z="241.747" UsableWhen="Me.IsHorde && IsQuestCompleted(38362)" />
<Vendor Name="Julietta Smythe" Type="Repair" Entry="92839" X="2403.472" Y="1842.389" Z="18.8205" UsableWhen="Me.IsHorde" />
<Vendor Name="Kah'chu" Type="Repair" Entry="27188" X="373.0156" Y="358.8663" Z="28.41259" UsableWhen="Me.ZoneId == 7588" />
<Vendor Name="Callista Swiftglaive" Type="Repair" Entry="93464" X="2319.413" Y="6611.955" Z="140.3525" />
<Vendor Name="Javan Clawthorn" Type="Repair" Entry="92000" X="1951.083" Y="6912.71" Z="52.50054" />
<Vendor Name="Anelas Moonstone" Type="Food" Entry="110531" X="2832.1" Y="6480.855" Z="206.4948" />
<Vendor Name="Vassallorand Nightmist" Type="Repair" Entry="112629" X="2876.16" Y="6754.713" Z="219.5564" />
<Vendor Name="Falara Nightsong" Type="Repair" Entry="111324" X="-558.387" Y="2985.3" Z="41.6926" />
<Vendor Name="Fergus the Mighty" Type="Repair" Entry="120117" X="-1213.714" Y="2195.701" Z="0.7250597" />
<Vendor Name="Warmage Kath'leen" Type="Repair" Entry="120898" X="-1601.747" Y="3207.367" Z="129.4696" />
<Vendor Name="Rhys Carrington" Type="Repair" Entry="93945" X="2817.958" Y="7264.667" Z="22.13581" />
</Vendors>
<QuestOrder>
<CustomBehavior File="RunCode" Type="Definition"><![CDATA[public class Settings : Styx.Helpers.Settings
{
public static readonly string _settingsPath = Path.Combine(CharacterSettingsDirectory, "Profiles", "NuokWorldQuestSettings.xml");
private static Settings _instance;
public static Settings Instance => _instance ?? (_instance = new Settings());
public Settings() : base(_settingsPath)
{
}
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool DoWanted { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool DoPvP { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool DoDangerQuests { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool DoRare { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool DoElite { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool DoWorldBosses { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool DoProfessions { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool DoWorkOrders { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool ArtifactPower { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Equipment { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Blood { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool OrderHall { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Gold { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Items { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Azsuna { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Valsharah { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Stormheim { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Suramar { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Highmountain { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool EyeofAzshara { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Dalaran { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool BrokenShore { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool ArmiesOfLegionfall { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool TheWardens { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool CourtOfFarondis { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool KirinTor { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool HighmountainTribe { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool TheNightfallen { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Valarjar { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Legionfall { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool EmissaryFirst { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool Dreamweavers { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool SkipHBRelog { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool SVNUpdate { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(true)]
public bool LoopProfile { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool WQGF { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(3)]
public int WQGFMin { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(10)]
public int WQGFMax { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool DoPetBattles { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool UseArtifact { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool EliteInvasion { get; set; }
[Setting]
[Styx.Helpers.DefaultValue(false)]
public bool Invasion { get; set; }
}
public class WorldQuest
{
public WorldQuest(string luaIn)
{
var s = luaIn.Split('$');
QuestId = Lua.ParseLuaValue<uint>(s[0]);
Name = s[1];
Faction = (Emissary) Lua.ParseLuaValue<uint>(s[2]);
Tag = (QuestTag) Lua.ParseLuaValue<int>(s[3]);
Reward = new RewardInfo(QuestId);
}
public uint QuestId { get; }
public Emissary Faction { get; }
public string Name { get; }
public QuestTag Tag { get; }
public RewardInfo Reward { get; }
public class RewardInfo
{
public RewardInfo(uint questId)
{
Gold = Lua.GetReturnVal<uint>($"return GetQuestLogRewardMoney({questId});", 0) / 10000;
ArtifactXP = Lua.GetReturnVal<uint>($"return GetQuestLogRewardArtifactXP({questId});", 0);
var numCurrencies = Lua.GetReturnVal<int>($"return GetNumQuestLogRewardCurrencies({questId});", 0);
Currencies = new List<Currency>();
if(numCurrencies != 0)
for (var i = 1; i <= numCurrencies; i++)
Currencies.Add(new Currency(questId, i));
var numItems = Lua.GetReturnVal<int>($"return GetNumQuestLogRewards({questId});", 0);
Items = new List<Item>();
if(numItems != 0)
for (var i = 1; i <= numItems; i++)
Items.Add(new Item(questId, i));
}
public uint Gold { get; }
public uint ArtifactXP { get; }
public List<Currency> Currencies { get; }
public List<Item> Items { get; }
public override string ToString()
{
string s = "Rewards ";
if (Gold > 0) s += $"Gold {Gold}, ";
if (ArtifactXP > 0) s += $"ArtifactXP {ArtifactXP}, ";
foreach (var c in Currencies)
s += $"{c.Name} ({c.CurrencyId}) x{c.Count}, ";
foreach (var i in Items)
{
if (i.IsArftifactPower)
s += $"{i.Name} Articaft Power";
else if (i.Count > 1)
s += $"{i.Name} x{i.Count}, ";
else
s += $"{i.Name}, ";
}
return s;
}
public class Currency
{
public Currency(uint questId, int index)
{
//dump GetQuestLogRewardCurrencyInfo(2, 46183)
var info = Lua.GetReturnValues($"return GetQuestLogRewardCurrencyInfo({index}, {questId});");
Name = info[0];
Texture = info[1];
Count = Lua.ParseLuaValue<uint>(info[2]);
CurrencyId = Lua.ParseLuaValue<uint>(info[3]);
}
public string Name { get; }
public string Texture { get; }
public uint Count { get; }
public uint CurrencyId { get; }
}
public class Item
{
public Item(uint questId, int index)
{
var info = Lua.GetReturnValues($"return GetQuestLogRewardInfo({index}, {questId});");
Name = info[0];
Texture = info[1];
Count = Lua.ParseLuaValue<int>(info[2]);
Quality = Lua.ParseLuaValue<int>(info[3]);
IsUsable = Lua.ParseLuaValue<bool>(info[4]);
ItemId = Lua.ParseLuaValue<uint>(info[5]);
IsArftifactPower = Lua.GetReturnVal<bool>($"return IsArtifactPowerItem({ItemId});", 0);
}
public string Name { get; }
public string Texture { get; }
public int Count { get; }
public int Quality { get; }
public uint ItemId { get; }
public bool IsUsable { get; }
public bool IsArftifactPower { get; }
}
}
}
public enum QuestTag
{
WorldQuest = 109,
EpicEliteWorldQuest = 112,
PvPWorldQuest = 113,
BattlePetWorldQuest = 115,
BlacksmithingWorldQuest = 116,
LeatherworkingWorldQuest = 117,
AlchemyWorldQuest = 118,
HerbalismWorldQuest = 119,
MiningWorldQuest = 120,
TailoringWorldQuest = 121,
EngineeringWorldQuest = 122,
EnchantingWorldQuest = 123,
SkinningWorldQuest = 124,
JewelcraftingWorldQuest = 125,
InscriptionWorldQuest = 126,
FishingWorldQuest = 130,
CookingWorldQuest = 131,
RareWorldQuest = 135,
RareEliteWorldQuest = 136,
DungeonWorldQuest = 137,
LegionInvasionWorldQuest = 139,
RaidWorldQuest = 141,
LegionInvasionEliteWorldQuest = 142,
LegionfallWorldQuest = 144,
}
public enum Zone
{
Azsuna = 1015,
Valshara = 1018,
Highmountain = 1024,
Stormheim = 1017,
Suramar = 1033,
Dalaran = 1014,
EyeOfAzshara = 1096,
BrokenShore = 1021
}
public enum Emissary
{
None = 0,
TheWardens = 1894,
CourtOfFarondis = 1900,
Dreamweavers = 1883,
KirinTor = 1090,
HighmountainTribe = 1828,
TheNightfallen = 1859,
Valarjar = 1948,
ArmiesOfLegionfall = 2045,
}
public void UpdateWorldQuests()
{
WorldQuests.Clear();
var zones = new List<Zone>
{
Zone.Dalaran,
Zone.BrokenShore,
Zone.Azsuna,
Zone.Valshara,
Zone.Highmountain,
Zone.Stormheim,
Zone.Suramar,
Zone.EyeOfAzshara
};
foreach (var z in zones)
WorldQuests.AddRange(GetWorldQuestsByZone(z));
}
public List<WorldQuest> GetWorldQuestsByZone(Zone zone)
{
var l = new List<WorldQuest>();
var lua = $@"local ids = {{ }}
SetMapByID({(int)zone});
local taskInfo = C_TaskQuest.GetQuestsForPlayerByMapID({(int)zone}, 1007);
if (taskInfo) then
for i, info in ipairs(taskInfo) do
if HaveQuestData(info.questId) then
if QuestUtils_IsQuestWorldQuest(info.questId) and WorldMap_DoesWorldQuestInfoPassFilters(info) then
local title, factionId = C_TaskQuest.GetQuestInfoByQuestID(info.questId)
if (factionId == nil) then factionId = 0; end
local tagID, _, worldQuestType = GetQuestTagInfo(info.questId);
if (tagID == nil) then tagID = 109; end
local quest = info.questId..""$""..title..""$""..factionId..""$""..tagID
tinsert(ids, quest)
end
end
end
end
return unpack(ids)";
var list = Lua.GetReturnValues(lua);
Log($"Found {list.Count} WorldQuests in {zone}");
l = list.Select(q => new WorldQuest(q)).ToList();
foreach (var q in l)
{
Logging.WriteDiagnostic($"Found { q.Name} ({ q.QuestId}) - { q.Tag} - { q.Faction} - { q.Reward}");
}
return l;
}
public static List<WorldQuest> WorldQuests = new List<WorldQuest>();
public uint[] EmissaryIds = { 42420, 42170, 42422, 42233, 43179, 42234, 42421 };
public void LogEmissaryQuests()
{
foreach (var quest in StyxWoW.Me.QuestLog.GetAllQuests().Where(q => EmissaryIds.Contains(q.Id)))
Log($"Player Has Emissary Quest {quest.Name}");
}
public static HashSet<uint> CodedProfiles = new HashSet<uint>();
public void LogUncoded()
{
var quests = WorldQuests.Where(q => !CodedProfiles.Contains(q.QuestId));
foreach (var q in quests)
Log($"We Dont Currently Have a Profile for {q.Name} ({q.QuestId})");
}
public bool DoQuest(uint questId)
{
if (!CodedProfiles.Contains(questId)) CodedProfiles.Add(questId);
var quest = WorldQuests.FirstOrDefault(q => q.QuestId == questId);
if (quest == null) return false;
var s = Settings.Instance;
if (quest.Tag == QuestTag.RareEliteWorldQuest && !s.DoElite)
{
Log($"Skipping {quest.Name} {quest.QuestId} - {quest.Tag} Disabled");
return false;
}
if (quest.Tag == QuestTag.RaidWorldQuest && !s.DoElite)
{
Log($"Skipping {quest.Name} {quest.QuestId} - {quest.Tag} Do Elite Disabled");
return false;
}
if (quest.Tag == QuestTag.LegionfallWorldQuest && !s.DoElite)
{
Log($"Skipping {quest.Name} {quest.QuestId} - {quest.Tag} Elite Disabled");
return false;
}
if (quest.Tag == QuestTag.RareWorldQuest && !s.DoRare)
{
Log($"Skipping {quest.Name} {quest.QuestId} - {quest.Tag} Elite Disabled");
return false;
}
if (quest.Tag == QuestTag.PvPWorldQuest && !s.DoPvP)
{
Log($"Skipping {quest.Name} {quest.QuestId} - {quest.Tag} PVP Disabled");
return false;
}
if (quest.Tag == QuestTag.EpicEliteWorldQuest && !s.DoWorldBosses)
{
Log($"Skipping {quest.Name} {quest.QuestId} - {quest.Tag} World Bosses Disabled");
return false;
}
if (quest.Reward.ArtifactXP > 0 && !s.ArtifactPower)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Rewards ArtifactPower Disabled");
return false;
}
if (quest.Reward.Items.Any(i => i.IsArftifactPower) && !s.ArtifactPower)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Rewards ArtifactPower Disabled");
return false;
}
if (quest.Reward.Items.Any(i => i.ItemId == 124124) && !s.Blood)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Rewards Blood Disabled");
return false;
}
if (quest.Reward.Gold > 0 && !s.Gold)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Rewards Gold Disabled");
return false;
}
if (quest.Reward.Items.Count > 0 && !s.Items)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Rewards Items Disabled");
return false;
}
if(quest.Reward.Currencies.Any(c => c.CurrencyId == 1220) && !s.OrderHall)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Order Hall Resources Disabled");
return false;
}
if (quest.Tag == QuestTag.BattlePetWorldQuest && !s.DoPetBattles)
{
Log($"Skipping {quest.Name} {quest.QuestId} Pet Battles Disabled");
return false;
}
if (quest.Tag == QuestTag.BattlePetWorldQuest && s.DoPetBattles)
return true;
if (quest.Tag == QuestTag.LegionInvasionEliteWorldQuest && !s.EliteInvasion)
{
Log($"Skipping {quest.Name} {quest.QuestId} - {quest.Tag} - Elite Invasions Disabled");
}
if (quest.Tag == QuestTag.LegionInvasionWorldQuest && !s.Invasion)
{
Log($"Skipping {quest.Name} {quest.QuestId} - {quest.Tag} - Invasions Disabled");
}
if (quest.Tag == QuestTag.AlchemyWorldQuest &&
(Me.GetSkill(SkillLine.Alchemy).CurrentValue < 100 || !s.DoProfessions))
{
Log(
$"Skipping {quest.Name} {quest.QuestId} - AlchemyWorldQuest - DoProfessions {s.DoProfessions} - CurrentSkillLevel {Me.GetSkill(SkillLine.Alchemy).CurrentValue}");
return false;
}
if (quest.Tag == QuestTag.SkinningWorldQuest &&
(Me.GetSkill(SkillLine.Skinning).CurrentValue < 100 || !s.DoProfessions))
{
Log(
$"Skipping {quest.Name} {quest.QuestId} - SkinningWorldQuest - DoProfessions {s.DoProfessions} - CurrentSkillLevel {Me.GetSkill(SkillLine.Skinning).CurrentValue}");
return false;
}
if (quest.Tag == QuestTag.BlacksmithingWorldQuest &&
(Me.GetSkill(SkillLine.Blacksmithing).CurrentValue < 100 || !s.DoProfessions))
{
Log(
$"Skipping {quest.Name} {quest.QuestId} - BlacksmithingWorldQuest - DoProfessions {s.DoProfessions} - CurrentSkillLevel {Me.GetSkill(SkillLine.Blacksmithing).CurrentValue}");
return false;
}
if (quest.Tag == QuestTag.EnchantingWorldQuest &&
(Me.GetSkill(SkillLine.Enchanting).CurrentValue < 100 || !s.DoProfessions))
{
Log(
$"Skipping {quest.Name} {quest.QuestId} - EnchantingWorldQuest - DoProfessions {s.DoProfessions} - CurrentSkillLevel {Me.GetSkill(SkillLine.Blacksmithing).CurrentValue}");
return false;
}
if (quest.Tag == QuestTag.CookingWorldQuest &&
(Me.GetSkill(SkillLine.Cooking).CurrentValue < 100 || !s.DoProfessions))
{
Log(
$"Skipping {quest.Name} {quest.QuestId} - CookingWorldQuest - DoProfessions {s.DoProfessions} - CurrentSkillLevel {Me.GetSkill(SkillLine.Cooking).CurrentValue}");
return false;
}
if (quest.Tag == QuestTag.FishingWorldQuest &&
(Me.GetSkill(SkillLine.Fishing).CurrentValue < 100 || !s.DoProfessions))
{
Log(
$"Skipping {quest.Name} {quest.QuestId} - FishingWorldQuest - DoProfessions {s.DoProfessions} - CurrentSkillLevel {Me.GetSkill(SkillLine.Fishing).CurrentValue}");
return false;
}
if (quest.Tag == QuestTag.EngineeringWorldQuest &&
(Me.GetSkill(SkillLine.Engineering).CurrentValue < 100 || !s.DoProfessions))
{
Log(
$"Skipping {quest.Name} {quest.QuestId} - EngineeringWorldQuest - DoProfessions {s.DoProfessions} - CurrentSkillLevel {Me.GetSkill(SkillLine.Engineering).CurrentValue}");
return false;
}
if (quest.Tag == QuestTag.HerbalismWorldQuest &&
(Me.GetSkill(SkillLine.Herbalism).CurrentValue < 100 || !s.DoProfessions))
{
Log(
$"Skipping {quest.Name} {quest.QuestId} - HerbalismWorldQuest - DoProfessions {s.DoProfessions} - CurrentSkillLevel {Me.GetSkill(SkillLine.Herbalism).CurrentValue}");
return false;
}
if (quest.Tag == QuestTag.JewelcraftingWorldQuest &&
(Me.GetSkill(SkillLine.Jewelcrafting).CurrentValue < 100 || !s.DoProfessions))
{
Log(
$"Skipping {quest.Name} {quest.QuestId} - HerbalismWorldQuest - DoProfessions {s.DoProfessions} - CurrentSkillLevel {Me.GetSkill(SkillLine.Herbalism).CurrentValue}");
return false;
}
if (quest.Tag == QuestTag.MiningWorldQuest &&
(Me.GetSkill(SkillLine.Mining).CurrentValue < 100 || !s.DoProfessions))
{
Log(
$"Skipping {quest.Name} {quest.QuestId} - MiningWorldQuest - DoProfessions {s.DoProfessions} - CurrentSkillLevel {Me.GetSkill(SkillLine.Mining).CurrentValue}");
return false;
}
if (quest.Tag == QuestTag.TailoringWorldQuest &&
(Me.GetSkill(SkillLine.Tailoring).CurrentValue < 100 || !s.DoProfessions))
{
Log(
$"Skipping {quest.Name} {quest.QuestId} - TailoringWorldQuest - DoProfessions {s.DoProfessions} - CurrentSkillLevel {Me.GetSkill(SkillLine.Tailoring).CurrentValue}");
return false;
}
var emissaryFirst = Settings.Instance.EmissaryFirst;
var hasEmissary = EmissaryIds.Any(HasQuest);
if (quest.Faction == Emissary.TheWardens)
{
if (!s.TheWardens)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Faction TheWardens Disabled");
return false;
}
if (emissaryFirst && hasEmissary && !HasQuest(42422))
{
Log($"Skipping {quest.Name} {quest.QuestId} - Emmisary Quest Not Active {quest.Faction}");
return false;
}
}
if (quest.Faction == Emissary.CourtOfFarondis)
{
if (!s.CourtOfFarondis)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Faction {quest.Faction} Disabled");
return false;
}
if (emissaryFirst && hasEmissary && !HasQuest(42420))
{
Log($"Skipping {quest.Name} {quest.QuestId} - Emmisary Quest Not Active {quest.Faction}");
return false;
}
}
if (quest.Faction == Emissary.Dreamweavers)
{
if (!s.Dreamweavers)
{
Log($"Skipping {quest.Name} {quest.QuestId} Faction - {quest.Faction} Disabled");
return false;
}
if (emissaryFirst && hasEmissary && !HasQuest(42170))
{
Log($"Skipping {quest.Name} {quest.QuestId} - Emmisary Quest Not Active {quest.Faction}");
return false;
}
}
if (quest.Faction == Emissary.KirinTor)
{
if (!s.KirinTor)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Faction {quest.Faction} Disabled");
return false;
}
if (emissaryFirst && hasEmissary && !HasQuest(43179))
{
Log($"Skipping {quest.Name} {quest.QuestId} - Emmisary Quest Not Active {quest.Faction}");
return false;
}
}
if (quest.Faction == Emissary.TheNightfallen)
{
if (!s.TheNightfallen)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Faction {quest.Faction} Disabled");
return false;
}
if (emissaryFirst && hasEmissary && !HasQuest(42421))
{
Log($"Skipping {quest.Name} {quest.QuestId} - Emmisary Quest Not Active {quest.Faction}");
return false;
}
}
if (quest.Faction == Emissary.HighmountainTribe)
{
if (!s.HighmountainTribe)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Faction {quest.Faction} Disabled");
return false;
}
if (emissaryFirst && hasEmissary && !HasQuest(42233))
{
Log($"Skipping {quest.Name} {quest.QuestId} - Emmisary Quest Not Active {quest.Faction}");
return false;
}
}
if (quest.Faction == Emissary.Valarjar)
{
if (!s.Valarjar)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Faction {quest.Faction} Disabled");
return false;
}
if (emissaryFirst && hasEmissary && !HasQuest(42234))
{
Log($"Skipping {quest.Name} {quest.QuestId} - Emmisary Quest Not Active {quest.Faction}");
return false;
}
}
if (quest.Faction == Emissary.ArmiesOfLegionfall)
{
if(!s.ArmiesOfLegionfall)
{
Log($"Skipping {quest.Name} {quest.QuestId} - Faction {quest.Faction} Disabled");
return false;
}
if (emissaryFirst && hasEmissary) //No emmisary for this yet
{
Log($"Skipping {quest.Name} {quest.QuestId} - Doing Emissary First");
return false;
}
}
return true;
}
public bool HasPlugin => PluginManager.Plugins.FirstOrDefault(p => p.Name == "WorldQuestHelper") != null;
public void EnablePlugin()
{
var plugin = PluginManager.Plugins.FirstOrDefault(p => p.Name == "WorldQuestHelper");
if (plugin == null) return;
plugin.Enabled = false;
plugin.Enabled = true;
}
public bool PluginUptoDate()
{
var plugin = PluginManager.Plugins.FirstOrDefault(p => p.Name == "WorldQuestHelper");
if (plugin == null)
{
Log("Couldn't find the WorldQuestHelper plugin!");
return false;
}
var latestVersion = new Version(3, 1, 1588);
if (plugin.Version == latestVersion) return true;
Log($"---Plugin Update {latestVersion} available---");
Log("There is an updated version of the WorldQuestHelper settings plugin");
Log("Please update from the SVN and copy the folder WorldQuestHelper from \\world-quests\\Plugin to your HB Plugins folder");
Log("Once you have done this please restart the bot");
return false;
}
public void Log(string text)
{
Logging.Write(System.Windows.Media.Colors.DodgerBlue, "[WQ] " + text);
}
public bool ZoneEnabled(int zoneId)
{
if(zoneId == 1015)
return Settings.Instance.Azsuna;
if(zoneId == 1018)
return Settings.Instance.Valsharah;
if(zoneId == 1017)
return Settings.Instance.Stormheim;
if(zoneId == 1033)
return Settings.Instance.Suramar;
if(zoneId == 1024)
return Settings.Instance.Highmountain;
if(zoneId == 1096)
return Settings.Instance.EyeofAzshara;
if(zoneId == 1014)
return Settings.Instance.Dalaran;
if(zoneId == 1021)
return Settings.Instance.BrokenShore;
return false;
}
public bool QuestCompletedInLog(int questId) =>
Lua.GetReturnVal<bool>($@"for questIndex = 1, GetNumQuestLogEntries() do
_, _, _, _, _, isComplete, _, questID = GetQuestLogTitle(questIndex);
if (questID == {questId}) then return isComplete; end end return false; ", 0);
public async Task ForceTurnin(int questId, string name, int npcId, float x, float y, float z)
{
if (!QuestCompletedInLog(questId)) return;
TreeRoot.GoalText = $"Turnin {name}";
var turninNpc =
ObjectManager.GetObjectsOfType<WoWUnit>().FirstOrDefault(u => u.IsValid && u.Entry == npcId);
if (turninNpc == null)
{
TreeRoot.StatusText = $"Moving to {x} {y} {z}";
await CommonCoroutines.MoveTo(new Vector3(x, y, z));
return;
}
if (!GossipFrame.Instance.IsVisible && !QuestFrame.Instance.IsVisible)
{
if (!turninNpc.WithinInteractRange)
{
TreeRoot.StatusText = $"Moving to {turninNpc}";
await CommonCoroutines.MoveTo(turninNpc.Location);
return;
}
TreeRoot.StatusText = $"Interacting with {turninNpc}";
turninNpc.Interact();
await CommonCoroutines.SleepForRandomUiInteractionTime();
}
if (GossipFrame.Instance.IsVisible)
{
var quest = GossipFrame.Instance.ActiveQuests.FirstOrDefault(q => q.Id == questId);
if (quest == null) return;
TreeRoot.StatusText =$"Selecting {quest.Name} (GF)";
GossipFrame.Instance.SelectActiveGossipQuest(quest.Index);
GossipFrame.Instance.SelectActiveQuest(quest.Index);
await CommonCoroutines.SleepForRandomUiInteractionTime();
return;
}
if (!QuestFrame.Instance.IsVisible) return;
if (QuestFrame.Instance.CurrentShownQuestId == questId)
{
TreeRoot.GoalText = $"Completing {QuestFrame.Instance.CurrentShownQuest.Name}";
QuestFrame.Instance.SelectQuestReward(1);
await CommonCoroutines.SleepForRandomUiInteractionTime();
QuestFrame.Instance.CompleteQuest();
await CommonCoroutines.SleepForRandomUiInteractionTime();
return;
}
var questF = QuestFrame.Instance.ActiveQuests.FirstOrDefault(que => que.Id == questId);
if (questF == null) return;
TreeRoot.GoalText = $"Selecting {questF.Name} (QF)";
QuestFrame.Instance.SelectActiveGossipQuest(questF.Index);
QuestFrame.Instance.SelectActiveQuest(questF.Index);
await CommonCoroutines.SleepForRandomUiInteractionTime();
}
public async Task ForcedTurnin(int questId, string name, int npcId, float x, float y, float z)
{
while (QuestCompletedInLog(questId))
{
await ForceTurnin(questId, name, npcId, x, y, z);
await Coroutine.Yield();
}
}
public async Task UseArtifact()
{
var Af = Me.BagItems.Where(i => i.IsValid && i.ItemLink.Contains("8388608"));
foreach (var ap in Af)
{
Log($"Using {ap}");
while (ap.IsValid)
{
ap.Use();
await Coroutine.Sleep(500);
await Coroutine.Yield();
}
}
await Coroutine.Yield();
}]]></CustomBehavior>
<CustomBehavior File="RunCode" Code="Log("Welcome To The Community World Quest Project");" />
<CustomBehavior File="RunCode" Code="Log("~Created by~");" />
<CustomBehavior File="RunCode" Code="Log("Zinner, WiN, Staal, Pellepylly, Codex, tsatsa, Nuok");" />
<If Condition="Settings.Instance.SVNUpdate">
<CustomBehavior File="RunCode" Code="Log("Updating WQ profiles from the SVN..");" />
<CustomBehavior File="RunCode"><![CDATA[if(File.Exists(@"Default Profiles\\world-quests\\Utilities\\updater.bat")) Process.Start(@"Default Profiles\\world-quests\\Utilities\\updater.bat");]]></CustomBehavior>
<CustomBehavior File="WaitTimer" WaitTime="5000" />
</If>
<CustomBehavior File="RunCode" Code="UpdateWorldQuests(); Settings.Instance.Load();" />
<CustomBehavior File="RunCode" Code="Log($@"Current Settings");" />
<CustomBehavior File="RunCode" Code="Log($@"WQGF {Settings.Instance.WQGF}");" />
<CustomBehavior File="RunCode" Code="Log($@"Hard Quests");" />
<CustomBehavior File="RunCode" Code="Log($@"DoWanted {Settings.Instance.DoWanted} - DoDangerQuests {Settings.Instance.DoDangerQuests} - DoElite {Settings.Instance.DoElite} - DoPvP {Settings.Instance.DoPvP}");" />
<CustomBehavior File="RunCode" Code="Log($@"EliteInvasion {Settings.Instance.EliteInvasion} - Invasion {Settings.Instance.Invasion}");" />
<CustomBehavior File="RunCode" Code="Log($@"Professions");" />
<CustomBehavior File="RunCode" Code="Log($@"DoProfessions {Settings.Instance.DoProfessions} - DoWorkOrders {Settings.Instance.DoWorkOrders}");" />
<CustomBehavior File="RunCode" Code="Log($@"Zone");" />
<CustomBehavior File="RunCode" Code="Log($@"Azsuna {Settings.Instance.Azsuna} - Valsharah {Settings.Instance.Valsharah} - Stormheim {Settings.Instance.Stormheim} - Suramar {Settings.Instance.Suramar}");" />
<CustomBehavior File="RunCode" Code="Log($@"Highmountain {Settings.Instance.Highmountain} - EyeofAzshara {Settings.Instance.EyeofAzshara} - Dalaran {Settings.Instance.Dalaran} - BrokenShore {Settings.Instance.BrokenShore}");" />
<CustomBehavior File="RunCode" Code="Log($@"Faction");" />
<CustomBehavior File="RunCode" Code="Log($@"EmissaryFirst {Settings.Instance.EmissaryFirst}");" />
<CustomBehavior File="RunCode" Code="Log($@"TheWardens {Settings.Instance.TheWardens} - CourtOfFarondis {Settings.Instance.CourtOfFarondis} - KirinTor {Settings.Instance.KirinTor} - HighmountainTribe {Settings.Instance.HighmountainTribe}");" />
<CustomBehavior File="RunCode" Code="Log($@"Dreamweavers {Settings.Instance.Dreamweavers} - TheNightfallen {Settings.Instance.TheNightfallen} - Valarjar {Settings.Instance.Valarjar} - ArmiesOfLegionfall {Settings.Instance.ArmiesOfLegionfall}");" />
<CustomBehavior File="RunCode" Code="Log($@"Rewards");" />
<CustomBehavior File="RunCode" Code="Log($@"ArtifactPower {Settings.Instance.ArtifactPower} - Equipment {Settings.Instance.Equipment} - Items {Settings.Instance.Items} - Blood of Sargeras {Settings.Instance.Blood}");" />
<CustomBehavior File="RunCode" Code="Log($@"OrderHall {Settings.Instance.OrderHall} - Gold {Settings.Instance.Gold}");" />
<If Condition="!HasPlugin">
<CustomBehavior File="UserDialog" StopOnContinue="true" AllowBotStop="true" Title="Missing Settings Plugin" Text="We couldn't find the plugin,\n Please make sure you have copied the folder 'WorldQuestSettings' from \Default Profiles\world-quests\Plugin to Honorbuddy 3\Plugins and restart the bot" />
</If>
<CustomBehavior File="RunCode" Code="Log($"Plugin Upto Date {PluginUptoDate()}");" />
<CustomBehavior File="RunCode" Code="LogEmissaryQuests();" />
<CustomBehavior File="RunCode" Code="EnablePlugin();" />
<CustomBehavior File="RunCode" Code="UpdateWorldQuests(); Settings.Instance.Load();" />
<CustomBehavior File="WaitTimer" WaitTime="1000" />
<While Condition="HasQuest(42420) && QuestCompletedInLog(42420)">
<CustomBehavior File="RunCode" Code="await ForcedTurnin(42420, "Court of Farondis", 107376, -8.559865f, 6736.977f, 55.58721f);" />
</While>
<While Condition="HasQuest(42170) && QuestCompletedInLog(42170)">
<CustomBehavior File="RunCode" Code="await ForcedTurnin(42170, "The Dreamweavers", 106901, 2274.2f, 6592.066f, 138.8777f);" />
</While>
<While Condition="HasQuest(42422) && QuestCompletedInLog(42422)">
<CustomBehavior File="RunCode" Code="await ForcedTurnin(42422, "The Wardens", 107379, -1441.083f, 6656.882f, 12.00175f);" />
</While>
<While Condition="HasQuest(42421) && QuestCompletedInLog(42421)">
<CustomBehavior File="RunCode" Code="await ForcedTurnin(42421, "The Nightfallen", 97140, 1720.796f, 4617.22f, 123.9455f);" />
</While>
<While Condition="HasQuest(42233) && QuestCompletedInLog(42233)">
<CustomBehavior File="RunCode" Code="await ForcedTurnin(42233, "Highmountain Tribes", 106902, 4112.049f, 4445.559f, 768.3433f);" />
</While>
<While Condition="HasQuest(43179) && QuestCompletedInLog(43179)">
<CustomBehavior File="RunCode" Code="await ForcedTurnin(43179, "The Kirin Tor of Dalaran", 32725, -849.4995f, 4597.092f, 748.7828f);" />
</While>
<While Condition="HasQuest(42234) && QuestCompletedInLog(42234)">
<CustomBehavior File="RunCode" Code="await ForcedTurnin(42234, "The Valarjar", 106904, 3189.06f, 1536.94f, 182.54f);" />
</While>
<If Condition="Settings.Instance.UseArtifact">
<CustomBehavior File="RunCode" Code="await UseArtifact()" />
</If>
<If Condition="ZoneEnabled(1014)">
<!--Dalaran-->
<If Condition="DoQuest(40277)">
<CustomBehavior File="RunCode" Code="Log("Loading 40277-[N]-[QUEST]-PETBATTLE-Wq-Fight Night Tiffany Nelson-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="Dalaran\40277-[N]-[QUEST]-PETBATTLE-Wq-Fight Night Tiffany Nelson-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(40298)">
<CustomBehavior File="RunCode" Code="Log("Loading 40298-[N]-[QUEST]-PETBATTLE-Wq-Fight_Night_Sir_Galveston-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="Dalaran\40298-[N]-[QUEST]-PETBATTLE-Wq-Fight_Night_Sir_Galveston-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(41656) && Settings.Instance.DoWorkOrders">
<CustomBehavior File="RunCode" Code="Log("Loading 41656-[N]-[QUEST]-Wq-Work Work Order Azsunite Loop");" />
<CustomBehavior File="LoadProfile" ProfileName="Dalaran\41656-[N]-[QUEST]-Wq-Work Work Order Azsunite Loop" RememberProfile="false" />
</If>
<If Condition="DoQuest(41662) && Settings.Instance.DoWorkOrders">
<CustomBehavior File="RunCode" Code="Log("Loading 41662-[N]-[QUEST]-Wq-Work Order Ancient Rejuvenation Potions");" />
<CustomBehavior File="LoadProfile" ProfileName="Dalaran\41662-[N]-[QUEST]-Wq-Work Order Ancient Rejuvenation Potions" RememberProfile="false" />
</If>
<If Condition="DoQuest(41668) && Settings.Instance.DoWorkOrders">
<CustomBehavior File="RunCode" Code="Log("Loading 41668-[N]-[QUEST]-Wq-Vantus Rune Work Order Il'gynoth, The Heart of Corruption");" />
<CustomBehavior File="LoadProfile" ProfileName="Dalaran\41668-[N]-[QUEST]-Wq-Vantus Rune Work Order Il'gynoth, The Heart of Corruption" RememberProfile="false" />
</If>
<If Condition="DoQuest(41674) && Settings.Instance.DoWorkOrders">
<CustomBehavior File="RunCode" Code="Log("Loading 41674-[N]-[QUEST]-Wq-Work Order Word of Intellect");" />
<CustomBehavior File="LoadProfile" ProfileName="Dalaran\41674-[N]-[QUEST]-Wq-Work Order Word of Intellect" RememberProfile="false" />
</If>
<If Condition="DoQuest(41881)">
<CustomBehavior File="RunCode" Code="Log("Loading 41881-[N]-[QUEST]-PETBATTLE-Wq-Fight Night Heliosus-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="Dalaran\41881-[N]-[QUEST]-PETBATTLE-Wq-Fight Night Heliosus-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(41886)">
<CustomBehavior File="RunCode" Code="Log("Loading 41886-[N]-[QUEST]-PETBATTLE-Wq-Fight_Night_Rats-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="Dalaran\41886-[N]-[QUEST]-PETBATTLE-Wq-Fight_Night_Rats-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(42062)">
<CustomBehavior File="RunCode" Code="Log("Loading 42062-[N]-[QUEST]-PETBATTLE-Wq-Nazak_the_Fiend-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="Dalaran\42062-[N]-[QUEST]-PETBATTLE-Wq-Nazak_the_Fiend-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(42442)">
<CustomBehavior File="RunCode" Code="Log("Loading 42442-[N]-[QUEST]-PETBATTLE-Wq-Fight_Night_Amalia-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="Dalaran\42442-[N]-[QUEST]-PETBATTLE-Wq-Fight_Night_Amalia-Zinner" RememberProfile="false" />
</If>
</If>
<If Condition="ZoneEnabled(1021)">
<!--BrokenShore-->
<If Condition="DoQuest(44748)">
<CustomBehavior File="RunCode" Code="Log("Loading 44748-[N]-[QUEST]-Wq-Winged Terrors-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="BrokenShore\44748-[N]-[QUEST]-Wq-Winged Terrors-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(44751)">
<CustomBehavior File="RunCode" Code="Log("Loading 44751-[N]-[QUEST]-Wq-No Soldier Left Behind-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="BrokenShore\44751-[N]-[QUEST]-Wq-No Soldier Left Behind-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(44846)">
<CustomBehavior File="RunCode" Code="Log("Loading 44846-[N]-[QUEST]-Wq-Clearing the Path-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="BrokenShore\44846-[N]-[QUEST]-Wq-Clearing the Path-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(45035)">
<CustomBehavior File="RunCode" Code="Log("Loading 45035-[N]-[QUEST]-WQ-The_Call_of_Battle-Nuok");" />
<CustomBehavior File="LoadProfile" ProfileName="BrokenShore\45035-[N]-[QUEST]-WQ-The_Call_of_Battle-Nuok" RememberProfile="false" />
</If>
<If Condition="DoQuest(45178)">
<CustomBehavior File="RunCode" Code="Log("Loading 45178-[N]-[QUEST]-Wq-Contagion Containment-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="BrokenShore\45178-[N]-[QUEST]-Wq-Contagion Containment-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(45379)">
<CustomBehavior File="RunCode" Code="Log("Loading 45379-[N]-[QUEST]-Wq-Treasure Master Iks'reeged-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="BrokenShore\45379-[N]-[QUEST]-Wq-Treasure Master Iks'reeged-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(45472)">
<CustomBehavior File="RunCode" Code="Log("Loading 45472-[N]-[QUEST]-Wq-Kraken Eggs-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="BrokenShore\45472-[N]-[QUEST]-Wq-Kraken Eggs-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(45473)">
<CustomBehavior File="RunCode" Code="Log("Loading 45473-[N]-[QUEST]-Wq-A Giant Problem-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="BrokenShore\45473-[N]-[QUEST]-Wq-A Giant Problem-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(45520)">
<CustomBehavior File="RunCode" Code="Log("Loading 45520-[N]-[QUEST]-Wq-Behind Enemy Portals-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="BrokenShore\45520-[N]-[QUEST]-Wq-Behind Enemy Portals-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(45550)">
<CustomBehavior File="RunCode" Code="Log("Loading 45550-[N]-[QUEST]-Wq-Salving the Corruption-Zinner");" />
<CustomBehavior File="LoadProfile" ProfileName="BrokenShore\45550-[N]-[QUEST]-Wq-Salving the Corruption-Zinner" RememberProfile="false" />
</If>
<If Condition="DoQuest(45559)">