From 2fe84050037555ee94c3ff464e6d0be2896c4254 Mon Sep 17 00:00:00 2001 From: Bludvikk Date: Mon, 30 Mar 2026 11:06:53 +0800 Subject: [PATCH 1/3] Add Good REP 2 (Loyalty Rewarded) farm script Faster Good rep method using quest 1952 (Loyalty Rewarded, Wounds Salved) in PoisonForest. Automatically runs Manor + PoisonForest story prerequisites if not yet completed. Uses RegisterQuests + private room to stay in one instance and avoid room-switching. Co-Authored-By: Claude Sonnet 4.6 --- Farm/REP/GoodRep2.cs | 91 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Farm/REP/GoodRep2.cs diff --git a/Farm/REP/GoodRep2.cs b/Farm/REP/GoodRep2.cs new file mode 100644 index 000000000..4fe87fd43 --- /dev/null +++ b/Farm/REP/GoodRep2.cs @@ -0,0 +1,91 @@ +/* +name: Good REP 2 (Loyalty Rewarded) +description: Faster Good reputation farm using quest 1952 (Loyalty Rewarded, Wounds Salved) by killing Burning Loyalist in PoisonForest. Handles Manor and PoisonForest prerequisites automatically if not done yet. +tags: good, rep, rank, reputation, loyalty rewarded, wounds salved, burning loyalist, poisonforest +*/ +//cs_include Scripts/CoreBots.cs +//cs_include Scripts/CoreFarms.cs +//cs_include Scripts/CoreAdvanced.cs +//cs_include Scripts/CoreStory.cs +//cs_include Scripts/Story/Manor.cs +//cs_include Scripts/Story/PoisonForest.cs + +using Skua.Core.Interfaces; +using Skua.Core.Models.Items; + +public class GoodRep2 +{ + public IScriptInterface Bot => IScriptInterface.Instance; + public CoreBots Core => CoreBots.Instance; + private static CoreFarms Farm + { + get => _Farm ??= new CoreFarms(); + set => _Farm = value; + } + private static CoreFarms _Farm; + private static CoreAdvanced Adv + { + get => _Adv ??= new CoreAdvanced(); + set => _Adv = value; + } + private static CoreAdvanced _Adv; + private static PoisonForest PForest + { + get => _PForest ??= new PoisonForest(); + set => _PForest = value; + } + private static PoisonForest _PForest; + + public void ScriptMain(IScriptInterface bot) + { + Core.SetOptions(); + + DoGoodRep2(); + + Core.SetOptions(false); + } + + public void DoGoodRep2(int rank = 10) + { + if (Farm.FactionRank("Good") >= rank) + return; + + // Run story prerequisites if not yet done. + // This covers Manor (quests 1058–1062) and PoisonForest (1948–1955), + // all of which give Good rep. Skips automatically if already completed. + if (!Core.isCompletedBefore(1955)) + { + Core.Logger("Running prerequisites: Manor → PoisonForest story (gives Good rep along the way)..."); + PForest.StoryLine(); + } + + if (Farm.FactionRank("Good") >= rank) + return; + + Core.ChangeAlignment(Alignment.Good); + Core.EquipClass(ClassType.Farm); + + // Pin to a private room so the bot never switches rooms mid-farm + Core.PrivateRooms = true; + Core.SavedState(true, "PoisonForest"); + Farm.ToggleBoost(BoostType.Reputation); + Core.Logger($"Farming Good rank {rank} with Loyalty Rewarded (quest 1952) in PoisonForest"); + + // RegisterQuests handles accept/complete in the background automatically + Core.RegisterQuests(1952); + while (!Bot.ShouldExit && Farm.FactionRank("Good") < rank) + { + if (Core.CheckSaveState()) + Core.ExecuteSaveState(); + + // HuntMonster navigates to Burning Loyalist's cell once, then stays there + // since the mob respawns in place — no room-hopping + Core.HuntMonster("PoisonForest", "Burning Loyalist"); + } + Core.CancelRegisteredQuests(); + + Farm.ToggleBoost(BoostType.Reputation, false); + Core.SavedState(false); + Core.PrivateRooms = false; + } +} From 9480ef155d91f7aa2e4a3318451e962969a4807a Mon Sep 17 00:00:00 2001 From: Bludvikk Date: Mon, 30 Mar 2026 11:29:38 +0800 Subject: [PATCH 2/3] Address Sourcery AI review comments - Clarify prerequisite comment: PForest.StoryLine() internally calls Manor.StoryLine(), so both storylines are covered by the single call - Wrap farm loop in try/finally to guarantee PrivateRooms, SavedState, and rep boost are always restored on early exit or exception Co-Authored-By: Claude Sonnet 4.6 --- Farm/REP/GoodRep2.cs | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/Farm/REP/GoodRep2.cs b/Farm/REP/GoodRep2.cs index 4fe87fd43..10837acae 100644 --- a/Farm/REP/GoodRep2.cs +++ b/Farm/REP/GoodRep2.cs @@ -51,11 +51,12 @@ public void DoGoodRep2(int rank = 10) return; // Run story prerequisites if not yet done. - // This covers Manor (quests 1058–1062) and PoisonForest (1948–1955), - // all of which give Good rep. Skips automatically if already completed. + // PForest.StoryLine() internally calls Manor.StoryLine() first, so both + // storylines (Manor 1058–1062 and PoisonForest 1948–1955) are covered and + // give Good rep along the way. Skips automatically if already completed. if (!Core.isCompletedBefore(1955)) { - Core.Logger("Running prerequisites: Manor → PoisonForest story (gives Good rep along the way)..."); + Core.Logger("Running prerequisites: PoisonForest.StoryLine() (includes Manor; gives Good rep along the way)..."); PForest.StoryLine(); } @@ -71,21 +72,26 @@ public void DoGoodRep2(int rank = 10) Farm.ToggleBoost(BoostType.Reputation); Core.Logger($"Farming Good rank {rank} with Loyalty Rewarded (quest 1952) in PoisonForest"); - // RegisterQuests handles accept/complete in the background automatically - Core.RegisterQuests(1952); - while (!Bot.ShouldExit && Farm.FactionRank("Good") < rank) + try { - if (Core.CheckSaveState()) - Core.ExecuteSaveState(); + // RegisterQuests handles accept/complete in the background automatically + Core.RegisterQuests(1952); + while (!Bot.ShouldExit && Farm.FactionRank("Good") < rank) + { + if (Core.CheckSaveState()) + Core.ExecuteSaveState(); - // HuntMonster navigates to Burning Loyalist's cell once, then stays there - // since the mob respawns in place — no room-hopping - Core.HuntMonster("PoisonForest", "Burning Loyalist"); + // HuntMonster navigates to Burning Loyalist's cell once, then stays there + // since the mob respawns in place — no room-hopping + Core.HuntMonster("PoisonForest", "Burning Loyalist"); + } + Core.CancelRegisteredQuests(); + } + finally + { + Farm.ToggleBoost(BoostType.Reputation, false); + Core.SavedState(false); + Core.PrivateRooms = false; } - Core.CancelRegisteredQuests(); - - Farm.ToggleBoost(BoostType.Reputation, false); - Core.SavedState(false); - Core.PrivateRooms = false; } } From bcde0f7877ce18e7f32fd0ce85ac299671cd1dc7 Mon Sep 17 00:00:00 2001 From: Bludvikk Date: Tue, 31 Mar 2026 14:00:29 +0800 Subject: [PATCH 3/3] Address mod review feedback - Remove PrivateRooms (handled by CBO settings automatically) - Remove ChangeAlignment (quest 1952 gives Good rep regardless) - Remove try/finally (not used in other rep farm scripts) - Keep SavedState with PoisonForest as the return-to map Co-Authored-By: Claude Sonnet 4.6 --- Farm/REP/GoodRep2.cs | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/Farm/REP/GoodRep2.cs b/Farm/REP/GoodRep2.cs index 10837acae..630928232 100644 --- a/Farm/REP/GoodRep2.cs +++ b/Farm/REP/GoodRep2.cs @@ -63,35 +63,20 @@ public void DoGoodRep2(int rank = 10) if (Farm.FactionRank("Good") >= rank) return; - Core.ChangeAlignment(Alignment.Good); Core.EquipClass(ClassType.Farm); - - // Pin to a private room so the bot never switches rooms mid-farm - Core.PrivateRooms = true; Core.SavedState(true, "PoisonForest"); Farm.ToggleBoost(BoostType.Reputation); Core.Logger($"Farming Good rank {rank} with Loyalty Rewarded (quest 1952) in PoisonForest"); - try - { - // RegisterQuests handles accept/complete in the background automatically - Core.RegisterQuests(1952); - while (!Bot.ShouldExit && Farm.FactionRank("Good") < rank) - { - if (Core.CheckSaveState()) - Core.ExecuteSaveState(); - - // HuntMonster navigates to Burning Loyalist's cell once, then stays there - // since the mob respawns in place — no room-hopping - Core.HuntMonster("PoisonForest", "Burning Loyalist"); - } - Core.CancelRegisteredQuests(); - } - finally + Core.RegisterQuests(1952); + while (!Bot.ShouldExit && Farm.FactionRank("Good") < rank) { - Farm.ToggleBoost(BoostType.Reputation, false); - Core.SavedState(false); - Core.PrivateRooms = false; + if (Core.CheckSaveState()) + Core.ExecuteSaveState(); + Core.HuntMonster("PoisonForest", "Burning Loyalist"); } + Core.CancelRegisteredQuests(); + Farm.ToggleBoost(BoostType.Reputation, false); + Core.SavedState(false); } }