Skip to content

Commit

Permalink
Merge pull request runelite#16 from BruuhPlz/main
Browse files Browse the repository at this point in the history
Blast Furnace in the works
  • Loading branch information
chsami authored Aug 21, 2023
2 parents 2c05dab + a547ef1 commit 8ac7ebf
Show file tree
Hide file tree
Showing 5 changed files with 488 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
package net.runelite.client.plugins.ogPlugins.ogblastfurnace.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
import net.runelite.api.ItemID;
import net.runelite.api.Varbits;

@Getter
@RequiredArgsConstructor
public enum Bars {
BRONZE_BAR(
ItemID.BRONZE_BAR,
ItemID.TIN_ORE,
1,
ItemID.COPPER_ORE,
1,
Varbits.BLAST_FURNACE_BRONZE_BAR,
Varbits.BLAST_FURNACE_TIN_ORE,
Varbits.BLAST_FURNACE_COPPER_ORE
),
IRON_BAR(
ItemID.IRON_BAR,
ItemID.IRON_ORE,
1,
null,
null,
Varbits.BLAST_FURNACE_IRON_BAR,
Varbits.BLAST_FURNACE_IRON_ORE,
null
),
SILVER_BAR(
ItemID.SILVER_BAR,
ItemID.SILVER_ORE,
1,
null,
null,
Varbits.BLAST_FURNACE_SILVER_BAR,
Varbits.BLAST_FURNACE_SILVER_ORE,
null
),
STEEL_BAR(
ItemID.STEEL_BAR,
ItemID.IRON_ORE,
1,
ItemID.COAL,
1,
Varbits.BLAST_FURNACE_STEEL_BAR,
Varbits.BLAST_FURNACE_IRON_ORE,
Varbits.BLAST_FURNACE_COAL
),
GOLD_BAR(
ItemID.GOLD_BAR,
ItemID.GOLD_ORE,
1,
null,
null,
Varbits.BLAST_FURNACE_GOLD_BAR,
Varbits.BLAST_FURNACE_GOLD_ORE,
null
),
MITHRIL_BAR(
ItemID.MITHRIL_BAR,
ItemID.MITHRIL_ORE,
1,
ItemID.COAL,
2,
Varbits.BLAST_FURNACE_MITHRIL_BAR,
Varbits.BLAST_FURNACE_MITHRIL_ORE,
Varbits.BLAST_FURNACE_COAL
),
ADAMANTITE_BAR(
ItemID.ADAMANTITE_BAR,
ItemID.ADAMANTITE_ORE,
1,
ItemID.COAL,
6,
Varbits.BLAST_FURNACE_ADAMANTITE_BAR,
Varbits.BLAST_FURNACE_ADAMANTITE_ORE,
Varbits.BLAST_FURNACE_COAL
),
RUNITE_BAR(
ItemID.RUNITE_BAR,
ItemID.RUNITE_ORE,
1,
ItemID.COAL,
8,
Varbits.BLAST_FURNACE_RUNITE_BAR,
Varbits.BLAST_FURNACE_RUNITE_ORE,
Varbits.BLAST_FURNACE_COAL
);

private final int barID;
private final int PrimaryOre;
private final int PrimaryOreNeeded;
private final Integer SecondaryOre;
private final Integer SecondaryOreNeeded;
private final int BFBarID;
private final int BFPrimaryOreID;
private final Integer BFSecondaryOreID;

public int getBarID() {return barID;}
public int getPrimaryOre() {return PrimaryOre;}
public int getPrimaryOreNeeded() {return PrimaryOreNeeded;}
public Integer getSecondaryOre() {return SecondaryOre;}
public Integer getSecondaryOreNeeded() {return SecondaryOreNeeded;}
public int getBFBarID() {return BFBarID;}
public int getBFPrimaryOreID() {return BFPrimaryOreID;}
public Integer getBFSecondaryOreID() {return BFSecondaryOreID;}


}
Original file line number Diff line number Diff line change
@@ -1,10 +1,219 @@
package net.runelite.client.plugins.ogPlugins.ogblastfurnace;

import net.runelite.client.config.*;
import net.runelite.client.plugins.ogPlugins.ogblastfurnace.enums.Bars;

import javax.inject.Inject;
import java.awt.event.KeyEvent;

