Skip to content

Commit

Permalink
The Great Brain Robbery: Some polish (#1287)
Browse files Browse the repository at this point in the history
* feat: Add copy function to NpcStep

* fix: ObjectStep copy function now copies teleports

* Add Ectophial teleport step to the first step of the quest

* Add the "Cross the gangplank to Bill Teach's ship" as a substep to the quests' first step

This ensures the "Starting off" category actually expands when you start the quest guide

* Highlight the "Yes." to start the quest

* Remove unused "Undead pirates?" dialog step

* Add moveToMos as a substep of `talkToTranquility`, ensuring the Starting off category expands

* Morytania Hard diary hint

* Fix the statue object coords

This caused the statue to not be highlighted

* Highlight the fishbowl & diving apparatus in your inventory

* Add requirement stating you must not have a pet following you (OR IN YOUR INVENTORY)

* Make sure the TP backl to Harmoy Island if you messed up any step goes smoothly

* Add "Yes, please" as a dialog step to tP to harmony island, in case you messed up and need a tp back

* Add tele hint to head to the edgeville monastery

* Add requirement to bring the Holy symbol to the "travel to monastery" step already

It's not technically required yet, but it would be silly not to have it now

* Add dialog hint for monastery teleport

* Add holy symbol as a requirement to "Starting off"

This is technically not a requirement, but for anyone other than a UIM this is good to bring already since it saves
a little time banking

* Highlight holy symbol when it should be equipped

* Add ectophial as an infinite charge teleport

* Clean up the "Go back to Harmony" step

It's now a ConditionalStep with all the required steps to head to Harmony copied
to make sure progress is kept as expected

* Add tele step when heading to Fenkenstrain for the first time

* highlight ring of charos in inventory when it needs to be equipped

* clean up "Talk to Dr. Fenkenstrain in harmony windmill" step

making sure there's proper TP steps to get there

* fix ectophial addTeleport quantity/copy

* Suggest climbing upstairs instead of just "go to harmony"

* highlight diving gear

* add "Get keg" as a side panel step

* clean up the ItemWithCharge addition

* Run the formatter
  • Loading branch information
pajlada authored Oct 1, 2023
1 parent 14a9c8f commit ea8eb6a
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 35 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/questhelper/ItemWithCharge.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public enum ItemWithCharge
TCRYSTAL5(TELEPORT_CRYSTAL_5, 5),

// Infinite charges
TP_ECTOPHIAL(ECTOPHIAL, 10000000),
FAIRY_RING_STAFF(ItemCollections.FAIRY_STAFF, 10000000)
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@
import com.questhelper.banktab.BankSlotIcons;
import com.questhelper.panel.PanelDetails;
import com.questhelper.questhelpers.BasicQuestHelper;
import com.questhelper.requirements.Requirement;
import com.questhelper.requirements.ZoneRequirement;
import com.questhelper.requirements.conditional.Conditions;
import com.questhelper.requirements.item.ItemOnTileRequirement;
import com.questhelper.requirements.item.ItemRequirement;
import com.questhelper.requirements.item.ItemRequirements;
import com.questhelper.requirements.item.TeleportItemRequirement;
import com.questhelper.requirements.player.InInstanceRequirement;
import com.questhelper.requirements.player.SkillRequirement;
import com.questhelper.requirements.quest.QuestRequirement;
import com.questhelper.requirements.Requirement;
import com.questhelper.requirements.util.LogicType;
import com.questhelper.requirements.util.Operation;
import com.questhelper.requirements.var.VarbitRequirement;
Expand All @@ -59,7 +60,6 @@
import java.util.List;
import java.util.Map;
import java.util.function.IntUnaryOperator;

import net.runelite.api.GameState;
import net.runelite.api.ItemID;
import net.runelite.api.NpcID;
Expand All @@ -78,7 +78,7 @@ public class TheGreatBrainRobbery extends BasicQuestHelper
{
// Required
ItemRequirement fishbowlHelmet, divingApparatus, woodenCats, oakPlank, saw, plank, fur, hammer, nails,
holySymbol, ringOfCharos, catsOrResources, tinderbox;
holySymbol, ringOfCharos, catsOrResources, tinderbox, noPet;

// Recommended
ItemRequirement ectophial, edgevilleTeleport, fenkenstrainTeleport, watermelonSeeds, combatGearForSafespotting,
Expand All @@ -91,7 +91,7 @@ public class TheGreatBrainRobbery extends BasicQuestHelper
Zone harmony, waterEntrance, water, waterExit, peepRoom, fenkF2, fenkF1, harmonyBasement, boat, boatToMos, mos;

Requirement inHarmony, inWaterEntrance, inWater, inWaterExit, inPeepRoom, inFenkF2, inFenkF1, inHarmonyBasement,
onBoat, repairedStairs, hasReadPrayerBook, talkedToFenk, talkedToRufus, madeCrateWalls, madeCrateBottom,
onBoat, repairedStairs, hasReadPrayerBook, talkedToFenk, talkedToRufus, madeCrateWalls, madeCrateBottom,
addedCats, addedCatsOrHas10, fenkInCrate, placedKeg, addedFuse, litFuse, churchDoorGone, hasKeg, hasFuse,
hasTinderbox, givenClamp, givenStaples, givenBells, givenTongs, hadClamp, hadStaples, hadBells, hadTongs,
givenHammer, barrelchestAppeared, inBoatToMos, inMos;
Expand All @@ -101,16 +101,17 @@ public class TheGreatBrainRobbery extends BasicQuestHelper
enterWaterReturn, leaveWaterEntranceReturn, talkToTranquilityAfterPeeping, talkToTranquilityMosAfterPeeping,
moveToMos, moveToCapt;

QuestStep searchBookcase, readBook, returnToTranquility, recitePrayer, returnToHarmonyAfterPrayer,
talkToTranquilityAfterPrayer;
QuestStep searchBookcase, readBook;
ConditionalStep returnToTranquility;
QuestStep recitePrayer, returnToHarmonyAfterPrayer, talkToTranquilityAfterPrayer;

QuestStep goToF1Fenk, goToF2Fenk, talkToFenk, talkToRufus, makeOrGetWoodenCats, goToF1FenkForCrate,
goToF2FenkForCrate, buildCrate, addBottomToCrate, fillCrate, blowWhistle, goF1WithOrder, goF2WithOrder,
putOrderOnCrate;

QuestStep goToHarmonyAfterFenk, goDownToFenk, talkToFenkOnHarmony, leaveWindmillBasement, goToHarmonyForBrainItems,
getFuse, climbShipLadder, getTinderbox, getKeg, climbDownFromShip, useKegOnDoor, useFuseOnDoor, lightFuse,
killSorebones, goBackDownToFenk, talkToFenkWithItems, goUpFromFenkAfterItems, talkToTranquilityAfterHelping;
killSorebones, goBackDownToFenk, talkToFenkWithItems, goUpFromFenkAfterItems, talkToTranquilityAfterHelping;

QuestStep enterChurchForFight, confrontMigor, defeatBarrelchest, pickupAnchor, talkToTranquilityToFinish;

Expand All @@ -130,7 +131,7 @@ public Map<Integer, QuestStep> loadSteps()
goStart.addStep(inHarmony, talkToTranquilityOnIsland);
steps.put(0, goStart);

ConditionalStep goPeep = new ConditionalStep(this, talkToTranquility);
ConditionalStep goPeep = new ConditionalStep(this, goStart);
goPeep.addStep(inPeepRoom, peerThroughHole);
goPeep.addStep(inWaterExit, climbFromWaterCaveToPeep);
goPeep.addStep(new Conditions(inWater, repairedStairs), climbFromWater);
Expand Down Expand Up @@ -195,6 +196,7 @@ public Map<Integer, QuestStep> loadSteps()
goBlowTheDoor.addStep(new Conditions(onBoat, hasFuse), getTinderbox);
goBlowTheDoor.addStep(new Conditions(inHarmony, hasFuse), climbShipLadder);
goBlowTheDoor.addStep(onBoat, climbDownFromShip);
goBlowTheDoor.addStep(inHarmonyBasement, leaveWindmillBasement);
goBlowTheDoor.addStep(inHarmony, getFuse);
steps.put(80, goBlowTheDoor);
steps.put(90, goBlowTheDoor);
Expand Down Expand Up @@ -240,9 +242,10 @@ public void setupRequirements()
woodenCats.quantity(10), new ItemRequirements(plank.quantity(10), fur.quantity(10)));
tinderbox = new ItemRequirement("Tinderbox", ItemID.TINDERBOX).isNotConsumed();
tinderbox.addAlternates(ItemID.TINDERBOX_7156);
noPet = new ItemRequirement("No pet following you or in your inventory", -1, -1);

// Item recommended
ectophial = new ItemRequirement("Ectophial", ItemID.ECTOPHIAL).isNotConsumed();
ectophial = new TeleportItemRequirement("Ectophial or Mos le'harmless teleport", ItemID.ECTOPHIAL, 3);
edgevilleTeleport = new ItemRequirement("Monastery teleport", ItemCollections.COMBAT_BRACELETS);
edgevilleTeleport.addAlternates(ItemCollections.AMULET_OF_GLORIES);

Expand Down Expand Up @@ -332,7 +335,7 @@ public void setupConditions()
placedKeg = new VarbitRequirement(3393, 2, Operation.GREATER_EQUAL);
addedFuse = new VarbitRequirement(3393, 3, Operation.GREATER_EQUAL);
litFuse = new VarbitRequirement(3393, 4, Operation.GREATER_EQUAL);
churchDoorGone = new VarbitRequirement(3393, 5, Operation.GREATER_EQUAL);
churchDoorGone = new VarbitRequirement(3393, 5, Operation.GREATER_EQUAL);

hasKeg = new Conditions(LogicType.OR, keg, placedKeg);
hasFuse = new Conditions(LogicType.OR, fuse, addedFuse);
Expand Down Expand Up @@ -366,11 +369,14 @@ public void setupSteps()
{
moveToCapt = new ObjectStep(this, ObjectID.GANGPLANK_11209, new WorldPoint(3710, 3496, 0),
"Cross the gangplank to Bill Teach's ship.");
((ObjectStep) moveToCapt).addTeleport(ectophial.quantity(1));
moveToMos = new NpcStep(this, NpcID.BILL_TEACH_4016, new WorldPoint(3714, 3497, 1),
"Talk to Bill Teach to travel to Mos Le'Harmless.");
talkToTranquility = new NpcStep(this, NpcID.BROTHER_TRANQUILITY, new WorldPoint(3681, 2963, 0),
"Talk to Brother Tranquility on Mos Le'Harmless.");
talkToTranquility.addDialogStep("Undead pirates? Let me at 'em!");
talkToTranquility.addDialogSteps("Yes.", "Yes, please.");
talkToTranquility.addSubSteps(moveToCapt);
talkToTranquility.addSubSteps(moveToMos);

talkToTranquilityOnIsland = new NpcStep(this, NpcID.BROTHER_TRANQUILITY, new WorldPoint(3787, 2825,
0), "Talk to Brother Tranquility on Harmony.");
Expand All @@ -380,8 +386,8 @@ public void setupSteps()
ItemRequirement conditionalNails = nails.quantity(60).hideConditioned(repairedStairs);
ItemRequirement conditionalHammer = hammer.hideConditioned(repairedStairs);
pullStatue = new ObjectStep(this, NullObjectID.NULL_22355, new WorldPoint(3795, 2844, 0),
"Pull the saradomin statue on Harmony, then enter it.", fishbowlHelmet.equipped(),
divingApparatus.equipped(), conditionalHammer, conditionalPlanks, conditionalNails);
"Pull the saradomin statue on Harmony, then enter it.\nPlant the watermelon seeds in the patch first if you brought them for the Hard Morytania Diary.",
fishbowlHelmet.highlighted().equipped(), divingApparatus.highlighted().equipped(), conditionalHammer, conditionalPlanks, conditionalNails);
enterWater = new ObjectStep(this, ObjectID.STAIRS_22365, new WorldPoint(3788, 9254, 0),
"Enter the water.");
repairWaterStairs = new ObjectStep(this, NullObjectID.NULL_22370, new WorldPoint(3829, 9254, 1),
Expand Down Expand Up @@ -410,32 +416,51 @@ public void setupSteps()
talkToTranquilityAfterPeeping.addSubSteps(goFromHoleToWater, enterWaterReturn, leaveWaterEntranceReturn,
leaveWaterBack, talkToTranquilityMosAfterPeeping);

/// Protecting the windmill
searchBookcase = new ObjectStep(this, ObjectID.BOOKCASE_380, new WorldPoint(3049, 3484, 0),
"Search the south west bookcase in the Edgeville Monastery.");
"Search the south west bookcase in the Edgeville Monastery.", holySymbol);
searchBookcase.addDialogStep("Monastery");
((ObjectStep) searchBookcase).addTeleport(edgevilleTeleport);

readBook = new DetailedQuestStep(this, "Read the prayer book.", prayerBook.highlighted());
returnToTranquility = new NpcStep(this, NpcID.BROTHER_TRANQUILITY, new WorldPoint(3681, 2963, 0),
"Return to Harmony.", prayerBook, holySymbol.equipped());

// Return to Harmony
ObjectStep moveToCapt2 = ((ObjectStep) moveToCapt).copy();
NpcStep moveToMos2 = ((NpcStep) moveToMos).copy();
NpcStep speakToTranquilityToTeleportBack = new NpcStep(this, NpcID.BROTHER_TRANQUILITY, new WorldPoint(3681, 2963, 0),
"Speak to Brother Tranquility to transport to Harmony.");
returnToTranquility = new ConditionalStep(this, moveToCapt2, "Return to Harmony");
returnToTranquility.addStep(inMos, speakToTranquilityToTeleportBack);
returnToTranquility.addStep(inBoatToMos, moveToMos2);
returnToTranquility.addRequirement(prayerBook);
returnToTranquility.addRequirement(holySymbol.equipped().highlighted());

// Recite prayer
recitePrayer = new DetailedQuestStep(this, new WorldPoint(3787, 2825,
0), "Right-click recite the prayer book on Harmony.", prayerBook.highlighted(), holySymbol.equipped());
0), "Right-click recite the prayer book on Harmony.",
prayerBook.highlighted(), holySymbol.equipped().highlighted());


