forked from BrenoHenrike/Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CoreFarms.cs
3117 lines (2696 loc) · 113 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.Factions;
using Skua.Core.Models.Items;
using Skua.Core.Models.Monsters;
using Skua.Core.Models.Quests;
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;
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);
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", "Battleground E Opponent Defeated", 10, log: false);
Core.KillMonster("honorhall", "r1", "Center", "Ice Demon", "HonorHall Opponent Defeated", 10, 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);
Core.KillMonster("battlegrounde", "r2", "Left", "*", "Battleground D Opponent Defeated", 10);
}
Core.CancelRegisteredQuests();
Core.SavedState(false);
}
/// <summary>
/// Farms Gold by selling Berserker Bunny
/// </summary>
/// <param name="goldQuant">How much gold to farm</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.HuntMonster("greenguardwest", "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);
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);
}
#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 (Bot.Player.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 < 30)
{
//i swear this is active yearround for a black friday "locked" quest according to the wiki.. keep undead warrior as a backup.. undead giant is slower but will work till we find a fillin - perhaps sluethhouseinn? used to be good years ago
if (Bot.Quests.IsAvailable(6979))
{
Core.EquipClass(ClassType.Solo);
Core.RegisterQuests(6979);
while (!Bot.ShouldExit && Bot.Player.Level < 30)
{
Core.Join("prison", "Tax", "Left");
if (Bot.Player.Cell != "Tax")
{
Core.Jump("Tax");
Core.Sleep();
Bot.Wait.ForCellChange("Tax");
}
while (!Bot.ShouldExit && Core.IsMonsterAlive(7, true) && Bot.Monsters.CurrentAvailableMonsters.Exists(m => m.MapID == 7))
{
Bot.Kill.Monster(7);
while (Bot.Player.Cell != "Tax")
{
Core.Jump("Tax");
Core.Sleep();
// if (Bot.Player.Cell == "Tax")
// break; // Removed unnecessary break statement
}
if (Bot.Player.Level >= 30)
break;
}
}
Core.CancelRegisteredQuests();
}
else
{
UndeadGiantUnlock();
Core.RegisterQuests(178);
while (!Bot.ShouldExit && Bot.Player.Level < 30)
Core.HuntMonster("swordhavenundead", "Undead Giant", log: false);
Core.CancelRegisteredQuests();
}
}
FireWarxp(40);
IcestormArena(level);
if (rankUpClass)
ToggleBoost(BoostType.Class, false);
ToggleBoost(BoostType.Experience, false);
}
/// <summary>
/// Farms level in Ice Storm Arena
/// </summary>
/// <param name="level">Desired level</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 (NotYetLevel(5))
Core.KillMonster("icestormarena", "r4", "Bottom", "*", log: false, publicRoom: true);
//Between level 5 and 10
while (NotYetLevel(10))
Core.KillMonster("icestormarena", "r5", "Left", "*", log: false, publicRoom: true);
//Between level 10 and 20
while (NotYetLevel(20))
Core.KillMonster("icestormarena", "r6", "Left", "*", log: false, publicRoom: true);
//Between level 20 and 25
if (NotYetLevel(25))
{
Core.RegisterQuests(6628);
while (NotYetLevel(25))
Core.KillMonster("icestormarena", "r7", "Left", "*", "Icewing Grunt Defeated", 3, log: false, publicRoom: true);
Core.CancelRegisteredQuests();
}
//Between level 25 and 30
while (NotYetLevel(30))
Core.KillMonster("icestormarena", "r10", "Left", "*", log: false, publicRoom: true);
//Between level 30 and 35
if (NotYetLevel(35))
{
Core.RegisterQuests(6629);
while (NotYetLevel(35))
Core.KillMonster("icestormarena", "r11", "Left", "*", "Icewing Warrior Defeated", 3, log: false, publicRoom: true);
Core.CancelRegisteredQuests();
}
//Between level 35 and 50
while (NotYetLevel(50))
Core.KillMonster("icestormarena", "r14", "Left", "*", log: false, publicRoom: true);
//Between level 50 and 61(for BGE)
while (NotYetLevel(61))
Core.KillMonster("icestormarena", "r16", "Left", "*", log: false, publicRoom: true);
//Between level 61 and 75
if (NotYetLevel(75))
{
ToggleBoost(BoostType.Gold);
Core.RegisterQuests(3991, 3992);
while (NotYetLevel(75))
Core.KillMonster("battlegrounde", "r2", "Center", "*", log: false, publicRoom: true);
Core.CancelRegisteredQuests();
ToggleBoost(BoostType.Gold, false);
}
//Between level 75 and 100
while (NotYetLevel(100))
Core.KillMonster(Core.IsMember ? "nightmare" : "icestormunder", Core.IsMember ? "r13" : "r2", Core.IsMember ? "left" : "Top", "*", log: false);
Core.ToggleAggro(false);
Core.JumpWait();
Bot.Wait.ForCombatExit();
Core.Rest();
if (rankUpClass)
ToggleBoost(BoostType.Class, false);
ToggleBoost(BoostType.Experience, false);
bool NotYetLevel(int _level)
{
return !Bot.ShouldExit && (Bot.Player.Level < _level && Bot.Player.Level < level) || (Bot.Player.Level <= _level && rankUpClass && Bot.Player.CurrentClassRank != 10);
}
}
/// <summary>
/// Farms in Seven Circles War for level and items
/// </summary>
/// <param name="level">Desired level</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;
}
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", "*", "Wrath Guards Defeated", 12);
Core.KillMonster("sevencircleswar", "Enter", "Right", "*", "War Medal", 5);
Core.KillMonster("sevencircleswar", "Enter", "Right", "*", "Mega War Medal", 3);
}
Core.CancelRegisteredQuests();
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);
Core.SavedState();
Core.RegisterQuests(6294, 6295);
while (!Bot.ShouldExit && Bot.Player.Level < level)
Core.KillMonster("Firewar", "r2", "Right", "*", log: false);
Core.CancelRegisteredQuests();
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");
Bot.Drops.Pickup("The Secret 4");
Bot.Kill.Monster("(B) Defensive Restorer");
Bot.Drops.Pickup("The Secret 4");
Core.PvPMove(20, "Resource1B");
Bot.Kill.Monster("(B) Defensive Restorer");
Bot.Drops.Pickup("The Secret 4");
Bot.Kill.Monster("(B) Defensive Restorer");
Bot.Wait.ForDrop("The Sercret 4");
Bot.Drops.Pickup("The Secret 4");
while (!Bot.ShouldExit && Bot.Map.Name != "battleon")
{
Core.Sleep(5000);
Core.JumpWait();
Core.Join("battleon");
}
}
}
/// <summary>
/// Kills the Team B Captain in /BludrutBrawl for the desired item (Combat Trophy or Yoshino's Citrine)
/// </summary>
/// <param name="item">Name of the desired item</param>
/// <param name="quant">Desired quantity</param>
/// <param name="canSoloBoss">Whether you can solo the Boss without killing Restorers and Brawlers</param>
public void BludrutBrawlBoss(string item = "Combat Trophy", int quant = 5000) //, bool canSoloBoss = true)
{
if (Core.CheckInventory(item, quant))
return;
int ExitAttempt = 1;
int Death = 1;
Core.Logger("Kill ads is on by default now\n" +
"as you get rewarded 10 rather then 3\n" +
"Combat Trophies");
// if (Core.CBOBool("PvP_SoloPvPBoss", out bool _canSoloBoss))
// canSoloBoss = !_canSoloBoss;
Core.AddDrop(item, "The Secret 4", "Yoshino's Citrine");
Core.EquipClass(ClassType.Solo);
Core.FarmingLogger(item, quant);
// Core.Logger($"Farming {quant} {item}. SoloBoss = {canSoloBoss}");
Core.ConfigureAggro(false);
// Bot.Events.PlayerDeath += PVPDeath;
Start:
Core.EquipClass(ClassType.Solo);
while (!Bot.ShouldExit && !Core.CheckInventory(item, quant))
{
Core.Join("bludrutbrawl", "Enter0", "Spawn");
Core.Sleep(2500);
Core.PvPMove(5, "Morale0C");
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(4, "Morale0B");
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(7, "Morale0A");
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(9, "Crosslower");
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(14, "Crossupper", 528, 255);
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(18, "Resource1A");
if (!Bot.Player.Alive)
goto RestartOnDeath;
while (!Bot.ShouldExit)
{
Bot.Kill.Monster(9);
Bot.Combat.CancelTarget();
Bot.Wait.ForCombatExit();
Bot.Kill.Monster(10);
Bot.Wait.ForCombatExit();
if (!Core.IsMonsterAlive(313))
{
Bot.Combat.CancelTarget();
Core.Logger("(B) Defensive Restorers killed, moving on.");
break;
}
if (!Bot.Player.Alive)
goto RestartOnDeath;
}
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(20, "Resource1B");
if (!Bot.Player.Alive)
goto RestartOnDeath;
while (!Bot.ShouldExit)
{
Bot.Kill.Monster(11);
Bot.Wait.ForCombatExit();
Bot.Kill.Monster(12);
Bot.Combat.CancelTarget();
Bot.Wait.ForCombatExit();
if (!Core.IsMonsterAlive(313))
{
Bot.Combat.CancelTarget();
Core.Logger("(B) Defensive Restorers killed, moving on.");
break;
}
if (!Bot.Player.Alive)
goto RestartOnDeath;
}
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(21, "Resource1A", 124);
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(19, "Crossupper", 124);
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(17, "Crosslower", 488, 483);
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(15, "Morale1A", 862, 268);
if (!Bot.Player.Alive)
goto RestartOnDeath;
while (!Bot.ShouldExit)
{
Bot.Kill.Monster(13);
Bot.Combat.CancelTarget();
Bot.Wait.ForCombatExit();
if (!Core.IsMonsterAlive(311))
{
Bot.Combat.CancelTarget();
Core.Logger("(B) Brawlers killed, moving on.");
break;
}
if (!Bot.Player.Alive)
goto RestartOnDeath;
}
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(23, "Morale1B", 860, 267);
if (!Bot.Player.Alive)
goto RestartOnDeath;
while (!Bot.ShouldExit)
{
Bot.Kill.Monster(14);
Bot.Combat.CancelTarget();
Bot.Wait.ForCombatExit();
if (!Core.IsMonsterAlive(311))
{
Bot.Combat.CancelTarget();
Core.Logger("(B) Brawlers killed, moving on.");
break;
}
if (!Bot.Player.Alive)
goto RestartOnDeath;
}
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(25, "Morale1C", 857, 267);
if (!Bot.Player.Alive)
goto RestartOnDeath;
while (!Bot.ShouldExit)
{
Bot.Kill.Monster(15);
Bot.Combat.CancelTarget();
Bot.Wait.ForCombatExit();
if (!Core.IsMonsterAlive(311))
{
Bot.Combat.CancelTarget();
Core.Logger("(B) Brawlers killed, moving on.");
break;
}
if (!Bot.Player.Alive)
goto RestartOnDeath;
}
if (!Bot.Player.Alive)
goto RestartOnDeath;
Core.PvPMove(28, "Captain1", 528, 255);
if (!Bot.Player.Alive)
goto RestartOnDeath;
while (!Bot.ShouldExit)
{
Bot.Kill.Monster(16);
Bot.Combat.CancelTarget();
Bot.Wait.ForCombatExit();
if (!Core.IsMonsterAlive(309))
{
Bot.Combat.CancelTarget();
Core.Logger("Team B Captain killed, moving on.");
break;
}
if (!Bot.Player.Alive)
goto RestartOnDeath;
}
Bot.Wait.ForDrop(item, 40);
Core.Sleep(1500);
Bot.Wait.ForPickup(item, 40);
Core.Logger("Delaying exit");
Core.Sleep(7500);
if (!Bot.Player.Alive)
goto RestartOnDeath;
else goto Exit;
Exit:
while (!Bot.ShouldExit && Bot.Map.Name != "battleon")
{
Core.Logger($"Attempting Exit {ExitAttempt++}.");
Bot.Map.Join("battleon-999999");
Bot.Combat.CancelTarget();
Bot.Wait.ForCombatExit();
Core.Sleep(1500);
if (Bot.Map.Name != "battleon")
Core.Logger("Failed!? HOW.. try agian");
else Core.Logger("Successful!");
goto Start;
}
RestartOnDeath:
Core.Logger($"Death: {Death++}, resetting");
while (!Bot.ShouldExit && !Bot.Player.Alive)
{
Bot.Wait.ForTrue(() => Bot.Player.Alive, 100);
Bot.Wait.ForCellChange("Enter0");
Core.Logger($"Attempting Exit {ExitAttempt++}.");
Bot.Map.Join("battleon-999999");
Bot.Wait.ForMapLoad("battleon");
Core.Sleep(1500);
if (Bot.Map.Name != "battleon")
Core.Logger("Failed!? HOW.. try agian");
else
{
Core.Logger("Successful!");
goto Start;
}
}
}
foreach (string reward in new[] { "Yoshino's Citrine", "The Secret 4" })
{
if (item != reward && Bot.Inventory.Contains(reward))
Core.ToBank(reward);
}
Core.Logger($"Deaths:[{Death}]");
Death = 0;
ExitAttempt = 0;
}
public void BattleUnderB(string item = "Bone Dust", int quant = 1, bool isTemp = false)
{
if (Core.CheckInventory(item, quant))
return;
if (item == "Undead Energy" && !Core.isCompletedBefore(2084))
{
Core.Logger("Making it so undead energy can drop..");
// 2066 - Reforging the Blinding Light
if (!Core.isCompletedBefore(2066))
{
Core.EnsureAccept(2066);
Core.BuyItem("doomwood", 276, "Blinding Light of Destiny Handle");
Core.EnsureComplete(2066);
}
// 2067 - Secret Order of Undead Slayers
if (!Core.isCompletedBefore(2067))
{
Core.EnsureAccept(2082);
Core.BuyItem("doomwood", 276, "Bonegrinder Medal");
Core.EnsureComplete(2082);
}
// 2082 - Essential Essences
if (!Core.isCompletedBefore(2082))
{
Core.EnsureAccept(2082);
Core.HuntMonster("battleunderb", "Skeleton Warrior", "Undead Essence", isTemp: false);
Core.EnsureComplete(2082);
}
// 2083 - Bust some Dust
if (!Core.isCompletedBefore(2083))
{
Core.EnsureAccept(2083);
Core.HuntMonster("battleunderb", "Skeleton Warrior", "Bone Dust", isTemp: false);
Core.EnsureComplete(2083);
}
// 2084 - A Loyal Follower
if (!Core.isCompletedBefore(2084))
{
Core.EnsureAccept(2084);
BoneSomeDust(100);
Core.HuntMonster("timevoid", "Ephemerite", "Celestial Compass");
Core.EnsureComplete(2084);
}
}
Core.AddDrop(item);
Core.FarmingLogger(item, quant);
Core.EquipClass(ClassType.Farm);
Core.KillMonster("battleunderb", "Enter", "Spawn", "*", item, quant, isTemp, log: false);
}
public void BoneSomeDust(int quant = 65000)
{
if (Core.CheckInventory("Spirit Orb", quant))
return;
Core.AddDrop("Bone Dust", "Undead Essence", "Undead Energy", "Spirit Orb");
Core.EquipClass(ClassType.Farm);
Core.FarmingLogger("Spirit Orb", quant);
Core.RegisterQuests(2082, 2083);
while (!Bot.ShouldExit && !Core.CheckInventory("Spirit Orb", quant))
Core.KillMonster("battleunderb", "Enter", "Spawn", "*", log: false);
Core.CancelRegisteredQuests();
}
#endregion
#region Reputation
public void GetAllRanks()
{
ToggleBoost(BoostType.Reputation);
AegisREP();
AlchemyREP();
ArcangroveREP();
BaconCatREP();
if (Core.IsMember)
BeastMasterREP();
BlacksmithingREP();
BladeofAweREP(farmBoA: false);
if (Core.isSeasonalMapActive("birdswithharms"))
BrethwrenREP();
BrightoakREP();
ChaosMilitiaREP();
ChaosREP();
ChronoSpanREP();
CraggleRockREP();
DiabolicalREP();
DoomWoodREP();
DreadfireREP();
DreadrockREP();
DruidGroveREP();
DwarfholdREP();
ElementalMasterREP();
EmberseaREP();
EternalREP();
EtherStormREP();
EvilREP();
if (Core.isSeasonalMapActive("rainbow"))
FaerieCourtREP();
FishingREP();
GlaceraREP();
GoodREP();
HollowbornREP();
HorcREP();
InfernalArmyREP();
LoremasterREP();
LycanREP();
MonsterHunterREP();
MysteriousDungeonREP();
MythsongREP();
NecroCryptREP();
NorthpointeREP();
PetTamerREP();
RavenlossREP();
SandseaREP();
if (Core.IsMember)
SkyguardREP();
SomniaREP();
SpellCraftingREP();
SwordhavenREP();
ThunderForgeREP();
TreasureHunterREP();
TrollREP();
VampireREP();
YokaiREP();
//Death Pit scripts here because they take alot of time and kill script efficieny
DeathPitBrawlREP();
DeathPitArenaREP();
ToggleBoost(BoostType.Reputation, false);
}
public void AegisREP(int rank = 10)
{
if (FactionRank("Aegis") >= rank)
return;
Core.EquipClass(ClassType.Farm);
Core.SavedState();
ToggleBoost(BoostType.Reputation);
Core.Logger($"Farming rank {rank}");
Core.RegisterQuests(4900, 4910, 4914); //Kick Some Can 4900, The Best You Can Buy 4910, Testing My Metal 4914
while (!Bot.ShouldExit && FactionRank("Aegis") < rank)
{
Core.HuntMonster("skytower", "Seraphic Assassin", "Seraphic Assassin Dueled", 10, log: false);
Core.HuntMonster("skytower", "Virtuous Warrior", "Warriors Dueled", 10, log: false);
Core.HuntMonster("skytower", "Seraphic Assassin", "Assassins Handed To Them", 6, log: false);
Core.HuntMonster("skytower", "Virtuous Warrior", "Warrior Butt Beaten", 6, log: false);
}
Core.CancelRegisteredQuests();
ToggleBoost(BoostType.Reputation, false);
Core.SavedState(false);
}
/// <summary>
/// Uses the specified parameters to make an Alchemy misture
/// </summary>
/// <param name="reagent1">The first reagent.</param>
/// <param name="reagent2">The second reagent</param>
/// <param name="rune">The rune to be used (AlchemyRunes.Gebo by default).</param>
/// <param name="rank">The minimum rank to make the misture, use 0 for any rank.</param>
/// <param name="loop">Whether loop till you run out of reagents</param>
/// <param name="modifier">Some mistures have specific packet modifiers, default is Moose but you can find Man, mRe and others.</param>
public void AlchemyPacket(string reagent1, string reagent2, AlchemyRunes rune = AlchemyRunes.Gebo, int rank = 0, bool loop = true, string modifier = "Moose", AlchemyTraits trait = AlchemyTraits.APw, bool P2w = false)
{
if (rank != 0 && FactionRank("Alchemy") < rank)
AlchemyREP(rank);
// Core.Join("Alchemy");
if (!Core.CheckInventory(reagent1) || !Bot.Inventory.TryGetItem(reagent1, out var reg1))
{
Core.Logger("Something went wrong, you do not own " + reagent1, messageBox: true, stopBot: true);
return;
}
if (!Core.CheckInventory(reagent2) || !Bot.Inventory.TryGetItem(reagent1, out var reg2))
{
Core.Logger("Something went wrong, you do not own " + reagent2, messageBox: true, stopBot: true);
return;
}
int reagentid1 = reg1!.ID;
int reagentid2 = reg2!.ID;
if (reagent1 == "Dragon Scale")
reg1!.ID = 11475;
Core.Logger($"Reagents: [{reagent1}], [{reagent2}].");
Core.Logger($"Rune: {rune}.");
Core.Logger($"Modifier: {modifier}.");
int i = 1;
if (loop)
{
while (!Bot.ShouldExit && Core.CheckInventory(new[] { reagent1, reagent2 }))
{
if (P2w && !Core.CheckInventory("Dragon Runestone"))
break;
Packet();
Core.Logger($"Completed alchemy x{i++}");
}
}
else Packet();
//Times alchemy was fixed: TO FUCKING MANY I HATE ARTIX
void Packet()
{
if (!P2w)
Core.Sleep(3500);
else Core.Sleep();
if (P2w && Core.CheckInventory("Dragon Runestone"))
Bot.Send.Packet($"%xt%zm%crafting%1%getAlchWait%{reagentid1}%{reagentid2}%true%Ready to Mix%{reagent1}%{reagent2}%{rune}%{trait}%");
else if (!P2w)
Bot.Send.Packet($"%xt%zm%crafting%1%getAlchWait%{reagentid1}%{reagentid2}%false%Ready to Mix%{reagent1}%{reagent2}%{rune}%{modifier}%");
if (P2w)
Core.Sleep(2500);
else Core.Sleep(11000);
if (P2w && Core.CheckInventory("Dragon Runestone"))
Bot.Send.Packet($"%xt%zm%crafting%1%checkAlchComplete%{reagentid1}%{reagentid2}%true%Mix Complete%{reagent1}%{reagent2}%{rune}%{trait}%");
else if (!P2w)
Bot.Send.Packet($"%xt%zm%crafting%1%checkAlchComplete%{reagentid1}%{reagentid2}%false%Mix Complete%{reagent1}%{reagent2}%{rune}%{modifier}%");
}
}
/// <summary>
/// Uses the Jera:hOu in the alchemy packet for starting rep.
/// to find the correct trait for a specific pot, goto /join alchemy with the correct reagents
/// and open packet logger, enable it, start "help me", "use dragon stones"
/// slect the level/type/kind(atk, int, spell, etc), and start it, grab the packet(copy it)
/// make request with that and the Potion's name+itemid(from tools > grabber > inventory > grab)
/// </summary>
public enum AlchemyTraits