Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions Farm/REP/GoodRep2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
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.
// 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: PoisonForest.StoryLine() (includes Manor; gives Good rep along the way)...");
PForest.StoryLine();
}

if (Farm.FactionRank("Good") >= rank)
return;

Core.EquipClass(ClassType.Farm);
Core.SavedState(true, "PoisonForest");
Farm.ToggleBoost(BoostType.Reputation);
Core.Logger($"Farming Good rank {rank} with Loyalty Rewarded (quest 1952) in PoisonForest");

Core.RegisterQuests(1952);
while (!Bot.ShouldExit && Farm.FactionRank("Good") < rank)
{
if (Core.CheckSaveState())
Core.ExecuteSaveState();
Core.HuntMonster("PoisonForest", "Burning Loyalist");
}
Core.CancelRegisteredQuests();
Farm.ToggleBoost(BoostType.Reputation, false);
Core.SavedState(false);
}
}