Skip to content

Commit 0534f4a

Browse files
committed
Update BuyScrolls.cs
1 parent 8ed1933 commit 0534f4a

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

Farm/BuyScrolls.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void BuyScroll(Scrolls scroll, int quant = -1, bool useMysticParchment =
5555
}
5656
string scrollName = QuestData.Rewards.First().Name;
5757
int maxStack = QuestData.Rewards.First().MaxStack;
58-
quant = quant == -1 ? maxStack : quant;
58+
quant = quant == -1 || quant > maxStack ? maxStack : quant;
5959

6060
if (Core.CheckInventory(scrollName, quant))
6161
return;
@@ -70,14 +70,17 @@ public void BuyScroll(Scrolls scroll, int quant = -1, bool useMysticParchment =
7070
Action gatherMaterials = !useMysticParchment
7171
? () =>
7272
{
73-
if (!Core.CheckInventory("Arcane Quill"))
73+
if (!Core.CheckInventory(ink, 5))
7474
{
75-
if (!Core.CheckInventory("Gold Voucher 500k", 2))
75+
if (!Core.CheckInventory("Arcane Quill", 1))
7676
{
77-
Farm.Gold(1_000_000);
78-
Core.BuyItem("spellcraft", 693, "Gold Voucher 500k", 2);
77+
if (!Core.CheckInventory("Gold Voucher 500k", 2))
78+
{
79+
Farm.Gold(1_000_000);
80+
Core.BuyItem("spellcraft", 693, "Gold Voucher 500k", 2);
81+
}
82+
Core.BuyItem("spellcraft", 693, "Arcane Quill", 10, shopItemID: 8847);
7983
}
80-
Core.BuyItem("spellcraft", 693, "Arcane Quill", 10, shopItemID: 8847);
8184
Core.BuyItem("spellcraft", 622, ink, 5);
8285
}
8386
}
@@ -92,8 +95,9 @@ public void BuyScroll(Scrolls scroll, int quant = -1, bool useMysticParchment =
9295
gatherMaterials();
9396
Core.EnsureAccept(QuestData.ID);
9497
Core.EnsureCompleteMulti(QuestData.ID);
98+
Bot.Wait.ForDrop(scrollName);
9599
Bot.Wait.ForPickup(scrollName);
96-
Core.FarmingLogger(scrollName, quant);
100+
Core.Logger($"{scrollName} x{Bot.Inventory.GetQuantity(scrollName)}/{quant}");
97101
}
98102
}
99103
}

0 commit comments

Comments
 (0)