Skip to content

Commit

Permalink
Update CoreAdvanced.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
wtffidy committed Nov 3, 2024
1 parent 8253d4f commit 5d0cfe5
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions CoreAdvanced.cs
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,17 @@ public void RankUpClass(string className, bool gearRestore = true)
{
InventoryItem? itemInv = Bot.Inventory.Items.Concat(Bot.Bank.Items).Find(i => i.Name.ToLower().Trim() == className.ToLower().Trim() && i.Category == ItemCategory.Class);

if (itemInv != null && itemInv.Quantity < 302500)
Bot.Wait.ForBankToInventory(itemInv.ID);
else Bot.Wait.ForTrue(() => Bot.Inventory.Contains(className), 20);
if (itemInv != null && Bot.Inventory.Contains(itemInv.ID) && itemInv.Quantity >= 302500)
return;

while (!Bot.ShouldExit && itemInv != null && Bot.Bank.Contains(itemInv.ID) && !Bot.Inventory.Contains(itemInv.ID))
{
Bot.Bank.ToInventory(itemInv.ID);
Core.Sleep();

if (Bot.Inventory.Contains(itemInv.ID))
break;
}

if (itemInv == null)
{
Expand Down

0 comments on commit 5d0cfe5

Please sign in to comment.