forked from BrenoHenrike/Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCoreDailies.cs
1293 lines (1121 loc) · 47.6 KB
/
CoreDailies.cs
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
/*
name: null
description: null
tags: null
*/
//cs_include Scripts/CoreBots.cs
using Newtonsoft.Json;
using Skua.Core.Interfaces;
using Skua.Core.Models.Items;
using Skua.Core.Models.Quests;
public class CoreDailies
{
// [Can Change] Default metals to be acquired by MineCrafting quest
public string[] MineCraftingMetalsArray = { "Barium", "Copper", "Silver" };
// [Can Change] Default metals to be acquired by Hard Core Metals quest
public string[] HardCoreMetalsMetalsArray = { "Arsenic", "Chromium", "Rhodium" };
// [Can Change] Skip daily if you own max stack of reward
public bool SkipOnMaxStack = true;
private IScriptInterface Bot => IScriptInterface.Instance;
private CoreBots Core => CoreBots.Instance;
public void ScriptMain(IScriptInterface Bot)
{
Core.RunCore();
}
/// <summary>
/// Accepts the quest and kills the monster to complete, if no cell/pad is given will hunt for the monster.
/// </summary>
/// <param name="quest">ID of the quest</param>
/// <param name="map">Map where the monster is</param>
/// <param name="monster">Name of the monster</param>
/// <param name="item">Item to get</param>
/// <param name="quant">Quantity of the item</param>
/// <param name="isTemp">Whether it is temporary</param>
/// <param name="cell">Cell where the monster is (optional)</param>
/// <param name="pad">Pad where the monster is</param>
public void DailyRoutine(int quest, string map, string monster, string item, int quant = 1, bool isTemp = true, string? cell = null, string pad = "Left", bool publicRoom = false)
{
if (Bot.Quests.IsDailyComplete(quest))
return;
Bot.Drops.Add(item);
Core.Join(map);
Core.EnsureAccept(quest);
if (cell != null)
Core.KillMonster(map, cell, pad, monster, item, quant, isTemp, true, publicRoom);
else
Core.HuntMonster(map, monster, item, quant, isTemp, true, publicRoom);
Core.EnsureComplete(quest);
Bot.Wait.ForPickup("*");
}
//if new CheckDaily fails fallback to this one just comment out the other checkdaily, and rename this one
//VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
/// <summary>
/// Checks if the daily is complete, if not will add the specified drops and unbank if necessary
/// </summary>
/// <param name="quest">ID of the quest</param>
/// <param name="items">Items to add to drop grabber and unbank</param>
/// <returns></returns>
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
public bool CheckDailyv2(int quest, bool any = true, params string[] items)
{
if (Bot.Quests.IsDailyComplete(quest))
{
Core.Logger("Daily/Weekly/Monthly quest not available right now");
return false;
}
if (items != null)
{
List<InventoryItem> invBank = Bot.Inventory.Items.Concat(Bot.Bank.Items).ToList().FindAll(x => items.ToList().Contains(x.Name));
int i = 0;
if (any)
{
foreach (string item in items)
{
InventoryItem? _item = invBank.Find(x => x.Name == item);
if (_item == null)
continue;
if (_item.Quantity == _item.MaxStack)
{
Core.Logger("You already own the maximum amount of: " + item);
return false;
}
}
}
else
{
foreach (string item in items)
{
InventoryItem? _item = invBank.Find(x => x.Name == item);
if (_item == null)
continue;
if (_item.Quantity == _item.MaxStack)
i++;
}
if (items.Length == i)
{
Core.Logger("You already own the maximum amount of: " + string.Join(',', items));
return false;
}
}
Bot.Drops.Add(items);
}
var questIds = Enumerable.Range(7156, 10).Concat(Enumerable.Range(3075, 3)).Distinct();
foreach (int questId in questIds)
Bot.Drops.Add(Core.QuestRewards(questId));
{
Core.AddDrop(Core.EnsureLoad(quest).Rewards.Select(x => x.Name).Where(x => !Core.CheckInventory(x, toInv: false)).ToArray());
Core.AddDrop(Core.EnsureLoad(quest).Rewards.Select(x => x.Name).ToArray());
}
Core.AddDrop(Core.EnsureLoad(quest).Requirements.Select(x => x.Name).ToArray());
return true;
}
//new one
/// <summary>
/// Checks if the daily is complete, if not will add the specified drops and unbank if necessary
/// </summary>
/// <param name="quest">ID of the quest</param>
/// <param name="items">Items to add to drop grabber and unbank</param>
/// <returns></returns>
public bool CheckDaily(int quest, bool any = true, bool shouldUnBank = true, params string[] items)
{
if (Bot.Quests.IsDailyComplete(quest))
{
Core.Logger("Daily/Weekly/Monthly quest not available right now");
return false;
}
if (items != null)
{
bool isSingleItem = items.Length == 1 && !items[0].Contains(',');
if (isSingleItem)
{
string itemName = items[0];
InventoryItem? item = Bot.Inventory.Items.Find(x => x.Name == itemName);
if (item != null && item.Quantity == item.MaxStack)
{
Core.Logger("You already own the maximum amount of: " + itemName);
return false;
}
if (shouldUnBank)
{
InventoryItem? bankItem = Bot.Bank.Items.Find(x => x.Name == itemName);
if (bankItem != null && bankItem.Quantity != bankItem.MaxStack)
Core.Unbank(itemName);
}
Bot.Drops.Add(itemName);
}
else
{
List<string> itemsToAdd = new();
foreach (string item in items)
{
InventoryItem? invItem = Bot.Inventory.Items.Find(x => x.Name == item);
InventoryItem? bankItem = Bot.Bank.Items.Find(x => x.Name == item);
if (invItem != null && invItem.Quantity == invItem.MaxStack)
{
Core.Logger("You already own the maximum amount of: " + item);
return false;
}
if (shouldUnBank && bankItem != null && bankItem.Quantity == bankItem.MaxStack)
Core.Unbank(item);
itemsToAdd.Add(item);
}
Bot.Drops.Add(itemsToAdd.ToArray());
}
}
var questIds = Enumerable.Range(7156, 10).Concat(Enumerable.Range(3075, 3)).Distinct();
foreach (int questId in questIds)
Bot.Drops.Add(Core.QuestRewards(questId));
Core.AddDrop(Core.EnsureLoad(quest).Rewards.Select(x => x.Name).Where(x => x != "Arrow" && !Core.CheckInventory(x, toInv: false)).ToArray());
Core.AddDrop(Core.EnsureLoad(quest).Requirements.Select(x => x.Name).ToArray());
return true;
}
/// <summary>
/// Does the Mine Crafting quest for 2 Barium, Copper and Silver by default.
/// </summary>
/// <param name="metals">Metals you want to be collected</param>
/// <param name="quant">Quantity you want of the metals</param>
public void MineCrafting(string[]? metals = null, int quant = 2, bool ToBank = false)
{
metals ??= MineCraftingMetalsArray;
Core.Logger($"Daily: Mine Crafting ({string.Join('/', metals)})");
// Check if all metals are in inventory
bool allMetalsFound = metals.All(metal => Core.CheckInventory(metal, quant, false));
if (allMetalsFound)
{
Core.Logger($"All metals were found with the needed quantity ({quant}).");
// Sort metals in the desired order
metals = metals.OrderBy(metal => Array.IndexOf(metals, metal)).ToArray();
if (ToBank)
Core.ToBank(metals);
return;
}
if (!CheckDailyv2(2091, false, metals))
return;
Core.EnsureAccept(2091);
Core.EquipClass(ClassType.Farm);
Core.HuntMonster("stalagbite", "Balboa", "Axe of the Prospector", isTemp: false);
Core.HuntMonster("stalagbite", "Balboa", "Raw Ore", 30);
Core.JumpWait();
foreach (string metal in metals)
{
if (!Core.CheckInventory(metal, quant, false))
{
Core.AddDrop(metal);
int metalID = (int)Enum.Parse(typeof(MineCraftingMetalsEnum), metal);
Core.EnsureComplete(2091, metalID);
Bot.Wait.ForPickup(metal);
if (ToBank)
Core.ToBank(metals);
break;
}
}
if (Bot.Quests.IsInProgress(2091))
Core.Logger($"All desired metals were found with the needed quantity ({quant}), quest not completed");
Core.Sleep();
}
/// <summary>
/// Does the Hard Core Metals quest for 1 Arsenic, Chromium and Rhodium by default
/// </summary>
/// <param name="metals">Metals you want to be collected</param>
/// <param name="quant">Quantity you want of the metals</param>
public void HardCoreMetals(string[]? metals = null, int quant = 1, bool ToBank = false)
{
if (!Core.IsMember || !Core.isCompletedBefore(2090))
return;
metals ??= HardCoreMetalsMetalsArray;
Core.Logger($"Daily: Hard Core Metals ({string.Join('/', metals)})");
if (Core.CheckInventory(metals, quant))
{
Core.Logger($"All metals were found with the needed quantity ({quant}). Skipped");
if (ToBank)
Core.ToBank(metals);
return;
}
if (!CheckDailyv2(2098, false, metals))
return;
Core.EnsureAccept(2098);
Core.EquipClass(ClassType.Farm);
Core.HuntMonster("stalagbite", "Balboa", "Axe of the Prospector", 1, false);
Core.HuntMonster("stalagbite", "Balboa", "Raw Ore", 30);
Core.JumpWait();
foreach (string metal in metals)
{
if (!Core.CheckInventory(metal, quant, false))
{
Core.AddDrop(metal);
int metalID = (int)Enum.Parse(typeof(HardCoreMetalsEnum), metal);
Core.EnsureComplete(2098, metalID);
Bot.Wait.ForPickup(metal);
if (ToBank)
Core.ToBank(metals);
break;
}
}
if (Bot.Quests.IsInProgress(2098))
Core.Logger($"All desired metals were found with the needed quantity ({quant}), quest not completed");
}
public void FungiforaFunGuy()
{
if (!Core.IsMember)
return;
Core.Logger("Daily: Fungi for a Fun Guy (BrightOak Reputation)");
if (Bot.Reputation.GetRank("Brightoak") == 10)
{
Core.Logger("BrightOak is already rank 10. Skipped");
return;
}
if (!CheckDaily(4465))
return;
Core.EquipClass(ClassType.Farm);
Core.EnsureAccept(4465);
Core.HuntMonster("brightoak", "Grove Spore", "Colony Spore");
Core.HuntMonster("brightoak", "Grove Spore", "Intact Spore");
Core.EnsureComplete(4465);
}
public void BeastMasterChallenge()
{
if (!Core.IsMember)
return;
Core.Logger("Daily: Beast Master Class");
if (Bot.Reputation.GetRank("BeastMaster") == 10)
{
Core.Logger("BeastMaster is already rank 10. Skipped");
return;
}
if (!CheckDaily(3759))
return;
DailyRoutine(3759, "swordhavenbridge", "Purple Slime", "Purple Slime", 10);
}
public void CyserosSuperHammer()
{
Core.Logger("Daily: Cysero's Super Hammer");
if (Core.CheckInventory("Cysero's SUPER Hammer", toInv: false))
{
Core.Logger("Skipped");
return;
}
if (!Core.CheckInventory("Cysero's SUPER Hammer", toInv: false) && Core.CheckInventory("C-Hammer Token", 90))
{
Core.BuyItem("deadmoor", 500, "Cysero's SUPER Hammer");
return;
}
if (!Core.CheckInventory("Mad Weaponsmith"))
{
Core.Logger("You don't own Mad Weaponsmith yet. Skipped");
return;
}
if (!CheckDaily(4310, true, true, "C-Hammer Token") && !Core.IsMember)
return;
if (!CheckDaily(4311, true, true, "C-Hammer Token") && Core.IsMember)
return;
Core.EquipClass(ClassType.Solo);
DailyRoutine(4310, "deadmoor", "Geist", "Geist's Chain Link");
if (Core.IsMember)
DailyRoutine(4311, "deadmoor", "Geist", "Geist's Pocket Lint");
Core.ToBank("C-Hammer Token", "Mad Weaponsmith", "Cysero's SUPER Hammer");
}
public void MadWeaponSmith()
{
Core.Logger("Daily: Mad Weaponsmith");
if (Core.CheckInventory("Mad Weaponsmith", toInv: false))
{
Core.Logger("Skipped");
return;
}
if (!Core.CheckInventory("Mad Weaponsmith", toInv: false) && Core.CheckInventory("C-Armor Token", 90))
{
Core.BuyItem("deadmoor", 500, "Mad Weaponsmith");
return;
}
if (!CheckDaily(4308, true, true, "C-Armor Token") && !Core.IsMember)
return;
if (!CheckDaily(4309, true, true, "C-Armor Token") && Core.IsMember)
return;
Core.EquipClass(ClassType.Solo);
DailyRoutine(4308, "deadmoor", "Nightmare", "Nightmare Fire");
if (Core.IsMember)
DailyRoutine(4309, "deadmoor", "Nightmare", "Unlucky Horseshoe");
Core.ToBank("C-Armor Token", "Mad Weaponsmith");
}
public void BrightKnightArmor(bool checkArmor = true)
{
Core.Logger("Daily: Bright Knight Armor");
if (checkArmor && Core.CheckInventory("Bright Knight", toInv: false))
{
Core.Logger("You already own the Bright Knight Armor, Skipped");
return;
}
if (Core.CheckInventory(new[] { "Seal of Light", "Seal of Darkness" }, 50))
{
Core.BuyItem("alteonbattle", 574, "Bright Knight");
return;
}
if (CheckDaily(3826, true, true, "Seal of Light"))
{
Core.EquipClass(ClassType.Solo);
DailyRoutine(3826, "alteonbattle", "ULTRA Alteon", "Alteon Defeated");
}
if (CheckDaily(3825, true, true, "Seal of Darkness"))
{
Core.EquipClass(ClassType.Solo);
DailyRoutine(3825, "sepulchurebattle", "ULTRA Sepulchure", "Sepulchure Defeated");
}
Core.JumpWait();
}
public void CollectorClass()
{
Core.Logger("Daily: The Collector Class");
//30229 is the ac, 30250 is the non-ac
if (Core.CheckInventory(new[] { 30250 }, any: true, toInv: false))
{
Core.Logger("You already own The Collector. Skipped");
return;
}
if (CheckDaily(1316, true, true, "Tokens of Collection"))
{
Core.EquipClass(ClassType.Farm);
Core.FarmingLogger("Token of Collection", 90);
DailyRoutine(1316, "terrarium", "Carnivorous Cricket", "This Might Be A Token", 2, false, "r2", "Right");
}
if (Core.IsMember)
{
Core.FarmingLogger("Token of Collection", 90);
if (CheckDaily(1331, true, true, "Tokens of Collection"))
DailyRoutine(1331, "terrarium", "*", "This Is Definitely A Token", 2, false, "Enter", "Right");
if (CheckDaily(1332, true, true, "Tokens of Collection"))
DailyRoutine(1332, "terrarium", "*", "This Could Be A Token", 2, false, "r2", "Right");
}
if (Core.CheckInventory("Token of Collection", 90))
Core.BuyItem("Collection", 324, 30250, shopItemID: 3511);
}
public void Cryomancer()
{
Core.Logger("Daily: Cryomancer Class");
if (Core.CheckInventory("Cryomancer", toInv: false))
{
Core.Logger("You already own Cryomancer, Skipped");
return;
}
if (Core.IsMember && CheckDaily(3965, true, true, "Glacera Ice Token"))
{
Core.EquipClass(ClassType.Farm);
DailyRoutine(3965, "frozentower", "Frost Invader", "Dark Ice");
Core.FarmingLogger("Glacera Ice Token", 84, "Glacera Ice Token");
Core.ToBank("Glacera Ice Token");
}
if (CheckDaily(3966, true, true, "Glacera Ice Token"))
{
Core.EquipClass(ClassType.Farm);
DailyRoutine(3966, "frozentower", "Frost Invader", "Dark Ice");
Core.FarmingLogger("Glacera Ice Token", 84, "Glacera Ice Token");
Core.ToBank("Glacera Ice Token");
}
if (Core.CheckInventory("Glacera Ice Token", 84))
Core.BuyItem("frozenruins", 1056, "Cryomancer", shopItemID: 3041);
Core.ToBank("Glacera Ice Token");
}
public void Pyromancer()
{
Core.Logger("Daily: Pyromancer Class");
if (Core.CheckInventory("Pyromancer", toInv: false))
{
Core.Logger("You already own Pryomancer, Skipped");
return;
}
if (Core.IsMember && CheckDaily(2210, true, true, "Shurpu Blaze Token"))
{
Core.EquipClass(ClassType.Solo);
DailyRoutine(2210, "xancave", "Shurpu Ring Guardian", "Guardian Shale");
Core.FarmingLogger("Shurpu Blaze Token", 84, "Shurpu Blaze Token");
Core.ToBank("Shurpu Blaze Token");
}
if (CheckDaily(2209, true, true, "Shurpu Blaze Token"))
{
Core.EquipClass(ClassType.Solo);
DailyRoutine(2209, "xancave", "Shurpu Ring Guardian", "Guardian Shale");
Core.FarmingLogger("Shurpu Blaze Token", 84, "Shurpu Blaze Token");
Core.ToBank("Shurpu Blaze Token");
}
if (Core.CheckInventory("Shurpu Blaze Token", 84))
Core.BuyItem("xancave", 447, 12812, shopItemID: 1278);
Core.ToBank("Shurpu Blaze Token");
}
public void DeathKnightLord()
{
if (!Core.IsMember)
return;
Core.Logger("Daily: Death KnightLord Class");
if (Core.CheckInventory(34780, toInv: false))
{
Core.Logger("You already own DeathKnight Lord Class, Skipped");
return;
}
if (!CheckDaily(492, true, true, "Shadow Skull"))
return;
DailyRoutine(492, "bludrut4", "Shadow Serpent", "Shadow Scales", 5);
Core.FarmingLogger("Shadow Skull", 30);
if (Core.CheckInventory("Shadow Skull", 30))
Core.BuyItem("bonecastle", 1242, 34780, shopItemID: 4397);
Core.ToBank("Shadow Skull");
}
public void ShadowScytheClass()
{
Core.Logger("Daily: ShadowScythe General Class");
if (Core.CheckInventory("ShadowScythe General", toInv: false))
{
Core.Logger("Skipped");
return;
}
if (!Core.CheckInventory("ShadowScythe General") && Core.CheckInventory("Shadow Shield", 100))
{
Core.BuyItem("shadowfall", 1644, "ShadowScythe General");
return;
}
if (!CheckDaily(3828, true, true, "Shadow Shield") && (Core.IsMember && !CheckDaily(3827, true, true, "Shadow Shield")))
return;
DailyRoutine(3828, "lightguardwar", "Citadel Crusader", "Broken Blade");
if (Core.IsMember)
{
DailyRoutine(3827, "lightguardwar", "Citadel Crusader", "Broken Blade");
if (Core.CheckInventory("Shadow Shield", 100))
Core.BuyItem("shadowfall", 1644, "ShadowScythe General");
}
Core.Jump("Cut1", "Left");
Core.ToBank("Shadow Shield");
}
public void GrumbleGrumble()
{
if (!Core.CheckInventory(4845))
return;
Core.Logger("Daily: Grumble Grumble (Blood Gem of the Archfiend)");
if (!CheckDaily(592, false, false, new[] { "Diamond of Nulgath", "Blood Gem of the Archfiend" }))
return;
Core.ChainComplete(592);
Core.ToBank("Diamond of Nulgath", "Blood Gem of the Archfiend");
}
public void EldersBlood()
{
Core.Logger("Daily: Elders' Blood");
if (Core.CheckInventory("Elders' Blood", 20)) //AE keeps updating this shit, Laste update: 1/30/23, https://www.aq.com/gamedesignnotes/aqw-30jan23-mondayupdates-9076
return;
if (!CheckDaily(802, true, true, "Elders' Blood"))
return;
Core.EquipClass(ClassType.Farm);
DailyRoutine(802, "arcangrove", "Gorillaphant", "Slain Gorillaphant", 50, cell: "Right", pad: "Left");
}
public void SparrowsBlood()
{
Core.Logger("Daily: Sparrow's Blood");
if (!CheckDaily(803, true, true, "Sparrow's Blood") || Core.CheckInventory("Sparrow's Blood", 3, false))
return;
Core.AddDrop("Sparrow's Blood");
Core.EquipClass(ClassType.Farm);
Core.EnsureAccept(803);
Core.HuntMonster("arcangrove", "Gorillaphant", "Blood Lily", 30);
Core.HuntMonster("arcangrove", "Seed Spitter", "Snapdrake", 17);
Core.HuntMonster("arcangrove", "Seed Spitter", "DOOM Dirt", 12);
Core.EnsureComplete(803);
}
public void ShadowShroud()
{
Core.Logger("Daily: Shadow Shroud");
if (!CheckDaily(486, true, true, "Shadow Shroud") || Core.CheckInventory("Shadow Shroud", 15, false))
return;
DailyRoutine(486, "bludrut2", "Shadow Creeper", "Shadow Canvas", 5, cell: "Enter", pad: "Down");
Core.ToBank("Shadow Shroud");
}
public void DagesScrollFragment()
{
Core.Logger("Daily: Dage's Scroll Fragment");
if (!CheckDaily(3596, true, true, "Dage's Scroll Fragment") || Core.CheckInventory("Dage's Scroll Fragment", 13, false))
return;
DailyRoutine(3596, "mountdoomskull", "*", "Chaos Power Increased", 6, cell: "b1", pad: "Left");
Bot.Wait.ForPickup("Dage's Scroll Fragment");
Core.ToBank("Dage's Scroll Fragment");
}
public void CryptoToken()
{
Core.Logger("Daily: Crypto Token (/curio)");
if (!CheckDaily(6187, true, true, "Crypto Token") || Core.CheckInventory("Crypto Token", 300, false))
return;
Core.EquipClass(ClassType.Farm);
DailyRoutine(6187, "boxes", "Sneevil", "Metal Ore", cell: "Closet", pad: "Center");
Core.ToBank("Crypto Token");
}
public void MonthlyTreasureChestKeys()
{
if (!Core.IsMember || !Core.CheckInventory("Treasure Chest"))
return;
Core.Logger("Montly: Treasure Chest Keys");
if (!CheckDaily(1239))
Core.Logger($"Next keys are available on {new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1).ToLongDateString()}");
else Core.ChainComplete(1239);
var questData = Core.EnsureLoad(1238);
if (Core.CheckInventory(questData.Rewards.Select(x => x.Name).ToArray(), toInv: false))
return;
List<string> PreQuestInv = Bot.Inventory.Items.Select(x => x.Name).ToList();
if (Core.CheckInventory("Magic Treasure Chest Key") && Core.CheckInventory("Treasure Chest", 1))
Bot.Drops.Add(questData.Rewards.Select(x => x.Name).ToArray());
while (!Bot.ShouldExit && Core.CheckInventory("Magic Treasure Chest Key") && Core.CheckInventory("Treasure Chest", 1))
{
Core.ChainComplete(1238);
Bot.Wait.ForPickup("*");
}
Core.ToBank(Bot.Inventory.Items.Select(x => x.Name).ToList().Except(PreQuestInv).ToArray());
}
public void WheelofDoom()
{
Core.Logger($"{(Core.IsMember ? "Daily" : "Weekly")}: Wheel of Doom");
List<string> PreQuestInv = Bot.Inventory.Items.Select(x => x.Name).ToList();
if (Core.IsMember && CheckDaily(3075))
Core.ChainComplete(3075);
if (Core.CheckInventory("Gear of Doom", 3))
Core.ChainComplete(3076);
Bot.Wait.ForPickup("*");
string[] Array = Bot.Inventory.Items.Select(x => x.Name).ToList().Except(PreQuestInv).ToArray();
if (Array.Length == 0)
return;
Core.Logger("New items: " + string.Join(" | ", Array));
Core.ToBank(Array);
}
public void NSoDDaily(bool IgnoreSwords = true)
{
if (!IgnoreSwords && Core.CheckInventory(new[] { "Necrotic Sword of Doom", "Dual Necrotic Swords of Doom" }, any: true) && Core.CheckInventory("Void Aura", 7500))
return;
Core.Logger("Daily: Void Auras");
Core.EquipClass(ClassType.Solo);
Core.AddDrop("Void Aura", "(Necro) Scroll of Dark Arts");
// Glimpse Into the Dark[Mem] - 8652
if (Core.IsMember)
{
if (CheckDaily(8652))
{
Core.EnsureAccept(8652);
if (Core.isCompletedBefore(3119))
{
Core.AddDrop("Kraken Doubloon");
Core.RegisterQuests(3119);
while (!Bot.ShouldExit && !Core.CheckInventory("Kraken Doubloon", 13))
{
Core.HuntMonster("chaoskraken", "Chaos Kraken", "Kraken Keelhauled");
}
Core.CancelRegisteredQuests();
}
else Core.HuntMonster("chaoskraken", "Chaos Kraken", "Kraken Doubloon", 13, isTemp: false, publicRoom: true);
Core.HuntMonster($"ancienttrigoras", "Ancient Trigoras", "Ancient Trigora's Horns", 3, isTemp: false);
Core.KillMonster("gravechallenge", "r19", "Left", "Graveclaw the Destroyer", "Graveclaw's Broken Axe", isTemp: false);
Core.EnsureComplete(8652);
Bot.Wait.ForPickup("Void Aura");
}
}
// The Encroaching Shadows - 8653
if (CheckDaily(8653))
{
Core.EnsureAccept(8653);
Core.HuntMonster("icewing", "Warlord Icewing", "Glacial Pinion", isTemp: false, publicRoom: true);
Core.HuntMonster("hydrachallenge", "Hydra Head 90", "Hydra Eyeball", 3, isTemp: false);
Core.HuntMonster("voidflibbi", "Flibbitiestgibbet", "Flibbitigiblets", isTemp: false, publicRoom: true);
Core.EnsureComplete(8653);
Bot.Wait.ForPickup("Void Aura");
}
}
public void FreeDailyBoost()
{
if (!Core.IsMember)
return;
Core.Logger("Daily: Free Boost");
if (!CheckDaily(4069))
return;
Quest quest = Core.EnsureLoad(4069);
Dictionary<ItemBase, int> CompareDict = new();
List<InventoryItem> InventoryData = Bot.Inventory.Items;
foreach (ItemBase item in quest.Rewards)
{
if (item.ID == 27552 && Bot.Player.Level == 100)
continue;
if (Core.CheckInventory(item.ID) && Bot.Inventory.TryGetItem(item.ID, out InventoryItem? _item))
CompareDict.Add(item, _item!.Quantity);
else CompareDict.Add(item, 0);
}
// IWLQ = ItemWithLowestQuant
ItemBase IWLQ = CompareDict.FirstOrDefault(x => x.Value == CompareDict.Values.Min()).Key;
Core.AddDrop(IWLQ.Name);
Core.ChainComplete(4069, IWLQ.ID);
Bot.Wait.ForPickup(IWLQ.Name);
Core.ToBank(IWLQ.Name);
}
public void BallyhooAdRewards()
{
if (AdCount() >= 3)
return;
Core.Logger($"Obtaining {3 - AdCount()} Ballyhoo Ad Reward{(AdCount() == 1 ? "" : "s")}");
while (AdCount() < 3)
{
int PreGold = Bot.Player.Gold;
int PreAC = PlayerAC();
Bot.Send.Packet($"%xt%zm%getAdReward%{Bot.Map.RoomID}%");
Core.Sleep();
Bot.Send.Packet($"%xt%zm%getAdData%{Bot.Map.RoomID}%");
Core.Sleep(1000);
if (Bot.Player.Gold != PreGold)
Core.Logger($"You received {Bot.Player.Gold - PreGold} Gold");
else if (PlayerAC() != PreAC)
Core.Logger($"You received {PlayerAC() - PreAC} AC!", messageBox: true);
}
int PlayerAC() => Bot.Flash.GetGameObject<int>("world.myAvatar.objData.intCoins");
int AdCount() => Bot.Flash.GetGameObject<int>("world.myAvatar.objData.iDailyAds");
}
public void PowerGem()
{
if (!Bot.Flash.CallGameFunction<bool>("world.myAvatar.isEmailVerified"))
{
Core.Logger("Account doesn't have a verified email.");
return;
}
Core.Logger("Weekly: Power Gems");
if (Core.CheckInventory("Power Gem", 1000, false) || !CheckDaily(9109))
{
Core.Logger("You have the maximum amount of Power Gems");
return;
}
// Weekly Power Gem Quest
Core.EnsureAccept(9109);
Core.HuntMonster("boxes", "Sneevil", "News Scroll", log: false);
Core.EnsureComplete(9109);
Bot.Wait.ForPickup("Power Gem");
Core.ToBank("Power Gem");
// Core.JumpWait();
// int PreQuant = Bot.Inventory.GetQuantity("Power Gem");
// Bot.Send.Packet($"%xt%zm%powergem%{Bot.Map.RoomID}%");
// Core.Sleep();
// if (Bot.Inventory.GetQuantity("Power Gem") != PreQuant)
// Core.Logger($"You received {Bot.Inventory.GetQuantity("Power Gem") - PreQuant} Power Gem");
// else Core.Logger("You received no Power Gem");
}
public void GoldenInquisitor()
{
Core.Logger("Daily: Golden Inquisitor of Shadowfall");
var rewards = Core.QuestRewards(491);
if (Core.CheckInventory(rewards, toInv: false) || !CheckDaily(491))
return;
Core.EnsureAccept(491);
Bot.Drops.Add(Core.EnsureLoad(491).Rewards.Select(x => x.Name).ToArray());
Core.EquipClass(ClassType.Farm);
Core.HuntMonster("citadel", "Inquisitor Guard", "Inquisitor Contract", 7);
Core.EnsureComplete(491);
Bot.Wait.ForPickup("*");
Core.ToBank(rewards);
}
public void DesignNotes()
{
Core.Logger("Weekly: Read the Design Notes!");
if (Bot.Reputation.GetRank("Loremaster") != 10 && CheckDaily(1213))
Core.ChainComplete(1213);
}
public void MoglinPets()
{
Core.Logger("Daily: Moglin Pets");
string[] pets = { "Twig Pet", "Twilly Pet", "Zorbak Pet" };
if (Core.CheckInventory(pets, toInv: false))
return;
foreach (string pet in pets)
{
if (Core.CheckInventory(pet, toInv: false))
continue;
bool dailyDone = !CheckDaily(4159);
if (!Core.CheckInventory("Moglin MEAL", 30) && !dailyDone)
{
Core.Logger("Dedicating daily to " + pet);
Core.AddDrop("Moglin MEAL");
Core.EnsureAccept(4159);
Core.HuntMonster("nexus", "Frogzard", "Frogzard Meat", 3);
Core.EnsureComplete(4159);
Bot.Wait.ForPickup("Moglin MEAL");
dailyDone = true;
}
if (Core.CheckInventory("Moglin MEAL", 30))
Core.BuyItem("ariapet", 1081, pet);
Core.ToBank("Moglin MEAL");
if (dailyDone)
break;
}
}
// public void templeshrineDailies()
// {
// if(Core.isCompletedBefore(?))
// if (!CheckDaily(9303) && !CheckDaily(9304) && !CheckDaily(9305))
// return;
// //Night Falls (Daily Bonus) - Sliver of Moonlight
// if (CheckDaily(9303))
// {
// Core.EnsureAccept(9303);
// Core.HuntMonster("midnightsun", "*", "Midnight Moondrop");
// Core.EnsureComplete(9303);
// Bot.Wait.ForPickup("Sliver of Moonlight");
// }
// //Dawn Breaks (Daily Bonus) - Sliver of Sunlight
// if (CheckDaily(9304))
// {
// Core.EnsureAccept(9304);
// Core.HuntMonster("solsticemoon", "*", "Solstice Sundew");
// Core.EnsureComplete(9304);
// Bot.Wait.ForPickup("Sliver of Sunlight");
// }
// //boss 3 requires taunting, not doable for skua atm.
// //Frozen Cycle (Daily Bonus) - Ecliptic Offering
// if (CheckDaily(9305))
// {
// Core.EnsureAccept(9305);
// Core.Join("templeshrine");
// Core.HuntMonster("ascendeclipse", "monster", "Midnight's Shadow");
// Core.HuntMonster("ascendeclipse", "monster", "Solstice's Shadow");
// Core.EnsureComplete(9305);
// Bot.Wait.ForPickup("Ecliptic Offering");
// }
// }
public void BreakIntotheHoard(bool KeepReward = false, bool bank = false)
{
if (!CheckDaily(3898))
return;
if (!Core.HasAchievement(30, "ip6"))
{
Core.Logger("\"Break Into the Hoard\" daily quest requires you to purchase BoneBreaker Adventure Pack to be able to complete it.");
return;
}
if (!Core.isCompletedBefore(5981))
{
Core.Logger("Requires storyline completetion, run the standalone daily (if you have the required items.)...)");
return;
}
//Buying BoneBreaker Fortress Map
Core.BuyItem("battleon", 1046, 27222);
ItemBase[] QuestReward = Core.EnsureLoad(3898).Rewards.ToArray();
if (KeepReward)
Core.AddDrop("BoneBreaker Medallion");
//Break Into the Hoard
Core.EnsureAccept(3898);
Core.HuntMonster("bonebreak", "Undead Berserker", "Warrior Defeated", 5, log: false);
Core.EnsureComplete(3898);
Bot.Wait.ForPickup("BoneBreaker Medallion");
if (bank)
foreach (ItemBase item in QuestReward)
if (Core.CheckInventory(item.ID, toInv: false))
Core.ToBank(item.ID);
}
#nullable enable
#region Friendship
public void Friendships()
{
bool waitForPacket = false;
string? _friendshipInfo = null;
Bot.Events.ExtensionPacketReceived += friendshipPacketReader;
if (!RefreshFriendshipData(out var friends))
return;
if (friends.All(f => !f.CanGift && (!f.CanTalk || f.NPC == "Linus")))
{
Core.Logger($"All the friendship dailies have already been completed today.");
return;
}
Bot.Drops.Add(frGiftIDs);
Core.AddDrop(frRewards);
// Battleodium
if (Core.isCompletedBefore(793))
handleFriendship("Dage the Evil", frGift.Crached_Opal);
handleFriendship("Gravelyn", frGift.Blood_Roseberry);
handleFriendship("Nulgath", frGift.Apples);
handleFriendship("Twig", frGift.Melons);
handleFriendship("Twilly", frGift.Apples, frGift.Orchids);
handleFriendship("Maya", frGift.Chrysanthemums, frGift.Apples);
handleFriendship("Yulgar", frGift.Turqoise, frGift.Orchids, frGift.Melons);
handleFriendship("Mi", frGift.Sapphires, frGift.Lilies);
handleFriendship("Lord Brentan", frGift.Oranges, frGift.Rubies);
handleFriendship("Warlic", frGift.Sapphires, frGift.Sunflowers);
handleFriendship("Zorbak", frGift.Apples);
handleFriendship("Smoglin", frGift.Turqoise, frGift.Apples);
// Greyguard
handleFriendship("Drakath", frGift.Chaos_Diemond);
handleFriendship("Xang", frGift.Emeralds, frGift.Grapes);
handleFriendship("Linus", frGift.A_Fish);
handleFriendship("Sally", frGift.Rubies, frGift.Tulips);
handleFriendship("Xing", frGift.Opals, frGift.Bananas);
Bot.Events.ExtensionPacketReceived -= friendshipPacketReader;
Core.ToBank(frGiftIDs);
Core.ToBank(frRewards[3..]);
//not sure how itll handle those hearts.. but its part of i
if (Core.CheckInventory("Happy Penguin") && !Core.HasWebBadge($"Penguin 🤍BFF🤍"))
Core.ChainComplete(9108);
#region Local methods
void handleFriendship(string npc, params frGift[] gifts)
{
if (!friends.Any(f => f.NPC.ToLower() == npc.ToLower()))
{
Core.Logger($"NPC \"{npc}\" not found. Check for typos");
return;
}
FriendshipInfo friend = friends.First(f => f.NPC.ToLower() == npc.ToLower());
if ((!friend.CanTalk || friend.NPC == "Linus") && !friend.CanGift)
{
Core.Logger($"Friendship dail{(friend.NPC == "Linus" ? "y" : "ies")} unavailable: {friend.NPC}");