Skip to content

Commit

Permalink
Update CoreNation.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
wtffidy committed Jan 21, 2025
1 parent 52c3947 commit cc3f296
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions Nation/CoreNation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -772,14 +772,14 @@ public void Supplies(string? item = null, int quant = 1, bool UltraAlteon = fals
bool sellMemVoucher = Core.CBOBool("Nation_SellMemVoucher", out bool _sellMemVoucher) && _sellMemVoucher == true;
bool returnPolicyDuringSupplies = Core.CBOBool("Nation_ReturnPolicyDuringSupplies", out bool _returnSupplies) && _returnSupplies == true;

Core.Logger($"Do Return Policy?: {returnPolicyDuringSupplies}");
Core.Logger(Bot.Player.Gold >= 100000000 && sellMemVoucher
? $"Your Gold is Capped, SellMemvouchers will be disabled"
: $"Sell Voucher of Nulgath: {sellMemVoucher}");

if (Bot.Player.Gold >= 100000000 && sellMemVoucher)
if (sellMemVoucher == true && Bot.Player.Gold >= 100000000)
{
Core.Logger("Gold is capped, no reason to sell Vouchers");
sellMemVoucher = false;
}

Core.Logger($"Do Return Policy?: {returnPolicyDuringSupplies}\n" +
$"Sell Voucher of Nulgath: {sellMemVoucher}");

// Register quests based on item check and inventory status
Core.RegisterQuests(
Expand Down Expand Up @@ -869,7 +869,7 @@ public void Supplies(string? item = null, int quant = 1, bool UltraAlteon = fals
}
}
DoSwindlesReturnArea(returnPolicyDuringSupplies, ReturnItem);
if (Core.CheckInventory("Voucher of Nulgath (non-mem)") && Core.CheckInventory("Essence of Nulgath", 60))
if (Core.CheckInventory("Voucher of Nulgath (non-mem)") && Item.Name != "Voucher of Nulgath (non-mem)" && Core.CheckInventory("Essence of Nulgath", 60))
Core.EnsureCompleteMulti(4778);
}
}
Expand All @@ -879,7 +879,7 @@ public void Supplies(string? item = null, int quant = 1, bool UltraAlteon = fals
else // Handle the case when item is not null
{
if (Core.CheckInventory(CragName) && !UltraAlteon)
BambloozevsDrudgen(item, quant, KeepVoucher, AssistantDuring, ReturnItem, ReturnItemQuant);
BambloozevsDrudgen(item, quant, KeepVoucher, AssistantDuring, ReturnItem, ReturnItemQuant, true);
else
{
List<ItemBase> rewards = Core.EnsureLoad(2857).Rewards;
Expand Down Expand Up @@ -936,7 +936,7 @@ public void Supplies(string? item = null, int quant = 1, bool UltraAlteon = fals

DoSwindlesReturnArea(returnPolicyDuringSupplies, ReturnItem);

if (Core.CheckInventory("Voucher of Nulgath (non-mem)") && Core.CheckInventory("Essence of Nulgath", 60))
if (Core.CheckInventory("Voucher of Nulgath (non-mem)") && item != "Voucher of Nulgath (non-mem)" && Core.CheckInventory("Essence of Nulgath", 60))
Core.EnsureCompleteMulti(4778);
}
}
Expand Down Expand Up @@ -1210,15 +1210,14 @@ public void BambloozevsDrudgen(string? item = null, int quant = 1, bool KeepVouc
bool sellMemVoucher = Core.CBOBool("Nation_SellMemVoucher", out bool _sellMemVoucher) && _sellMemVoucher == true;
bool HasLogged = false;
if (!CamefromSupplies)
{
Core.Logger(Bot.Player.Gold >= 100000000 && sellMemVoucher
? $"Your Gold is Capped, SellMemvouchers will be disabled"
: $"Sell Voucher of Nulgath: {sellMemVoucher}");
Core.Logger($"Do Return Policy?: {returnPolicyDuringSupplies}\n" +
$"Sell Voucher of Nulgath: {sellMemVoucher}");

}

if (sellMemVoucher && Bot.Player.Gold >= 100000000)
if (sellMemVoucher == true && Bot.Player.Gold >= 100000000)
{
Core.Logger($"Your gold is capped, SellMemvouchers will be disabled");
sellMemVoucher = false;
}

if (returnPolicyDuringSupplies)
Core.AddDrop(Uni(1), Uni(6), Uni(9), Uni(16), Uni(20));
Expand Down

0 comments on commit cc3f296

Please sign in to comment.