An Exiled plugin that makes it easier to create custom quests.
There is an example in this repo. Usage in short you need to create a PlayerQuestComponent for example in
public static void OnVerified(VerifiedEventArgs ev)with
QuestComponent.Register(ev.Player, out QuestComponent component);and to create a new quest you need to make a new class inheriting from BaseQuest
public class KillPlayersQuest : BaseQuestand in there you provide what should happen when progress to this quest is added and when the quest is finished
protected override void OnAddedProgress(Player player, float progress)
{
Log.Info($"{player.Nickname} has killquest progress : {CurrentProgress}/{MaxProgress}");
}
protected override void OnQuestCompleted(Player player)
{
Log.Info("Quest completed");
player.AddItem(ItemType.Adrenaline);
}and to add that quest to a player you need to have a QuestComponent. You can use for it QuestComponent.Get(Player).
Once you have it need to
QuestComponent::Add(Basequest);so in this example
QuestComponent.Add(new KillPlayersQuest(5f));this 5f means what is the max progress that once its reached the BaseQuest::OnQuestCompleted would be called.
If you have any questions feel free to dm me on discord (@michcio15) or ping on Exiled discord server