@ConfigGroup("ogBlastFurnace")
public interface ogBlastFurnaceConfig extends Config {

@ConfigSection(
name ="Delays",
description = "Delays when doing actions",
position = 0,
closedByDefault = false

)
String delaySection = "delays";
@ConfigSection(
name ="AFK",
description = "AFK Settings",
position = 1,
closedByDefault = false

)
String afkSection = "afk";
@ConfigSection(
name = "Stamina Potion",
description = "Stamina Potion Settings",
position = 2,
closedByDefault = false
)
String staminaPotionSection = "stamina";

@ConfigSection(
name = "Blast Furnace Settings",
description = "Blast Furnace Settings",
position = 3,
closedByDefault = false
)
String bFSettingsSection = "bFSettings";



//Delays
@ConfigItem(
keyName = "Delay Min",
name = "Delay Min",
description = "Sets minimal delay",
position = 0,
section = delaySection
)
@Range(
min = 30,
max = 90
)
@Units(Units.MILLISECONDS)
default int delayMin() {return 50;}

@ConfigItem(
keyName = "Delay Max",
name = "Delay Max",
description = "Sets maximum delay",
position = 1,
section = delaySection
)
@Range(
min = 100,
max = 200
)
@Units(Units.MILLISECONDS)
default int delayMax() {return 150;}
@ConfigItem(
keyName = "Delay Target",
name = "Delay Target",
description = "Preferred delay time",
position = 2,
section = delaySection
)
@Range(
min = 30,
max = 200
)
@Units(Units.MILLISECONDS)
default int delayTarget() {return 90;}

//AFK
@ConfigItem(
keyName = "AFK Directions",
name = "AFK Directions",
description = "Directions",
position = 0,
section = afkSection
)
default String directions() {return "Please set the Runelite Logout Timer plugin to 25 minutes.\nOr at-least greater than your AFK Max";}
@ConfigItem(
keyName = "AFK Max",
name = "AFK Max",
description = "Sets Maximum AFK",
position = 1,
section = afkSection
)
@Range(
min = 0,
max = 24
)
@Units(Units.MINUTES)
default int afkMax() {return 4;}
@ConfigItem(
keyName = "AFK Target",
name = "AFK Target",
description = "Preferred AFK time",
position = 2,
section = afkSection
)
@Range(
min = 0,
max = 24
)
@Units(Units.MINUTES)
default int afkTarget() {return 3;}

//Stamina
@ConfigItem(
keyName = "Stamina Potion",
name = "Use Stamina Potion?",
description = "Use Stamina Potion?",
position = 0,
section = staminaPotionSection
)
default boolean useStamina() {return true;}
@ConfigItem(
keyName = "Keep Stamina Potion Active?",
name = "Keep Stamina Potion Active?",
description = "Keep Stamina Potion Active?",
position = 1,
section = staminaPotionSection
)
default boolean keepStaminaActive() {return true;}
@ConfigItem(
keyName = "Min Run Energy",
name = "Min Run Energy",
description = "Min Run Energy",
position = 2,
section = staminaPotionSection
)
@Range(
min = 0,
max = 98
)
default int staminaMin() {return 50;}

@ConfigItem(
keyName = "Max Run Energy",
name = "Max Run Energy",
description = "Max Run Energy",
position = 3,
section = staminaPotionSection
)
@Range(
min = 1,
max = 99
)
default int staminaMax() {return 150;}

//Blast Furnace Settings
@ConfigItem(
keyName = "BF Directions",
name = "BF Directions",
description = "Directions",
position = 0,
section = bFSettingsSection
)
default String directionsBF() {return "Requires Ice Gloves\nRequires Goldsmith Gauntlets if doing Gold Bars ";}
@ConfigItem(
keyName = "Bars",
name = "Bars",
description = "Bars",
position = 1,
section = bFSettingsSection
)
default Bars getBars() {return Bars.GOLD_BAR;}
@ConfigItem(
keyName = "Talk to Foreman?",
name = "Talk to Foreman?",
description = "Talk to Foreman?",
position = 2,
section = bFSettingsSection
)
default boolean talkToForeman() {return false;}
@ConfigItem(
keyName = "Use Coal Bag?",
name = "Use Coal Bag?",
description = "Use Coal Bag?",
position = 3,
section = bFSettingsSection
)
default boolean useCoalBag() {return true;}
@ConfigItem(
keyName = "Refill Coffer?",
name = "Refill Coffer?",
description = "Refill Coffer?",
position = 4,
section = bFSettingsSection
)
default boolean getRefill() {return true;}
@ConfigItem(
keyName = "Coffer Refill Amount",
name = "Coffer Refill Amount",
description = "Coffer Refill Amount",
position = 5,
section = bFSettingsSection
)
@Range(min = 100000, max = 2147483647)
default int getRefillAmount() {return 1000000;}


}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public Dimension render(Graphics2D graphics) {
try {
panelComponent.setPreferredSize(new Dimension(200, 300));
panelComponent.getChildren().add(TitleComponent.builder()
.text("OG Blast Furnace")
.text("OG Blast Furnace Gold")
.color(Color.GREEN)
.build());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected void startUp() throws AWTException {
if (overlayManager != null) {
overlayManager.add(ogBlastFurnaceOverlay);
}
ogBlastFurnaceScript.run(360);
ogBlastFurnaceScript.run(config);
}

protected void shutDown() {
Expand Down
Loading

0 comments on commit 8ac7ebf

Please sign in to comment.