// Talk to Brother Tranquility again
returnToHarmonyAfterPrayer = new NpcStep(this, NpcID.BROTHER_TRANQUILITY, new WorldPoint(3681, 2963, 0),
"Return to Brother Tranquility on Harmony.");
returnToHarmonyAfterPrayer.addDialogStep("Yes, please.");
talkToTranquilityAfterPrayer = new NpcStep(this, NpcID.BROTHER_TRANQUILITY, new WorldPoint(3787, 2825,
0), "Talk to Brother Tranquility again.");
talkToTranquilityAfterPrayer.addSubSteps(returnToHarmonyAfterPrayer);

/// Finding a Doctor
goToF1Fenk = new ObjectStep(this, ObjectID.STAIRCASE_5206, new WorldPoint(3538, 3552, 0),
"Go up to the second floor of Fenkenstrain's Castle and talk to Dr. Fenkenstrain.");
((ObjectStep) goToF1Fenk).addTeleport(fenkenstrainTeleport);
goToF1Fenk.addDialogStep("Yes, please.");
goToF2Fenk = new ObjectStep(this, ObjectID.LADDER_16683, new WorldPoint(3548, 3554, 1),
"Go up to the second floor of Fenkenstrain's Castle and talk to Dr. Fenkenstrain.");
talkToFenk = new NpcStep(this, NpcID.DR_FENKENSTRAIN, new WorldPoint(3548, 3554, 2),
"Go up to the second floor of Fenkenstrain's Castle and talk to Dr. Fenkenstrain.");
talkToFenk.addSubSteps(goToF1Fenk, goToF2Fenk);
talkToRufus = new NpcStep(this, NpcID.RUFUS_6478, new WorldPoint(3507, 3494, 0),
"Talk to Rufus in Canifis' food store.", ringOfCharos.equipped());
"Talk to Rufus in Canifis' food store.", ringOfCharos.equipped().highlighted());
talkToRufus.addDialogStep("Talk about the meat shipment");
makeOrGetWoodenCats = new DetailedQuestStep(this,
"Either buy 10 wooden cats from the G.E., or make them on a clockmaker's bench in your POH.",
Expand All @@ -451,15 +476,15 @@ public void setupSteps()
plank.quantity(4).hideConditioned(madeCrateBottom), nails.quantity(100).hideConditioned(madeCrateBottom),
hammer.hideConditioned(madeCrateBottom), woodenCats.quantity(10).hideConditioned(addedCats),
cratePart.quantity(6).hideConditioned(madeCrateWalls), wolfWhistle);
buildCrate = new ObjectStep(this, NullObjectID.NULL_22489, new WorldPoint(3550, 3554, 2),
buildCrate = new ObjectStep(this, NullObjectID.NULL_22489, new WorldPoint(3550, 3554, 2),
"Return to Dr. Fenkenstrain and build the crate next to him.", ringOfCharos.equipped(), plank.quantity(4), nails.quantity(100),
hammer, woodenCats.quantity(10), cratePart.quantity(6), wolfWhistle);
buildCrate.addSubSteps(goToF1FenkForCrate, goToF2FenkForCrate);

addBottomToCrate = new ObjectStep(this, NullObjectID.NULL_22489, new WorldPoint(3550, 3554, 2),
addBottomToCrate = new ObjectStep(this, NullObjectID.NULL_22489, new WorldPoint(3550, 3554, 2),
"Add a bottom to the crate.", plank.quantity(4), nails.quantity(100), hammer);

fillCrate = new ObjectStep(this, NullObjectID.NULL_22489, new WorldPoint(3550, 3554, 2),
fillCrate = new ObjectStep(this, NullObjectID.NULL_22489, new WorldPoint(3550, 3554, 2),
"Fill the crate next to Fenkenstrain with wooden cats.", woodenCats.quantity(10).highlighted());
fillCrate.addIcon(ItemID.WOODEN_CAT);

Expand All @@ -469,13 +494,21 @@ public void setupSteps()
"Return to Dr. Fenkenstrain and place the shipping order on the crate.", shippingOrder);
goF2WithOrder = new ObjectStep(this, ObjectID.LADDER_16683, new WorldPoint(3548, 3554, 1),
"Return to Dr. Fenkenstrain and place the shipping order on the crate.", shippingOrder);
putOrderOnCrate = new ObjectStep(this, NullObjectID.NULL_22489, new WorldPoint(3550, 3554, 2),
putOrderOnCrate = new ObjectStep(this, NullObjectID.NULL_22489, new WorldPoint(3550, 3554, 2),
"Return to Dr. Fenkenstrain and place the shipping order on the crate..", shippingOrder.highlighted());
putOrderOnCrate.addIcon(ItemID.SHIPPING_ORDER);
putOrderOnCrate.addSubSteps(goF1WithOrder, goF2WithOrder);

goToHarmonyAfterFenk = new NpcStep(this, NpcID.BROTHER_TRANQUILITY, new WorldPoint(3681, 2963, 0),
"Return to Harmony and talk to Fenkenstrain in the windmill's basement.");
/// Saving the Monks
ObjectStep moveToCapt3 = moveToCapt2.copy();
NpcStep moveToMos3 = moveToMos2.copy();
NpcStep tranqTpToHarmony3 = speakToTranquilityToTeleportBack.copy();
NpcStep savingTheMonksTalkToFenk = new NpcStep(this, NpcID.BROTHER_TRANQUILITY, new WorldPoint(3681, 2963, 0),
"Talk to Fenkenstrain in the windmill's basement.");
goToHarmonyAfterFenk = new ConditionalStep(this, moveToCapt3, "Talk to Dr. Fenkenstrain in the Harmony Windmill basement.");
((ConditionalStep) goToHarmonyAfterFenk).addStep(inMos, tranqTpToHarmony3);
((ConditionalStep) goToHarmonyAfterFenk).addStep(inBoatToMos, moveToMos3);
((ConditionalStep) goToHarmonyAfterFenk).addStep(inHarmony, savingTheMonksTalkToFenk);
goDownToFenk = new ObjectStep(this, ObjectID.LADDER_22173, new WorldPoint(3789, 2826, 0),
"Talk to Dr. Fenkenstrain in the Harmony Windmill basement.");
talkToFenkOnHarmony = new NpcStep(this, NpcID.DR_FENKENSTRAIN, new WorldPoint(3785, 9225, 0),
Expand All @@ -487,9 +520,10 @@ public void setupSteps()
goToHarmonyForBrainItems = new NpcStep(this, NpcID.BROTHER_TRANQUILITY, new WorldPoint(3681, 2963, 0),
"Return to Harmony.");
getFuse = new ObjectStep(this, ObjectID.LOCKER_22298, new WorldPoint(3791, 2873, 0),
"Search the locker on the ship on the north of Harmony.", fishbowlHelmet.equipped(), divingApparatus.equipped());
"Search the locker on the ship on the north of Harmony.",
fishbowlHelmet.highlighted().equipped(), divingApparatus.highlighted().equipped());
((ObjectStep) getFuse).addAlternateObjects(ObjectID.LOCKER_22299);
getFuse.addSubSteps(goToHarmonyForBrainItems);
getFuse.addSubSteps(goToHarmonyForBrainItems, leaveWindmillBasement);
climbShipLadder = new ObjectStep(this, ObjectID.LADDER_22274, new WorldPoint(3802, 2873, 0),
"Climb the ship's ladder.");
getTinderbox = new ItemStep(this, "Take a tinderbox.", tinderbox);
Expand Down Expand Up @@ -546,7 +580,7 @@ public void setupSteps()
public List<ItemRequirement> getItemRequirements()
{
return Arrays.asList(fishbowlHelmet, divingApparatus, catsOrResources, plank.quantity(8), hammer,
nails.quantity(100), holySymbol, ringOfCharos);
nails.quantity(100), holySymbol, ringOfCharos, noPet);
}

@Override
Expand Down Expand Up @@ -588,18 +622,18 @@ public QuestPointReward getQuestPointReward()
public List<ExperienceReward> getExperienceRewards()
{
return Arrays.asList(
new ExperienceReward(Skill.PRAYER, 6000),
new ExperienceReward(Skill.CRAFTING, 2000),
new ExperienceReward(Skill.CONSTRUCTION, 2000));
new ExperienceReward(Skill.PRAYER, 6000),
new ExperienceReward(Skill.CRAFTING, 2000),
new ExperienceReward(Skill.CONSTRUCTION, 2000));
}

@Override
public List<ItemReward> getItemRewards()
{
return Arrays.asList(
new ItemReward("Barrelchest Anchor", ItemID.BARRELCHEST_ANCHOR, 1),
new ItemReward("5,000 Exp Reward Lamp (Any skill above 30)", ItemID.ANTIQUE_LAMP, 1),
new ItemReward("Prayer Book", ItemID.PRAYER_BOOK, 1));
new ItemReward("Barrelchest Anchor", ItemID.BARRELCHEST_ANCHOR, 1),
new ItemReward("5,000 Exp Reward Lamp (Any skill above 30)", ItemID.ANTIQUE_LAMP, 1),
new ItemReward("Prayer Book", ItemID.PRAYER_BOOK, 1));
}

