├── .editorconfig ├── .github ├── FUNDING.yml └── workflows │ ├── gradle-snapshot.yml │ └── gradle.yml ├── .gitignore ├── .run └── Application.run.xml ├── LICENSE ├── README.md ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── icon.png ├── runelite-plugin.properties ├── settings.gradle └── src ├── main ├── java │ └── com │ │ └── questhelper │ │ ├── QuestHelperConfig.java │ │ ├── QuestHelperPlugin.java │ │ ├── bank │ │ ├── GroupBank.java │ │ ├── QuestBank.java │ │ ├── QuestBankData.java │ │ └── banktab │ │ │ ├── BankSlotIcons.java │ │ │ ├── BankTabItem.java │ │ │ ├── BankTabItems.java │ │ │ ├── BankText.java │ │ │ ├── BankWidget.java │ │ │ ├── PotionStorage.java │ │ │ ├── QuestBankTab.java │ │ │ ├── QuestBankTabInterface.java │ │ │ ├── QuestGrandExchangeInterface.java │ │ │ └── QuestHelperBankTagService.java │ │ ├── collections │ │ ├── ItemCollections.java │ │ ├── ItemWithCharge.java │ │ ├── KeyringCollection.java │ │ ├── NpcCollections.java │ │ └── TeleportCollections.java │ │ ├── config │ │ ├── AssistanceLevel.java │ │ ├── ConfigKeys.java │ │ └── SkillFiltering.java │ │ ├── domain │ │ └── AccountType.java │ │ ├── helpers │ │ ├── achievementdiaries │ │ │ ├── ardougne │ │ │ │ ├── ArdougneEasy.java │ │ │ │ ├── ArdougneElite.java │ │ │ │ ├── ArdougneHard.java │ │ │ │ └── ArdougneMedium.java │ │ │ ├── desert │ │ │ │ ├── DesertEasy.java │ │ │ │ ├── DesertElite.java │ │ │ │ ├── DesertHard.java │ │ │ │ └── DesertMedium.java │ │ │ ├── falador │ │ │ │ ├── FaladorEasy.java │ │ │ │ ├── FaladorElite.java │ │ │ │ ├── FaladorHard.java │ │ │ │ └── FaladorMedium.java │ │ │ ├── fremennik │ │ │ │ ├── DagRoute.java │ │ │ │ ├── DagRouteHelper.java │ │ │ │ ├── FremennikEasy.java │ │ │ │ ├── FremennikElite.java │ │ │ │ ├── FremennikHard.java │ │ │ │ └── FremennikMedium.java │ │ │ ├── kandarin │ │ │ │ ├── KandarinEasy.java │ │ │ │ ├── KandarinElite.java │ │ │ │ ├── KandarinHard.java │ │ │ │ └── KandarinMedium.java │ │ │ ├── karamja │ │ │ │ ├── KaramjaEasy.java │ │ │ │ ├── KaramjaElite.java │ │ │ │ ├── KaramjaHard.java │ │ │ │ └── KaramjaMedium.java │ │ │ ├── kourend │ │ │ │ ├── KourendEasy.java │ │ │ │ ├── KourendElite.java │ │ │ │ ├── KourendHard.java │ │ │ │ └── KourendMedium.java │ │ │ ├── lumbridgeanddraynor │ │ │ │ ├── LumbridgeEasy.java │ │ │ │ ├── LumbridgeElite.java │ │ │ │ ├── LumbridgeHard.java │ │ │ │ └── LumbridgeMedium.java │ │ │ ├── morytania │ │ │ │ ├── MorytaniaEasy.java │ │ │ │ ├── MorytaniaElite.java │ │ │ │ ├── MorytaniaHard.java │ │ │ │ └── MorytaniaMedium.java │ │ │ ├── varrock │ │ │ │ ├── VarrockEasy.java │ │ │ │ ├── VarrockElite.java │ │ │ │ ├── VarrockHard.java │ │ │ │ └── VarrockMedium.java │ │ │ ├── westernprovinces │ │ │ │ ├── WesternEasy.java │ │ │ │ ├── WesternElite.java │ │ │ │ ├── WesternHard.java │ │ │ │ └── WesternMedium.java │ │ │ └── wilderness │ │ │ │ ├── WildernessEasy.java │ │ │ │ ├── WildernessElite.java │ │ │ │ ├── WildernessHard.java │ │ │ │ └── WildernessMedium.java │ │ ├── combattasks │ │ │ └── EasyCombatTasks.java │ │ ├── miniquests │ │ │ ├── alfredgrimhandsbarcrawl │ │ │ │ └── AlfredGrimhandsBarcrawl.java │ │ │ ├── barbariantraining │ │ │ │ └── BarbarianTraining.java │ │ │ ├── curseoftheemptylord │ │ │ │ └── CurseOfTheEmptyLord.java │ │ │ ├── daddyshome │ │ │ │ └── DaddysHome.java │ │ │ ├── enchantedkey │ │ │ │ ├── EnchantedKey.java │ │ │ │ ├── EnchantedKeyDigLocation.java │ │ │ │ ├── EnchantedKeyDigStep.java │ │ │ │ ├── EnchantedKeySolver.java │ │ │ │ ├── EnchantedKeyTemperature.java │ │ │ │ └── EnchantedKeyTemperatureChange.java │ │ │ ├── familypest │ │ │ │ └── FamilyPest.java │ │ │ ├── hisfaithfulservants │ │ │ │ ├── BarrowsDoors.java │ │ │ │ ├── BarrowsHelper.java │ │ │ │ ├── BarrowsRooms.java │ │ │ │ ├── BarrowsRouteCalculator.java │ │ │ │ └── HisFaithfulServants.java │ │ │ ├── hopespearswill │ │ │ │ └── HopespearsWill.java │ │ │ ├── lairoftarnrazorlor │ │ │ │ ├── LairOfTarnRazorlor.java │ │ │ │ └── TarnRoute.java │ │ │ ├── skippyandthemogres │ │ │ │ └── SkippyAndTheMogres.java │ │ │ ├── thegeneralsshadow │ │ │ │ └── TheGeneralsShadow.java │ │ │ ├── themagearenai │ │ │ │ └── TheMageArenaI.java │ │ │ └── themagearenaii │ │ │ │ ├── MA2Locator.java │ │ │ │ ├── MageArenaBossStep.java │ │ │ │ ├── MageArenaSolver.java │ │ │ │ ├── MageArenaSpawnLocation.java │ │ │ │ ├── MageArenaTemperature.java │ │ │ │ ├── MageArenaTemperatureChange.java │ │ │ │ └── TheMageArenaII.java │ │ ├── mischelpers │ │ │ ├── allneededitems │ │ │ │ └── AllNeededItems.java │ │ │ ├── farmruns │ │ │ │ ├── CropState.java │ │ │ │ ├── FarmingConfigChangeHandler.java │ │ │ │ ├── FarmingHandler.java │ │ │ │ ├── FarmingPatch.java │ │ │ │ ├── FarmingRegion.java │ │ │ │ ├── FarmingUtils.java │ │ │ │ ├── FarmingWorld.java │ │ │ │ ├── HerbRun.java │ │ │ │ ├── PatchImplementation.java │ │ │ │ ├── PatchPrediction.java │ │ │ │ ├── PatchState.java │ │ │ │ ├── PatchStates.java │ │ │ │ ├── PaymentTracker.java │ │ │ │ └── TreeRun.java │ │ │ ├── knightswaves │ │ │ │ └── KnightWaves.java │ │ │ └── strongholdofsecurity │ │ │ │ └── StrongholdOfSecurity.java │ │ ├── quests │ │ │ ├── akingdomdivided │ │ │ │ ├── AKingdomDivided.java │ │ │ │ ├── StatuePuzzle.java │ │ │ │ ├── StonePuzzleStep.java │ │ │ │ └── XericsLookoutStepper.java │ │ │ ├── anightatthetheatre │ │ │ │ └── ANightAtTheTheatre.java │ │ │ ├── animalmagnetism │ │ │ │ ├── AnimalMagnetism.java │ │ │ │ └── PuzzleSolver.java │ │ │ ├── anothersliceofham │ │ │ │ └── AnotherSliceOfHam.java │ │ │ ├── aporcineofinterest │ │ │ │ └── APorcineOfInterest.java │ │ │ ├── asoulsbane │ │ │ │ └── ASoulsBane.java │ │ │ ├── atailoftwocats │ │ │ │ └── ATailOfTwoCats.java │ │ │ ├── atasteofhope │ │ │ │ └── ATasteOfHope.java │ │ │ ├── atfirstlight │ │ │ │ └── AtFirstLight.java │ │ │ ├── bearyoursoul │ │ │ │ └── BearYourSoul.java │ │ │ ├── belowicemountain │ │ │ │ └── BelowIceMountain.java │ │ │ ├── beneathcursedsands │ │ │ │ ├── BeneathCursedSands.java │ │ │ │ └── TombRiddle.java │ │ │ ├── betweenarock │ │ │ │ ├── BetweenARock.java │ │ │ │ └── PuzzleStep.java │ │ │ ├── bigchompybirdhunting │ │ │ │ └── BigChompyBirdHunting.java │ │ │ ├── biohazard │ │ │ │ ├── Biohazard.java │ │ │ │ └── GiveIngredientsToHelpersStep.java │ │ │ ├── blackknightfortress │ │ │ │ └── BlackKnightFortress.java │ │ │ ├── bonevoyage │ │ │ │ └── BoneVoyage.java │ │ │ ├── cabinfever │ │ │ │ └── CabinFever.java │ │ │ ├── childrenofthesun │ │ │ │ └── ChildrenOfTheSun.java │ │ │ ├── clientofkourend │ │ │ │ └── ClientOfKourend.java │ │ │ ├── clocktower │ │ │ │ └── ClockTower.java │ │ │ ├── coldwar │ │ │ │ ├── ColdWar.java │ │ │ │ └── PenguinEmote.java │ │ │ ├── contact │ │ │ │ └── Contact.java │ │ │ ├── cooksassistant │ │ │ │ └── CooksAssistant.java │ │ │ ├── creatureoffenkenstrain │ │ │ │ └── CreatureOfFenkenstrain.java │ │ │ ├── darknessofhallowvale │ │ │ │ └── DarknessOfHallowvale.java │ │ │ ├── deathontheisle │ │ │ │ └── DeathOnTheIsle.java │ │ │ ├── deathplateau │ │ │ │ └── DeathPlateau.java │ │ │ ├── deathtothedorgeshuun │ │ │ │ └── DeathToTheDorgeshuun.java │ │ │ ├── defenderofvarrock │ │ │ │ └── DefenderOfVarrock.java │ │ │ ├── demonslayer │ │ │ │ ├── DemonSlayer.java │ │ │ │ └── IncantationStep.java │ │ │ ├── deserttreasure │ │ │ │ ├── DesertTreasure.java │ │ │ │ └── GiveItems.java │ │ │ ├── deserttreasureii │ │ │ │ ├── ChestCodeStep.java │ │ │ │ ├── DesertTreasureII.java │ │ │ │ ├── GolemPuzzleStep.java │ │ │ │ ├── GrowthPuzzleStep.java │ │ │ │ ├── MemoryPuzzle.java │ │ │ │ ├── PerseriyaSteps.java │ │ │ │ ├── SucellusSteps.java │ │ │ │ ├── VardorvisSteps.java │ │ │ │ └── WhispererSteps.java │ │ │ ├── deviousminds │ │ │ │ └── DeviousMinds.java │ │ │ ├── doricsquest │ │ │ │ └── DoricsQuest.java │ │ │ ├── dragonslayer │ │ │ │ └── DragonSlayer.java │ │ │ ├── dragonslayerii │ │ │ │ ├── CryptPuzzle.java │ │ │ │ ├── DragonSlayerII.java │ │ │ │ └── MapPuzzle.java │ │ │ ├── dreammentor │ │ │ │ ├── CyrisusArmourSet.java │ │ │ │ ├── CyrisusBankConditional.java │ │ │ │ ├── CyrisusBankItem.java │ │ │ │ ├── DreamMentor.java │ │ │ │ └── SelectingCombatGear.java │ │ │ ├── druidicritual │ │ │ │ └── DruidicRitual.java │ │ │ ├── dwarfcannon │ │ │ │ └── DwarfCannon.java │ │ │ ├── eadgarsruse │ │ │ │ └── EadgarsRuse.java │ │ │ ├── eaglespeak │ │ │ │ └── EaglesPeak.java │ │ │ ├── elementalworkshopi │ │ │ │ └── ElementalWorkshopI.java │ │ │ ├── elementalworkshopii │ │ │ │ ├── ConnectPipes.java │ │ │ │ └── ElementalWorkshopII.java │ │ │ ├── enakhraslament │ │ │ │ └── EnakhrasLament.java │ │ │ ├── enlightenedjourney │ │ │ │ ├── BalloonFlightStep.java │ │ │ │ ├── CastleWarsBalloonFlight.java │ │ │ │ ├── CraftingGuildBalloonFlight.java │ │ │ │ ├── EnlightenedJourney.java │ │ │ │ ├── GiveAugusteItems.java │ │ │ │ ├── GrandTreeBalloonFlight.java │ │ │ │ ├── TaverleyBalloonFlight.java │ │ │ │ └── VarrockBalloonFlight.java │ │ │ ├── entertheabyss │ │ │ │ └── EnterTheAbyss.java │ │ │ ├── ernestthechicken │ │ │ │ └── ErnestTheChicken.java │ │ │ ├── ethicallyacquiredantiquities │ │ │ │ └── EthicallyAcquiredAntiquities.java │ │ │ ├── fairytalei │ │ │ │ └── FairytaleI.java │ │ │ ├── fairytaleii │ │ │ │ └── FairytaleII.java │ │ │ ├── familycrest │ │ │ │ └── FamilyCrest.java │ │ │ ├── fightarena │ │ │ │ └── FightArena.java │ │ │ ├── fishingcontest │ │ │ │ └── FishingContest.java │ │ │ ├── forgettabletale │ │ │ │ └── ForgettableTale.java │ │ │ ├── gardenoftranquility │ │ │ │ └── GardenOfTranquillity.java │ │ │ ├── gertrudescat │ │ │ │ └── GertrudesCat.java │ │ │ ├── gettingahead │ │ │ │ └── GettingAhead.java │ │ │ ├── ghostsahoy │ │ │ │ ├── DyeShipSteps.java │ │ │ │ └── GhostsAhoy.java │ │ │ ├── goblindiplomacy │ │ │ │ └── GoblinDiplomacy.java │ │ │ ├── grimtales │ │ │ │ └── GrimTales.java │ │ │ ├── hauntedmine │ │ │ │ └── HauntedMine.java │ │ │ ├── hazeelcult │ │ │ │ ├── HazeelCult.java │ │ │ │ └── HazeelValves.java │ │ │ ├── heroesquest │ │ │ │ └── HeroesQuest.java │ │ │ ├── holygrail │ │ │ │ └── HolyGrail.java │ │ │ ├── horrorfromthedeep │ │ │ │ └── HorrorFromTheDeep.java │ │ │ ├── icthlarinslittlehelper │ │ │ │ ├── DoorPuzzleStep.java │ │ │ │ └── IcthlarinsLittleHelper.java │ │ │ ├── impcatcher │ │ │ │ └── ImpCatcher.java │ │ │ ├── inaidofthemyreque │ │ │ │ ├── FillBurghCrate.java │ │ │ │ └── InAidOfTheMyreque.java │ │ │ ├── insearchofknowledge │ │ │ │ ├── FeedingAimeri.java │ │ │ │ └── InSearchOfKnowledge.java │ │ │ ├── insearchofthemyreque │ │ │ │ └── InSearchOfTheMyreque.java │ │ │ ├── junglepotion │ │ │ │ └── JunglePotion.java │ │ │ ├── kingsransom │ │ │ │ ├── KingsRansom.java │ │ │ │ └── LockpickPuzzle.java │ │ │ ├── landofthegoblins │ │ │ │ └── LandOfTheGoblins.java │ │ │ ├── legendsquest │ │ │ │ └── LegendsQuest.java │ │ │ ├── lostcity │ │ │ │ └── LostCity.java │ │ │ ├── lunardiplomacy │ │ │ │ ├── BringLunarItems.java │ │ │ │ ├── ChanceChallenge.java │ │ │ │ ├── LunarDiplomacy.java │ │ │ │ ├── MemoryChallenge.java │ │ │ │ ├── MimicChallenge.java │ │ │ │ └── NumberChallenge.java │ │ │ ├── makingfriendswithmyarm │ │ │ │ └── MakingFriendsWithMyArm.java │ │ │ ├── makinghistory │ │ │ │ └── MakingHistory.java │ │ │ ├── meatandgreet │ │ │ │ └── MeatAndGreet.java │ │ │ ├── merlinscrystal │ │ │ │ └── MerlinsCrystal.java │ │ │ ├── misthalinmystery │ │ │ │ └── MisthalinMystery.java │ │ │ ├── monkeymadnessi │ │ │ │ └── MonkeyMadnessI.java │ │ │ ├── monkeymadnessii │ │ │ │ ├── AgilityDungeonSteps.java │ │ │ │ ├── MM2AgilityNodes.java │ │ │ │ ├── MM2Route.java │ │ │ │ ├── MM2Sabotage.java │ │ │ │ └── MonkeyMadnessII.java │ │ │ ├── monksfriend │ │ │ │ └── MonksFriend.java │ │ │ ├── mountaindaughter │ │ │ │ └── MountainDaughter.java │ │ │ ├── mourningsendparti │ │ │ │ └── MourningsEndPartI.java │ │ │ ├── mourningsendpartii │ │ │ │ └── MourningsEndPartII.java │ │ │ ├── murdermystery │ │ │ │ └── MurderMystery.java │ │ │ ├── myarmsbigadventure │ │ │ │ ├── AddCompost.java │ │ │ │ ├── AddDung.java │ │ │ │ └── MyArmsBigAdventure.java │ │ │ ├── naturespirit │ │ │ │ └── NatureSpirit.java │ │ │ ├── observatoryquest │ │ │ │ ├── ObservatoryQuest.java │ │ │ │ └── StarSignAnswer.java │ │ │ ├── olafsquest │ │ │ │ ├── OlafsQuest.java │ │ │ │ └── PaintingWall.java │ │ │ ├── onesmallfavour │ │ │ │ └── OneSmallFavour.java │ │ │ ├── perilousmoon │ │ │ │ └── PerilousMoon.java │ │ │ ├── piratestreasure │ │ │ │ ├── PiratesTreasure.java │ │ │ │ └── RumSmugglingStep.java │ │ │ ├── plaguecity │ │ │ │ └── PlagueCity.java │ │ │ ├── priestinperil │ │ │ │ ├── BringDrezelPureEssenceStep.java │ │ │ │ └── PriestInPeril.java │ │ │ ├── princealirescue │ │ │ │ └── PrinceAliRescue.java │ │ │ ├── ragandboneman │ │ │ │ ├── RagAndBoneManI.java │ │ │ │ ├── RagAndBoneManII.java │ │ │ │ ├── RagBoneGroups.java │ │ │ │ └── RagBoneState.java │ │ │ ├── ratcatchers │ │ │ │ ├── RatCatchers.java │ │ │ │ └── RatCharming.java │ │ │ ├── recipefordisaster │ │ │ │ ├── AskAboutFishCake.java │ │ │ │ ├── GetRohakDrunk.java │ │ │ │ ├── MakeEvilStew.java │ │ │ │ ├── QuizSteps.java │ │ │ │ ├── RFDAwowogei.java │ │ │ │ ├── RFDDwarf.java │ │ │ │ ├── RFDEvilDave.java │ │ │ │ ├── RFDFinal.java │ │ │ │ ├── RFDGoblins.java │ │ │ │ ├── RFDLumbridgeGuide.java │ │ │ │ ├── RFDPiratePete.java │ │ │ │ ├── RFDSirAmikVarze.java │ │ │ │ ├── RFDSkrachUglogwee.java │ │ │ │ └── RFDStart.java │ │ │ ├── recruitmentdrive │ │ │ │ ├── DoorPuzzle.java │ │ │ │ ├── LadyTableStep.java │ │ │ │ ├── MsCheevesSetup.java │ │ │ │ ├── MsHynnAnswerDialogQuizStep.java │ │ │ │ ├── RecruitmentDrive.java │ │ │ │ └── SirRenItchoodStep.java │ │ │ ├── regicide │ │ │ │ └── Regicide.java │ │ │ ├── romeoandjuliet │ │ │ │ └── RomeoAndJuliet.java │ │ │ ├── rovingelves │ │ │ │ └── RovingElves.java │ │ │ ├── royaltrouble │ │ │ │ └── RoyalTrouble.java │ │ │ ├── rumdeal │ │ │ │ ├── RumDeal.java │ │ │ │ └── SlugSteps.java │ │ │ ├── runemysteries │ │ │ │ └── RuneMysteries.java │ │ │ ├── scorpioncatcher │ │ │ │ └── ScorpionCatcher.java │ │ │ ├── seaslug │ │ │ │ └── SeaSlug.java │ │ │ ├── secretsofthenorth │ │ │ │ ├── ArrowChestPuzzleStep.java │ │ │ │ ├── AskAboutRitual.java │ │ │ │ ├── SecretsOfTheNorth.java │ │ │ │ ├── SolveChestCode.java │ │ │ │ ├── SolveDoorCode.java │ │ │ │ └── TellAboutMurder.java │ │ │ ├── shadesofmortton │ │ │ │ └── ShadesOfMortton.java │ │ │ ├── shadowofthestorm │ │ │ │ ├── IncantationStep.java │ │ │ │ ├── SearchKilns.java │ │ │ │ └── ShadowOfTheStorm.java │ │ │ ├── sheepherder │ │ │ │ └── SheepHerder.java │ │ │ ├── sheepshearer │ │ │ │ └── SheepShearer.java │ │ │ ├── shieldofarrav │ │ │ │ ├── ShieldOfArravBlackArmGang.java │ │ │ │ └── ShieldOfArravPhoenixGang.java │ │ │ ├── shilovillage │ │ │ │ └── ShiloVillage.java │ │ │ ├── sinsofthefather │ │ │ │ ├── DoorPuzzleStep.java │ │ │ │ ├── SinsOfTheFather.java │ │ │ │ └── ValveStep.java │ │ │ ├── sleepinggiants │ │ │ │ └── SleepingGiants.java │ │ │ ├── songoftheelves │ │ │ │ ├── AmloddLightPuzzle.java │ │ │ │ ├── BaxtorianPillar.java │ │ │ │ ├── BaxtorianPuzzle.java │ │ │ │ ├── CadarnLightPuzzle.java │ │ │ │ ├── CrwysLightPuzzle.java │ │ │ │ ├── HefinLightPuzzle.java │ │ │ │ ├── IorwerthLightPuzzle.java │ │ │ │ ├── MeilyrLightPuzzle.java │ │ │ │ ├── SongOfTheElves.java │ │ │ │ └── TrahaearnLightPuzzle.java │ │ │ ├── spiritsoftheelid │ │ │ │ └── SpiritsOfTheElid.java │ │ │ ├── swansong │ │ │ │ ├── FishMonkfish.java │ │ │ │ ├── FixWall.java │ │ │ │ └── SwanSong.java │ │ │ ├── taibwowannaitrio │ │ │ │ └── TaiBwoWannaiTrio.java │ │ │ ├── taleoftherighteous │ │ │ │ └── TaleOfTheRighteous.java │ │ │ ├── tearsofguthix │ │ │ │ └── TearsOfGuthix.java │ │ │ ├── templeofikov │ │ │ │ └── TempleOfIkov.java │ │ │ ├── templeoftheeye │ │ │ │ ├── RuneEnergyStep.java │ │ │ │ ├── RunicEnergy.java │ │ │ │ └── TempleOfTheEye.java │ │ │ ├── theascentofarceuus │ │ │ │ └── TheAscentOfArceuus.java │ │ │ ├── thecorsaircurse │ │ │ │ └── TheCorsairCurse.java │ │ │ ├── thecurseofarrav │ │ │ │ ├── MetalDoorSolver.java │ │ │ │ ├── TheCurseOfArrav.java │ │ │ │ ├── TilePuzzleSolver.java │ │ │ │ └── rubblesolvers │ │ │ │ │ ├── RubbleSolver.java │ │ │ │ │ ├── RubbleSolverFour.java │ │ │ │ │ ├── RubbleSolverOne.java │ │ │ │ │ ├── RubbleSolverThree.java │ │ │ │ │ ├── RubbleSolverTwo.java │ │ │ │ │ └── RubbleType.java │ │ │ ├── thedepthsofdespair │ │ │ │ └── TheDepthsOfDespair.java │ │ │ ├── thedigsite │ │ │ │ └── TheDigSite.java │ │ │ ├── theeyesofglouphrie │ │ │ │ ├── PuzzleStep.java │ │ │ │ └── TheEyesOfGlouphrie.java │ │ │ ├── thefeud │ │ │ │ └── TheFeud.java │ │ │ ├── theforsakentower │ │ │ │ ├── AltarPuzzle.java │ │ │ │ ├── JugPuzzle.java │ │ │ │ ├── PotionPuzzle.java │ │ │ │ ├── PowerPuzzle.java │ │ │ │ └── TheForsakenTower.java │ │ │ ├── thefremennikexiles │ │ │ │ └── TheFremennikExiles.java │ │ │ ├── thefremennikisles │ │ │ │ ├── KillTrolls.java │ │ │ │ └── TheFremennikIsles.java │ │ │ ├── thefremenniktrials │ │ │ │ ├── CombinationPuzzle.java │ │ │ │ └── TheFremennikTrials.java │ │ │ ├── thegardenofdeath │ │ │ │ └── TheGardenOfDeath.java │ │ │ ├── thegiantdwarf │ │ │ │ └── TheGiantDwarf.java │ │ │ ├── thegolem │ │ │ │ └── TheGolem.java │ │ │ ├── thegrandtree │ │ │ │ └── TheGrandTree.java │ │ │ ├── thegreatbrainrobbery │ │ │ │ └── TheGreatBrainRobbery.java │ │ │ ├── thehandinthesand │ │ │ │ └── TheHandInTheSand.java │ │ │ ├── theheartofdarkness │ │ │ │ ├── ChestCodeStep.java │ │ │ │ ├── LockedChestPuzzle.java │ │ │ │ ├── StatueDetails.java │ │ │ │ └── TheHeartOfDarkness.java │ │ │ ├── theknightssword │ │ │ │ └── TheKnightsSword.java │ │ │ ├── thelosttribe │ │ │ │ └── TheLostTribe.java │ │ │ ├── thepathofglouphrie │ │ │ │ ├── DiscInsertionStep.java │ │ │ │ ├── MonolithPuzzle.java │ │ │ │ ├── Solution.java │ │ │ │ ├── ThePathOfGlouphrie.java │ │ │ │ ├── YewnocksPuzzle.java │ │ │ │ └── sections │ │ │ │ │ ├── FindLongramble.java │ │ │ │ │ ├── InformKingBolren.java │ │ │ │ │ ├── StartingOff.java │ │ │ │ │ ├── TheWarpedDepths.java │ │ │ │ │ └── UnveilEvil.java │ │ │ ├── thequeenofthieves │ │ │ │ └── TheQueenOfThieves.java │ │ │ ├── therestlessghost │ │ │ │ └── TheRestlessGhost.java │ │ │ ├── theribbitingtaleofalilypadlabourdispute │ │ │ │ └── TheRibbitingTaleOfALilyPadLabourDispute.java │ │ │ ├── theslugmenace │ │ │ │ ├── PuzzleStep.java │ │ │ │ └── TheSlugMenace.java │ │ │ ├── thetouristtrap │ │ │ │ └── TheTouristTrap.java │ │ │ ├── throneofmiscellania │ │ │ │ └── ThroneOfMiscellania.java │ │ │ ├── toweroflife │ │ │ │ ├── PuzzleSolver.java │ │ │ │ └── TowerOfLife.java │ │ │ ├── treegnomevillage │ │ │ │ └── TreeGnomeVillage.java │ │ │ ├── tribaltotem │ │ │ │ ├── PuzzleStep.java │ │ │ │ └── TribalTotem.java │ │ │ ├── trollromance │ │ │ │ └── TrollRomance.java │ │ │ ├── trollstronghold │ │ │ │ └── TrollStronghold.java │ │ │ ├── twilightspromise │ │ │ │ └── TwilightsPromise.java │ │ │ ├── undergroundpass │ │ │ │ └── UndergroundPass.java │ │ │ ├── vampyreslayer │ │ │ │ └── VampyreSlayer.java │ │ │ ├── wanted │ │ │ │ └── Wanted.java │ │ │ ├── watchtower │ │ │ │ ├── SkavidChoice.java │ │ │ │ └── Watchtower.java │ │ │ ├── waterfallquest │ │ │ │ └── WaterfallQuest.java │ │ │ ├── whatliesbelow │ │ │ │ └── WhatLiesBelow.java │ │ │ ├── whileguthixsleeps │ │ │ │ ├── DolmenType.java │ │ │ │ ├── HerblorePuzzle.java │ │ │ │ ├── StatueLocation.java │ │ │ │ ├── WeightStep.java │ │ │ │ └── WhileGuthixSleeps.java │ │ │ ├── witchshouse │ │ │ │ └── WitchsHouse.java │ │ │ ├── witchspotion │ │ │ │ └── WitchsPotion.java │ │ │ ├── xmarksthespot │ │ │ │ └── XMarksTheSpot.java │ │ │ └── zogreflesheaters │ │ │ │ └── ZogreFleshEaters.java │ │ └── skills │ │ │ ├── agility │ │ │ ├── Agility.java │ │ │ ├── AgilityCourse.java │ │ │ ├── AlKharid.java │ │ │ ├── Ardougne.java │ │ │ ├── Canifis.java │ │ │ ├── DraynorVillage.java │ │ │ ├── Falador.java │ │ │ ├── Pollnivneach.java │ │ │ ├── Rellekka.java │ │ │ ├── SeersVillage.java │ │ │ └── Varrock.java │ │ │ ├── mining │ │ │ └── Mining.java │ │ │ └── woodcutting │ │ │ ├── Woodcutting.java │ │ │ └── WoodcuttingMember.java │ │ ├── managers │ │ ├── ItemAndLastUpdated.java │ │ ├── NewVersionManager.java │ │ ├── QuestBankManager.java │ │ ├── QuestContainerManager.java │ │ ├── QuestManager.java │ │ ├── QuestMenuHandler.java │ │ └── QuestOverlayManager.java │ │ ├── overlays │ │ ├── QuestHelperDebugOverlay.java │ │ ├── QuestHelperMinimapOverlay.java │ │ ├── QuestHelperOverlay.java │ │ ├── QuestHelperTooltipOverlay.java │ │ ├── QuestHelperWidgetOverlay.java │ │ ├── QuestHelperWorldArrowOverlay.java │ │ ├── QuestHelperWorldLineOverlay.java │ │ └── QuestHelperWorldOverlay.java │ │ ├── panel │ │ ├── AssistLevelPanel.java │ │ ├── DropdownRenderer.java │ │ ├── DynamicPaddedGridLayout.java │ │ ├── FixedWidthPanel.java │ │ ├── JGenerator.java │ │ ├── PanelDetails.java │ │ ├── QuestHelperPanel.java │ │ ├── QuestOverviewPanel.java │ │ ├── QuestRequirementsPanel.java │ │ ├── QuestRewardsPanel.java │ │ ├── QuestSelectPanel.java │ │ ├── QuestStepPanel.java │ │ ├── questorders │ │ │ ├── IronmanOptimalQuestGuide.java │ │ │ ├── OptimalQuestGuide.java │ │ │ ├── QuestOrders.java │ │ │ └── ReleaseDate.java │ │ └── skillfiltering │ │ │ ├── SkillFilterPanel.java │ │ │ ├── SkillIconButton.java │ │ │ └── SkillTabGroup.java │ │ ├── playerquests │ │ ├── bikeshedder │ │ │ └── BikeShedder.java │ │ └── cookshelper │ │ │ └── CooksHelper.java │ │ ├── questhelpers │ │ ├── BasicQuestHelper.java │ │ ├── ComplexStateQuestHelper.java │ │ ├── PlayerMadeQuestHelper.java │ │ ├── QuestDebugRenderer.java │ │ ├── QuestDetails.java │ │ ├── QuestHelper.java │ │ └── QuestUtil.java │ │ ├── questinfo │ │ ├── ExternalQuestResources.java │ │ ├── HelperConfig.java │ │ ├── PlayerQuests.java │ │ ├── QuestHelperQuest.java │ │ ├── QuestVarPlayer.java │ │ └── QuestVarbits.java │ │ ├── requirements │ │ ├── AbstractRequirement.java │ │ ├── ChatMessageRequirement.java │ │ ├── ComplexRequirement.java │ │ ├── ConfigRequirement.java │ │ ├── ManualRequirement.java │ │ ├── MesBoxRequirement.java │ │ ├── MultiChatMessageRequirement.java │ │ ├── RegionHintArrowRequirement.java │ │ ├── Requirement.java │ │ ├── RequirementValidator.java │ │ ├── SimpleRequirement.java │ │ ├── conditional │ │ │ ├── ConditionForStep.java │ │ │ ├── Conditions.java │ │ │ ├── InitializableRequirement.java │ │ │ ├── NpcCondition.java │ │ │ └── ObjectCondition.java │ │ ├── item │ │ │ ├── ContainerStateForRequirement.java │ │ │ ├── FollowerItemRequirement.java │ │ │ ├── ItemOnTileConsideringSceneLoadRequirement.java │ │ │ ├── ItemOnTileRequirement.java │ │ │ ├── ItemRequirement.java │ │ │ ├── ItemRequirements.java │ │ │ ├── KeyringRequirement.java │ │ │ ├── NoItemRequirement.java │ │ │ ├── TeleportItemRequirement.java │ │ │ └── TrackedContainers.java │ │ ├── location │ │ │ └── TileIsLoadedRequirement.java │ │ ├── npc │ │ │ ├── DialogRequirement.java │ │ │ ├── FollowerRequirement.java │ │ │ ├── NoFollowerRequirement.java │ │ │ ├── NpcHintArrowRequirement.java │ │ │ ├── NpcInteractingRequirement.java │ │ │ ├── NpcInteractingWithNpcRequirement.java │ │ │ └── NpcRequirement.java │ │ ├── player │ │ │ ├── Boosts.java │ │ │ ├── CombatLevelRequirement.java │ │ │ ├── FreeInventorySlotRequirement.java │ │ │ ├── InInstanceRequirement.java │ │ │ ├── IronmanRequirement.java │ │ │ ├── PrayerPointRequirement.java │ │ │ ├── PrayerRequirement.java │ │ │ ├── SkillRequirement.java │ │ │ ├── SpecialAttackRequirement.java │ │ │ ├── SpellbookRequirement.java │ │ │ ├── WarriorsGuildAccessRequirement.java │ │ │ └── WeightRequirement.java │ │ ├── quest │ │ │ ├── QuestPointRequirement.java │ │ │ └── QuestRequirement.java │ │ ├── runelite │ │ │ ├── PlayerQuestStateRequirement.java │ │ │ └── RuneliteRequirement.java │ │ ├── util │ │ │ ├── ComplexRequirementBuilder.java │ │ │ ├── InventorySlots.java │ │ │ ├── ItemSlots.java │ │ │ ├── LogicHelper.java │ │ │ ├── LogicType.java │ │ │ ├── Operation.java │ │ │ ├── RequirementBuilder.java │ │ │ ├── SpecialAttack.java │ │ │ └── Spellbook.java │ │ ├── var │ │ │ ├── VarComparisonRequirement.java │ │ │ ├── VarType.java │ │ │ ├── VarbitRequirement.java │ │ │ └── VarplayerRequirement.java │ │ ├── widget │ │ │ ├── WidgetModelRequirement.java │ │ │ ├── WidgetPresenceRequirement.java │ │ │ ├── WidgetSpriteRequirement.java │ │ │ └── WidgetTextRequirement.java │ │ └── zone │ │ │ ├── PolyZone.java │ │ │ ├── Zone.java │ │ │ └── ZoneRequirement.java │ │ ├── rewards │ │ ├── ExperienceReward.java │ │ ├── ItemReward.java │ │ ├── QuestPointReward.java │ │ ├── Reward.java │ │ ├── RewardType.java │ │ └── UnlockReward.java │ │ ├── runeliteobjects │ │ ├── Cheerer.java │ │ ├── GlobalFakeObjects.java │ │ ├── RuneliteConfigSetter.java │ │ ├── dialog │ │ │ ├── RuneliteDialogStep.java │ │ │ ├── RuneliteObjectDialogStep.java │ │ │ └── RunelitePlayerDialogStep.java │ │ └── extendedruneliteobjects │ │ │ ├── ChatBox.java │ │ │ ├── ExtendedRuneliteObject.java │ │ │ ├── ExtendedRuneliteObjects.java │ │ │ ├── FaceAnimationIDs.java │ │ │ ├── FakeGraphicsObject.java │ │ │ ├── FakeItem.java │ │ │ ├── FakeNpc.java │ │ │ ├── FakeObject.java │ │ │ ├── MenuEntryWrapper.java │ │ │ ├── NpcChatBox.java │ │ │ ├── PlayerChatBox.java │ │ │ ├── QuestCompletedWidget.java │ │ │ ├── ReplacedNpc.java │ │ │ ├── ReplacedObject.java │ │ │ ├── RuneliteObjectManager.java │ │ │ ├── RuneliteObjectTypes.java │ │ │ ├── WidgetReplacement.java │ │ │ └── actions │ │ │ ├── Action.java │ │ │ └── LoopedAction.java │ │ ├── statemanagement │ │ ├── AchievementDiaryStepManager.java │ │ ├── BarbarianTrainingStateTracker.java │ │ └── PlayerStateManager.java │ │ ├── steps │ │ ├── ConditionalStep.java │ │ ├── DetailedOwnerStep.java │ │ ├── DetailedQuestStep.java │ │ ├── DigStep.java │ │ ├── EmoteStep.java │ │ ├── ItemStep.java │ │ ├── MultiNpcStep.java │ │ ├── NpcEmoteStep.java │ │ ├── NpcFollowerStep.java │ │ ├── NpcStep.java │ │ ├── ObjectStep.java │ │ ├── OwnerStep.java │ │ ├── PuzzleStep.java │ │ ├── PuzzleWrapperStep.java │ │ ├── QuestStep.java │ │ ├── QuestSyncStep.java │ │ ├── TileStep.java │ │ ├── WidgetStep.java │ │ ├── choice │ │ │ ├── DialogChoiceChange.java │ │ │ ├── DialogChoiceStep.java │ │ │ ├── DialogChoiceSteps.java │ │ │ ├── WidgetChoiceStep.java │ │ │ ├── WidgetChoiceSteps.java │ │ │ └── WidgetTextChange.java │ │ ├── emote │ │ │ └── QuestEmote.java │ │ ├── overlay │ │ │ ├── DirectionArrow.java │ │ │ ├── IconOverlay.java │ │ │ └── WorldLines.java │ │ ├── playermadesteps │ │ │ └── RuneliteObjectStep.java │ │ ├── tools │ │ │ └── QuestPerspective.java │ │ └── widget │ │ │ ├── AbstractWidgetHighlight.java │ │ │ ├── AncientSpells.java │ │ │ ├── ArceuusSpells.java │ │ │ ├── LunarSpells.java │ │ │ ├── NormalSpells.java │ │ │ ├── Spell.java │ │ │ ├── SpellWidgetHighlight.java │ │ │ ├── WidgetDetails.java │ │ │ └── WidgetHighlight.java │ │ ├── tools │ │ ├── Icon.java │ │ ├── QuestHelperWorldMapPoint.java │ │ ├── QuestTile.java │ │ ├── QuestWidgets.java │ │ └── VisibilityHelper.java │ │ └── util │ │ ├── Fonts.java │ │ ├── QHObjectID.java │ │ ├── Utils.java │ │ └── worldmap │ │ ├── WorldMapArea.java │ │ ├── WorldMapAreaChanged.java │ │ ├── WorldMapAreaManager.java │ │ ├── WorldMapPointMapping.java │ │ ├── WorldPointMapper.java │ │ └── WorldPointWithWorldMapArea.java └── resources │ ├── blueHitsplat.png │ ├── close.png │ ├── collapsed.png │ ├── discord.png │ ├── expanded.png │ ├── github.png │ ├── icon_background.png │ ├── info_icon.png │ ├── maxHitsplat.png │ ├── patreon.png │ ├── quest_icon.png │ ├── quest_step_arrow.png │ ├── quest_step_arrow_135.png │ ├── quest_step_arrow_180.png │ ├── quest_step_arrow_225.png │ ├── quest_step_arrow_270.png │ ├── quest_step_arrow_315.png │ ├── quest_step_arrow_45.png │ ├── quest_step_arrow_90.png │ ├── redHitsplat.png │ ├── settings_icon.png │ └── start.png └── test └── java └── com └── questhelper ├── MockedTest.java ├── MockedTestBase.java ├── QuestHelperPluginTest.java ├── helpers └── quests │ ├── lunardiplomacy │ └── MemoryChallengeTest.java │ ├── pures │ └── OneDefPureTest.java │ ├── thecurseofarrav │ ├── KeysAndLeversTest.java │ └── MetalDoorSolverTest.java │ ├── thefremennikisles │ └── TheFremennikIslesTest.java │ └── thepathofglouphrie │ └── SolutionTest.java ├── questhelpers └── QuestHelperTest.java ├── requirements └── player │ └── SkillRequirementTest.java └── util └── UtilsTest.java /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: zoinkwiz 2 | custom: paypal.com/donate?hosted_button_id=HSSLPZCSZELDW 3 | -------------------------------------------------------------------------------- /.github/workflows/gradle-snapshot.yml: -------------------------------------------------------------------------------- 1 | name: Build with Snapshot RuneLite 2 | on: pull_request 3 | jobs: 4 | gradle: 5 | strategy: 6 | matrix: 7 | os: [ubuntu-latest] 8 | runs-on: ${{ matrix.os }} 9 | steps: 10 | - uses: actions/checkout@v4 11 | - uses: actions/setup-java@v4 12 | with: 13 | distribution: temurin 14 | java-version: 11 15 | 16 | - name: Setup Gradle 17 | uses: gradle/actions/setup-gradle@v4 18 | 19 | - name: Build using latest runelite snapshot version 20 | run: ./gradlew --refresh-dependencies -Puse.snapshot clean build -x test 21 | -------------------------------------------------------------------------------- /.github/workflows/gradle.yml: -------------------------------------------------------------------------------- 1 | name: Build with Gradle 2 | on: 3 | push: 4 | branches: 5 | - master 6 | pull_request: 7 | workflow_dispatch: 8 | 9 | concurrency: 10 | group: build-${{ github.ref }} 11 | cancel-in-progress: true 12 | 13 | jobs: 14 | gradle: 15 | strategy: 16 | matrix: 17 | os: [ubuntu-latest] 18 | runs-on: ${{ matrix.os }} 19 | steps: 20 | - uses: actions/checkout@v4 21 | - uses: actions/setup-java@v3 22 | with: 23 | distribution: temurin 24 | java-version: 11 25 | 26 | - name: Setup Gradle 27 | uses: gradle/gradle-build-action@v2 28 | with: 29 | gradle-version: 8.10 # https://github.com/runelite/plugin-hub/blob/master/package/gradle/wrapper/gradle-wrapper.properties 30 | 31 | - name: Execute Gradle build 32 | run: gradle build 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | build 3 | .idea/ 4 | .project 5 | .settings/ 6 | .classpath 7 | nbactions.xml 8 | nb-configuration.xml 9 | nbproject/ 10 | .run/ 11 | bin/main 12 | bin/test 13 | out 14 | .DS_Store 15 | *.iml 16 | -------------------------------------------------------------------------------- /.run/Application.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2020, Zoinkwiz 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Runelite Quest Helper plugin 2 | 3 | This plugin is intended to assist in completing quests, from showing you quest steps, where to go, items needed, puzzles solutions, and more. 4 | 5 | 6 | ## Using the Quest Helper 7 | 8 | Firstly, download the Quest Helper from the Runelite Plugin Hub. 9 | 10 | You should then see the quest helper icon appear in the Runelite sidebar. You can click it to see a list of all quests which you've yet to complete. Select the icon quest you're wanting to do, and the helper for that quest will start up. 11 | 12 | ![](https://user-images.githubusercontent.com/41973452/234351938-0db43249-7f0c-4e7c-8bb3-8ca2fa294f04.png) 13 | 14 | Once the quest is started, the sidebar will change to show the requirements for the quest, as well as listing all the steps you'll need to complete to finish the quest. In the top-left corner the current step is displayed. The world map will display an arrow to where you need to go, the minimap an arrow to the location, and the object, NPC, or tile you need to go to will be highlighted as seen below. 15 | 16 | ![](https://user-images.githubusercontent.com/41973452/234352011-145fa8b9-d978-4dd7-a88f-28f1e21e13f8.png) 17 | 18 | At this stage, simply follow the steps until you've completed the quest! 19 | 20 | ## Help and discussion 21 | 22 | If you've experienced an issue with a quest helper, or have a recommendation on how to improve it, please [create an issue](https://github.com/Zoinkwiz/quest-helper/issues/new) with the relevant details. 23 | 24 | In addition, there's a [Discord](https://discord.gg/XCfwNnz6RB) you can use for discussion and raising issues. 25 | 26 | ## Contributing 27 | 28 | Check out the [Contribution Guide](https://github.com/Zoinkwiz/quest-helper/wiki/Contribution-guide) for help with making changes and adding your own helpers. 29 | 30 | ## Donating 31 | 32 | If you'd like to donate to help support development, there is a [Patreon](https://www.patreon.com/zoinkwiz) you can use. 33 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/icon.png -------------------------------------------------------------------------------- /runelite-plugin.properties: -------------------------------------------------------------------------------- 1 | displayName=Quest Helper 2 | author=Zoinkwiz 3 | support=https://github.com/Zoinkwiz/quest-helper 4 | description=A helper for questing 5 | tags=quest,helper 6 | plugins=com.questhelper.QuestHelperPlugin -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'quest-helper' 2 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/bank/QuestBankData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Adam 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.bank; 26 | 27 | import lombok.Data; 28 | import net.runelite.api.Item; 29 | 30 | import java.util.ArrayList; 31 | import java.util.Arrays; 32 | import java.util.List; 33 | 34 | @Data 35 | class QuestBankData 36 | { 37 | int[] idAndQuantity; 38 | 39 | QuestBankData() 40 | { 41 | idAndQuantity = new int[0]; 42 | } 43 | 44 | void set(List items) 45 | { 46 | int[] newIdAndQuantity = new int[(items.size() + 1) * 2]; 47 | for (int i = 0; i < items.size(); i++) 48 | { 49 | Item item = items.get(i); 50 | newIdAndQuantity[i*2] = item.getId(); 51 | newIdAndQuantity[(i*2)+1] = item.getQuantity(); 52 | } 53 | idAndQuantity = newIdAndQuantity; 54 | } 55 | 56 | void set(Item[] items) 57 | { 58 | set(Arrays.asList(items)); 59 | } 60 | 61 | void setEmpty() 62 | { 63 | idAndQuantity = new int[0]; 64 | } 65 | 66 | List getAsList() 67 | { 68 | List items = new ArrayList<>(); 69 | 70 | if (idAndQuantity == null) return items; 71 | 72 | for (int i = 0; i < idAndQuantity.length - 2; i += 2) 73 | { 74 | items.add(new Item(idAndQuantity[i], idAndQuantity[i+1])); 75 | } 76 | return items; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/bank/banktab/BankSlotIcons.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.bank.banktab; 26 | 27 | import lombok.Getter; 28 | import net.runelite.api.gameval.ItemID; 29 | 30 | public class BankSlotIcons 31 | { 32 | @Getter 33 | private static final Integer combatGear = ItemID.ABYSSAL_WHIP; 34 | 35 | @Getter 36 | private static final Integer meleeCombatGear = ItemID.ABYSSAL_WHIP; 37 | 38 | @Getter 39 | private static final Integer rangedCombatGear = ItemID.MAGIC_SHORTBOW; 40 | 41 | @Getter 42 | private static final Integer magicCombatGear = ItemID.STAFF_OF_AIR; 43 | 44 | @Getter 45 | private static final Integer food = ItemID.SHARK; 46 | 47 | @Getter 48 | private static final Integer armour = ItemID.RUNE_PLATEBODY; 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/bank/banktab/BankText.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.bank.banktab; 26 | 27 | public class BankText 28 | { 29 | String text; 30 | int x; 31 | int y; 32 | int spriteID = -1; 33 | int spriteX; 34 | int spriteY; 35 | 36 | public BankText(String text, int x, int y) 37 | { 38 | this.text = text; 39 | this.x = x; 40 | this.y = y; 41 | } 42 | 43 | public BankText(String text, int x, int y, int spriteID, int spriteX, int spriteY) 44 | { 45 | this.text = text; 46 | this.x = x; 47 | this.y = y; 48 | this.spriteID = spriteID; 49 | this.spriteX = spriteX; 50 | this.spriteY = spriteY; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/domain/AccountType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, pajlada 3 | * Copyright (c) 2023, pajlads 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | package com.questhelper.domain; 27 | 28 | public enum AccountType 29 | { 30 | NORMAL, 31 | IRONMAN, 32 | ULTIMATE_IRONMAN, 33 | HARDCORE_IRONMAN, 34 | GROUP_IRONMAN, 35 | HARDCORE_GROUP_IRONMAN, 36 | UNRANKED_GROUP_IRONMAN; 37 | 38 | private static final AccountType[] TYPES = values(); 39 | 40 | /** 41 | * @param varbitValue the value associated with {@link net.runelite.api.Varbits#ACCOUNT_TYPE} 42 | * @return the equivalent enum value 43 | */ 44 | public static AccountType get(int varbitValue) 45 | { 46 | if (varbitValue < 0 || varbitValue >= TYPES.length) 47 | { 48 | return null; 49 | } 50 | return TYPES[varbitValue]; 51 | } 52 | 53 | /** 54 | * Checks whether this account type is any of the ironman types, solo or group. 55 | */ 56 | public boolean isAnyIronman() 57 | { 58 | return this == IRONMAN || this == ULTIMATE_IRONMAN || this == HARDCORE_IRONMAN || this == GROUP_IRONMAN || this == HARDCORE_GROUP_IRONMAN || this == UNRANKED_GROUP_IRONMAN; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/combattasks/EasyCombatTasks.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.helpers.combattasks; 2 | 3 | public class EasyCombatTasks 4 | { 5 | // Killed fire giant, first task 6 | // 12538 0->1 7 | // 12885 0->1 8 | // 14815 0->1 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/miniquests/enchantedkey/EnchantedKeyTemperatureChange.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, Jordan Atwood 3 | * Copyright (c) 2020, Zoinkwiz 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | package com.questhelper.helpers.miniquests.enchantedkey; 27 | 28 | import lombok.AllArgsConstructor; 29 | import lombok.Getter; 30 | 31 | @AllArgsConstructor 32 | public enum EnchantedKeyTemperatureChange 33 | { 34 | WARMER("and warmer than"), 35 | SAME("and the same temperature as"), 36 | COLDER("but colder than"); 37 | 38 | @Getter 39 | private final String text; 40 | 41 | public static EnchantedKeyTemperatureChange of(final String message) 42 | { 43 | if (!message.endsWith(" last time")) 44 | { 45 | return null; 46 | } 47 | 48 | for (final EnchantedKeyTemperatureChange change : values()) 49 | { 50 | if (message.contains(change.text)) 51 | { 52 | return change; 53 | } 54 | } 55 | 56 | return null; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/miniquests/themagearenaii/MageArenaTemperatureChange.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * Copyright (c) 2019, Jordan Atwood 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | package com.questhelper.helpers.miniquests.themagearenaii; 27 | 28 | import lombok.AllArgsConstructor; 29 | import lombok.Getter; 30 | 31 | @AllArgsConstructor 32 | public enum MageArenaTemperatureChange 33 | { 34 | WARMER("and warmer"), 35 | SAME("and the same temperature as"), 36 | COLDER("but colder"); 37 | 38 | @Getter 39 | private final String text; 40 | 41 | public static MageArenaTemperatureChange of(final String message) 42 | { 43 | if (!message.endsWith(" last time.")) 44 | { 45 | return null; 46 | } 47 | 48 | for (final MageArenaTemperatureChange change : values()) 49 | { 50 | if (message.contains(change.text)) 51 | { 52 | return change; 53 | } 54 | } 55 | 56 | return null; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/mischelpers/farmruns/CropState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Abex 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.mischelpers.farmruns; 26 | 27 | import lombok.Getter; 28 | import lombok.RequiredArgsConstructor; 29 | 30 | @RequiredArgsConstructor 31 | @Getter 32 | public enum CropState 33 | { 34 | HARVESTABLE(), // Ready for checking 35 | UNCHECKED(), 36 | STUMP(), // Cut down 37 | GROWING(), 38 | DISEASED(), 39 | DEAD(), 40 | EMPTY(), 41 | FILLING(); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/mischelpers/farmruns/FarmingConfigChangeHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Kerpackie 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.mischelpers.farmruns; 26 | 27 | import com.questhelper.QuestHelperConfig; 28 | import com.questhelper.QuestHelperPlugin; 29 | import net.runelite.client.config.ConfigManager; 30 | import net.runelite.client.events.ConfigChanged; 31 | import java.util.function.Consumer; 32 | 33 | public class FarmingConfigChangeHandler 34 | { 35 | public static > void handleFarmingEnumConfigChange(ConfigChanged event, String configKey, 36 | Class enumClass, Consumer updateAction, T defaultValue, ConfigManager configManager, QuestHelperPlugin questHelperPlugin) 37 | { 38 | if (event.getKey().equals(configKey)) 39 | { 40 | try 41 | { 42 | T selectedEnumValue = Enum.valueOf(enumClass, event.getNewValue()); 43 | updateAction.accept(selectedEnumValue); 44 | questHelperPlugin.refreshBank(); 45 | } 46 | catch (IllegalArgumentException e) 47 | { 48 | configManager.setConfiguration(QuestHelperConfig.QUEST_BACKGROUND_GROUP, configKey, defaultValue.name()); 49 | } 50 | } 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/mischelpers/farmruns/FarmingRegion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Abex 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.mischelpers.farmruns; 26 | 27 | import lombok.Getter; 28 | import net.runelite.api.coords.WorldPoint; 29 | 30 | @Getter 31 | public class FarmingRegion 32 | { 33 | private final String name; 34 | private final int regionID; 35 | private final boolean definite; 36 | private final FarmingPatch[] patches; 37 | 38 | FarmingRegion(String name, int regionID, boolean definite, FarmingPatch... patches) 39 | { 40 | this.name = name; 41 | this.regionID = regionID; 42 | this.definite = definite; 43 | this.patches = patches; 44 | for (FarmingPatch p : patches) 45 | { 46 | p.setRegion(this); 47 | } 48 | } 49 | 50 | public boolean isInBounds(WorldPoint loc) 51 | { 52 | return true; 53 | } 54 | 55 | @Override 56 | public String toString() 57 | { 58 | return name; 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/mischelpers/farmruns/PatchPrediction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Abex 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.mischelpers.farmruns; 26 | 27 | 28 | import lombok.Value; 29 | import net.runelite.client.plugins.timetracking.farming.Produce; 30 | 31 | @Value 32 | class PatchPrediction 33 | { 34 | private final Produce produce; 35 | private final CropState cropState; 36 | private final long doneEstimate; 37 | private final int stage; 38 | private final int stages; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/mischelpers/farmruns/PatchState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Abex 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.mischelpers.farmruns; 26 | 27 | import lombok.Value; 28 | import net.runelite.client.plugins.timetracking.farming.Produce; 29 | @Value 30 | class PatchState 31 | { 32 | Produce produce; 33 | CropState cropState; 34 | int stage; 35 | 36 | int getStages() 37 | { 38 | return cropState == CropState.HARVESTABLE || cropState == CropState.FILLING ? produce.getHarvestStages() : produce.getStages(); 39 | } 40 | 41 | int getTickRate() 42 | { 43 | switch (cropState) 44 | { 45 | case HARVESTABLE: 46 | return produce.getRegrowTickrate(); 47 | case GROWING: 48 | return produce.getTickrate(); 49 | default: 50 | return 0; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/mischelpers/farmruns/PaymentTracker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Adam 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.mischelpers.farmruns; 26 | 27 | import javax.inject.Inject; 28 | import javax.inject.Singleton; 29 | import lombok.AccessLevel; 30 | import lombok.RequiredArgsConstructor; 31 | import lombok.extern.slf4j.Slf4j; 32 | import net.runelite.client.config.ConfigManager; 33 | import net.runelite.client.plugins.timetracking.TimeTrackingConfig; 34 | 35 | @Slf4j 36 | @RequiredArgsConstructor( 37 | access = AccessLevel.PRIVATE, 38 | onConstructor = @__({@Inject}) 39 | ) 40 | @Singleton 41 | public class PaymentTracker 42 | { 43 | private final ConfigManager configManager; 44 | 45 | private static String configKey(FarmingPatch fp) 46 | { 47 | return fp.configKey() + "." + TimeTrackingConfig.PROTECTED; 48 | } 49 | 50 | boolean getProtectedState(FarmingPatch fp) 51 | { 52 | return Boolean.TRUE.equals(configManager.getRSProfileConfiguration( 53 | TimeTrackingConfig.CONFIG_GROUP, 54 | configKey(fp), 55 | Boolean.class)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/animalmagnetism/PuzzleSolver.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.helpers.quests.animalmagnetism; 2 | 3 | import com.questhelper.steps.widget.WidgetDetails; 4 | 5 | import java.util.HashSet; 6 | 7 | public class PuzzleSolver 8 | { 9 | 10 | public PuzzleSolver() {} 11 | 12 | //Controls 13 | private static final WidgetDetails[] buttons = new WidgetDetails[]{ 14 | new WidgetDetails(480, 26, 0), 15 | //Skip 2 16 | new WidgetDetails(480, 31, 0), 17 | new WidgetDetails(480, 34, 0), 18 | //Skip 5 19 | new WidgetDetails(480, 40, 0), 20 | new WidgetDetails(480, 43, 0), 21 | new WidgetDetails(480, 46, 0) 22 | //Skip 9 23 | }; 24 | 25 | public HashSet solver() 26 | { 27 | HashSet highlights = new HashSet<>(); 28 | 29 | for (WidgetDetails button : buttons) { 30 | highlights.add(button); 31 | } 32 | 33 | return highlights; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/dreammentor/CyrisusBankConditional.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.quests.dreammentor; 26 | 27 | import com.questhelper.requirements.SimpleRequirement; 28 | import net.runelite.api.Client; 29 | 30 | public class CyrisusBankConditional extends SimpleRequirement 31 | { 32 | @Override 33 | public boolean check(Client client) 34 | { 35 | 36 | return CyrisusArmourSet.isReady(client); 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/dreammentor/CyrisusBankItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.quests.dreammentor; 26 | 27 | import lombok.Getter; 28 | 29 | enum CyrisusBankItem 30 | { 31 | DRAGON_CHAINBODY("Dragon chainbody", 3140, 1), 32 | AHRIM_ROBETOP("Ahrim's robetop", 2, 4712), 33 | KARILS_TOP("Karil's leathertop", 3, 4736), 34 | DRAGON_MED_HELM("Dragon med helm", 15, 1149), 35 | SPLITBARK_HELM("Splitbark helm", 16, 3385), 36 | ROBIN_HOOD("Robin hood hat", 17, 2581), 37 | ABYSSAL_WHIP("Abyssal whip", 19, 4151), 38 | ANCIENT_STAFF("Ancient staff", 20, 4675), 39 | MAGIC_SHORTBOW("Magic shortbown", 21, 861), 40 | TORAG_LEG("Torag's platelegs", 26, 4970), 41 | AHRIM_SKIRT("Ahrim's robeskirt", 27, 4714), 42 | BLACK_CHAPS("Black d'hide chaps", 28, 2497), 43 | INFINITY_BOOTS("Infinity boots", 29, 6920), 44 | RANGER_BOOTS("Ranger boots", 30, 2577), 45 | ADAMANT_BOOTS("Adamant boots", 31, 4129); 46 | 47 | @Getter 48 | private final String name; 49 | 50 | @Getter 51 | private final int varbitID; 52 | 53 | @Getter 54 | private final int widgetID; 55 | 56 | CyrisusBankItem(String name, int varbitID, int widgetID) 57 | { 58 | this.name = name; 59 | this.varbitID = varbitID; 60 | this.widgetID = widgetID; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/monkeymadnessii/MM2AgilityNodes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.quests.monkeymadnessii; 26 | 27 | import lombok.AllArgsConstructor; 28 | import lombok.Getter; 29 | 30 | @AllArgsConstructor 31 | @Getter 32 | public enum MM2AgilityNodes 33 | { 34 | NODE0(new MM2Route[] { MM2Route.S0E3, MM2Route.S0E1, null, null }), 35 | NODE1(new MM2Route[] { MM2Route.S1E5, MM2Route.S1E2, null, MM2Route.S1E0 }), 36 | NODE2(new MM2Route[] { MM2Route.S2E6, null, null, MM2Route.S2E1 }), 37 | NODE3(new MM2Route[] { MM2Route.S3E7, null, MM2Route.S3E4, null }), 38 | NODE4(new MM2Route[] { MM2Route.S4E8, MM2Route.S4E5, null, MM2Route.S4E3 }), 39 | NODE5(new MM2Route[] { null, MM2Route.S5E6, MM2Route.S5E1, MM2Route.S5E4 }), 40 | NODE6(new MM2Route[] { MM2Route.S6E9, null, null, MM2Route.S6E5 }), 41 | NODE7(new MM2Route[] { MM2Route.S7E10, MM2Route.S7E8, null, null }), 42 | NODE8(new MM2Route[] { MM2Route.S8E10, MM2Route.S8E9, MM2Route.S8E4, MM2Route.S8E7 }), 43 | NODE9(new MM2Route[] { MM2Route.S9E10, null, null, MM2Route.S9E8 }), 44 | NODE10(new MM2Route[] { null, null, null, null }); 45 | 46 | private final MM2Route[] paths; 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/myarmsbigadventure/AddDung.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.helpers.quests.myarmsbigadventure; 2 | 3 | import com.questhelper.questhelpers.QuestHelper; 4 | import com.questhelper.requirements.item.ItemRequirement; 5 | import com.questhelper.steps.ObjectStep; 6 | import net.runelite.api.coords.WorldPoint; 7 | import net.runelite.api.events.GameTick; 8 | import net.runelite.api.gameval.ItemID; 9 | import net.runelite.api.gameval.ObjectID; 10 | import net.runelite.client.eventbus.Subscribe; 11 | 12 | import java.util.Arrays; 13 | 14 | public class AddDung extends ObjectStep 15 | { 16 | ItemRequirement dung = new ItemRequirement("Ugthanki dung", ItemID.FEUD_CAMEL_POOH_BUCKET, 3); 17 | ItemRequirement spade = new ItemRequirement("Spade", ItemID.SPADE); 18 | 19 | public AddDung(QuestHelper questHelper) 20 | { 21 | super(questHelper, ObjectID.MYARM_FAKEFARMINGPATCH, new WorldPoint(2831, 3696, 0), "Add 3 ugthanki dung on My Arm's soil patch."); 22 | this.addIcon(ItemID.FEUD_CAMEL_POOH_BUCKET); 23 | dung.setTooltip("You can get some by feeding the camels in Pollnivneach hot sauce, then using a bucket on their dung"); 24 | dung.setHighlightInInventory(true); 25 | } 26 | 27 | @Subscribe 28 | public void onGameTick(GameTick event) 29 | { 30 | updateSteps(); 31 | } 32 | 33 | protected void updateSteps() 34 | { 35 | int numCompToAdd = 3 - client.getVarbitValue(2791); 36 | dung.setQuantity(numCompToAdd); 37 | this.setRequirements(Arrays.asList(dung, spade)); 38 | this.setText("Add " + numCompToAdd + " ugthanki dung on My Arm's soil patch."); 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/priestinperil/BringDrezelPureEssenceStep.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.helpers.quests.priestinperil; 2 | 3 | import com.questhelper.questhelpers.QuestHelper; 4 | import com.questhelper.requirements.item.ItemRequirement; 5 | import com.questhelper.steps.NpcStep; 6 | import net.runelite.api.coords.WorldPoint; 7 | import net.runelite.api.events.GameTick; 8 | import net.runelite.api.gameval.ItemID; 9 | import net.runelite.api.gameval.NpcID; 10 | import net.runelite.client.eventbus.Subscribe; 11 | 12 | import java.util.Collections; 13 | 14 | public class BringDrezelPureEssenceStep extends NpcStep 15 | { 16 | ItemRequirement essence = new ItemRequirement("Rune/Pure essence",ItemID.BLANKRUNE, 50); 17 | 18 | public BringDrezelPureEssenceStep(QuestHelper questHelper) 19 | { 20 | super(questHelper, NpcID.PRIESTPERILTRAPPEDMONK_VIS, new WorldPoint(3439, 9896, 0), "Bring Drezel 50 UNNOTED rune/pure essence in the underground of the Salve Temple to finish the quest!"); 21 | essence.addAlternates(ItemID.BLANKRUNE_HIGH); 22 | } 23 | 24 | @Subscribe 25 | public void onGameTick(GameTick event) 26 | { 27 | updateSteps(); 28 | } 29 | 30 | protected void updateSteps() 31 | { 32 | int numEssence = 60 - client.getVarpValue(302); 33 | essence.setQuantity(numEssence); 34 | this.setRequirements(Collections.singletonList(essence)); 35 | this.setText("Bring Drezel " + numEssence + " UNNOTED rune/pure essence in the underground of the Salve Temple."); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/templeoftheeye/RunicEnergy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.quests.templeoftheeye; 26 | 27 | import net.runelite.api.coords.WorldPoint; 28 | 29 | public class RunicEnergy 30 | { 31 | String name; 32 | WorldPoint wp; 33 | int id; 34 | 35 | public RunicEnergy(String name, WorldPoint wp, int id) 36 | { 37 | this.name = name; 38 | this.wp = wp; 39 | this.id = id; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/thecurseofarrav/rubblesolvers/RubbleSolverOne.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, pajlada 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.quests.thecurseofarrav.rubblesolvers; 26 | 27 | import com.questhelper.helpers.quests.thecurseofarrav.TheCurseOfArrav; 28 | import lombok.extern.slf4j.Slf4j; 29 | import net.runelite.api.coords.Direction; 30 | 31 | /** 32 | * This class describes the rubble mining steps required for Roadblock 1 (when quest state varbit is 22) 33 | */ 34 | @Slf4j 35 | public class RubbleSolverOne extends RubbleSolver 36 | { 37 | public RubbleSolverOne(TheCurseOfArrav theCurseOfArrav) { 38 | super(theCurseOfArrav, "1"); 39 | } 40 | 41 | @Override 42 | protected void setupRubbleSteps() { 43 | this.addMineRubbleStep(2764, 10266, RubbleType.Two, Direction.SOUTH); // 1 44 | this.addMineRubbleStep(2775, 10258, RubbleType.One, Direction.SOUTH); // 2 45 | this.addMineRubbleStep(2764, 10266, RubbleType.One, Direction.EAST); // 3 46 | this.addMineRubbleStep(2764, 10267, RubbleType.One, Direction.SOUTH); // 4 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/thecurseofarrav/rubblesolvers/RubbleType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, pajlada 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.quests.thecurseofarrav.rubblesolvers; 26 | 27 | import lombok.Getter; 28 | import net.runelite.api.gameval.ObjectID; 29 | 30 | import java.util.ArrayList; 31 | import java.util.Collections; 32 | import java.util.List; 33 | 34 | @Getter 35 | public enum RubbleType 36 | { 37 | Three(ObjectID.MAH3_TUNNEL_RUBBLE_MINE_3, ObjectID.MAH3_TUNNEL_RUBBLE_MINE_COLLAPSE), 38 | Two(ObjectID.MAH3_TUNNEL_RUBBLE_MINE_2, ObjectID.MAH3_RUBBLE_2_WEST, ObjectID.MAH3_RUBBLE_2_SOUTH, ObjectID.MAH3_RUBBLE_2_NORTH), 39 | One(ObjectID.MAH3_TUNNEL_RUBBLE_MINE_1, ObjectID.MAH3_RUBBLE_1_SOUTH, ObjectID.MAH3_RUBBLE_1_WEST, ObjectID.MAH3_RUBBLE_1_NORTH_WEST, ObjectID.MAH3_RUBBLE_1_SOUTH_WEST, ObjectID.MAH3_RUBBLE_1_NORTH, ObjectID.MAH3_RUBBLE_1_NORTH_SOUTH); 40 | 41 | private final List objectIDs; 42 | 43 | RubbleType(Integer... possibleObjectIDs) { 44 | this.objectIDs = new ArrayList<>(); 45 | Collections.addAll(this.objectIDs, possibleObjectIDs); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/thefremennikisles/KillTrolls.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.helpers.quests.thefremennikisles; 2 | 3 | import com.questhelper.questhelpers.QuestHelper; 4 | import com.questhelper.steps.NpcStep; 5 | import net.runelite.api.coords.WorldPoint; 6 | import net.runelite.api.events.GameTick; 7 | import net.runelite.api.gameval.NpcID; 8 | import net.runelite.client.eventbus.Subscribe; 9 | 10 | public class KillTrolls extends NpcStep 11 | { 12 | public KillTrolls(QuestHelper questHelper) 13 | { 14 | super(questHelper, NpcID.FRIS_TROLLM_LOWXP, new WorldPoint(2390, 10280, 1), "Kill 10 ice trolls.", true); 15 | this.addAlternateNpcs(NpcID.FRIS_TROLLM_PC, NpcID.FRIS_TROLLF_LOWXP, NpcID.FRIS_TROLLF_PC, NpcID.FRIS_BABY_TROLL_LOWXP, NpcID.FRIS_BABY_TROLL_PC); 16 | } 17 | 18 | @Subscribe 19 | public void onGameTick(GameTick event) 20 | { 21 | updateSteps(); 22 | } 23 | 24 | protected void updateSteps() 25 | { 26 | int numToKill = client.getVarbitValue(3312); 27 | this.setText("Kill " + numToKill + " trolls to continue."); 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/theheartofdarkness/StatueDetails.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.quests.theheartofdarkness; 26 | 27 | import com.questhelper.requirements.ManualRequirement; 28 | import com.questhelper.requirements.zone.Zone; 29 | import lombok.Data; 30 | import net.runelite.api.coords.WorldPoint; 31 | 32 | @Data 33 | public class StatueDetails 34 | { 35 | Zone elementZone; 36 | Integer posInOrder = -1; 37 | ManualRequirement hasBeenInspected; 38 | WorldPoint statuePos; 39 | String elementName; 40 | 41 | public StatueDetails(Zone zone, ManualRequirement hasBeenInspected, WorldPoint statuePos, String elementName) 42 | { 43 | this.elementZone = zone; 44 | this.hasBeenInspected = hasBeenInspected; 45 | this.statuePos = statuePos; 46 | this.elementName = elementName; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/quests/thepathofglouphrie/DiscInsertionStep.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, pajlada 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.quests.thepathofglouphrie; 26 | 27 | import com.questhelper.questhelpers.QuestHelper; 28 | import com.questhelper.requirements.Requirement; 29 | import com.questhelper.steps.ItemStep; 30 | import net.runelite.api.gameval.InterfaceID; 31 | import net.runelite.api.widgets.Widget; 32 | 33 | /** 34 | * DiscInsertionStep is a custom ItemStep that allows highlighting items in the disc insertion widget that overlays the inventory 35 | */ 36 | public class DiscInsertionStep extends ItemStep 37 | { 38 | public DiscInsertionStep(QuestHelper questHelper, String text, Requirement... requirements) 39 | { 40 | super(questHelper, text, requirements); 41 | } 42 | 43 | @Override 44 | protected Widget getInventoryWidget() 45 | { 46 | return client.getWidget(InterfaceID.PogCoinSide.INV_LAYER); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/helpers/skills/agility/AgilityCourse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, jLereback 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.helpers.skills.agility; 26 | 27 | import com.questhelper.panel.PanelDetails; 28 | import com.questhelper.questhelpers.QuestHelper; 29 | import com.questhelper.requirements.item.ItemRequirement; 30 | import com.questhelper.steps.ConditionalStep; 31 | import com.questhelper.steps.QuestStep; 32 | 33 | public abstract class AgilityCourse extends QuestStep 34 | { 35 | ItemRequirement[] recommendedItems; 36 | 37 | public AgilityCourse(QuestHelper questHelper) 38 | { 39 | super(questHelper); 40 | } 41 | 42 | protected abstract ConditionalStep loadStep(); 43 | 44 | protected abstract void setupConditions(); 45 | 46 | protected abstract void setupZones(); 47 | 48 | protected abstract void setupSteps(); 49 | 50 | protected abstract void addSteps(); 51 | 52 | protected abstract PanelDetails getPanelDetails(); 53 | 54 | protected void setRecommended(ItemRequirement... items) 55 | { 56 | this.recommendedItems = items; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/overlays/QuestHelperMinimapOverlay.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.overlays; 2 | 3 | import com.questhelper.QuestHelperPlugin; 4 | import com.questhelper.questhelpers.QuestHelper; 5 | import net.runelite.client.ui.overlay.Overlay; 6 | import net.runelite.client.ui.overlay.OverlayLayer; 7 | import net.runelite.client.ui.overlay.OverlayPosition; 8 | import net.runelite.client.ui.overlay.OverlayPriority; 9 | 10 | import javax.inject.Inject; 11 | import java.awt.*; 12 | 13 | public class QuestHelperMinimapOverlay extends Overlay 14 | { 15 | private final QuestHelperPlugin plugin; 16 | 17 | @Inject 18 | public QuestHelperMinimapOverlay(QuestHelperPlugin plugin) 19 | { 20 | setPosition(OverlayPosition.DYNAMIC); 21 | setLayer(OverlayLayer.ALWAYS_ON_TOP); 22 | setPriority(OverlayPriority.HIGH); 23 | this.plugin = plugin; 24 | } 25 | 26 | @Override 27 | public Dimension render(Graphics2D graphics) 28 | { 29 | QuestHelper quest = plugin.getSelectedQuest(); 30 | 31 | if (quest != null && quest.getCurrentStep() != null && quest.getCurrentStep().getActiveStep() != null) 32 | { 33 | quest.getCurrentStep().getActiveStep().makeDirectionOverlayHint(graphics, plugin); 34 | } 35 | return null; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/overlays/QuestHelperWorldArrowOverlay.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, Lotto 3 | * Copyright (c) 2019, Trevor 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | package com.questhelper.overlays; 27 | 28 | import com.questhelper.QuestHelperPlugin; 29 | import com.questhelper.questhelpers.QuestHelper; 30 | import net.runelite.client.ui.overlay.Overlay; 31 | import net.runelite.client.ui.overlay.OverlayLayer; 32 | import net.runelite.client.ui.overlay.OverlayPosition; 33 | 34 | import javax.inject.Inject; 35 | import java.awt.*; 36 | 37 | public class QuestHelperWorldArrowOverlay extends Overlay 38 | { 39 | private final QuestHelperPlugin plugin; 40 | 41 | @Inject 42 | public QuestHelperWorldArrowOverlay(QuestHelperPlugin plugin) 43 | { 44 | setPosition(OverlayPosition.DYNAMIC); 45 | setLayer(OverlayLayer.ABOVE_SCENE); 46 | this.plugin = plugin; 47 | } 48 | 49 | @Override 50 | public Dimension render(Graphics2D graphics) 51 | { 52 | QuestHelper quest = plugin.getSelectedQuest(); 53 | 54 | if (quest != null && quest.getCurrentStep() != null) 55 | { 56 | quest.getCurrentStep().makeWorldArrowOverlayHint(graphics, plugin); 57 | } 58 | 59 | return null; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/panel/DropdownRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.panel; 26 | 27 | import net.runelite.client.ui.ColorScheme; 28 | import net.runelite.client.util.Text; 29 | 30 | import javax.swing.*; 31 | import javax.swing.border.EmptyBorder; 32 | import java.awt.*; 33 | 34 | public final class DropdownRenderer extends DefaultListCellRenderer 35 | { 36 | @Override 37 | public Component getListCellRendererComponent(JList list, Object o, int i, boolean isSelected, boolean b1) { 38 | setBackground(ColorScheme.DARK_GRAY_COLOR); 39 | setForeground(Color.WHITE); 40 | setBorder(new EmptyBorder(0, 0, 0, 0)); 41 | 42 | if (!isSelected) 43 | { 44 | setBackground(ColorScheme.DARK_GRAY_COLOR); 45 | setForeground(Color.WHITE); 46 | } 47 | else 48 | { 49 | setBackground(list.getBackground()); 50 | setForeground(ColorScheme.LIGHT_GRAY_COLOR); 51 | } 52 | 53 | setText(Text.titleCase((Enum) o)); 54 | 55 | return this; 56 | } 57 | } -------------------------------------------------------------------------------- /src/main/java/com/questhelper/panel/FixedWidthPanel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Adam 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.panel; 26 | 27 | import net.runelite.client.ui.PluginPanel; 28 | 29 | import javax.swing.*; 30 | import java.awt.*; 31 | 32 | public class FixedWidthPanel extends JPanel 33 | { 34 | @Override 35 | public Dimension getPreferredSize() 36 | { 37 | return new Dimension(PluginPanel.PANEL_WIDTH, super.getPreferredSize().height); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/panel/skillfiltering/SkillTabGroup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, Psikoi 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.panel.skillfiltering; 26 | 27 | import javax.swing.*; 28 | import java.awt.*; 29 | import java.util.ArrayList; 30 | import java.util.List; 31 | 32 | public class SkillTabGroup extends JPanel 33 | { 34 | /* The panel on which the content tab's content will be displayed on. */ 35 | private final JPanel display; 36 | /* A list of all the tabs contained in this group. */ 37 | private final List tabs = new ArrayList<>(); 38 | 39 | public SkillTabGroup(JPanel display) 40 | { 41 | this.display = display; 42 | if (display != null) 43 | { 44 | this.display.setLayout(new BorderLayout()); 45 | } 46 | setLayout(new FlowLayout(FlowLayout.CENTER, 8, 0)); 47 | setOpaque(false); 48 | } 49 | 50 | public SkillTabGroup() 51 | { 52 | this(null); 53 | } 54 | 55 | public void addTab(SkillIconButton tab) 56 | { 57 | tabs.add(tab); 58 | add(tab, BorderLayout.NORTH); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/questhelpers/ComplexStateQuestHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.questhelpers; 26 | 27 | import com.questhelper.QuestHelperConfig; 28 | import com.questhelper.panel.PanelDetails; 29 | import com.questhelper.steps.QuestStep; 30 | 31 | import java.util.ArrayList; 32 | import java.util.Collections; 33 | import java.util.List; 34 | 35 | public abstract class ComplexStateQuestHelper extends QuestHelper 36 | { 37 | protected QuestStep step; 38 | protected int var; 39 | 40 | @Override 41 | public void init() 42 | { 43 | if (step == null) 44 | { 45 | step = loadStep(); 46 | } 47 | } 48 | 49 | @Override 50 | public void startUp(QuestHelperConfig config) 51 | { 52 | step = loadStep(); 53 | this.config = config; 54 | instantiateSteps(Collections.singletonList(step)); 55 | var = getVar(); 56 | startUpStep(step); 57 | } 58 | 59 | @Override 60 | public void shutDown() 61 | { 62 | super.shutDown(); 63 | shutDownStep(); 64 | } 65 | 66 | @Override 67 | public boolean updateQuest() 68 | { 69 | return true; 70 | } 71 | 72 | public List getPanels() 73 | { 74 | return new ArrayList<>(); 75 | } 76 | 77 | public abstract QuestStep loadStep(); 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/questhelpers/PlayerMadeQuestHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.questhelpers; 26 | 27 | import com.questhelper.runeliteobjects.extendedruneliteobjects.QuestCompletedWidget; 28 | import lombok.Getter; 29 | import net.runelite.api.QuestState; 30 | 31 | import javax.inject.Inject; 32 | 33 | public abstract class PlayerMadeQuestHelper extends ComplexStateQuestHelper 34 | { 35 | @Inject 36 | QuestCompletedWidget questCompletedWidget; 37 | 38 | @Getter 39 | protected int itemWidget = -1; 40 | 41 | @Getter 42 | protected int rotationX = 0; 43 | @Getter 44 | protected int rotationY = 0; 45 | @Getter 46 | protected int rotationZ = 0; 47 | @Getter 48 | protected int zoom = 0; 49 | 50 | @Override 51 | public void init() 52 | { 53 | super.init(); 54 | } 55 | 56 | @Override 57 | public void shutDown() 58 | { 59 | super.shutDown(); 60 | if (getQuest().getState(client, configManager) == QuestState.FINISHED) 61 | { 62 | runeliteObjectManager.createChatboxMessage("Quest completed!"); 63 | questCompletedWidget.createWidget(client, getQuest().getName(), getQuestRewardsText(), getItemWidget(), rotationX, rotationY, rotationZ, zoom); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/questhelpers/QuestDebugRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Senmori 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.questhelpers; 28 | 29 | import com.questhelper.QuestHelperPlugin; 30 | import net.runelite.client.ui.overlay.components.PanelComponent; 31 | 32 | import java.awt.*; 33 | 34 | public interface QuestDebugRenderer 35 | { 36 | /** Used to render overlay's like quest steps. */ 37 | default void renderDebugOverlay(Graphics graphics, QuestHelperPlugin plugin, PanelComponent panelComponent) {} 38 | 39 | /** Used to render an overlay similar to how fishing spot overlays work. */ 40 | default void renderDebugWorldOverlayHint(Graphics2D graphics, QuestHelperPlugin plugin, QuestHelper quest, PanelComponent panelComponent) {} 41 | 42 | /** Used to render overlays on widgets */ 43 | default void renderDebugWidgetOverlayHint(Graphics2D graphics, QuestHelperPlugin plugin, QuestHelper quest, PanelComponent panelComponent) {} 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/questhelpers/QuestUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Senmori 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | 28 | package com.questhelper.questhelpers; 29 | 30 | import javax.annotation.Nonnull; 31 | import java.util.ArrayList; 32 | import java.util.Arrays; 33 | import java.util.List; 34 | import java.util.stream.Collector; 35 | import java.util.stream.Collectors; 36 | 37 | public class QuestUtil 38 | { 39 | public static List toArrayList(@Nonnull T... elements) 40 | { 41 | return new ArrayList<>(Arrays.asList(elements)); 42 | } 43 | 44 | public static Collector> collectToArrayList() 45 | { 46 | return Collectors.toCollection(ArrayList::new); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/questinfo/HelperConfig.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.questinfo; 2 | 3 | import lombok.Getter; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | public class HelperConfig 9 | { 10 | @Getter 11 | String name; 12 | @Getter 13 | String key; 14 | @Getter 15 | Enum[] enums; 16 | public HelperConfig(String name, String key, Enum[] enums) 17 | { 18 | this.name = name; 19 | this.key = key; 20 | this.enums = enums; 21 | } 22 | 23 | public String[] getValues() 24 | { 25 | List s = new ArrayList<>(); 26 | for (Enum value : enums) 27 | { 28 | s.add(value.name()); 29 | } 30 | return s.toArray(s.toArray(new String[0])); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/questinfo/PlayerQuests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.questinfo; 26 | 27 | import lombok.Getter; 28 | 29 | public enum PlayerQuests 30 | { 31 | 32 | COOKS_HELPER("cooks_helper"), 33 | BIKE_SHEDDER("bike_shedder"); 34 | 35 | @Getter 36 | private final String configValue; 37 | PlayerQuests(String configValue) 38 | { 39 | this.configValue = configValue; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/ConfigRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.requirements; 26 | 27 | import lombok.Setter; 28 | import net.runelite.api.Client; 29 | 30 | import java.util.function.BooleanSupplier; 31 | 32 | public class ConfigRequirement extends SimpleRequirement 33 | { 34 | @Setter 35 | boolean shouldPass; 36 | 37 | BooleanSupplier booleanSupplier; 38 | 39 | public ConfigRequirement(BooleanSupplier booleanSupplier) 40 | { 41 | this.booleanSupplier = booleanSupplier; 42 | } 43 | 44 | @Override 45 | public boolean check(Client client) 46 | { 47 | return booleanSupplier.getAsBoolean(); 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/ManualRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.requirements; 26 | 27 | import lombok.Setter; 28 | import net.runelite.api.Client; 29 | 30 | public class ManualRequirement extends SimpleRequirement 31 | { 32 | @Setter 33 | boolean shouldPass; 34 | 35 | @Override 36 | public boolean check(Client client) 37 | { 38 | return shouldPass; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/RegionHintArrowRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.requirements; 26 | 27 | import com.questhelper.requirements.zone.Zone; 28 | import com.questhelper.steps.tools.QuestPerspective; 29 | import net.runelite.api.Client; 30 | import net.runelite.api.coords.WorldPoint; 31 | 32 | public class RegionHintArrowRequirement extends SimpleRequirement 33 | { 34 | private final Zone zone; 35 | 36 | public RegionHintArrowRequirement(WorldPoint worldPoint) 37 | { 38 | assert(worldPoint != null); 39 | this.zone = new Zone(worldPoint, worldPoint); 40 | } 41 | 42 | public RegionHintArrowRequirement(Zone zone) 43 | { 44 | assert(zone != null); 45 | this.zone = zone; 46 | } 47 | 48 | public boolean check(Client client) 49 | { 50 | WorldPoint hintArrowPoint = client.getHintArrowPoint(); 51 | if (hintArrowPoint == null) 52 | { 53 | return false; 54 | } 55 | 56 | WorldPoint wp = QuestPerspective.getInstanceWorldPointFromReal(client, hintArrowPoint); 57 | if (wp == null) 58 | { 59 | return false; 60 | } 61 | 62 | return zone.contains(wp); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/SimpleRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.requirements; 28 | 29 | import com.questhelper.QuestHelperConfig; 30 | import net.runelite.api.Client; 31 | 32 | import javax.annotation.Nonnull; 33 | import java.awt.*; 34 | 35 | public abstract class SimpleRequirement extends AbstractRequirement 36 | { 37 | @Override 38 | public abstract boolean check(Client client); 39 | 40 | @Nonnull 41 | @Override 42 | public String getDisplayText() 43 | { 44 | return ""; 45 | } 46 | 47 | @Override 48 | public Color getColor(Client client, QuestHelperConfig config) 49 | { 50 | return check(client) ? config.passColour() : config.failColour(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/item/ContainerStateForRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.requirements.item; 26 | 27 | 28 | import lombok.Getter; 29 | 30 | public class ContainerStateForRequirement 31 | { 32 | @Getter 33 | private int matchesFound; 34 | 35 | @Getter 36 | private int lastCheckedTick = -2; 37 | 38 | public void set(int matchesFound, int currentTick) 39 | { 40 | this.matchesFound = matchesFound; 41 | this.lastCheckedTick = currentTick; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/item/TrackedContainers.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.requirements.item; 26 | 27 | public enum TrackedContainers 28 | { 29 | EQUIPPED, 30 | INVENTORY, 31 | BANK, 32 | POTION_STORAGE, 33 | GROUP_STORAGE, 34 | RUNE_POUCH, 35 | UNDEFINED 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/npc/NoFollowerRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2022, Zoinkwiz 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.requirements.npc; 28 | 29 | import com.questhelper.requirements.AbstractRequirement; 30 | import net.runelite.api.Client; 31 | 32 | import javax.annotation.Nonnull; 33 | 34 | public class NoFollowerRequirement extends AbstractRequirement 35 | { 36 | String text; 37 | 38 | public NoFollowerRequirement(String text) 39 | { 40 | this.text = text; 41 | } 42 | 43 | @Override 44 | public boolean check(Client client) 45 | { 46 | return client.getVarpValue(447) == -1; 47 | } 48 | 49 | @Nonnull 50 | @Override 51 | public String getDisplayText() 52 | { 53 | return text; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/npc/NpcInteractingRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Zoinkwiz 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | 28 | package com.questhelper.requirements.npc; 29 | 30 | import com.questhelper.requirements.SimpleRequirement; 31 | import com.questhelper.util.Utils; 32 | import net.runelite.api.Client; 33 | 34 | import java.util.Arrays; 35 | import java.util.List; 36 | 37 | public class NpcInteractingRequirement extends SimpleRequirement 38 | { 39 | final List npcIDs; 40 | 41 | public NpcInteractingRequirement(Integer... npcID) 42 | { 43 | assert(Utils.varargsNotNull(npcID)); 44 | this.npcIDs = Arrays.asList(npcID); 45 | } 46 | 47 | @Override 48 | public boolean check(Client client) 49 | { 50 | return client.getTopLevelWorldView().npcs().stream() 51 | .filter(npc -> npc.getInteracting() != null) 52 | .filter(npc -> npc.getInteracting() == client.getLocalPlayer()) 53 | .anyMatch(npc -> npcIDs.contains(npc.getId())); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/npc/NpcInteractingWithNpcRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Zoinkwiz 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.requirements.npc; 28 | 29 | import com.questhelper.requirements.SimpleRequirement; 30 | import net.runelite.api.Client; 31 | 32 | import java.util.List; 33 | 34 | public class NpcInteractingWithNpcRequirement extends SimpleRequirement 35 | { 36 | final Integer npcID; 37 | final List npcNames; 38 | 39 | public NpcInteractingWithNpcRequirement(Integer npcID, String... npcNames) 40 | { 41 | assert(npcID != null); 42 | this.npcID = npcID; 43 | this.npcNames = List.of(npcNames); 44 | } 45 | 46 | @Override 47 | public boolean check(Client client) 48 | { 49 | return client.getTopLevelWorldView().npcs().stream() 50 | .filter(npc -> npc.getInteracting() != null) 51 | .filter(npc -> npcNames.contains(npc.getInteracting().getName())) 52 | .anyMatch(npc -> npc.getInteracting().getInteracting() == npc); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/player/InInstanceRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Zoinkwiz 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | 28 | package com.questhelper.requirements.player; 29 | 30 | import com.questhelper.requirements.SimpleRequirement; 31 | import net.runelite.api.Client; 32 | 33 | public class InInstanceRequirement extends SimpleRequirement 34 | { 35 | @Override 36 | public boolean check(Client client) 37 | { 38 | return client.isInInstancedRegion(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/player/IronmanRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABI`LITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.requirements.player; 26 | 27 | import com.questhelper.requirements.AbstractRequirement; 28 | import com.questhelper.util.Utils; 29 | import net.runelite.api.Client; 30 | 31 | import javax.annotation.Nonnull; 32 | 33 | public class IronmanRequirement extends AbstractRequirement 34 | { 35 | final boolean shouldBeIronman; 36 | 37 | public IronmanRequirement(boolean shouldBeIronman) 38 | { 39 | this.shouldBeIronman = shouldBeIronman; 40 | } 41 | 42 | @Override 43 | public boolean check(Client client) 44 | { 45 | return client.getLocalPlayer() != null && 46 | Utils.getAccountType(client).isAnyIronman() == shouldBeIronman; 47 | } 48 | 49 | @Nonnull 50 | @Override 51 | public String getDisplayText() 52 | { 53 | if (shouldBeIronman) 54 | { 55 | return "You need to be an ironman"; 56 | } 57 | else 58 | { 59 | return "You need to not be an ironman"; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/player/PrayerPointRequirement.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.requirements.player; 2 | 3 | import com.questhelper.requirements.AbstractRequirement; 4 | import net.runelite.api.Client; 5 | import net.runelite.api.Skill; 6 | 7 | import javax.annotation.Nonnull; 8 | 9 | public class PrayerPointRequirement extends AbstractRequirement 10 | { 11 | private final int level; 12 | public PrayerPointRequirement(int level) 13 | { 14 | this.level = level; 15 | } 16 | 17 | 18 | @Override 19 | public boolean check(Client client) 20 | { 21 | return client.getBoostedSkillLevel(Skill.PRAYER) >= level; 22 | } 23 | 24 | @Nonnull 25 | @Override 26 | public String getDisplayText() 27 | { 28 | return level + " prayer points"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/player/PrayerRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Zoinkwiz 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.requirements.player; 28 | 29 | import com.questhelper.requirements.AbstractRequirement; 30 | import net.runelite.api.Client; 31 | import net.runelite.api.Prayer; 32 | 33 | import javax.annotation.Nonnull; 34 | 35 | /** 36 | * Requirement that checks if a specified {@link Prayer} is active 37 | */ 38 | public class PrayerRequirement extends AbstractRequirement 39 | { 40 | private final Prayer prayer; 41 | private final String text; 42 | 43 | /** 44 | * Checks if the {@link Prayer} is currently active. 45 | * 46 | * @param text the display text 47 | * @param prayer the {@link Prayer} to check 48 | */ 49 | public PrayerRequirement(String text, Prayer prayer) 50 | { 51 | assert(prayer != null); 52 | this.prayer = prayer; 53 | this.text = text; 54 | } 55 | 56 | @Override 57 | public boolean check(Client client) 58 | { 59 | int currentPrayer = client.getVarbitValue(prayer.getVarbit()); 60 | return currentPrayer == 1; 61 | } 62 | 63 | @Nonnull 64 | @Override 65 | public String getDisplayText() 66 | { 67 | return text; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/player/SpecialAttackRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Obasill 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.requirements.player; 28 | 29 | import com.questhelper.requirements.AbstractRequirement; 30 | import com.questhelper.requirements.util.SpecialAttack; 31 | import net.runelite.api.Client; 32 | 33 | import javax.annotation.Nonnull; 34 | 35 | public class SpecialAttackRequirement extends AbstractRequirement 36 | { 37 | private static final int SPECIALATTACK_VARP = 301; 38 | private final SpecialAttack specialAttack; 39 | 40 | public SpecialAttackRequirement(SpecialAttack specialAttack) 41 | { 42 | assert(specialAttack != null); 43 | this.specialAttack = specialAttack; 44 | } 45 | 46 | @Override 47 | public boolean check(Client client) 48 | { 49 | return specialAttack.check(client, SPECIALATTACK_VARP); 50 | } 51 | 52 | @Nonnull 53 | @Override 54 | public String getDisplayText() 55 | { 56 | return "You must turn " + specialAttack.getName() + " special attack."; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/player/SpellbookRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Zoinkwiz 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.requirements.player; 28 | 29 | import com.questhelper.requirements.AbstractRequirement; 30 | import com.questhelper.requirements.util.Spellbook; 31 | import net.runelite.api.Client; 32 | 33 | import javax.annotation.Nonnull; 34 | 35 | public class SpellbookRequirement extends AbstractRequirement 36 | { 37 | private static final int SPELLBOOK_VARBIT = 4070; 38 | private final Spellbook spellBook; 39 | 40 | public SpellbookRequirement(Spellbook spellBook) 41 | { 42 | assert(spellBook != null); 43 | this.spellBook = spellBook; 44 | } 45 | 46 | @Override 47 | public boolean check(Client client) 48 | { 49 | return spellBook.check(client, SPELLBOOK_VARBIT); 50 | } 51 | 52 | @Nonnull 53 | @Override 54 | public String getDisplayText() 55 | { 56 | return "You must be on the " + spellBook.getName() + " spellbook."; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/player/WarriorsGuildAccessRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.requirements.player; 26 | 27 | import com.questhelper.requirements.AbstractRequirement; 28 | import net.runelite.api.Client; 29 | import net.runelite.api.Skill; 30 | 31 | import javax.annotation.Nonnull; 32 | 33 | public class WarriorsGuildAccessRequirement extends AbstractRequirement 34 | { 35 | public WarriorsGuildAccessRequirement() 36 | { 37 | shouldCountForFilter = true; 38 | } 39 | 40 | @Override 41 | public boolean check(Client client) 42 | { 43 | int attLevel = client.getRealSkillLevel(Skill.ATTACK); 44 | int strLevel = client.getRealSkillLevel(Skill.STRENGTH); 45 | return attLevel == 99 || strLevel == 99 || attLevel + strLevel >= 130; 46 | } 47 | 48 | @Nonnull 49 | @Override 50 | public String getDisplayText() 51 | { 52 | return "Can access the Warriors' Guild (combined Attack + Strength level of 130, or 99 in Attack or Strength)"; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/util/LogicHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.requirements.util; 26 | 27 | import com.questhelper.requirements.Requirement; 28 | import com.questhelper.requirements.conditional.Conditions; 29 | 30 | public class LogicHelper 31 | { 32 | public static Conditions nor(Requirement... condition) 33 | { 34 | return new Conditions(LogicType.NOR, condition); 35 | } 36 | 37 | public static Conditions not(Requirement condition) 38 | { 39 | return new Conditions(LogicType.NOR, condition); 40 | } 41 | 42 | public static Conditions nand(Requirement... condition) 43 | { 44 | return new Conditions(LogicType.NAND, condition); 45 | } 46 | 47 | public static Conditions or(Requirement... condition) 48 | { 49 | return new Conditions(LogicType.OR, condition); 50 | } 51 | 52 | public static Conditions and(Requirement... condition) 53 | { 54 | return new Conditions(LogicType.AND, condition); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/util/Operation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Zoinkwiz 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.requirements.util; 28 | 29 | import lombok.Getter; 30 | 31 | import java.util.function.BiFunction; 32 | 33 | public enum Operation 34 | { 35 | GREATER(">", (x,y) -> x > y), 36 | LESS("<", (x,y) -> x < y), 37 | LESS_EQUAL("<=", (x,y) -> x <= y), 38 | EQUAL("==", Integer::equals), 39 | GREATER_EQUAL(">=", (x,y) -> x >= y), 40 | NOT_EQUAL("=/=", (x,y) -> !x.equals(y)); 41 | 42 | private final BiFunction operation; 43 | @Getter 44 | private String displayText; 45 | Operation(String displayText, BiFunction operation) { 46 | this.displayText = displayText; 47 | this.operation = operation; 48 | } 49 | 50 | public boolean check(int numberToCheck, int numberToCheckAgainst) { 51 | return operation.apply(numberToCheck, numberToCheckAgainst); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/util/SpecialAttack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Obasill 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.requirements.util; 28 | 29 | import lombok.AllArgsConstructor; 30 | import lombok.Getter; 31 | import net.runelite.api.Client; 32 | 33 | @AllArgsConstructor 34 | @Getter 35 | public enum SpecialAttack 36 | { 37 | OFF(0, "off"), 38 | ON(1, "on"); 39 | 40 | private final int id; 41 | private final String name; 42 | 43 | public boolean check(Client client, int varp) 44 | { 45 | return client.getVarpValue(varp) == this.getId(); 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/util/Spellbook.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Zoinkwiz 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.requirements.util; 28 | 29 | import lombok.AllArgsConstructor; 30 | import lombok.Getter; 31 | import net.runelite.api.Client; 32 | 33 | @AllArgsConstructor 34 | @Getter 35 | public enum Spellbook 36 | { 37 | NORMAL(0, "Normal"), 38 | ANCIENT(1, "Ancient"), 39 | LUNAR(2, "Lunar"), 40 | ARCEUUS(3, "Arceuus"); 41 | 42 | private final int id; 43 | private final String name; 44 | 45 | public boolean check(Client client, int varbit) 46 | { 47 | return client.getVarbitValue(varbit) == this.getId(); 48 | } 49 | } -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/var/VarType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.requirements.var; 26 | 27 | import net.runelite.api.Client; 28 | 29 | import java.util.function.ToIntBiFunction; 30 | 31 | public enum VarType { 32 | VARBIT(Client::getVarbitValue), 33 | VARP(Client::getVarpValue); 34 | 35 | private final ToIntBiFunction getter; 36 | 37 | VarType(ToIntBiFunction getter) 38 | { 39 | this.getter = getter; 40 | } 41 | 42 | public int getValue(Client client, int id) 43 | { 44 | return getter.applyAsInt(client, id); 45 | } 46 | } -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/widget/WidgetModelRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Zoinkwiz 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.requirements.widget; 28 | 29 | import lombok.Setter; 30 | import net.runelite.api.Client; 31 | import net.runelite.api.widgets.Widget; 32 | 33 | public class WidgetModelRequirement extends WidgetPresenceRequirement 34 | { 35 | @Setter 36 | private int id; 37 | 38 | public WidgetModelRequirement(int groupId, int childId, int childChildId, int id) 39 | { 40 | super(groupId, childId, childChildId); 41 | this.id = id; 42 | } 43 | 44 | public WidgetModelRequirement(int groupId, int childId, int id) 45 | { 46 | super(groupId, childId); 47 | this.id = id; 48 | } 49 | 50 | public boolean checkWidget(Client client) 51 | { 52 | Widget widget = getWidget(client); 53 | if (widget == null) 54 | { 55 | return false; 56 | } 57 | return widget.getModelId() == id; 58 | } 59 | 60 | public void checkWidgetText(Client client) 61 | { 62 | hasPassed = hasPassed || checkWidget(client); 63 | } 64 | } 65 | 66 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/widget/WidgetSpriteRequirement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2021, Zoinkwiz 4 | * * All rights reserved. 5 | * * 6 | * * Redistribution and use in source and binary forms, with or without 7 | * * modification, are permitted provided that the following conditions are met: 8 | * * 9 | * * 1. Redistributions of source code must retain the above copyright notice, this 10 | * * list of conditions and the following disclaimer. 11 | * * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * * this list of conditions and the following disclaimer in the documentation 13 | * * and/or other materials provided with the distribution. 14 | * * 15 | * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | package com.questhelper.requirements.widget; 28 | 29 | import net.runelite.api.Client; 30 | import net.runelite.api.widgets.Widget; 31 | 32 | public class WidgetSpriteRequirement extends WidgetPresenceRequirement 33 | { 34 | private final int id; 35 | 36 | public WidgetSpriteRequirement(int groupId, int childId, int childChildId, int id) 37 | { 38 | super(groupId, childId, childChildId); 39 | this.id = id; 40 | } 41 | 42 | public WidgetSpriteRequirement(int groupId, int childId, int id) 43 | { 44 | super(groupId, childId); 45 | this.id = id; 46 | } 47 | 48 | public boolean checkWidget(Client client) 49 | { 50 | Widget widget = getWidget(client); 51 | if (widget == null) 52 | { 53 | return false; 54 | } 55 | return widget.getSpriteId() == id; 56 | } 57 | 58 | public void checkWidgetText(Client client) 59 | { 60 | hasPassed = hasPassed || checkWidget(client); 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/requirements/zone/PolyZone.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.requirements.zone; 2 | 3 | import net.runelite.api.coords.WorldPoint; 4 | 5 | import java.awt.geom.Path2D; 6 | import java.awt.geom.Point2D; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | public class PolyZone extends Zone 11 | { 12 | List perimeter = new ArrayList<>(); 13 | 14 | private int minPlane = 8; 15 | private int maxPlane = 0; 16 | 17 | int minX = Integer.MAX_VALUE; 18 | int minY = Integer.MAX_VALUE; 19 | 20 | //The first plane of the "Overworld" 21 | public PolyZone(List permiter) 22 | { 23 | // Check minimum z, check for max z 24 | for (WorldPoint p : permiter) 25 | { 26 | Point2D.Double pos = new Point2D.Double(); 27 | pos.x = p.getX(); 28 | pos.y = p.getY(); 29 | this.perimeter.add(pos); 30 | 31 | if (p.getPlane() > maxPlane) 32 | { 33 | maxPlane = p.getPlane(); 34 | } 35 | else if (p.getPlane() < minPlane) 36 | { 37 | minPlane = p.getPlane(); 38 | } 39 | 40 | if (p.getX() < minX) 41 | { 42 | minX = p.getX(); 43 | } 44 | if (p.getY() < minY) 45 | { 46 | minY = p.getY(); 47 | } 48 | } 49 | } 50 | 51 | public boolean contains(WorldPoint worldPoint) 52 | { 53 | Path2D.Double path = new Path2D.Double(); 54 | Point2D.Double firstVertex = perimeter.get(0); 55 | path.moveTo(firstVertex.x, firstVertex.y); 56 | 57 | for (int i = 1; i < perimeter.size(); i++) 58 | { 59 | Point2D.Double vertex = perimeter.get(i); 60 | path.lineTo(vertex.x, vertex.y); 61 | } 62 | 63 | path.closePath(); 64 | return path.contains(worldPoint.getX(), worldPoint.getY()); 65 | } 66 | 67 | public WorldPoint getMinWorldPoint() 68 | { 69 | 70 | return new WorldPoint(minX, minY, minPlane); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/rewards/ItemReward.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Kerpackie 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.rewards; 26 | 27 | import javax.annotation.Nonnull; 28 | 29 | public class ItemReward implements Reward 30 | { 31 | private final String name; 32 | private final int itemID; 33 | private final int quantity; 34 | 35 | public ItemReward(String name, int itemID, int quantity) 36 | { 37 | this.name = name; 38 | this.itemID = itemID; 39 | this.quantity = quantity; 40 | } 41 | 42 | public ItemReward(String name, int itemID) 43 | { 44 | this.name = name; 45 | this.itemID = itemID; 46 | this.quantity = 1; 47 | } 48 | 49 | public String getName() 50 | { 51 | return name; 52 | } 53 | 54 | @Nonnull 55 | @Override 56 | public RewardType rewardType() 57 | { 58 | return RewardType.ITEM; 59 | } 60 | 61 | @Nonnull 62 | @Override 63 | public String getDisplayText() 64 | { 65 | String text = ""; 66 | if (quantity > 1) 67 | { 68 | text = quantity + " x "; 69 | } 70 | text += getName(); 71 | return text; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/rewards/QuestPointReward.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.rewards; 26 | 27 | import lombok.Getter; 28 | 29 | import javax.annotation.Nonnull; 30 | 31 | public class QuestPointReward implements Reward 32 | { 33 | @Getter 34 | private final int points; 35 | 36 | public QuestPointReward(int points) 37 | { 38 | this.points = points; 39 | } 40 | 41 | @Nonnull 42 | @Override 43 | public RewardType rewardType() 44 | { 45 | return RewardType.QUEST_POINT; 46 | } 47 | 48 | @Nonnull 49 | @Override 50 | public String getDisplayText() 51 | { 52 | if (points == 1) 53 | { 54 | return points + " Quest Point"; 55 | } 56 | else 57 | { 58 | return points + " Quest Points"; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/rewards/Reward.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.rewards; 26 | 27 | import javax.annotation.Nonnull; 28 | 29 | public interface Reward 30 | { 31 | @Nonnull 32 | RewardType rewardType(); 33 | 34 | @Nonnull 35 | String getDisplayText(); 36 | } -------------------------------------------------------------------------------- /src/main/java/com/questhelper/rewards/RewardType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.rewards; 26 | 27 | public enum RewardType 28 | { 29 | EXPERIENCE, 30 | UNLOCK, 31 | QUEST_POINT, 32 | ITEM 33 | } -------------------------------------------------------------------------------- /src/main/java/com/questhelper/rewards/UnlockReward.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.rewards; 26 | 27 | import javax.annotation.Nonnull; 28 | 29 | public class UnlockReward implements Reward 30 | { 31 | private final String unlock; 32 | 33 | public UnlockReward(String unlock) 34 | { 35 | this.unlock = unlock; 36 | } 37 | 38 | @Nonnull 39 | @Override 40 | public RewardType rewardType() 41 | { 42 | return RewardType.UNLOCK; 43 | } 44 | 45 | @Nonnull 46 | @Override 47 | public String getDisplayText() 48 | { 49 | return unlock; 50 | } 51 | } -------------------------------------------------------------------------------- /src/main/java/com/questhelper/runeliteobjects/RuneliteConfigSetter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.runeliteobjects; 26 | 27 | import com.questhelper.QuestHelperConfig; 28 | import lombok.Getter; 29 | import net.runelite.client.config.ConfigManager; 30 | 31 | public class RuneliteConfigSetter 32 | { 33 | @Getter 34 | protected final String CONFIG_GROUP = QuestHelperConfig.QUEST_BACKGROUND_GROUP; 35 | 36 | protected final String runeliteIdentifier; 37 | 38 | @Getter 39 | protected final String setValue; 40 | protected final ConfigManager configManager; 41 | 42 | 43 | public RuneliteConfigSetter(ConfigManager configManager, String id, String setValue) 44 | { 45 | this.configManager = configManager; 46 | this.runeliteIdentifier = id; 47 | this.setValue = setValue; 48 | } 49 | 50 | public String getConfigValue() 51 | { 52 | return configManager.getRSProfileConfiguration(CONFIG_GROUP, runeliteIdentifier); 53 | } 54 | 55 | public void setConfigValue() 56 | { 57 | configManager.setRSProfileConfiguration(CONFIG_GROUP, runeliteIdentifier, setValue); 58 | } 59 | 60 | public boolean configExists() 61 | { 62 | return configManager.getRSProfileConfiguration(CONFIG_GROUP, runeliteIdentifier) != null; 63 | } 64 | } 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/runeliteobjects/extendedruneliteobjects/ExtendedRuneliteObjects.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.runeliteobjects.extendedruneliteobjects; 2 | 3 | import lombok.Getter; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | // A group of RuneliteNpcs, which are used as a group in RuneliteObjectManager 9 | public class ExtendedRuneliteObjects 10 | { 11 | @Getter 12 | private final String groupName; 13 | 14 | @Getter 15 | List extendedRuneliteObjects = new ArrayList<>(); 16 | 17 | List subGroups = new ArrayList<>(); 18 | 19 | public ExtendedRuneliteObjects(String groupName) 20 | { 21 | this.groupName = groupName; 22 | } 23 | 24 | public ExtendedRuneliteObjects(String groupName, ExtendedRuneliteObject npc) 25 | { 26 | this.groupName = groupName; 27 | this.extendedRuneliteObjects.add(npc); 28 | } 29 | 30 | public ExtendedRuneliteObjects(String groupName, List extendedRuneliteObjects) 31 | { 32 | this.groupName = groupName; 33 | this.extendedRuneliteObjects.addAll(extendedRuneliteObjects); 34 | } 35 | 36 | public void addExtendedRuneliteObject(ExtendedRuneliteObject npc) 37 | { 38 | extendedRuneliteObjects.add(npc); 39 | } 40 | 41 | public void addSubGroup(ExtendedRuneliteObjects subgroup) 42 | { 43 | subGroups.add(subgroup); 44 | } 45 | 46 | public void remove(ExtendedRuneliteObject npc) 47 | { 48 | extendedRuneliteObjects.remove(npc); 49 | } 50 | 51 | public void removeAll(RuneliteObjectManager runeliteObjectManager) 52 | { 53 | disableAll(runeliteObjectManager); 54 | extendedRuneliteObjects.clear(); 55 | } 56 | 57 | public void disableAll(RuneliteObjectManager runeliteObjectManager) 58 | { 59 | for (ExtendedRuneliteObject npc : extendedRuneliteObjects) 60 | { 61 | npc.disable(); 62 | } 63 | } 64 | 65 | public void disableAllIncludingSubgroups(RuneliteObjectManager runeliteObjectManager) 66 | { 67 | disableAll(runeliteObjectManager); 68 | // Remove all associated groups 69 | for (ExtendedRuneliteObjects subGroup : subGroups) 70 | { 71 | runeliteObjectManager.removeGroup(subGroup.getGroupName()); 72 | } 73 | } 74 | 75 | public void removeAllIncludingSubgroups(RuneliteObjectManager runeliteObjectManager) 76 | { 77 | disableAllIncludingSubgroups(runeliteObjectManager); 78 | // Remove all associated groups 79 | for (ExtendedRuneliteObjects subGroup : subGroups) 80 | { 81 | runeliteObjectManager.removeGroupAndSubgroups(subGroup.getGroupName()); 82 | } 83 | extendedRuneliteObjects.clear(); 84 | subGroups.clear(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/runeliteobjects/extendedruneliteobjects/FaceAnimationIDs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.runeliteobjects.extendedruneliteobjects; 26 | 27 | import lombok.AllArgsConstructor; 28 | import lombok.Getter; 29 | 30 | @AllArgsConstructor 31 | public enum FaceAnimationIDs 32 | { 33 | NORMAL(554), 34 | FRIENDLY(567), 35 | YES(568), 36 | QUIZZICAL(569), 37 | CHATTY(570), 38 | QUESTIONING(575), 39 | FRIENDLY_QUESTIONING(588), 40 | FRIENDLY_2(589), 41 | SHORT_LAUGH(605), 42 | LAUGHING(606), 43 | BIG_LAUGH(607), 44 | SAD(610), 45 | WORRIED_SAD(612), 46 | ANNOYED(614), 47 | ANNOYED_2(615); 48 | @Getter 49 | private final int animationID; 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/runeliteobjects/extendedruneliteobjects/FakeObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.runeliteobjects.extendedruneliteobjects; 26 | 27 | import net.runelite.api.Client; 28 | import net.runelite.api.coords.WorldPoint; 29 | import net.runelite.client.callback.ClientThread; 30 | 31 | public class FakeObject extends ExtendedRuneliteObject 32 | { 33 | protected FakeObject(Client client, ClientThread clientThread, WorldPoint worldPoint, int[] model, int animation) 34 | { 35 | super(client, clientThread, worldPoint, model, animation); 36 | objectType = RuneliteObjectTypes.OBJECT; 37 | nameColor = "00FFFF"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/runeliteobjects/extendedruneliteobjects/MenuEntryWrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.runeliteobjects.extendedruneliteobjects; 26 | 27 | import lombok.Getter; 28 | import net.runelite.api.MenuAction; 29 | 30 | @Getter 31 | public class MenuEntryWrapper 32 | { 33 | String option; 34 | MenuAction type; 35 | String target; 36 | int identifier; 37 | int param0; 38 | int param1; 39 | 40 | public MenuEntryWrapper(String option, MenuAction type, String target, int identifier, int param0, int param1) 41 | { 42 | this.option = option; 43 | this.type = type; 44 | this.target = target; 45 | this.identifier = identifier; 46 | this.param0 = param0; 47 | this.param1 = param1; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/runeliteobjects/extendedruneliteobjects/NpcChatBox.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * Copyright (c) 2018 Abex 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | package com.questhelper.runeliteobjects.extendedruneliteobjects; 27 | 28 | import net.runelite.api.Client; 29 | import net.runelite.client.game.chatbox.ChatboxPanelManager; 30 | 31 | public class NpcChatBox extends ChatBox 32 | { 33 | protected NpcChatBox(Client client, ChatboxPanelManager chatboxPanelManager) 34 | { 35 | super(client, chatboxPanelManager); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/runeliteobjects/extendedruneliteobjects/ReplacedObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.runeliteobjects.extendedruneliteobjects; 26 | 27 | import lombok.AllArgsConstructor; 28 | import lombok.Getter; 29 | import net.runelite.api.coords.WorldPoint; 30 | 31 | @AllArgsConstructor 32 | public class ReplacedObject 33 | { 34 | @Getter 35 | private int objectID; 36 | 37 | @Getter 38 | private WorldPoint wp; 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/runeliteobjects/extendedruneliteobjects/RuneliteObjectTypes.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.runeliteobjects.extendedruneliteobjects; 2 | 3 | public enum RuneliteObjectTypes 4 | { 5 | UNDEFINED(), 6 | OBJECT(), 7 | NPC(), 8 | GRAPHICS_OBJECT(), 9 | ITEM(); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/runeliteobjects/extendedruneliteobjects/WidgetReplacement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.runeliteobjects.extendedruneliteobjects; 26 | 27 | import com.questhelper.steps.widget.WidgetDetails; 28 | import lombok.Getter; 29 | 30 | public class WidgetReplacement 31 | { 32 | @Getter 33 | private final WidgetDetails widgetDetails; 34 | @Getter 35 | private final String textToReplace; 36 | @Getter 37 | private final String replacementText; 38 | 39 | // Requirement requirement; 40 | 41 | public WidgetReplacement(WidgetDetails widgetDetails, String textToReplace, String replacementText) 42 | { 43 | this.widgetDetails = widgetDetails; 44 | this.textToReplace = textToReplace; 45 | this.replacementText = replacementText; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/runeliteobjects/extendedruneliteobjects/actions/Action.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.runeliteobjects.extendedruneliteobjects.actions; 26 | 27 | import lombok.Getter; 28 | import net.runelite.api.MenuEntry; 29 | 30 | import java.util.function.Consumer; 31 | 32 | public class Action 33 | { 34 | protected Consumer action; 35 | 36 | protected boolean isActive = false; 37 | 38 | @Getter 39 | MenuEntry menuEntry; 40 | 41 | public Action(Consumer action) 42 | { 43 | this.action = action.andThen(createEndAction()); 44 | } 45 | 46 | protected Consumer createEndAction() 47 | { 48 | return (menuEntry -> { 49 | isActive = false; 50 | }); 51 | } 52 | 53 | public void activate(MenuEntry menuEntry) 54 | { 55 | isActive = true; 56 | this.menuEntry = menuEntry; 57 | action.accept(menuEntry); 58 | } 59 | 60 | public void activate() 61 | { 62 | isActive = true; 63 | this.menuEntry = null; 64 | action.accept(null); 65 | } 66 | 67 | public void deactivate() 68 | { 69 | this.menuEntry = null; 70 | isActive = false; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/runeliteobjects/extendedruneliteobjects/actions/LoopedAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.runeliteobjects.extendedruneliteobjects.actions; 26 | 27 | import lombok.Getter; 28 | import net.runelite.api.MenuEntry; 29 | 30 | import java.util.concurrent.atomic.AtomicInteger; 31 | import java.util.function.Consumer; 32 | 33 | public class LoopedAction extends Action 34 | { 35 | @Getter 36 | AtomicInteger ticksBetweenActions; 37 | 38 | 39 | public LoopedAction(Consumer action, AtomicInteger ticksBetweenActions) 40 | { 41 | super(action); 42 | this.ticksBetweenActions = ticksBetweenActions; 43 | } 44 | 45 | @Override 46 | protected Consumer createEndAction() 47 | { 48 | return (menuEntry -> { 49 | }); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/ItemStep.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.steps; 2 | 3 | import com.questhelper.questhelpers.QuestHelper; 4 | import com.questhelper.requirements.Requirement; 5 | import com.questhelper.steps.overlay.DirectionArrow; 6 | import net.runelite.api.Perspective; 7 | import net.runelite.api.coords.LocalPoint; 8 | import net.runelite.api.coords.WorldPoint; 9 | 10 | import java.awt.*; 11 | 12 | public class ItemStep extends DetailedQuestStep 13 | { 14 | 15 | 16 | public ItemStep(QuestHelper questHelper, WorldPoint worldPoint, String text, Requirement... requirements) 17 | { 18 | super(questHelper, worldPoint, text, requirements); 19 | } 20 | 21 | public ItemStep(QuestHelper questHelper, String text, Requirement... requirements) 22 | { 23 | super(questHelper, text, requirements); 24 | } 25 | 26 | @Override 27 | public void renderArrow(Graphics2D graphics) 28 | { 29 | tileHighlights.forEach((tile, ids) -> { 30 | LocalPoint lp = tile.getLocalLocation(); 31 | 32 | Polygon poly = Perspective.getCanvasTilePoly(client, lp, 30); 33 | if (poly == null || poly.getBounds() == null) 34 | { 35 | return; 36 | } 37 | 38 | int startX = poly.getBounds().x + (poly.getBounds().width / 2); 39 | int startY = poly.getBounds().y + (poly.getBounds().height / 2); 40 | 41 | DirectionArrow.drawWorldArrow(graphics, questHelper.getConfig().targetOverlayColor(), startX, startY); 42 | }); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/NpcFollowerStep.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.steps; 26 | 27 | import com.questhelper.questhelpers.QuestHelper; 28 | import com.questhelper.requirements.Requirement; 29 | import net.runelite.api.NPC; 30 | 31 | public class NpcFollowerStep extends NpcStep 32 | { 33 | public NpcFollowerStep(QuestHelper questHelper, int npcID, String text, Requirement... requirements) 34 | { 35 | super(questHelper, npcID, text, requirements); 36 | } 37 | 38 | @Override 39 | protected boolean npcPassesChecks(NPC npc) 40 | { 41 | boolean passesBaseCheck = super.npcPassesChecks(npc); 42 | if (!passesBaseCheck) 43 | { 44 | return false; 45 | } 46 | 47 | int followerVarp = client.getVarpValue(447); 48 | int followerID = followerVarp & 0x0000FFFF; 49 | return followerID == npc.getIndex(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/OwnerStep.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, Tomas Slusny 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.steps; 26 | 27 | import java.util.Collection; 28 | 29 | public interface OwnerStep 30 | { 31 | Collection getSteps(); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/PuzzleStep.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.steps; 2 | 3 | import com.questhelper.QuestHelperPlugin; 4 | import com.questhelper.questhelpers.QuestHelper; 5 | import com.questhelper.requirements.Requirement; 6 | import com.questhelper.steps.widget.WidgetDetails; 7 | import net.runelite.api.events.GameTick; 8 | import net.runelite.api.widgets.Widget; 9 | import net.runelite.client.eventbus.Subscribe; 10 | 11 | import java.awt.*; 12 | import java.util.HashSet; 13 | public class PuzzleStep extends DetailedQuestStep 14 | { 15 | 16 | ButtonHighlighCalculator highlightCalculator; 17 | private HashSet highlightedButtons = new HashSet<>(); 18 | 19 | public PuzzleStep(QuestHelper questHelper, ButtonHighlighCalculator highlightCalculator, Requirement... requirements) 20 | { 21 | this(questHelper, "Click the highlighted buttons to complete the puzzle", highlightCalculator, requirements); 22 | } 23 | 24 | public PuzzleStep(QuestHelper questHelper, String text, ButtonHighlighCalculator highlightCalculator, Requirement... requirements) 25 | { 26 | super(questHelper, text, requirements); 27 | this.highlightCalculator = highlightCalculator; 28 | } 29 | 30 | @Override 31 | public void startUp() 32 | { 33 | this.highlightedButtons = highlightCalculator.getHighlightedButtons(); 34 | } 35 | 36 | @Subscribe 37 | public void onGameTick(GameTick event) 38 | { 39 | super.onGameTick(event); 40 | this.highlightedButtons = highlightCalculator.getHighlightedButtons(); 41 | } 42 | 43 | @Override 44 | public void makeWidgetOverlayHint(Graphics2D graphics, QuestHelperPlugin plugin) 45 | { 46 | super.makeWidgetOverlayHint(graphics, plugin); 47 | for (WidgetDetails button : highlightedButtons) 48 | { 49 | if (button == null) 50 | { 51 | continue; 52 | } 53 | 54 | Widget widget = client.getWidget(button.getGroupID(), button.getChildID()); 55 | if (widget != null) 56 | { 57 | graphics.setColor(new Color(questHelper.getConfig().targetOverlayColor().getRed(), 58 | questHelper.getConfig().targetOverlayColor().getGreen(), 59 | questHelper.getConfig().targetOverlayColor().getBlue(), 65)); 60 | graphics.fill(widget.getBounds()); 61 | graphics.setColor(questHelper.getConfig().targetOverlayColor()); 62 | graphics.draw(widget.getBounds()); 63 | } 64 | 65 | } 66 | } 67 | 68 | public interface ButtonHighlighCalculator 69 | { 70 | HashSet getHighlightedButtons(); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/TileStep.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.steps; 2 | 3 | import com.questhelper.QuestHelperPlugin; 4 | import com.questhelper.questhelpers.QuestHelper; 5 | import com.questhelper.requirements.Requirement; 6 | import net.runelite.api.Perspective; 7 | import net.runelite.api.coords.LocalPoint; 8 | import net.runelite.api.coords.WorldPoint; 9 | import net.runelite.client.ui.overlay.OverlayUtil; 10 | 11 | import java.awt.*; 12 | 13 | public class TileStep extends DetailedQuestStep 14 | { 15 | public TileStep(QuestHelper questHelper, WorldPoint worldPoint, String text, Requirement... requirements) 16 | { 17 | super(questHelper, text, requirements); 18 | this.worldPoint = worldPoint; 19 | } 20 | 21 | @Override 22 | public void makeWorldOverlayHint(Graphics2D graphics, QuestHelperPlugin plugin) 23 | { 24 | super.makeWorldOverlayHint(graphics, plugin); 25 | 26 | LocalPoint lp = LocalPoint.fromWorld(client, worldPoint); 27 | if (lp == null) 28 | { 29 | return; 30 | } 31 | 32 | Polygon poly = Perspective.getCanvasTilePoly(client, lp); 33 | if (poly == null) 34 | { 35 | return; 36 | } 37 | 38 | OverlayUtil.renderPolygon(graphics, poly, questHelper.getConfig().targetOverlayColor()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/choice/DialogChoiceChange.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.steps.choice; 26 | 27 | import com.questhelper.QuestHelperConfig; 28 | import net.runelite.api.widgets.Widget; 29 | 30 | public class DialogChoiceChange extends DialogChoiceStep 31 | { 32 | private final String textChange; 33 | 34 | public DialogChoiceChange(QuestHelperConfig config, String choice, String textChange) 35 | { 36 | super(config, choice); 37 | this.textChange = textChange; 38 | } 39 | 40 | @Override 41 | protected void highlightText(Widget text, int option) 42 | { 43 | if (!config.showTextHighlight()) 44 | { 45 | return; 46 | } 47 | if (shouldNumber) 48 | { 49 | text.setText("[" + option + "] " + textChange); 50 | } 51 | else 52 | { 53 | text.setText(textChange); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/choice/DialogChoiceStep.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.steps.choice; 2 | 3 | import com.questhelper.QuestHelperConfig; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | 7 | import java.util.regex.Pattern; 8 | 9 | public class DialogChoiceStep extends WidgetChoiceStep 10 | { 11 | @Setter 12 | @Getter 13 | protected String expectedPreviousLine; 14 | 15 | public DialogChoiceStep(QuestHelperConfig config, String choice) 16 | { 17 | super(config, choice, 219, 1); 18 | shouldNumber = true; 19 | } 20 | 21 | public DialogChoiceStep(QuestHelperConfig config, Pattern pattern) 22 | { 23 | super(config, pattern, 219, 1); 24 | shouldNumber = true; 25 | } 26 | 27 | public DialogChoiceStep(QuestHelperConfig config, int choiceId, String choice) 28 | { 29 | super(config, choiceId, choice, 219, 1); 30 | shouldNumber = true; 31 | } 32 | 33 | public DialogChoiceStep(QuestHelperConfig config, int choiceId, Pattern pattern) 34 | { 35 | super(config, choiceId, pattern, 219, 1); 36 | shouldNumber = true; 37 | } 38 | 39 | public DialogChoiceStep(QuestHelperConfig config, int choice) 40 | { 41 | super(config, choice, 219, 1); 42 | shouldNumber = true; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/choice/WidgetChoiceSteps.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.steps.choice; 26 | 27 | import lombok.Getter; 28 | import net.runelite.api.Client; 29 | 30 | import java.util.ArrayList; 31 | import java.util.Collections; 32 | 33 | public class WidgetChoiceSteps 34 | { 35 | @Getter 36 | final private ArrayList choices = new ArrayList<>(); 37 | 38 | public WidgetChoiceSteps(WidgetChoiceStep... choices) 39 | { 40 | Collections.addAll(this.choices, choices); 41 | } 42 | 43 | public void addChoice(WidgetChoiceStep choice) 44 | { 45 | choices.add(choice); 46 | } 47 | 48 | public void checkChoices(Client client) 49 | { 50 | if (choices.size() == 0) 51 | { 52 | return; 53 | } 54 | 55 | for (WidgetChoiceStep currentChoice : choices) 56 | { 57 | currentChoice.highlightChoice(client); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/emote/QuestEmote.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.steps.emote; 26 | 27 | import lombok.Getter; 28 | 29 | import static net.runelite.api.SpriteID.*; 30 | 31 | @Getter 32 | public enum QuestEmote 33 | { 34 | SKILL_CAPE("Skill Cape", EMOTE_SKILLCAPE), 35 | FLEX("Flex", 2426), 36 | CLAP("Clap", EMOTE_CLAP), 37 | CRY("Cry", EMOTE_CRY), 38 | BOW("Bow", EMOTE_BOW), 39 | DANCE("Dance", EMOTE_DANCE), 40 | WAVE("Wave", EMOTE_WAVE), 41 | THINK("Think", EMOTE_THINK), 42 | GOBLIN_BOW("Goblin bow", EMOTE_GOBLIN_BOW), 43 | BLOW_KISS("Blow Kiss", EMOTE_BLOW_KISS), 44 | IDEA("Idea", 732), 45 | STAMP("Stamp", 730), 46 | FLAP("Flap", 731), 47 | SLAP_HEAD("Slap Head", 729), 48 | SPIN("Spin", EMOTE_SPIN); 49 | 50 | private String name; 51 | private int spriteId; 52 | 53 | QuestEmote(String name, int spriteId) 54 | { 55 | this.name = name; 56 | this.spriteId = spriteId; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/widget/AbstractWidgetHighlight.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.steps.widget; 26 | 27 | import com.questhelper.QuestHelperPlugin; 28 | import net.runelite.api.Client; 29 | import net.runelite.api.widgets.Widget; 30 | 31 | import java.awt.*; 32 | 33 | public abstract class AbstractWidgetHighlight 34 | { 35 | public abstract void highlightChoices(Graphics2D graphics, Client client, QuestHelperPlugin questHelper); 36 | 37 | protected void highlightWidget(Graphics2D graphics, QuestHelperPlugin questHelper, Widget widgetToHighlight) 38 | { 39 | if (widgetToHighlight == null) { 40 | return; 41 | } 42 | 43 | graphics.setColor(new Color(questHelper.getConfig().targetOverlayColor().getRed(), 44 | questHelper.getConfig().targetOverlayColor().getGreen(), 45 | questHelper.getConfig().targetOverlayColor().getBlue(), 65)); 46 | graphics.fill(widgetToHighlight.getBounds()); 47 | graphics.setColor(questHelper.getConfig().targetOverlayColor()); 48 | graphics.draw(widgetToHighlight.getBounds()); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/widget/Spell.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | package com.questhelper.steps.widget; 27 | 28 | public interface Spell 29 | { 30 | String getSpellName(); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/steps/widget/WidgetDetails.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.steps.widget; 26 | 27 | import com.questhelper.util.Utils; 28 | import lombok.AllArgsConstructor; 29 | import lombok.Value; 30 | import net.runelite.api.annotations.Component; 31 | 32 | @Value 33 | @AllArgsConstructor 34 | public class WidgetDetails 35 | { 36 | public int groupID; 37 | public int childID; 38 | public int childChildID; 39 | 40 | public WidgetDetails(int groupID, int childID) 41 | { 42 | this.groupID = groupID; 43 | this.childID = childID; 44 | this.childChildID = -1; 45 | } 46 | 47 | public WidgetDetails(@Component int componentId) 48 | { 49 | var pair = Utils.unpackWidget(componentId); 50 | groupID = pair.getLeft(); 51 | childID = pair.getRight(); 52 | childChildID = -1; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/tools/QuestTile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.tools; 26 | 27 | import lombok.Getter; 28 | import net.runelite.api.SpriteID; 29 | import net.runelite.api.coords.WorldPoint; 30 | 31 | public class QuestTile 32 | { 33 | @Getter 34 | private final WorldPoint worldPoint; 35 | @Getter 36 | private final int iconID; 37 | 38 | public QuestTile(WorldPoint worldPoint) 39 | { 40 | this.worldPoint = worldPoint; 41 | this.iconID = SpriteID.QUESTS_PAGE_ICON_BLUE_QUESTS; 42 | } 43 | 44 | public QuestTile(WorldPoint worldPoint, int iconID) 45 | { 46 | this.worldPoint = worldPoint; 47 | this.iconID = iconID; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/tools/QuestWidgets.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Adam 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.tools; 26 | 27 | public enum QuestWidgets 28 | { 29 | QUESTLIST_SCROLLBAR(399, 5), 30 | QUESTLIST_CONTAINER(399, 6), 31 | QUEST_CONTAINER(399, 7); 32 | 33 | private final int groupId; 34 | private final int childId; 35 | 36 | QuestWidgets(int groupId, int childId) 37 | { 38 | this.groupId = groupId; 39 | this.childId = childId; 40 | } 41 | 42 | public int getId() 43 | { 44 | return groupId << 16 | childId; 45 | } 46 | 47 | /** 48 | * Gets the group ID of the pair. 49 | * 50 | * @return the group ID 51 | */ 52 | public int getGroupId() 53 | { 54 | return groupId; 55 | } 56 | 57 | /** 58 | * Gets the ID of the child in the group. 59 | * 60 | * @return the child ID 61 | */ 62 | public int getChildId() 63 | { 64 | return childId; 65 | } 66 | 67 | /** 68 | * Gets the packed widget ID. 69 | * 70 | * @return the packed ID 71 | */ 72 | public int getPackedId() 73 | { 74 | return groupId << 16 | childId; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/util/Fonts.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, pajlada 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.util; 26 | 27 | import com.questhelper.panel.JGenerator; 28 | import lombok.Getter; 29 | 30 | import java.awt.*; 31 | import java.awt.font.TextAttribute; 32 | import java.util.HashMap; 33 | 34 | public class Fonts 35 | { 36 | @Getter 37 | private static final Font originalFont; 38 | @Getter 39 | private static final Font underlinedFont; 40 | 41 | static 42 | { 43 | var label = JGenerator.makeJTextArea(); 44 | originalFont = label.getFont(); 45 | var attributes = new HashMap(originalFont.getAttributes()); 46 | attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); 47 | underlinedFont = originalFont.deriveFont(attributes); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/util/QHObjectID.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025, Zoinkwiz 3 | * Copyright (c) 2025, pajlada 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | package com.questhelper.util; 27 | 28 | import net.runelite.api.gameval.ObjectID; 29 | 30 | public class QHObjectID 31 | { 32 | /** 33 | * Ladder used at the bottom floor of the Grand Tree in the Tree Gnome Stronghold 34 | */ 35 | public static final int GRAND_TREE_F0_LADDER = ObjectID.GRANDTREE_LADDERBOTTOM; 36 | /** 37 | * Ladder used at the first floor of the Grand Tree in the Tree Gnome Stronghold 38 | */ 39 | public static final int GRAND_TREE_F1_LADDER = ObjectID.GRANDTREE_LADDERMIDDLE_BOTTOM; 40 | /** 41 | * Ladder used at the second floor of the Grand Tree in the Tree Gnome Stronghold 42 | */ 43 | public static final int GRAND_TREE_F2_LADDER = ObjectID.GRANDTREE_LADDERMIDDLE_TOP; 44 | /** 45 | * Ladder used at the top floor of the Grand Tree in the Tree Gnome Stronghold 46 | */ 47 | public static final int GRAND_TREE_F3_LADDER = ObjectID.GRANDTREE_LADDERTOP; 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/util/worldmap/WorldMapAreaChanged.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.util.worldmap; 26 | 27 | import lombok.Value; 28 | @Value 29 | public class WorldMapAreaChanged 30 | { 31 | WorldMapArea worldMapArea; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /src/main/java/com/questhelper/util/worldmap/WorldPointWithWorldMapArea.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Zoinkwiz 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | package com.questhelper.util.worldmap; 26 | 27 | import lombok.Value; 28 | import net.runelite.api.coords.WorldPoint; 29 | 30 | /** 31 | * This class is useful for dealing with the world map, where the viewed area is relevant to the placement of a {@link WorldPoint}. 32 | */ 33 | @Value 34 | public class WorldPointWithWorldMapArea 35 | { 36 | WorldPoint worldPoint; 37 | 38 | WorldMapArea worldMapArea; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /src/main/resources/blueHitsplat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/blueHitsplat.png -------------------------------------------------------------------------------- /src/main/resources/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/close.png -------------------------------------------------------------------------------- /src/main/resources/collapsed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/collapsed.png -------------------------------------------------------------------------------- /src/main/resources/discord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/discord.png -------------------------------------------------------------------------------- /src/main/resources/expanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/expanded.png -------------------------------------------------------------------------------- /src/main/resources/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/github.png -------------------------------------------------------------------------------- /src/main/resources/icon_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/icon_background.png -------------------------------------------------------------------------------- /src/main/resources/info_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/info_icon.png -------------------------------------------------------------------------------- /src/main/resources/maxHitsplat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/maxHitsplat.png -------------------------------------------------------------------------------- /src/main/resources/patreon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/patreon.png -------------------------------------------------------------------------------- /src/main/resources/quest_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/quest_icon.png -------------------------------------------------------------------------------- /src/main/resources/quest_step_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/quest_step_arrow.png -------------------------------------------------------------------------------- /src/main/resources/quest_step_arrow_135.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/quest_step_arrow_135.png -------------------------------------------------------------------------------- /src/main/resources/quest_step_arrow_180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/quest_step_arrow_180.png -------------------------------------------------------------------------------- /src/main/resources/quest_step_arrow_225.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/quest_step_arrow_225.png -------------------------------------------------------------------------------- /src/main/resources/quest_step_arrow_270.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/quest_step_arrow_270.png -------------------------------------------------------------------------------- /src/main/resources/quest_step_arrow_315.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/quest_step_arrow_315.png -------------------------------------------------------------------------------- /src/main/resources/quest_step_arrow_45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/quest_step_arrow_45.png -------------------------------------------------------------------------------- /src/main/resources/quest_step_arrow_90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/quest_step_arrow_90.png -------------------------------------------------------------------------------- /src/main/resources/redHitsplat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/redHitsplat.png -------------------------------------------------------------------------------- /src/main/resources/settings_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/settings_icon.png -------------------------------------------------------------------------------- /src/main/resources/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zoinkwiz/quest-helper/91299c6bec29664e34a468f9c2bc818df23ce7c2/src/main/resources/start.png -------------------------------------------------------------------------------- /src/test/java/com/questhelper/MockedTestBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, pajlada 3 | * Copyright (c) 2023, pajlads 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 19 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | package com.questhelper; 27 | 28 | import com.google.inject.Guice; 29 | import com.google.inject.Injector; 30 | import com.google.inject.testing.fieldbinder.BoundFieldModule; 31 | import org.junit.jupiter.api.AfterEach; 32 | import org.junit.jupiter.api.BeforeEach; 33 | import org.mockito.MockitoAnnotations; 34 | 35 | /** 36 | * Based on Dink's MockedTestBase 37 | */ 38 | public abstract class MockedTestBase 39 | { 40 | protected Injector injector; 41 | private AutoCloseable mocks; 42 | 43 | @BeforeEach 44 | protected void setUp() 45 | { 46 | this.mocks = MockitoAnnotations.openMocks(this); 47 | this.injector = Guice.createInjector(BoundFieldModule.of(this)); 48 | this.injector.injectMembers(this); 49 | } 50 | 51 | @AfterEach 52 | protected void cleanUp() throws Exception 53 | { 54 | mocks.close(); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/test/java/com/questhelper/QuestHelperPluginTest.java: -------------------------------------------------------------------------------- 1 | package com.questhelper; 2 | 3 | import net.runelite.client.RuneLite; 4 | import net.runelite.client.externalplugins.ExternalPluginManager; 5 | 6 | public class QuestHelperPluginTest 7 | { 8 | public static void main(String[] args) throws Exception 9 | { 10 | ExternalPluginManager.loadBuiltin(QuestHelperPlugin.class); 11 | RuneLite.main(args); 12 | } 13 | } -------------------------------------------------------------------------------- /src/test/java/com/questhelper/helpers/quests/thefremennikisles/TheFremennikIslesTest.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.helpers.quests.thefremennikisles; 2 | 3 | import com.questhelper.MockedTest; 4 | import com.questhelper.domain.AccountType; 5 | import net.runelite.api.Skill; 6 | import org.junit.jupiter.api.Test; 7 | 8 | import static org.junit.jupiter.api.Assertions.assertFalse; 9 | import static org.junit.jupiter.api.Assertions.assertTrue; 10 | import static org.mockito.Mockito.when; 11 | 12 | public class TheFremennikIslesTest extends MockedTest 13 | { 14 | @Test 15 | void ensureMiningSkillCheckWorks() 16 | { 17 | when(playerStateManager.getAccountType()).thenReturn(AccountType.NORMAL); 18 | var helper = new TheFremennikIsles(); 19 | this.injector.injectMembers(helper); 20 | helper.setQuestHelperPlugin(questHelperPlugin); 21 | helper.initializeRequirements(); 22 | 23 | when(client.getRealSkillLevel(Skill.MINING)).thenReturn(1); 24 | assertTrue(helper.tinOre.shouldDisplayText(this.client), "Only Tin ore should display when lvl 1 mining"); 25 | assertFalse(helper.coal.shouldDisplayText(this.client), "Only Tin ore should display when lvl 1 mining"); 26 | assertFalse(helper.mithrilOre.shouldDisplayText(this.client), "Only Tin ore should display when lvl 1 mining"); 27 | 28 | when(client.getRealSkillLevel(Skill.MINING)).thenReturn(10); 29 | assertFalse(helper.tinOre.shouldDisplayText(this.client), "Only Coal should display when lvl 10 mining"); 30 | assertTrue(helper.coal.shouldDisplayText(this.client), "Only Coal should display when lvl 10 mining"); 31 | assertFalse(helper.mithrilOre.shouldDisplayText(this.client), "Only Coal should display when lvl 10 mining"); 32 | 33 | when(client.getRealSkillLevel(Skill.MINING)).thenReturn(55); 34 | assertFalse(helper.tinOre.shouldDisplayText(this.client), "Only Mithril ore should display when lvl 55 mining"); 35 | assertFalse(helper.coal.shouldDisplayText(this.client), "Only Mithril ore should display when lvl 55 mining"); 36 | assertTrue(helper.mithrilOre.shouldDisplayText(this.client), "Only Mithril ore should display when lvl 55 mining"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/test/java/com/questhelper/requirements/player/SkillRequirementTest.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.requirements.player; 2 | 3 | import com.questhelper.MockedTest; 4 | import net.runelite.api.Skill; 5 | import org.junit.jupiter.api.Test; 6 | 7 | import static org.junit.jupiter.api.Assertions.*; 8 | import static org.mockito.Mockito.when; 9 | 10 | public class SkillRequirementTest extends MockedTest 11 | { 12 | void initFishing(int realLevel, int boostedLevel) { 13 | when(client.getRealSkillLevel(Skill.FISHING)).thenReturn(realLevel); 14 | when(client.getBoostedSkillLevel(Skill.FISHING)).thenReturn(boostedLevel); 15 | } 16 | 17 | @Test 18 | void unboostable() { 19 | var req = new SkillRequirement(Skill.FISHING, 60); 20 | 21 | initFishing(60, 60); 22 | assertEquals(SkillRequirement.BoostStatus.Pass, req.checkBoosted(client, questHelperConfig)); 23 | assertTrue(req.check(client)); 24 | 25 | // User has temporarily lost some stats 26 | initFishing(60, 59); 27 | assertEquals(SkillRequirement.BoostStatus.Pass, req.checkBoosted(client, questHelperConfig)); 28 | assertTrue(req.check(client)); 29 | 30 | initFishing(59, 59); 31 | assertEquals(SkillRequirement.BoostStatus.Fail, req.checkBoosted(client, questHelperConfig)); 32 | assertFalse(req.check(client)); 33 | 34 | // User has boosted, but this requirement doesn't allow boosting 35 | initFishing(59, 61); 36 | assertEquals(SkillRequirement.BoostStatus.Fail, req.checkBoosted(client, questHelperConfig)); 37 | assertFalse(req.check(client)); 38 | } 39 | 40 | @Test 41 | void boostable() { 42 | var req = new SkillRequirement(Skill.FISHING, 60, true); 43 | 44 | // User is outside of boost range 45 | initFishing(54, 54); 46 | assertEquals(SkillRequirement.BoostStatus.Fail, req.checkBoosted(client, questHelperConfig)); 47 | 48 | // User is outside of boost range 49 | initFishing(54, 59); 50 | assertEquals(SkillRequirement.BoostStatus.Fail, req.checkBoosted(client, questHelperConfig)); 51 | 52 | // User can boost 53 | initFishing(57, 57); 54 | assertEquals(SkillRequirement.BoostStatus.CanPassWithBoost, req.checkBoosted(client, questHelperConfig)); 55 | 56 | // User has already boosted 57 | initFishing(57, 62); 58 | assertEquals(SkillRequirement.BoostStatus.Pass, req.checkBoosted(client, questHelperConfig)); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/test/java/com/questhelper/util/UtilsTest.java: -------------------------------------------------------------------------------- 1 | package com.questhelper.util; 2 | 3 | import net.runelite.api.gameval.InterfaceID; 4 | import net.runelite.api.widgets.WidgetUtil; 5 | import org.apache.commons.lang3.tuple.Pair; 6 | import org.junit.jupiter.api.Test; 7 | 8 | import static org.junit.jupiter.api.Assertions.assertEquals; 9 | 10 | public class UtilsTest 11 | { 12 | @Test 13 | void unpack() 14 | { 15 | var interfaceID = InterfaceID.CHATBOX; 16 | var childID = 1; 17 | var componentID = WidgetUtil.packComponentId(interfaceID, childID); 18 | assertEquals( 19 | Utils.unpackWidget(componentID), 20 | Pair.of(interfaceID, childID) 21 | ); 22 | } 23 | } 24 | --------------------------------------------------------------------------------