Assignment(nameof(DialogueChoice.Answer), dialogueChoice.Answer,
emptyChoice.Answer)
.AsSyntaxNodeOrToken(),
+ Assignment(nameof(DialogueChoice.PromptIsRegularExpression),
+ dialogueChoice.PromptIsRegularExpression,
+ emptyChoice.PromptIsRegularExpression)
+ .AsSyntaxNodeOrToken(),
Assignment(nameof(DialogueChoice.AnswerIsRegularExpression),
dialogueChoice.AnswerIsRegularExpression,
emptyChoice.AnswerIsRegularExpression)
},
"TerritoryId": 146,
"InteractionType": "Combat",
- "EnemySpawnType": "OverworldEnemies",
- "KillEnemyDataIds": []
+ "EnemySpawnType": "FateEnemies",
+ "KillEnemyDataIds": [
+ 2390
+ ]
}
]
},
"Prompt": "TEXT_CHRHDB101_01204_Q2_000_1",
"Answer": "TEXT_CHRHDB101_01204_Q2A2_000_2"
}
- ]
+ ],
+ "NextQuestId": 1205
}
]
}
"Y": 4.0131226,
"Z": -98.95477
},
+ "StopDistance": 7,
"TerritoryId": 130,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 32
+ ]
},
{
"DataId": 1004331,
"Z": -133.22656
},
"TerritoryId": 130,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
},
{
"DataId": 1001313,
"Z": -106.21808
},
"TerritoryId": 130,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ]
}
]
},
"Z": -126.51257
},
"TerritoryId": 130,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 1206
}
]
}
"Y": 12,
"Z": 0.99176025
},
+ "StopDistance": 4,
"TerritoryId": 130,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 1207
}
]
}
"Y": 12,
"Z": -5.5390625
},
+ "StopDistance": 4,
"TerritoryId": 130,
"InteractionType": "AcceptQuest"
}
"Z": -221.27112
},
"TerritoryId": 145,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 32
+ ]
},
{
"DataId": 1003940,
"Z": -241.07733
},
"TerritoryId": 145,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ]
},
{
"DataId": 1003939,
"Y": 4.137387,
"Z": -240.98578
},
+ "StopDistance": 4,
"TerritoryId": 145,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
}
]
},
"Z": 151.87305
},
"TerritoryId": 145,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 32
+ ]
},
{
"DataId": 2003005,
"Z": 166.0028
},
"TerritoryId": 145,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ]
},
{
"DataId": 2003004,
"Z": 187.36548
},
"TerritoryId": 145,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
}
]
},
"Sequence": 255,
"Steps": [
{
- "Mount": true,
- "Fly": true,
+ "Position": {
+ "X": -535.8004,
+ "Y": 5.3931885,
+ "Z": -252.96324
+ },
+ "TerritoryId": 145,
+ "InteractionType": "WalkTo",
+ "Fly": true
+ },
+ {
"DataId": 1005731,
"Position": {
"X": -526.8788,
"Z": -246.50952
},
"TerritoryId": 145,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 1315
}
]
}
"Y": 5.4049973,
"Z": -249.25616
},
+ "StopDistance": 4,
"TerritoryId": 145,
"InteractionType": "AcceptQuest"
}
"Sequence": 2,
"Steps": [
{
- "AetheryteShortcut": "Western Thanalan - Horizon",
+ "TerritoryId": 145,
+ "InteractionType": "UseItem",
+ "ItemId": 30362,
+ "TargetTerritoryId": 140
+ },
+ {
"Mount": true,
"DataId": 1008709,
"Position": {
"Z": 12.191956
},
"TerritoryId": 140,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
},
{
"Mount": true,
"Z": 65.384766
},
"TerritoryId": 140,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ]
},
{
"Mount": true,
"Z": 158.73962
},
"TerritoryId": 140,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 32
+ ]
}
]
},
"Z": 155.9624
},
"TerritoryId": 140,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 32
+ ]
},
{
"DataId": 2003656,
"Z": 159.19727
},
"TerritoryId": 140,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
},
{
"DataId": 2003659,
"Z": 155.90137
},
"TerritoryId": 140,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 16
+ ]
},
{
"DataId": 2003657,
"Z": 158.12915
},
"TerritoryId": 140,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ]
}
]
},
"Z": 157.5188
},
"TerritoryId": 140,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 1316
}
]
}
"Z": 254.13892
},
"TerritoryId": 147,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "Fly": true
}
]
},
"Z": 121.20239
},
"TerritoryId": 147,
- "InteractionType": "Interact"
- },
- {
- "TerritoryId": 147,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "Fly": true,
+ "NextQuestId": 1317
}
]
}
"Sequence": 2,
"Steps": [
{
- "AetheryteShortcut": "Western Thanalan - Horizon",
+ "TerritoryId": 145,
+ "InteractionType": "UseItem",
+ "ItemId": 30362,
+ "TargetTerritoryId": 140
+ },
+ {
"Mount": true,
- "Fly": true,
"DataId": 1008730,
"Position": {
"X": -431.26575,
"Z": -367.17786
},
"TerritoryId": 140,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 1318
}
]
}
"Y": 23.113976,
"Z": -367.8188
},
+ "StopDistance": 5,
"TerritoryId": 140,
"InteractionType": "AcceptQuest"
}
"Z": 378.80518
},
"TerritoryId": 155,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "Fly": true
}
]
},
"Z": 479.69775
},
"TerritoryId": 155,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "Fly": true
}
]
},
{
"Sequence": 6,
"Steps": [
- {
- "DataId": 2003671,
- "Position": {
- "X": 489.181,
- "Y": 206.8937,
- "Z": 479.662
- },
- "TerritoryId": 155,
- "InteractionType": "Interact"
- },
{
"TerritoryId": 155,
"InteractionType": "Duty",
"Y": 207.33582,
"Z": 475.33374
},
+ "StopDistance": 7,
"TerritoryId": 155,
"InteractionType": "Interact"
}
"Sequence": 255,
"Steps": [
{
- "AetheryteShortcut": "Western Thanalan - Horizon",
+ "TerritoryId": 145,
+ "InteractionType": "UseItem",
+ "ItemId": 30362,
+ "TargetTerritoryId": 140
+ },
+ {
"Mount": true,
"Fly": true,
"DataId": 1008788,
"Z": -367.57465
},
"TerritoryId": 140,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 1438
}
]
}
"Z": 525.81055
},
"TerritoryId": 137,
- "InteractionType": "Interact"
- },
- {
- "TerritoryId": 137,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 1439
}
]
}
{
"Sequence": 2,
"Steps": [
+ {
+ "Position": {
+ "X": 581.1095,
+ "Y": 14.587067,
+ "Z": 394.20828
+ },
+ "TerritoryId": 137,
+ "InteractionType": "WalkTo",
+ "Fly": true
+ },
{
"DataId": 1009319,
"Position": {
"Z": 344.71655
},
"TerritoryId": 138,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 1440
}
]
}
"Z": 425.58936
},
"TerritoryId": 138,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
},
{
"DataId": 2004325,
"Z": 514.7324
},
"TerritoryId": 138,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ]
},
{
"DataId": 2004326,
"Z": 596.765
},
"TerritoryId": 138,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 32
+ ]
}
]
},
"Z": 684.1992
},
"TerritoryId": 138,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "DialogueChoices": [
+ {
+ "Type": "YesNo",
+ "ExcelSheet": "Addon",
+ "Prompt": 102445,
+ "PromptIsRegularExpression": true,
+ "Yes": true
+ }
+ ]
},
{
"Comment": "Fight some Mandragoras",
},
"TerritoryId": 138,
"InteractionType": "Combat",
- "EnemySpawnType": "OverworldEnemies",
+ "EnemySpawnType": "FateEnemies",
"KillEnemyDataIds": [
2950,
2951,
"Steps": [
{
"AetheryteShortcut": "Eastern La Noscea - Costa Del Sol",
- "Mount": true,
"Fly": true,
+ "Position": {
+ "X": 581.46533,
+ "Y": 14.587067,
+ "Z": 393.86594
+ },
+ "TerritoryId": 137,
+ "InteractionType": "WalkTo"
+ },
+ {
"DataId": 1009319,
"Position": {
"X": 581.3534,
"Z": 10.879639
},
"TerritoryId": 137,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 1441
}
]
}
"Z": 455.2528
},
"TerritoryId": 137,
- "InteractionType": "Interact"
- },
- {
- "TerritoryId": 137,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 166
}
]
}
"[Ul'dah] Aetheryte Plaza",
"[Ul'dah] Gladiators' Guild"
],
+ "Position": {
+ "X": -71.1609,
+ "Y": 6.9845705,
+ "Z": 9.066199
+ },
+ "TerritoryId": 131,
+ "InteractionType": "WalkTo"
+ },
+ {
"DataId": 1010281,
"Position": {
"X": -70.96979,
"Z": 3.982544
},
"TerritoryId": 131,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "DisableNavmesh": true
}
]
},
"Z": -3.9215698
},
"TerritoryId": 130,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 202
}
]
}
{
"Sequence": 1,
"Steps": [
+ {
+ "Position": {
+ "X": -153.18225,
+ "Y": 14.005,
+ "Z": 43.458076
+ },
+ "TerritoryId": 130,
+ "InteractionType": "WalkTo"
+ },
{
"AethernetShortcut": [
"[Ul'dah] Thaumaturges' Guild",
"Z": 260.57825
},
"TerritoryId": 141,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "AetheryteShortcut": "Ul'dah",
+ "AethernetShortcut": [
+ "[Ul'dah] Aetheryte Plaza",
+ "[Ul'dah] Gate of Nald (Central Thanalan)"
+ ]
}
]
},
"Z": -5.661133
},
"TerritoryId": 130,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 203
}
]
}
{
"Sequence": 1,
"Steps": [
+ {
+ "Position": {
+ "X": -153.18225,
+ "Y": 14.005,
+ "Z": 43.458076
+ },
+ "TerritoryId": 130,
+ "InteractionType": "WalkTo"
+ },
{
"AethernetShortcut": [
"[Ul'dah] Thaumaturges' Guild",
"Z": 8.255066
},
"TerritoryId": 131,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 32
+ ]
+ },
+ {
+ "Position": {
+ "X": 109.42333,
+ "Y": 8,
+ "Z": 8.92655
+ },
+ "TerritoryId": 131,
+ "InteractionType": "WalkTo"
},
{
"DataId": 2004900,
"Z": -35.233154
},
"TerritoryId": 131,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ]
},
{
"DataId": 2004899,
"Z": -74.05206
},
"TerritoryId": 131,
- "InteractionType": "Interact"
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
}
]
},
"[Ul'dah] Gladiators' Guild",
"[Ul'dah] Sapphire Avenue Exchange"
],
+ "Position": {
+ "X": 137.68585,
+ "Y": 3.9999998,
+ "Z": -58.555218
+ },
+ "TerritoryId": 131,
+ "InteractionType": "WalkTo"
+ },
+ {
"DataId": 1001679,
"Position": {
"X": 140.48975,
"Y": 4.0099983,
"Z": -59.80017
},
+ "StopDistance": 5,
"TerritoryId": 131,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 204
}
]
}
"[Ul'dah] Sapphire Avenue Exchange",
"[Ul'dah] Gladiators' Guild"
],
+ "Position": {
+ "X": -71.1609,
+ "Y": 6.9845705,
+ "Z": 9.066199
+ },
+ "TerritoryId": 131,
+ "InteractionType": "WalkTo"
+ },
+ {
"DataId": 1010330,
"Position": {
"X": -69.5354,
},
"TerritoryId": 131,
"InteractionType": "Interact",
+ "DisableNavmesh": true,
"DialogueChoices": [
{
"Type": "YesNo",
"Y": 6.9839687,
"Z": -0.045776367
},
+ "StopDistance": 5,
"TerritoryId": 131,
"InteractionType": "Interact"
}
"Z": 0.07623291
},
"TerritoryId": 131,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 490
}
]
}
"Z": 171.12988
},
"TerritoryId": 140,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 491
}
]
}
"Z": 96.29968
},
"TerritoryId": 131,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 492
}
]
}
"Z": 27.237305
},
"TerritoryId": 131,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 493
}
]
}
"Z": 29.343018
},
"TerritoryId": 131,
- "InteractionType": "CompleteQuest"
+ "InteractionType": "CompleteQuest",
+ "NextQuestId": 502
}
]
}
"AfterInteraction",
"AfterItemUse",
"AfterAction",
- "OverworldEnemies"
+ "OverworldEnemies",
+ "FateEnemies"
]
},
"KillEnemyDataIds": {
"integer"
]
},
+ "PromptIsRegularExpression": {
+ "type": "boolean"
+ },
"Yes": {
"type": "boolean",
"default": true
"null"
]
},
+ "PromptIsRegularExpression": {
+ "type": "boolean"
+ },
"Answer": {
"type": [
"string",
"integer"
]
+ },
+ "AnswerIsRegularExpression": {
+ "type": "boolean"
}
},
"required": [
{ EEnemySpawnType.AfterAction, "AfterAction" },
{ EEnemySpawnType.AutoOnEnterArea, "AutoOnEnterArea" },
{ EEnemySpawnType.OverworldEnemies, "OverworldEnemies" },
+ { EEnemySpawnType.FateEnemies, "FateEnemies" },
};
}
[JsonConverter(typeof(ExcelRefConverter))]
public ExcelRef? Answer { get; set; }
+ public bool PromptIsRegularExpression { get; set; }
public bool AnswerIsRegularExpression { get; set; }
/// <summary>
AfterAction,
AutoOnEnterArea,
OverworldEnemies,
+ FateEnemies,
}
// TODO this works as somewhat of a delay between killing enemies if certain items/flags are checked
// but also delays killing the next enemy a little
- if (_currentFight == null || _currentFight.Data.SpawnType != EEnemySpawnType.OverworldEnemies ||
- _currentFight.Data.ComplexCombatDatas.Count == 0)
+ if (_currentFight == null ||
+ _currentFight.Data.SpawnType == EEnemySpawnType.OverworldEnemies ||
+ (_currentFight.Data.SpawnType != EEnemySpawnType.FateEnemies && _currentFight.Data.KillEnemyDataIds.Count > 0))
{
if (battleNpc.IsDead)
return 0;
}
}
+ if (_currentFight?.Data.SpawnType == EEnemySpawnType.FateEnemies)
+ {
+ var gameObjectStruct = (GameObject*)gameObject.Address;
+ if (gameObjectStruct->FateId != 0)
+ return 15;
+ }
+
// stuff trying to kill us
if (battleNpc.TargetObjectId == _clientState.LocalPlayer?.GameObjectId)
return 10;
continue;
}
- string? excelPrompt = ResolveReference(quest, dialogueChoice.ExcelSheet, dialogueChoice.Prompt, false)
- ?.GetString();
+ StringOrRegex? excelPrompt = ResolveReference(quest, dialogueChoice.ExcelSheet, dialogueChoice.Prompt,
+ dialogueChoice.PromptIsRegularExpression);
StringOrRegex? excelAnswer = ResolveReference(quest, dialogueChoice.ExcelSheet, dialogueChoice.Answer,
dialogueChoice.AnswerIsRegularExpression);
- if (actualPrompt == null && !string.IsNullOrEmpty(excelPrompt))
+ if (actualPrompt == null && excelPrompt != null)
{
_logger.LogInformation("Unexpected excelPrompt: {ExcelPrompt}", excelPrompt);
continue;
}
if (actualPrompt != null &&
- (excelPrompt == null || !GameFunctions.GameStringEquals(actualPrompt, excelPrompt)))
+ (excelPrompt == null || !IsMatch(actualPrompt, excelPrompt)))
{
_logger.LogInformation("Unexpected excelPrompt: {ExcelPrompt}, actualPrompt: {ActualPrompt}",
excelPrompt, actualPrompt);
continue;
}
- string? excelPrompt = ResolveReference(quest, dialogueChoice.ExcelSheet, dialogueChoice.Prompt, false)
- ?.GetString();
- if (excelPrompt == null || !GameFunctions.GameStringEquals(actualPrompt, excelPrompt))
+ StringOrRegex? excelPrompt = ResolveReference(quest, dialogueChoice.ExcelSheet, dialogueChoice.Prompt,
+ dialogueChoice.PromptIsRegularExpression);
+ if (excelPrompt == null || !IsMatch(actualPrompt, excelPrompt))
{
_logger.LogInformation("Unexpected excelPrompt: {ExcelPrompt}, actualPrompt: {ActualPrompt}",
excelPrompt, actualPrompt);
break;
case EEnemySpawnType.OverworldEnemies:
+ case EEnemySpawnType.FateEnemies:
yield return CreateTask(quest, sequence, step);
break;