Skip to content

Commit

Permalink
Update EmpoweredNationItem.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
wtffidy committed Nov 8, 2024
1 parent b8045cb commit e055601
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions Nation/Various/EmpoweredNationItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void ScriptMain(IScriptInterface bot)
Core.BankingBlackList.AddRange(Nation.bagDrops);
Core.SetOptions();

GetEmpoweredItem(Bot.Config?.Get<EmpoweredItems>("EmpoweredWep") ?? default);
GetEmpoweredItem(Bot.Config.Get<EmpoweredItems>("EmpoweredWep"));

Core.SetOptions(false);
}
Expand All @@ -41,12 +41,32 @@ public void GetEmpoweredItem(EmpoweredItems Item)
if (!Core.CheckInventory("Nulgath Insignia", 25))
Core.Logger("Could not find 25x Nulgath Insignia, stopping.", messageBox: true, stopBot: true);

// Add list to drop table.
new[] { "Empowered Overfiend Blade", "Empowered Ungodly Reavers", "Empowered Shadow Spear",
"Empowered Bloodletter", "Empowered Prismatic Manslayer", "Empowered Prismatic Manslayers",
"Empowered Legacy of Nulgath", "Empowered Worshipper of Nulgath",
"Empowered Evolved Void", "Empowered Evolved Fiend", "Empowered Evolved Blood",
"Empowered Evolved Hex", "Empowered Evolved Shadow" }.ToList().ForEach(item => Bot.Drops.Add(item));

Farm.Experience(80);
Core.AddDrop(Nation.bagDrops);

foreach (EmpoweredItems item in (EmpoweredItems[])Enum.GetValues(typeof(EmpoweredItems)))
{
switch (Bot.Config?.Get<EmpoweredItems>("EmpoweredWep") ?? default)
// Get the selected item from config
EmpoweredItems? selectedItem = Bot.Config?.Get<EmpoweredItems>("EmpoweredWep");

// Ensure we have a valid item selection from the config
if (selectedItem == null)
continue;

// Convert the enum value to a string for checking in the inventory
string itemName = selectedItem.ToString().Replace('_', ' ');

if (Core.CheckInventory(itemName, toInv: false))
return;

switch (Bot.Config?.Get<EmpoweredItems>("EmpoweredWep"))
{
//Empowered Bloodletter 8696
case EmpoweredItems.Empowered_Bloodletter:
Expand Down

0 comments on commit e055601

Please sign in to comment.