@Override
Expand All @@ -610,7 +644,9 @@ public ArrayList<PanelDetails> getPanels()
allSteps.add(new PanelDetails("Starting off",
Arrays.asList(talkToTranquility, pullStatue, enterWater, repairWaterStairs, climbFromWater,
climbFromWaterCaveToPeep, peerThroughHole, talkToTranquilityAfterPeeping),
plank.quantity(4), nails.quantity(60), hammer, fishbowlHelmet, divingApparatus));
Arrays.asList(plank.quantity(4), nails.quantity(60), hammer, fishbowlHelmet, divingApparatus,
holySymbol, // For the next step, saves some time & the inventory slot is not really needed
noPet)));

allSteps.add(new PanelDetails("Protecting the windmill",
Arrays.asList(searchBookcase, readBook, returnToTranquility, recitePrayer, talkToTranquilityAfterPrayer),
Expand All @@ -622,7 +658,7 @@ public ArrayList<PanelDetails> getPanels()
ringOfCharos, catsOrResources, plank.quantity(4), nails.quantity(100), hammer));

allSteps.add(new PanelDetails("Saving the Monks",
Arrays.asList(talkToFenkOnHarmony, getFuse, climbShipLadder, getTinderbox, climbDownFromShip,
Arrays.asList(talkToFenkOnHarmony, getFuse, climbShipLadder, getTinderbox, getKeg, climbDownFromShip,
useKegOnDoor, useFuseOnDoor, lightFuse, killSorebones, talkToFenkWithItems, talkToTranquilityAfterHelping),
hammer, fishbowlHelmet, divingApparatus, combatGearForSafespotting));

Expand Down
17 changes: 17 additions & 0 deletions src/main/java/com/questhelper/steps/NpcStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,23 @@ public NpcStep(QuestHelper questHelper, int npcID, String text, boolean allowMul
this(questHelper, npcID, null, text, allowMultipleHighlights, requirements);
}

public NpcStep copy()
{
NpcStep newStep = new NpcStep(getQuestHelper(), npcID, worldPoint, null, requirements, recommended);
if (text != null)
{
newStep.setText(text);
}
newStep.allowMultipleHighlights = allowMultipleHighlights;
newStep.addAlternateNpcs(alternateNpcIDs);
if (mustBeFocused) {
newStep.setMustBeFocused(true);
}
newStep.setMaxRoamRange(maxRoamRange);

return newStep;
}

private boolean npcPassesChecks(NPC npc)
{
if (npcName != null && (npc.getName() == null || !npc.getName().equals(npcName))) return false;
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/questhelper/steps/ObjectStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ public ObjectStep copy()
newStep.addAlternateObjects(alternateObjectIDs);
newStep.setMaxObjectDistance(maxObjectDistance);
newStep.setMaxRenderDistance(maxRenderDistance);
for (Requirement tp : teleport) {
newStep.addTeleport(tp);
}

return newStep;
}
Expand Down

0 comments on commit ea8eb6a

Please sign in to comment.