if (step.TargetTerritoryId == _clientState.TerritoryType)
{
- // no more movement
+ _pluginLog.Information("Skipping any movement");
}
else if (step.Position != null)
{
else
distance = step.StopDistance ?? MovementController.DefaultStopDistance;
- _pluginLog.Information($"Stop dist: {distance}");
var position = _clientState.LocalPlayer?.Position ?? new Vector3();
float actualDistance = (position - step.Position.Value).Length();
if (_gameFunctions.Unmount())
return;
- if (step is { DataId: not null, ItemId: not null })
+ if (step is { DataId: not null, ItemId: not null, GroundTarget: true })
+ {
+ _gameFunctions.UseItemOnGround(step.DataId.Value, step.ItemId.Value);
+ IncreaseStepCount();
+ }
+ else if (step is { DataId: not null, ItemId: not null })
{
_gameFunctions.UseItem(step.DataId.Value, step.ItemId.Value);
IncreaseStepCount();
_gameFunctions.UseEmote(step.DataId.Value, step.Emote.Value);
IncreaseStepCount();
}
+ else if (step.Emote != null)
+ {
+ _gameFunctions.UseEmote(step.Emote.Value);
+ IncreaseStepCount();
+ }
+
+ break;
+
+ case EInteractionType.Say:
+ if (_condition[ConditionFlag.Mounted])
+ {
+ _gameFunctions.Unmount();
+ return;
+ }
+
+ if (!string.IsNullOrEmpty(step.ChatMessage))
+ {
+ _gameFunctions.ExecuteCommand($"/say {step.ChatMessage}");
+ IncreaseStepCount();
+ }
break;
}
}
+ public void UseItemOnGround(uint dataId, uint itemId)
+ {
+ GameObject? gameObject = FindObjectByDataId(dataId);
+ if (gameObject != null)
+ {
+ var position = (FFXIVClientStructs.FFXIV.Common.Math.Vector3)gameObject.Position;
+ ActionManager.Instance()->UseActionLocation(ActionType.KeyItem, itemId, gameObject.ObjectId, &position);
+ }
+ }
+
public void UseEmote(uint dataId, EEmote emote)
{
GameObject? gameObject = FindObjectByDataId(dataId);
}
}
+ public void UseEmote(EEmote emote)
+ {
+ ExecuteCommand($"{_emoteCommands[emote]} motion");
+ }
+
public bool IsObjectAtPosition(uint dataId, Vector3 position)
{
GameObject? gameObject = FindObjectByDataId(dataId);
{ EInteractionType.AttuneAetherCurrent, "AttuneAetherCurrent" },
{ EInteractionType.Combat, "Combat" },
{ EInteractionType.UseItem, "UseItem" },
+ { EInteractionType.Say, "Say" },
{ EInteractionType.Emote, "Emote" },
{ EInteractionType.WaitForObjectAtPosition, "WaitForNpcAtPosition" },
{ EInteractionType.ManualAction, "ManualAction" }
AttuneAetherCurrent,
Combat,
UseItem,
+ Say,
Emote,
WaitForObjectAtPosition,
ManualAction
public uint? AetherCurrentId { get; set; }
public uint? ItemId { get; set; }
+ public bool? GroundTarget { get; set; }
[JsonConverter(typeof(EmoteConverter))]
public EEmote? Emote { get; set; }
+ public string ChatMessage { get; set; }
[JsonConverter(typeof(EnemySpawnTypeConverter))]
public EEnemySpawnType? EnemySpawnType { get; set; }
"Z": 305.80603
},
"TerritoryId": 813,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "AetheryteShortcut": "Lakeland - Fort Jobb",
+ "Fly": true
}
]
},
"TerritoryId": 819,
"InteractionType": "ManualAction",
"Comment": "Cutscene Interaction needed",
+ "AetheryteShortcut": "Crystarium",
"AethernetShortcut": [
"[Crystarium] Aetheryte Plaza",
"[Crystarium] The Cabinet of Curiosity"
"Y": -37.7,
"Z": -208.85028
},
+ "StopDistance": 6,
"TerritoryId": 819,
"InteractionType": "Interact"
}
"Y": -37.7,
"Z": -208.85028
},
+ "StopDistance": 6,
"TerritoryId": 819,
"InteractionType": "Interact"
}
]
},
{
- "Sequence": 2,
+ "Sequence": 3,
"Steps": [
{
- "DataId": 2012128,
"Position": {
- "X": -0.001528129,
- "Y": 4.931927,
- "Z": 0.01416349
+ "X": -6.1157894,
+ "Y": 2.0849845,
+ "Z": -4.654831
},
"TerritoryId": 1031,
- "InteractionType": "ManualAction",
- "Comment": "Interact with Aetheryte (Navmesh can't jump)"
+ "InteractionType": "WalkTo"
+ },
+ {
+ "DataId": 2012128,
+ "TerritoryId": 1031,
+ "InteractionType": "Interact",
+ "Comment": "Interact with Aetheryte (Navmesh can't jump)",
+ "$": "QuestVariables after: 16 0 16 0 0 16"
},
{
"DataId": 1039993,
"Z": -9.353821
},
"TerritoryId": 1031,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "$": "QuestVariables after: 32 1 16 0 0 144"
},
{
"DataId": 1039994,
"Z": 2.1209717
},
"TerritoryId": 1031,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "$": "QuestVariables after: 49 1 16 0 0 208"
},
{
"DataId": 1039995,
"Y": 44.32154,
"Z": 771.4198
},
+ "StopDistance": 5,
"TerritoryId": 961,
"InteractionType": "Interact"
}
"Y": 44.32154,
"Z": 771.4198
},
+ "StopDistance": 5,
"TerritoryId": 961,
"InteractionType": "Interact"
}
"Steps": [
{
"DataId": 1039998,
- "Position": {
- "X": 206.0426,
- "Y": 20.561113,
- "Z": 629.14465
- },
"TerritoryId": 961,
"InteractionType": "ManualAction",
"Comment": "Capture Mobs with less than 50% HP"
"Y": -1.1050489,
"Z": 158.0376
},
+ "StopDistance": 5,
"TerritoryId": 961,
"InteractionType": "Interact"
}
"Y": 11.703674,
"Z": 126.878784
},
+ "StopDistance": 6,
"TerritoryId": 961,
"InteractionType": "AttuneAetheryte"
},
"Z": 1.5411377
},
"TerritoryId": 961,
- "InteractionType": "ManualAction",
- "Comment": "Use Quest Item on ground locations"
+ "InteractionType": "UseItem",
+ "ItemId": 2003234,
+ "GroundTarget": true,
+ "$": "QuestValues after: 1 16 0 0 0 128"
+ },
+ {
+ "DataId": 2012132,
+ "Position": {
+ "X": 373.18982,
+ "Y": 2.9754639,
+ "Z": 10.788086
+ },
+ "TerritoryId": 961,
+ "InteractionType": "UseItem",
+ "ItemId": 2003234,
+ "GroundTarget": true
}
]
},
"Z": 107.9021
},
"TerritoryId": 961,
- "InteractionType": "AttuneAetherCurrent"
+ "InteractionType": "AttuneAetherCurrent",
+ "AetherCurrentId": 2818374
+ },
+ {
+ "Position": {
+ "X": 346.73517,
+ "Y": -15.572778,
+ "Z": -105.96149
+ },
+ "TerritoryId": 961,
+ "InteractionType": "WalkTo",
+ "Comment": "Needs manual jumping"
},
{
"DataId": 1040052,
{
"Sequence": 4,
"Steps": [
+ {
+ "Position": {
+ "X": 339.039,
+ "Y": -14.322072,
+ "Z": -101.509995
+ },
+ "StopDistance": 0.5,
+ "TerritoryId": 961,
+ "InteractionType": "WalkTo",
+ "DisableNavmesh": true
+ },
{
"DataId": 2012022,
"Position": {
"Z": 2.5177002
},
"TerritoryId": 961,
- "InteractionType": "AttuneAetherCurrent"
+ "InteractionType": "AttuneAetherCurrent",
+ "AetherCurrentId": 2818376
},
{
"DataId": 1040061,
"Z": -104.631165
},
"TerritoryId": 961,
- "InteractionType": "ManualAction",
+ "InteractionType": "Say",
"ChatMessage": "I have a favor to ask"
}
]
"Z": -104.631165
},
"TerritoryId": 961,
- "InteractionType": "ManualAction",
+ "InteractionType": "Say",
"ChatMessage": "Please, Emet-Selch"
}
]
"Sequence": 6,
"Steps": [
{
- "Position": {
- "X": -64.09766,
- "Y": -15.335736,
- "Z": -84.71621
- },
"TerritoryId": 961,
"InteractionType": "Emote",
- "Emote": "wave"
+ "Emote": "wave",
+ "Comment": "Need to jump manually"
}
]
},
"Z": 88.91431
},
"TerritoryId": 961,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "AetheryteShortcut": "Elpis - Anagnorisis"
}
]
}
"Y": 10.385857,
"Z": 89.34155
},
+ "StopDistance": 5,
"TerritoryId": 961,
"InteractionType": "Interact"
}
{
"Sequence": 1,
"Steps": [
+ {
+ "Position": {
+ "X": -137.80992,
+ "Y": -26.995626,
+ "Z": 543.8281
+ },
+ "TerritoryId": 961,
+ "InteractionType": "WalkTo"
+ },
+ {
+ "Position": {
+ "X": -137.80992,
+ "Y": -26.995626,
+ "Z": 543.8281
+ },
+ "TerritoryId": 961,
+ "InteractionType": "ManualAction",
+ "Comment": "Jump on Ledge"
+ },
{
"DataId": 2012023,
"Position": {
"Z": 551.5067
},
"TerritoryId": 961,
- "InteractionType": "AttuneAetherCurrent"
+ "InteractionType": "AttuneAetherCurrent",
+ "AetherCurrentId": 2818377
+ },
+ {
+ "Position": {
+ "X": -139.15512,
+ "Y": -27.030453,
+ "Z": 535.6933
+ },
+ "TerritoryId": 961,
+ "InteractionType": "WalkTo",
+ "DisableNavmesh": true
},
{
"DataId": 1040073,
"Z": 490.53174
},
"TerritoryId": 961,
- "InteractionType": "AttuneAetherCurrent"
+ "InteractionType": "AttuneAetherCurrent",
+ "AetherCurrentId": 2818378
},
{
"DataId": 1040080,
"Y": -22.394821,
"Z": 527.88574
},
+ "StopDistance": 5,
"TerritoryId": 961,
"InteractionType": "Interact"
}
"Y": -22.39482,
"Z": 525.47485
},
+ "StopDistance": 5,
"TerritoryId": 961,
"InteractionType": "Interact"
}
"Y": -22.394821,
"Z": 527.88574
},
+ "StopDistance": 5,
"TerritoryId": 961,
"InteractionType": "Interact"
}
{
"Sequence": 7,
"Steps": [
+ {
+ "Position": {
+ "X": -734.30804,
+ "Y": -28.391644,
+ "Z": 432.59787
+ },
+ "TerritoryId": 961,
+ "InteractionType": "WalkTo"
+ },
{
"DataId": 2012021,
"Position": {
"Z": 411.12378
},
"TerritoryId": 961,
- "InteractionType": "AttuneAetherCurrent"
+ "InteractionType": "AttuneAetherCurrent",
+ "AetherCurrentId": 2818375,
+ "DisableNavmesh": true
},
{
"DataId": 2012141,
},
"TerritoryId": 961,
"InteractionType": "Combat",
+ "EnemySpawnType": "AutoOnEnterArea",
"KillEnemyDataIds": [
14075,
14074
"Y": -22.39482,
"Z": 504.90576
},
+ "StopDistance": 5,
"TerritoryId": 961,
"InteractionType": "Interact"
}
"Y": -22.39482,
"Z": 505.08887
},
+ "StopDistance": 5,
"TerritoryId": 961,
"InteractionType": "Interact"
}
"AttuneAetherCurrent",
"Combat",
"UseItem",
+ "Say",
"Emote",
"WaitForNpcAtPosition",
"ManualAction"
"deny"
]
},
+ "ChatMessage": {
+ "type": "string",
+ "description": "The text to use with /say"
+ },
"ItemId": {
"type": ["number", "null"],
"description": "The Item to use",
var q = _gameFunctions.GetCurrentQuest();
ImGui.Text($"Current Quest: {q.CurrentQuest} → {q.Sequence}");
+ var questManager = QuestManager.Instance();
+ if (questManager != null)
+ {
+ for (int i = 0; i < 1 /*questManager->TrackedQuestsSpan.Length*/; ++i)
+ {
+ var trackedQuest = questManager->TrackedQuestsSpan[i];
+ switch (trackedQuest.QuestType)
+ {
+ default:
+ ImGui.Text($"Tracked quest {i}: {trackedQuest.QuestType}, {trackedQuest.Index}");
+ break;
+
+ case 1:
+ ImGui.Text(
+ $"Tracked quest: {questManager->NormalQuestsSpan[trackedQuest.Index].QuestId}, {trackedQuest.Index}");
+ break;
+ }
+ }
+ }
+
+
if (_targetManager.Target != null)
{
ImGui.Separator();