-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathCoreFarms.cs
3782 lines (3229 loc) · 136 KB
/
CoreFarms.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 Skua.Core.Interfaces;
using Skua.Core.Models;
using Skua.Core.Models.Factions;
using Skua.Core.Models.Items;
using Skua.Core.Models.Monsters;
using Skua.Core.Models.Quests;
using Skua.Core.Models.Shops;
public class CoreFarms
{
// [Can Change] Can you solo the boss without killing the ads
public bool canSoloInPvP { get; set; } = true;
// [Can Change] Use boosts on Gold farming
public bool doGoldBoost { get; set; } = false;
// [Can Change] Use boosts on Class farming
public bool doClassBoost { get; set; } = false;
// [Can Change] Use boosts on Reputation farming
public bool doRepBoost { get; set; } = false;
// [Can Change] Use boosts on Experience farming
public bool doExpBoost { get; set; } = false;
// Thousand-level Constants
const int OneK = 1000; // 1k
const int TenK = 10000; // 10k
const int OneHundredK = 100000; // 100k
const int FiveHundredK = 500000; // 500k
// Million-level Constants
const int OneMillion = 1000000; // 1m
const int FiveMillion = 5000000; // 5m
const int TenMillion = 10000000; // 10m
const int FiftyMillion = 50000000; // 50m
const int OneHundredMillion = 100000000; // 100m
//Max integer
const int maxint = Int32.MaxValue;
private IScriptInterface Bot => IScriptInterface.Instance;
private CoreBots Core => CoreBots.Instance;
public void ScriptMain(IScriptInterface Bot)
{
Core.RunCore();
}
public void ToggleBoost(BoostType type, bool enabled = true)
{
if (enabled)
{
if (Core.CBOBool("doGoldBoost", out bool _doGoldBoost))
doGoldBoost = _doGoldBoost;
if (Core.CBOBool("doClassBoost", out bool _doClassBoost))
doClassBoost = _doClassBoost;
if (Core.CBOBool("doRepBoost", out bool _doRepBoost))
doRepBoost = _doRepBoost;
if (Core.CBOBool("doExpBoost", out bool _doExpBoost))
doExpBoost = _doExpBoost;
switch (type)
{
case BoostType.Gold:
if (!doGoldBoost || Bot.Boosts.UseGoldBoost || Bot.Player.Gold >= 100000000)
return;
Bot.Boosts.SetGoldBoostID();
Bot.Boosts.UseGoldBoost = true;
break;
case BoostType.Class:
if (!doClassBoost || Bot.Boosts.UseClassBoost)
return;
Bot.Boosts.SetClassBoostID();
Bot.Boosts.UseClassBoost = true;
break;
case BoostType.Reputation:
if (!doRepBoost || Bot.Boosts.UseReputationBoost)
return;
Bot.Boosts.SetReputationBoostID();
Bot.Boosts.UseReputationBoost = true;
break;
case BoostType.Experience:
if (!doExpBoost || Bot.Boosts.UseExperienceBoost || Bot.Player.Level == 100)
return;
Bot.Boosts.SetExperienceBoostID();
Bot.Boosts.UseExperienceBoost = true;
break;
}
Bot.Boosts.Start();
}
else
{
switch (type)
{
case BoostType.Gold:
if (!Bot.Boosts.UseGoldBoost)
return;
Bot.Boosts.UseGoldBoost = false;
break;
case BoostType.Class:
if (!Bot.Boosts.UseClassBoost)
return;
Bot.Boosts.UseClassBoost = false;
break;
case BoostType.Reputation:
if (!Bot.Boosts.UseReputationBoost)
return;
Bot.Boosts.UseReputationBoost = false;
break;
case BoostType.Experience:
if (!Bot.Boosts.UseExperienceBoost)
return;
Bot.Boosts.UseExperienceBoost = false;
break;
}
if (new[] { Bot.Boosts.UseGoldBoost, Bot.Boosts.UseClassBoost, Bot.Boosts.UseReputationBoost, Bot.Boosts.UseExperienceBoost }.All(on => !on))
Bot.Boosts.Stop();
}
}
#region Gold
public void Gold(int quant = 100000000)
{
if (Bot.Player.Gold >= quant)
return;
ToggleBoost(BoostType.Gold);
HonorHall(quant);
// LovePotion(quant);
BattleGroundE(quant);
BerserkerBunny(quant);
ToggleBoost(BoostType.Gold, false);
}
/// <summary>
/// Farms Gold in HonorHall (members) with quests HonorHall Mobs and 61-75
/// </summary>
/// <param name="goldQuant">How much gold to farm</param>
public void HonorHall(int goldQuant = 100000000)
{
if (!Core.IsMember || Bot.Player.Level < 61 || Bot.Player.Gold >= goldQuant)
return;
Core.EquipClass(ClassType.Farm);
Core.SavedState();
Core.Logger($"Farming {goldQuant} gold using HonorHall Method");
Core.RegisterQuests(3992, 3993);
while (!Bot.ShouldExit && Bot.Player.Gold < goldQuant)
{
Core.KillMonster("honorhall", "r1", "Center", "Ice Demon");
}
Core.CancelRegisteredQuests();
Core.SavedState(false);
}
public void LovePotion(int goldQuant = 100000000)
{
if (Bot.Player.Gold >= goldQuant)
return;
Core.EquipClass(ClassType.Farm);
Core.SavedState();
Core.Logger($"Farming {goldQuant} gold using \"A Lovely An-Sewer [Love Potion]\" method");
#region Side Quests that require stories and may not be unlocked:
List<int> QuestIDs = new() { 9643 };
foreach (int q in new[] { 4319, 4328 })
{
if (!Core.isCompletedBefore(q))
continue;
QuestIDs.Add(q);
}
#endregion
Core.RegisterQuests(QuestIDs.ToArray());
while (!Bot.ShouldExit && Bot.Player.Gold < goldQuant)
{
Core.KillMonster("sewerpink", "Sewer2", "Left", "Pink Rat", log: false);
}
Core.CancelRegisteredQuests();
Core.SavedState(false);
}
/// <summary>
/// Farms Gold in Battle Ground E with quests Level 46-60 and 61-75
/// </summary>
/// <param name="goldQuant">How much gold to farm</param>
public void BattleGroundE(int goldQuant = 100000000)
{
if (Bot.Player.Level < 61 || Bot.Player.Gold >= goldQuant)
return;
Core.EquipClass(ClassType.Farm);
Core.SavedState();
Core.Logger($"Farming {goldQuant} gold using BattleGroundE Method");
Core.RegisterQuests(3991, 3992);
while (!Bot.ShouldExit && Bot.Player.Gold < goldQuant)
{
Core.KillMonster("battlegrounde", "r2", "Left", "*", "Battleground E Opponent Defeated", 10, log: false);
Core.KillMonster("battlegrounde", "r2", "Left", "*", "Battleground D Opponent Defeated", 10, log: false);
}
Core.CancelRegisteredQuests();
Core.SavedState(false);
}
/// <summary>
/// Farms Gold by selling Berserker Bunny
/// </summary>
/// <param name="goldQuant">How much gold to farm</param>
/// <param name="sell"></param>
public void BerserkerBunny(int goldQuant = 100000000, bool sell = true)
{
if (Bot.Player.Gold >= goldQuant)
return;
Core.AddDrop("Berserker Bunny");
Core.EquipClass(ClassType.Solo);
Core.SavedState();
Core.Logger($"Farming {goldQuant} using BerserkerBunny Method");
Core.RegisterQuests(236);
while (!Bot.ShouldExit && Bot.Player.Gold < goldQuant)
{
Core.KillMonster("greenguardwest", "West12", "Up", "Big Bad Boar", "Were Egg", log: false);
Bot.Wait.ForDrop("Berserker Bunny", 40);
if (!sell)
return;
Core.Sleep();
Core.SellItem("Berserker Bunny");
}
Core.CancelRegisteredQuests();
Core.SavedState(false);
}
// <summary>
// Farms Gold by Kill mobs in "darkwarlegion" for Badges and turning the quest in. (ignore the missign turning reqs.. its to quick)
// </summary>
// <param name="goldQuant">How much gold to farm</param>
public void DarkWarLegion(int goldQuant = 100000000) //Slower then BattleGroundE
{
if (Bot.Player.Gold >= goldQuant)
return;
Core.EquipClass(ClassType.Farm);
ToggleBoost(BoostType.Gold);
Core.SavedState();
Core.Logger($"Farming {goldQuant} using DarkWarLegion Method");
Core.RegisterQuests(8584, 8585);
while (!Bot.ShouldExit && Bot.Player.Gold < goldQuant)
Core.KillMonster("darkwarlegion", "r2", "Left", "*", "Nation Badge", 5, log: false);
Core.CancelRegisteredQuests();
Core.SavedState(false);
ToggleBoost(BoostType.Gold, false);
}
#endregion
#region Experience
public void Experience(int level = 100, bool rankUpClass = false)
{
if (Bot.Player.Level >= level && !rankUpClass)
return;
if (!rankUpClass)
Core.EquipClass(ClassType.Farm);
if (rankUpClass)
ToggleBoost(BoostType.Class);
ToggleBoost(BoostType.Experience);
if (rankUpClass)
IcestormArena(level, rankUpClass);
else
{
if (Bot.Player.Level < 10)
{
Core.Logger("Doing Oaklore \"Bone Berserker\" Quest till level 10");
Core.RegisterQuests(4007);
while (!Bot.ShouldExit && Bot.Player.Level < 10)
Core.KillMonster("oaklore", "r3", "Left", "Bone Berserker", log: false);
Core.CancelRegisteredQuests();
}
if (Bot.Player.Level < 20)
{
UndeadGiantUnlock();
Core.Logger("Doing swordhavenundead \"Undead Giant\" Quest till level 20");
Core.RegisterQuests(178);
while (!Bot.ShouldExit && Bot.Player.Level < 20)
Core.KillMonster("swordhavenundead", "Gates", "Left", "Undead Giant", log: false);
Core.CancelRegisteredQuests();
}
}
IcestormArena(level, rankUpClass);
if (rankUpClass)
ToggleBoost(BoostType.Class, false);
ToggleBoost(BoostType.Experience, false);
}
// /// <summary>
// /// Farms level in Ice Storm Arena
// /// </summary>
// /// <param name="level">Desired level</param>
// /// <param name="rankUpClass"></param>
// public void IcestormArena(int level = 100, bool rankUpClass = false)
// {
// if (Bot.Player.Level >= level && !rankUpClass)
// return;
// if (!rankUpClass)
// Core.EquipClass(ClassType.Farm);
// if (rankUpClass)
// ToggleBoost(BoostType.Class);
// Core.ToggleAggro(true);
// Core.SavedState();
// if (NotYetLevel(level) && Bot.Player.Level < 100)
// ToggleBoost(BoostType.Experience, true);
// //Between level 1 and 5
// while (!Bot.ShouldExit && NotYetLevel(5))
// {
// Core.ByPassCheck();
// Core.KillMonster("icestormarena", "r4", "Bottom", "*", log: false, publicRoom: true);
// }
// //Between level 5 and 10
// while (!Bot.ShouldExit && NotYetLevel(10))
// {
// Core.ByPassCheck();
// Core.KillMonster("icestormarena", "r5", "Left", "*", log: false, publicRoom: true);
// }
// //Between level 10 and 20
// while (!Bot.ShouldExit && NotYetLevel(20))
// {
// Core.ByPassCheck();
// Core.KillMonster("icestormarena", "r6", "Left", "*", log: false, publicRoom: true);
// }
// //Between level 20 and 25
// if (NotYetLevel(25))
// {
// Core.RegisterQuests(6628);
// while (!Bot.ShouldExit && NotYetLevel(25))
// {
// Core.ByPassCheck();
// Core.KillMonster("icestormarena", "r7", "Left", "*", log: false, publicRoom: true);
// }
// Core.CancelRegisteredQuests();
// }
// //Between level 25 and 30
// while (!Bot.ShouldExit && NotYetLevel(30))
// {
// Core.ByPassCheck();
// Core.KillMonster("icestormarena", "r10", "Left", "*", log: false, publicRoom: true);
// }
// //Between level 30 and 35
// if (NotYetLevel(35))
// {
// if (!rankUpClass)
// Core.EquipClass(ClassType.Solo);
// Core.RegisterQuests(6629);
// while (!Bot.ShouldExit && NotYetLevel(35))
// {
// Core.ByPassCheck();
// Core.KillMonster("icestormarena", "r11", "Left", "*", log: false, publicRoom: true);
// }
// Core.CancelRegisteredQuests();
// }
// if (!rankUpClass)
// Core.EquipClass(ClassType.Farm);
// //Between level 35 and 50
// while (!Bot.ShouldExit && NotYetLevel(50))
// {
// Core.ByPassCheck();
// Core.KillMonster("icestormarena", "r14", "Left", "*", log: false, publicRoom: true);
// }
// //Between level 50 and 61(for BGE)
// while (!Bot.ShouldExit && NotYetLevel(61))
// {
// Core.ByPassCheck();
// Core.KillMonster("icestormarena", "r16", "Left", "*", log: false, publicRoom: true);
// }
// //Between level 61 and 75
// if (NotYetLevel(75))
// {
// if (rankUpClass)
// {
// while (!Bot.ShouldExit && NotYetLevel(75))
// {
// Core.ByPassCheck();
// Core.KillMonster("icestormarena", NotYetLevel(65) ? "r17" : NotYetLevel(70) ? "r18" : "r20", "Left", "*", log: false, publicRoom: true);
// }
// }
// else
// {
// ToggleBoost(BoostType.Gold);
// Core.RegisterQuests(3991, 3992);
// while (!Bot.ShouldExit && NotYetLevel(75))
// Core.KillMonster("battlegrounde", "r2", "Center", "*", log: false, publicRoom: true);
// Core.CancelRegisteredQuests();
// ToggleBoost(BoostType.Gold, false);
// }
// }
// //Between level 75 and 100
// while (!Bot.ShouldExit && NotYetLevel(level))
// {
// if (!Bot.Player.IsMember)
// Core.ByPassCheck();
// Core.KillMonster(
// Core.IsMember
// ? "nightmare"
// : "icestormunder",
// Core.IsMember
// ? "r13"
// : "r2",
// Core.IsMember
// ? "Left"
// : "Top",
// Core.IsMember
// ? "*"
// : "*",
// log: false);
// }
// Core.ToggleAggro(false);
// Core.JumpWait();
// Core.Rest();
// if (rankUpClass)
// ToggleBoost(BoostType.Class, false);
// ToggleBoost(BoostType.Experience, false);
// bool NotYetLevel(int _level)
// {
// // Check for an equipped class item in the inventory.
// InventoryItem? item = Bot.Inventory.Items
// .FirstOrDefault(x => x != null && x.Equipped && x.Category == ItemCategory.Class);
// // If no class item is found, log and return level comparison.
// if (item == null)
// {
// Core.Logger("Class not found.");
// return !rankUpClass
// ? Bot.Player.Level < _level && Bot.Player.Level < level
// : Bot.Player.Level <= _level;
// }
// // Return level comparison based on class item conditions.
// return !rankUpClass
// ? Bot.Player.Level < _level && Bot.Player.Level < level
// : Bot.Player.Level <= _level && Bot.Player.Level <= level && item.Quantity < 302500;
// }
// }
/// <summary>
/// Farms level in Ice Storm Arena
/// </summary>
/// <param name="level">Desired level</param>
/// <param name="rankUpClass">Whether to rank up the class (true or false)</param>
public void IcestormArena(int level = 100, bool rankUpClass = false)
{
// Exit if the player's level has already reached the desired level and we are not ranking up the class
if (Bot.Player.Level >= level && !rankUpClass)
return;
#region level checks
// Equip the class for farming or rank up boost as needed
if (!rankUpClass)
Core.EquipClass(ClassType.Farm);
if (rankUpClass)
ToggleBoost(BoostType.Class);
// Enable aggro for the farm
Core.ToggleAggro(true);
Core.SavedState();
// Toggle experience boost if we are farming for experience
if (Bot.Player.Level < 100)
ToggleBoost(BoostType.Experience);
Core.ByPassCheck();
// Farming between levels 1-5
while (!Bot.ShouldExit && Bot.Player.Level < 5)
{
if (!Bot.Player.Alive)
Core.Sleep();
Core.ByPassCheck();
if (Bot.Map.Name != "icestormarena")
{
Core.Join("icestormarena", publicRoom: Core.PrivateRooms);
Bot.Wait.ForMapLoad("icestormarena");
}
if (Bot.Player.Cell != "r4")
{
Core.Jump("r4", "Bottom");
Bot.Wait.ForCellChange("r4");
}
Core.CanWeAggro();
Bot.Combat.Attack("*");
if (Bot.Player.Alive && rankUpClass && Bot.Player.CurrentClass != null && Bot.Player.CurrentClassRank >= 10)
break;
}
Core.ByPassCheck();
// Farming between levels 5-10
while (!Bot.ShouldExit && Bot.Player.Level >= 5 && Bot.Player.Level < 10)
{
if (!Bot.Player.Alive)
Core.Sleep();
Core.ByPassCheck();
if (Bot.Map.Name != "icestormarena")
{
Core.Join("icestormarena", publicRoom: Core.PrivateRooms);
Bot.Wait.ForMapLoad("icestormarena");
}
if (Bot.Player.Cell != "r5")
{
Core.Jump("r5", "Left");
Bot.Wait.ForCellChange("r5");
}
Core.CanWeAggro();
Core.Sleep();
Bot.Combat.Attack("*");
if (Bot.Player.Alive && rankUpClass && Bot.Player.CurrentClass != null && Bot.Player.CurrentClassRank >= 10)
break;
}
Core.ByPassCheck();
// Farming between levels 10-20
while (!Bot.ShouldExit && Bot.Player.Level >= 10 && Bot.Player.Level < 20)
{
if (!Bot.Player.Alive)
Core.Sleep();
Core.ByPassCheck();
if (Bot.Map.Name != "icestormarena")
{
Core.Join("icestormarena", publicRoom: Core.PrivateRooms);
Bot.Wait.ForMapLoad("icestormarena");
}
if (Bot.Player.Cell != "r6")
{
Core.Jump("r6", "Left");
Bot.Wait.ForCellChange("r6");
}
Core.CanWeAggro();
Bot.Combat.Attack("*");
Core.Sleep();
if (Bot.Player.Alive && rankUpClass && Bot.Player.CurrentClass != null && Bot.Player.CurrentClassRank >= 10)
break;
}
Core.ByPassCheck();
// Farming between levels 20-25
if (Bot.Player.Level < 25)
{
Core.RegisterQuests(6628);
while (!Bot.ShouldExit && Bot.Player.Level >= 20 && Bot.Player.Level < 25)
{
if (!Bot.Player.Alive)
Core.Sleep();
Core.ByPassCheck();
if (Bot.Map.Name != "icestormarena")
{
Core.Join("icestormarena", publicRoom: Core.PrivateRooms);
Bot.Wait.ForMapLoad("icestormarena");
}
if (Bot.Player.Cell != "r7")
{
Core.Jump("r7", "Left");
Bot.Wait.ForCellChange("r7");
}
Core.CanWeAggro();
Bot.Combat.Attack("*");
Core.Sleep();
if (Bot.Player.Alive && rankUpClass && Bot.Player.CurrentClass != null && Bot.Player.CurrentClassRank >= 10)
break;
}
Core.AbandonQuest(6628);
}
Core.ByPassCheck();
// Farming between levels 25-30
while (!Bot.ShouldExit && Bot.Player.Level >= 25 && Bot.Player.Level < 30)
{
if (!Bot.Player.Alive)
Core.Sleep();
Core.ByPassCheck();
if (Bot.Map.Name != "icestormarena")
{
Core.Join("icestormarena", publicRoom: Core.PrivateRooms);
Bot.Wait.ForMapLoad("icestormarena");
}
if (Bot.Player.Cell != "r10")
{
Core.Jump("r10", "Left");
Bot.Wait.ForCellChange("cell");
}
Core.CanWeAggro();
Bot.Combat.Attack("*");
Core.Sleep();
if (Bot.Player.Alive && rankUpClass && Bot.Player.CurrentClass != null && Bot.Player.CurrentClassRank >= 10)
break;
}
Core.ByPassCheck();
// Farming between levels 30-35 (and switching to solo class if needed)
if (Bot.Player.Level >= 30 && Bot.Player.Level < 35)
{
if (!rankUpClass)
Core.EquipClass(ClassType.Solo);
Core.RegisterQuests(6629);
while (!Bot.ShouldExit && Bot.Player.Level >= 30 && Bot.Player.Level < 35)
{
if (!Bot.Player.Alive)
Core.Sleep();
Core.ByPassCheck();
if (Bot.Map.Name != "icestormarena")
{
Core.Join("icestormarena", publicRoom: Core.PrivateRooms);
Bot.Wait.ForMapLoad("icestormarena");
}
if (Bot.Player.Cell != "r11")
{
Core.Jump("r11", "Left");
Bot.Wait.ForCellChange("r11");
}
Core.CanWeAggro();
Bot.Combat.Attack("*");
Core.Sleep();
if (Bot.Player.Alive && rankUpClass && Bot.Player.CurrentClass != null && Bot.Player.CurrentClassRank >= 10)
break;
}
Core.AbandonQuest(6629);
}
if (!rankUpClass)
Core.EquipClass(ClassType.Farm);
Core.ByPassCheck();
// Farming between levels 35-50
while (!Bot.ShouldExit && Bot.Player.Level >= 35 && Bot.Player.Level < 50)
{
if (!Bot.Player.Alive)
Core.Sleep();
Core.ByPassCheck();
if (Bot.Map.Name != "icestormarena")
{
Core.Join("icestormarena", publicRoom: Core.PrivateRooms);
Bot.Wait.ForMapLoad("icestormarena");
}
if (Bot.Player.Cell != "r14")
{
Core.Jump("r14", "Left");
Bot.Wait.ForCellChange("cell");
}
Core.CanWeAggro();
Bot.Combat.Attack("*");
Core.Sleep();
}
Core.ByPassCheck();
// Farming between levels 50-61
while (!Bot.ShouldExit && Bot.Player.Level >= 50 && Bot.Player.Level < 61)
{
if (!Bot.Player.Alive)
Core.Sleep();
Core.ByPassCheck();
Core.CanWeAggro();
if (Bot.Map.Name != "icestormarena")
{
Core.Join("icestormarena", publicRoom: Core.PrivateRooms);
Bot.Wait.ForMapLoad("icestormarena");
}
if (Bot.Player.Cell != "r16")
{
Core.Jump("r16", "Left");
Bot.Wait.ForCellChange("cell");
}
Bot.Combat.Attack("*");
Core.Sleep();
if (Bot.Player.Alive && rankUpClass && Bot.Player.CurrentClass != null && Bot.Player.CurrentClassRank >= 10)
break;
}
Core.ByPassCheck();
// Farming between levels 61-75 with BattleGroundE for non-rank-up class
if (Bot.Player.Level >= 61 && Bot.Player.Level < 75)
{
if (rankUpClass)
{
while (!Bot.ShouldExit && Bot.Player.Level >= 61 && Bot.Player.Level < 75)
{
if (!Bot.Player.Alive)
Core.Sleep();
Core.ByPassCheck();
if (Bot.Map.Name != "icestormarena")
Core.Join("icestormarena", publicRoom: Core.PrivateRooms);
if (Bot.Player.Cell != "r17")
Core.Jump("r17", "Left");
Core.CanWeAggro();
Bot.Combat.Attack("*");
Core.Sleep();
if (Bot.Player.Alive && rankUpClass && Bot.Player.CurrentClass != null && Bot.Player.CurrentClassRank >= 10)
break;
}
}
else
{
if (Bot.Player.Gold < OneHundredMillion)
ToggleBoost(BoostType.Gold);
Core.RegisterQuests(3991, 3992);
while (!Bot.ShouldExit && Bot.Player.Level >= 61 && Bot.Player.Level < 75)
{
if (!Bot.Player.Alive)
Core.Sleep();
if (Bot.Map.Name != "battlegrounde")
Core.Join("battlegrounde", publicRoom: Core.PrivateRooms);
if (Bot.Player.Cell != "r2")
Core.Jump("r2", "center");
Core.CanWeAggro();
Bot.Combat.Attack("*");
Core.Sleep();
}
Core.AbandonQuest(3991, 3992);
ToggleBoost(BoostType.Gold, false);
}
}
Core.ByPassCheck();
// Farming between levels 75-100
while (!Bot.ShouldExit)
{
if (!Bot.Player.Alive)
Core.Sleep();
if (!rankUpClass && Bot.Player.Level >= level)
break;
if (Bot.Player.Alive && rankUpClass && Bot.Player.CurrentClass != null && Bot.Player.CurrentClassRank >= 10)
break;
if (!Bot.Player.IsMember)
Core.ByPassCheck();
if (Bot.Map.Name != (Core.IsMember
? "nightmare"
: "icestormunder"))
Core.Join(Core.IsMember
? "nightmare"
: "icestormunder", publicRoom: Core.PrivateRooms);
if (Bot.Player.Cell != (Core.IsMember
? "r13"
: "r2"))
Core.Jump(Core.IsMember
? "r13"
: "r2", "Left");
Core.CanWeAggro();
Bot.Combat.Attack("*");
Core.Sleep();
}
#endregion level checks
Bot.Options.AttackWithoutTarget = false;
Core.ToggleAggro(false);
Core.Jump();
Bot.Options.AggroMonsters = false;
Core.JumpWait();
Core.Rest();
// Disable any active boosts
if (rankUpClass)
ToggleBoost(BoostType.Class, false);
ToggleBoost(BoostType.Experience, false);
}
/// <summary>
/// Farms in Seven Circles War for level and items
/// </summary>
/// <param name="level">Desired level</param>
/// <param name="gold"></param>
public void SevenCirclesWar(int level = 100, int gold = 100000000)
{
if (Bot.Player.Level >= level && Bot.Player.Gold >= gold)
return;
if (!Core.isCompletedBefore(7979))
{
Core.Logger("Please use Scripts/Story/Legion/SevenCircles(War).cs to use the SevenCircles method");
return;
}
if (Bot.Player.Level < level)
ToggleBoost(BoostType.Experience);
if (Bot.Player.Gold < gold)
ToggleBoost(BoostType.Gold);
Core.AddDrop("Essence of Wrath", "Souls of Heresy");
Core.EquipClass(ClassType.Farm);
Core.SavedState();
Core.Logger($"Farming {gold} gold using SCW Method");
Core.RegisterQuests(7979, 7980, 7981);
while (!Bot.ShouldExit && (level == 101 ? Bot.Player.Gold < gold : (Bot.Player.Level < level && Bot.Player.Gold < gold)))
Core.KillMonster("sevencircleswar", "Enter", "Right", "*", log: false);
Core.CancelRegisteredQuests();
ToggleBoost(BoostType.Experience, false);
ToggleBoost(BoostType.Gold, false);
Core.SavedState(false);
}
/// <summary>
/// Farms level in FireWar Turnins
/// </summary>
/// <param name="level">Desired level</param>
public void FireWarxp(int level)
{
if (Bot.Player.Level >= 60)
return;
Core.EquipClass(ClassType.Farm);
if (Bot.Player.Level < level)
ToggleBoost(BoostType.Experience);
Core.SavedState();
Core.RegisterQuests(6294, 6295);
while (!Bot.ShouldExit && Bot.Player.Level < level)
Core.KillMonster("Firewar", "r2", "Right", "*", log: false);
Core.CancelRegisteredQuests();
ToggleBoost(BoostType.Experience, false);
Core.SavedState(false);
}
#endregion
#region Misc
/// <summary>
/// Farms the Black Knight Orb
/// </summary>
public void BlackKnightOrb()
{
if (Core.CheckInventory("Black Knight Orb"))
return;
Core.AddDrop("Black Knight Orb");
Core.EnsureAccept(318);
Core.HuntMonster("well", "Gell Oh No", "Black Knight Leg Piece");
Core.HuntMonster("greendragon", "Greenguard Dragon", "Black Knight Chest Piece");
Core.HuntMonster("deathgazer", "Deathgazer", "Black Knight Shoulder Piece");
Core.HuntMonster("trunk", "GreenGuard Basilisk", "Black Knight Arm Piece");
Core.EnsureComplete(318);
Bot.Drops.Pickup("Black Knight Orb");
}
/// <summary>
/// Kills the Restorers from /BludrutBrawl for "The Secret 4" item
/// </summary>
public void TheSecret4()
{
if (Core.CheckInventory("The Secret 4"))
return;
Core.EquipClass(ClassType.Solo);
Core.JumpWait();
while (!Bot.ShouldExit && !Core.CheckInventory("The Secret 4"))
{
while (!Bot.ShouldExit && Bot.Map.Name != "bludrutbrawl")
{
Core.Sleep(5000);
Core.JumpWait();
Core.Join("bludrutbrawl", "Enter0", "Spawn");
}
Core.PvPMove(5, "Morale0C");
Core.PvPMove(4, "Morale0B");
Core.PvPMove(7, "Morale0A");
Core.PvPMove(9, "Crosslower");
Core.PvPMove(14, "Crossupper", 528, 255);
Core.PvPMove(18, "Resource1A");
Bot.Kill.Monster("(B) Defensive Restorer");
if (Bot.Drops.Exists("The Secret 4"))
Bot.Drops.Pickup("The Secret 4");
Core.PvPMove(20, "Resource1B");
Bot.Kill.Monster("(B) Defensive Restorer");
if (Bot.Drops.Exists("The Secret 4"))
Bot.Drops.Pickup("The Secret 4");
while (!Bot.ShouldExit && Bot.Map.Name != "battleon")
{
Core.Sleep(5000);
Core.JumpWait();
Core.Join("battleon");
}
}
}
/// <summary>
/// Defeats the Team B Captain in /BludrutBrawl to farm the specified item.
/// </summary>
/// <param name="item">The name of the item to be obtained (e.g., "Combat Trophy" or "Yoshino's Citrine").</param>
/// <param name="quant">The target quantity of the item.</param>
/// <param name="canSoloBoss">Indicates if the boss can be soloed; true by default.</param>
public void BludrutBrawlBoss(string item = "Combat Trophy", int quant = 5000, bool canSoloBoss = true)
{
if (Core.CheckInventory(item, quant))
return;
canSoloBoss = Core.CBOBool("PvP_SoloPvPBoss", out bool KillAds);
Core.Logger($"`Kill Ads` Enabled? {KillAds}");
Core.AddDrop(new[] { item } ?? new[] { "The Secret 4", "Yoshino's Citrine" });
Core.EquipClass(ClassType.Solo);
Core.FarmingLogger(item, quant);
Bot.Options.AggroAllMonsters = false;
Bot.Options.AggroMonsters = false;
if (Core.CheckInventory(AcceptablePvPAmulets, any: true) && !AcceptablePvPAmulets.Any(Bot.Inventory.IsEquipped) ||
!Bot.Inventory.Items.Any(x => x != null && Core.CheckInventory(AcceptablePvPAmulets, any: true)))
{
// Unbank and equip the first acceptable PvP amulet if owned
if (AcceptablePvPAmulets.Any(item => Bot.Bank.Contains(item)))
{
Core.Unbank(AcceptablePvPAmulets);
Core.Sleep(); // Sleep if necessary to account for server-side inventory updates
}
if (AcceptablePvPAmulets.Any(item => Bot.Inventory.Contains(item)))
{
Core.Equip(AcceptablePvPAmulets.First());
Core.Sleep(); // Sleep if necessary to allow equip to process
}
// Enable Kill Ads if no amulet is found
if (!Core.CheckInventory(AcceptablePvPAmulets, any: true))
{
Core.Logger("No amulet owned, enabling `Kill Ads`");