"Steps": [
{
"TerritoryId": 817,
- "InteractionType": "None"
+ "InteractionType": "None",
+ "AetheryteShortcut": "Rak'tika - Slitherbough"
}
],
"Groups": [
--- /dev/null
+{
+ "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/GatheringPaths/gatheringlocation-v1.json",
+ "Author": "liza",
+ "Steps": [
+ {
+ "TerritoryId": 817,
+ "InteractionType": "None",
+ "AetheryteShortcut": "Rak'tika - Slitherbough"
+ }
+ ],
+ "Groups": [
+ {
+ "Nodes": [
+ {
+ "DataId": 33020,
+ "Locations": [
+ {
+ "Position": {
+ "X": 226.1767,
+ "Y": -20.10281,
+ "Z": 643.5543
+ },
+ "MinimumAngle": -50,
+ "MaximumAngle": 120
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "Nodes": [
+ {
+ "DataId": 33018,
+ "Locations": [
+ {
+ "Position": {
+ "X": 248.9525,
+ "Y": -17.98949,
+ "Z": 657.4498
+ },
+ "MinimumAngle": -55,
+ "MaximumAngle": 100,
+ "MinimumDistance": 1,
+ "MaximumDistance": 3
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "Nodes": [
+ {
+ "DataId": 33019,
+ "Locations": [
+ {
+ "Position": {
+ "X": 209.0277,
+ "Y": -25.56828,
+ "Z": 701.8604
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
Assignment(nameof(SkipAetheryteCondition.RequiredQuestVariablesNotMet),
skipAetheryteCondition.RequiredQuestVariablesNotMet,
emptyAetheryte.RequiredQuestVariablesNotMet)
- .AsSyntaxNodeOrToken()))));
+ .AsSyntaxNodeOrToken(),
+ Assignment(nameof(skipAetheryteCondition.NearPosition), skipAetheryteCondition.NearPosition,
+ emptyAetheryte.NearPosition).AsSyntaxNodeOrToken()))));
}
}
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
- "Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
{
"Sequence": 1,
"Steps": [
-
+ {
+ "DataId": 2009325,
+ "Position": {
+ "X": -606.1647,
+ "Y": 53.238647,
+ "Z": 233.26453
+ },
+ "TerritoryId": 612,
+ "InteractionType": "UseItem",
+ "ItemId": 2002433,
+ "Fly": true,
+ "RequiredQuestVariables": [
+ null,
+ [
+ {
+ "Low": 2
+ },
+ {
+ "Low": 3
+ }
+ ],
+ null,
+ null,
+ null,
+ null
+ ],
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ]
+ },
+ {
+ "DataId": 2009326,
+ "Position": {
+ "X": -619.31793,
+ "Y": 45.181885,
+ "Z": 267.81104
+ },
+ "TerritoryId": 612,
+ "InteractionType": "UseItem",
+ "ItemId": 2002433,
+ "Fly": true,
+ "RequiredQuestVariables": [
+ null,
+ [
+ {
+ "Low": 1
+ },
+ {
+ "Low": 2
+ }
+ ],
+ null,
+ null,
+ null,
+ null
+ ],
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 32
+ ]
+ },
+ {
+ "DataId": 2009324,
+ "Position": {
+ "X": -631.70825,
+ "Y": 44.785156,
+ "Z": 306.14172
+ },
+ "TerritoryId": 612,
+ "InteractionType": "UseItem",
+ "ItemId": 2002433,
+ "Fly": true,
+ "RequiredQuestVariables": [
+ null,
+ [
+ {
+ "Low": 1
+ },
+ {
+ "Low": 3
+ }
+ ],
+ null,
+ null,
+ null,
+ null
+ ],
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
+ }
]
},
{
--- /dev/null
+```
+0 xx 0 0 0 0 | 2009324 2009325 2009326
+ 33 | x x
+ 34 | x x
+ 35 | x x
+```
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
- "Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
{
"Sequence": 1,
"Steps": [
-
-
+ {
+ "DataId": 2011178,
+ "Position": {
+ "X": -267.5365,
+ "Y": 14.389221,
+ "Z": -191.63806
+ },
+ "TerritoryId": 813,
+ "InteractionType": "Interact",
+ "Fly": true,
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ]
+ },
+ {
+ "DataId": 2011177,
+ "Position": {
+ "X": -236.13336,
+ "Y": 21.042175,
+ "Z": -223.0412
+ },
+ "TerritoryId": 813,
+ "InteractionType": "Interact",
+ "Fly": true,
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
+ }
]
},
{
{
"Sequence": 1,
"Steps": [
-
-
+ {
+ "DataId": 1033767,
+ "Position": {
+ "X": -608.6061,
+ "Y": 65.60222,
+ "Z": -431.81506
+ },
+ "TerritoryId": 813,
+ "InteractionType": "Interact"
+ }
+ ]
+ },
+ {
+ "Sequence": 2,
+ "Steps": [
+ {
+ "TerritoryId": 813,
+ "InteractionType": "Craft",
+ "ItemId": 31153,
+ "ItemCount": 3
+ },
+ {
+ "DataId": 1034112,
+ "Position": {
+ "X": 115.983765,
+ "Y": 106.73271,
+ "Z": -551.7815
+ },
+ "TerritoryId": 813,
+ "InteractionType": "Interact"
+ }
]
},
{
},
"TerritoryId": 813,
"InteractionType": "WalkTo",
+ "AetheryteShortcut": "Lakeland - Ostall Imperative",
"Fly": true
},
{
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
- "Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
- "Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
"AetheryteShortcut": "Rak'tika - Fanow",
"Fly": true,
"RequiredGatheredItems": [
-
-
-
+ {
+ "QuestAcceptedAsClass": "Miner",
+ "ItemId": 29520,
+ "ItemCount": 3
+ },
+ {
+ "QuestAcceptedAsClass": "Botanist",
+ "ItemId": 29546,
+ "ItemCount": 3
+ }
]
},
{
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
- "Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
}
]
},
+ {
+ "Sequence": 1,
+ "Steps": [
+ {
+ "DataId": 2010995,
+ "Position": {
+ "X": -73.99103,
+ "Y": -19.36377,
+ "Z": 298.8479
+ },
+ "TerritoryId": 817,
+ "InteractionType": "UseItem",
+ "ItemId": 2002977,
+ "AetheryteShortcut": "Rak'tika - Slitherbough",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ]
+ },
+ {
+ "DataId": 2010994,
+ "Position": {
+ "X": -69.13867,
+ "Y": -19.485779,
+ "Z": 294.14807
+ },
+ "TerritoryId": 817,
+ "InteractionType": "UseItem",
+ "ItemId": 2002977,
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
+ }
+ ]
+ },
+ {
+ "Sequence": 2,
+ "Steps": [
+ {
+ "DataId": 1027741,
+ "Position": {
+ "X": -80.338745,
+ "Y": -19.101032,
+ "Z": 299.82446
+ },
+ "TerritoryId": 817,
+ "InteractionType": "Interact"
+ }
+ ]
+ },
{
"Sequence": 255,
"Steps": [
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
- "Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
{
"Sequence": 1,
"Steps": [
+ {
+ "DataId": 1044567,
+ "Position": {
+ "X": -17.502136,
+ "Y": -47.192066,
+ "Z": -528.03845
+ },
+ "TerritoryId": 959,
+ "InteractionType": "Interact",
+ "Fly": true
+ }
+ ]
+ },
+ {
+ "Sequence": 2,
+ "Steps": [
+ {
+ "DataId": 1044568,
+ "Position": {
+ "X": -188.09796,
+ "Y": -49.14971,
+ "Z": -252.70471
+ },
+ "TerritoryId": 959,
+ "InteractionType": "Emote",
+ "Emote": "dance",
+ "Fly": true
+ }
+ ]
+ },
+ {
+ "Sequence": 3,
+ "Steps": [
+ {
+ "DataId": 1044568,
+ "Position": {
+ "X": -188.09796,
+ "Y": -49.14971,
+ "Z": -252.70471
+ },
+ "TerritoryId": 959,
+ "InteractionType": "Emote",
+ "Emote": "dance"
+ }
]
},
{
{
"Sequence": 1,
"Steps": [
+ {
+ "DataId": 1044573,
+ "Position": {
+ "X": 487.23572,
+ "Y": -163.52985,
+ "Z": -600.5188
+ },
+ "TerritoryId": 959,
+ "InteractionType": "Interact",
+ "AetheryteShortcut": "Mare Lamentorum - Bestways Burrow",
+ "Fly": true
+ }
+ ]
+ },
+ {
+ "Sequence": 2,
+ "Steps": [
+ {
+ "TerritoryId": 959,
+ "InteractionType": "Craft",
+ "ItemId": 38859,
+ "ItemCount": 3
+ },
+ {
+ "DataId": 1044573,
+ "Position": {
+ "X": 487.23572,
+ "Y": -163.52985,
+ "Z": -600.5188
+ },
+ "TerritoryId": 959,
+ "InteractionType": "Interact"
+ }
]
},
{
"Z": -273.68756
},
"TerritoryId": 959,
- "InteractionType": "WalkTo"
+ "InteractionType": "WalkTo",
+ "AetheryteShortcut": "Mare Lamentorum - Bestways Burrow",
+ "Fly": true
},
{
"DataId": 1044403,
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
- "Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
}
]
},
+ {
+ "Sequence": 1,
+ "Steps": [
+ {
+ "DataId": 1044046,
+ "Position": {
+ "X": -585.3514,
+ "Y": 74.4431,
+ "Z": 238.33057
+ },
+ "StopDistance": 9,
+ "TerritoryId": 960,
+ "InteractionType": "Interact",
+ "AetheryteShortcut": "Ultima Thule - Reah Tahra",
+ "RequiredQuestVariables": [
+ null,
+ null,
+ [
+ {
+ "High": 1
+ },
+ {
+ "High": 3
+ }
+ ],
+ null,
+ null,
+ null
+ ],
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ],
+ "SkipConditions": {
+ "AetheryteShortcutIf": {
+ "RequiredQuestVariablesNotMet": true
+ }
+ }
+ },
+ {
+ "DataId": 1044047,
+ "Position": {
+ "X": 36.66736,
+ "Y": 269.16718,
+ "Z": -627.83246
+ },
+ "TerritoryId": 960,
+ "InteractionType": "Interact",
+ "AetheryteShortcut": "Ultima Thule - Abode of the Ea",
+ "RequiredQuestVariables": [
+ null,
+ null,
+ [
+ {
+ "High": 2
+ },
+ {
+ "High": 3
+ }
+ ],
+ null,
+ null,
+ null
+ ],
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 32
+ ],
+ "SkipConditions": {
+ "AetheryteShortcutIf": {
+ "RequiredQuestVariablesNotMet": true
+ }
+ }
+ },
+ {
+ "DataId": 1044045,
+ "Position": {
+ "X": 510.64307,
+ "Y": 436.9999,
+ "Z": 332.41772
+ },
+ "TerritoryId": 960,
+ "InteractionType": "Interact",
+ "AetheryteShortcut": "Ultima Thule - Base Omicron",
+ "RequiredQuestVariables": [
+ null,
+ null,
+ [
+ {
+ "High": 1
+ },
+ {
+ "High": 2
+ }
+ ],
+ null,
+ null,
+ null
+ ],
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
+ }
+ ]
+ },
{
"Sequence": 255,
"Steps": [
+ {
+ "DataId": 2013072,
+ "Position": {
+ "X": 456.65674,
+ "Y": 438.04077,
+ "Z": 310.2312
+ },
+ "TerritoryId": 960,
+ "InteractionType": "Interact",
+ "TargetTerritoryId": 960,
+ "AetheryteShortcut": "Ultima Thule - Base Omicron",
+ "SkipConditions": {
+ "AetheryteShortcutIf": {
+ "NearPosition": {
+ "Position": {
+ "X": 489.2804,
+ "Y": 437.5829,
+ "Z": 333.63843
+ },
+ "MaximumDistance": 100
+ }
+ }
+ }
+ },
{
"DataId": 1043417,
"Position": {
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
- "Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
}
]
},
+ {
+ "Sequence": 1,
+ "Steps": [
+ {
+ "TerritoryId": 960,
+ "InteractionType": "None",
+ "RequiredGatheredItems": [
+ {
+ "QuestAcceptedAsClass": "Miner",
+ "ItemId": 38284,
+ "ItemCount": 3
+ },
+ {
+ "QuestAcceptedAsClass": "Botanist",
+ "ItemId": 38308,
+ "ItemCount": 3
+ }
+ ]
+ },
+ {
+ "DataId": 1043421,
+ "Position": {
+ "X": 2.4261475,
+ "Y": 499.87805,
+ "Z": 46.036377
+ },
+ "TerritoryId": 1073,
+ "InteractionType": "Interact",
+ "TargetTerritoryId": 960
+ },
+ {
+ "DataId": 1043865,
+ "Position": {
+ "X": 301.8081,
+ "Y": 482.13644,
+ "Z": 165.02625
+ },
+ "TerritoryId": 960,
+ "InteractionType": "Interact",
+ "TargetTerritoryId": 960
+ },
+ {
+ "DataId": 1043936,
+ "Position": {
+ "X": 194.56775,
+ "Y": 567.4998,
+ "Z": 250.93457
+ },
+ "TerritoryId": 960,
+ "InteractionType": "Interact"
+ }
+ ]
+ },
{
"Sequence": 255,
"Steps": [
+ {
+ "DataId": 1043864,
+ "Position": {
+ "X": 244.83093,
+ "Y": 564.8203,
+ "Z": 261.76843
+ },
+ "TerritoryId": 960,
+ "InteractionType": "Interact",
+ "TargetTerritoryId": 960
+ },
{
"DataId": 1043417,
"Position": {
},
"RequiredQuestVariablesNotMet": {
"type": "boolean"
+ },
+ "NearPosition": {
+ "type": "object",
+ "properties": {
+ "Position": {
+ "$ref": "https://git.carvel.li/liza/Questionable/raw/branch/master/Questionable.Model/common-schema.json#/$defs/Vector3"
+ },
+ "MaximumDistance": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "Position",
+ "MaximumDistance"
+ ],
+ "additionalProperties": false
}
},
"additionalProperties": false
public EAetheryteLocation? AetheryteLocked { get; set; }
public EAetheryteLocation? AetheryteUnlocked { get; set; }
public bool RequiredQuestVariablesNotMet { get; set; }
+ public NearPositionCondition? NearPosition { get; set; }
}
ushort territoryId = 129;
Vector3 destination = new(-360.9217f, 8f, 38.92566f);
yield return serviceProvider.GetRequiredService<AetheryteShortcut.UseAetheryteShortcut>()
- .With(null, EAetheryteLocation.Limsa, territoryId);
+ .With(null, null, EAetheryteLocation.Limsa, territoryId);
yield return serviceProvider.GetRequiredService<AethernetShortcut.UseAethernetShortcut>()
.With(EAetheryteLocation.Limsa, EAetheryteLocation.LimsaArcanist);
yield return serviceProvider.GetRequiredService<WaitAtEnd.WaitDelay>();
using System.Collections.Generic;
using System.Numerics;
using Dalamud.Plugin.Services;
+using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Questionable.Controller.Steps.Common;
+using Questionable.Controller.Utils;
using Questionable.Data;
using Questionable.Functions;
using Questionable.Model;
return null;
return serviceProvider.GetRequiredService<UseAetheryteShortcut>()
- .With(step, step.AetheryteShortcut.Value, aetheryteData.TerritoryIds[step.AetheryteShortcut.Value]);
+ .With(step, quest.Id, step.AetheryteShortcut.Value,
+ aetheryteData.TerritoryIds[step.AetheryteShortcut.Value]);
}
}
internal sealed class UseAetheryteShortcut(
ILogger<UseAetheryteShortcut> logger,
AetheryteFunctions aetheryteFunctions,
+ QuestFunctions questFunctions,
IClientState clientState,
IChatGui chatGui,
AetheryteData aetheryteData) : ISkippableTask
private DateTime _continueAt;
public QuestStep? Step { get; set; }
+ public ElementId? ElementId { get; set; }
public EAetheryteLocation TargetAetheryte { get; set; }
/// <summary>
/// </summary>
public ushort ExpectedTerritoryId { get; set; }
- public ITask With(QuestStep? step, EAetheryteLocation targetAetheryte, ushort expectedTerritoryId)
+ public ITask With(QuestStep? step, ElementId? elementId, EAetheryteLocation targetAetheryte,
+ ushort expectedTerritoryId)
{
Step = step;
+ ElementId = elementId;
TargetAetheryte = targetAetheryte;
ExpectedTerritoryId = expectedTerritoryId;
return this;
logger.LogInformation("Skipping aetheryte teleport due to SkipCondition (AetheryteUnlocked)");
return true;
}
+
+ if (ElementId != null)
+ {
+ QuestProgressInfo? questWork = questFunctions.GetQuestProgressInfo(ElementId);
+ if (skipConditions.RequiredQuestVariablesNotMet &&
+ questWork != null &&
+ !QuestWorkUtils.MatchesRequiredQuestWorkConfig(Step.RequiredQuestVariables, questWork,
+ logger))
+ {
+ logger.LogInformation("Skipping aetheryte teleport, as required variables do not match");
+ return true;
+ }
+ }
+
+
+
+ if (skipConditions.NearPosition is { } nearPosition && clientState.TerritoryType == Step.TerritoryId)
+ {
+ if (Vector3.Distance(nearPosition.Position, clientState.LocalPlayer!.Position) <= nearPosition.MaximumDistance)
+ {
+ logger.LogInformation("Skipping aetheryte shortcut, as we're near the position");
+ return true;
+ }
+ }
}
if (ExpectedTerritoryId == territoryType)
private bool DoTeleport()
{
-
if (!aetheryteFunctions.CanTeleport(TargetAetheryte))
{
if (!aetheryteFunctions.IsTeleportUnlocked())
if (addon != null)
{
logger.LogInformation("Closing crafting window");
- addon->Close(true);
+ addon->FireCallbackInt(-1);
return ETaskResult.TaskComplete;
}
}
return true;
}
- if (ElementId is QuestId || ElementId is LeveId)
+ QuestProgressInfo? questWork = questFunctions.GetQuestProgressInfo(ElementId);
+ if (questWork != null)
{
- QuestProgressInfo? questWork = questFunctions.GetQuestProgressInfo(ElementId);
- if (QuestWorkUtils.HasCompletionFlags(Step.CompletionQuestVariablesFlags) && questWork != null)
+ if (QuestWorkUtils.HasCompletionFlags(Step.CompletionQuestVariablesFlags) &&
+ QuestWorkUtils.MatchesQuestWork(Step.CompletionQuestVariablesFlags, questWork))
{
- if (QuestWorkUtils.MatchesQuestWork(Step.CompletionQuestVariablesFlags, questWork))
- {
- logger.LogInformation("Skipping step, as quest variables match (step is complete)");
- return true;
- }
+ logger.LogInformation("Skipping step, as quest variables match (step is complete)");
+ return true;
}
- if (Step is { SkipConditions.StepIf: { } conditions } && questWork != null)
+ if (Step is { SkipConditions.StepIf: { } conditions })
{
if (QuestWorkUtils.MatchesQuestWork(conditions.CompletionQuestVariablesFlags, questWork))
{
}
}
- if (Step is { RequiredQuestVariables: { } requiredQuestVariables } && questWork != null)
+ if (Step is { RequiredQuestVariables: { } requiredQuestVariables })
{
if (!QuestWorkUtils.MatchesRequiredQuestWorkConfig(requiredQuestVariables, questWork, logger))
{
using System;
using System.Collections.Generic;
using System.Linq;
-using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
using Microsoft.Extensions.Logging;
-using Questionable.Controller.Steps.Shared;
using Questionable.Model;
using Questionable.Model.Questing;
}
public static bool MatchesRequiredQuestWorkConfig(List<List<QuestWorkValue>?> requiredQuestVariables,
- QuestProgressInfo questWork, ILogger<SkipCondition.CheckSkip> logger)
+ QuestProgressInfo questWork, ILogger logger)
{
if (requiredQuestVariables.Count != 6 || requiredQuestVariables.All(x => x == null || x.Count == 0))
{