diff --git a/02-A-Realm-Reborn/Trials/Nabriales.cs b/02-A-Realm-Reborn/Trials/Nabriales.cs new file mode 100644 index 0000000..f28a807 --- /dev/null +++ b/02-A-Realm-Reborn/Trials/Nabriales.cs @@ -0,0 +1,162 @@ +using System; +using System.ComponentModel; +using System.Linq; +using System.Numerics; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using Dalamud.Game.ClientState.Objects.Types; +using Newtonsoft.Json; +using Dalamud.Utility.Numerics; +using KodakkuAssist.Script; +using KodakkuAssist.Module.GameEvent; +using KodakkuAssist.Module.Draw; +using ECommons; +using ECommons.DalamudServices; +using ECommons.GameFunctions; +using ECommons.MathHelpers; + +namespace Nabriales; + +[ScriptType(guid: "64206b9e-cd0a-47ec-960d-15f39a888f9e", name: "那布里亚勒斯讨伐战", territorys: [426], + version: "0.0.0.1", author: "Tetora", note: noteStr)] + +public class Nabriales +{ + const string noteStr = + """ + v0.0.0.1: + LV50 那布里亚勒斯讨伐战 初版绘制 + """; + + +} + +public static class EventExtensions +{ + private static bool ParseHexId(string? idStr, out uint id) + { + id = 0; + if (string.IsNullOrEmpty(idStr)) return false; + try + { + var idStr2 = idStr.Replace("0x", ""); + id = uint.Parse(idStr2, System.Globalization.NumberStyles.HexNumber); + return true; + } + catch (Exception) + { + return false; + } + } + + public static uint ActionId(this Event @event) + { + return JsonConvert.DeserializeObject(@event["ActionId"]); + } + + public static uint SourceId(this Event @event) + { + return ParseHexId(@event["SourceId"], out var id) ? id : 0; + } + + public static uint SourceDataId(this Event @event) + { + return JsonConvert.DeserializeObject(@event["SourceDataId"]); + } + + public static uint Command(this Event @event) + { + return ParseHexId(@event["Command"], out var cid) ? cid : 0; + } + + public static uint DurationMilliseconds(this Event @event) + { + return JsonConvert.DeserializeObject(@event["DurationMilliseconds"]); + } + + public static float SourceRotation(this Event @event) + { + return JsonConvert.DeserializeObject(@event["SourceRotation"]); + } + + public static float TargetRotation(this Event @event) + { + return JsonConvert.DeserializeObject(@event["TargetRotation"]); + } + + public static byte Index(this Event @event) + { + return (byte)(ParseHexId(@event["Index"], out var index) ? index : 0); + } + + public static uint State(this Event @event) + { + return ParseHexId(@event["State"], out var state) ? state : 0; + } + + public static string SourceName(this Event @event) + { + return @event["SourceName"]; + } + + public static string TargetName(this Event @event) + { + return @event["TargetName"]; + } + + public static uint TargetId(this Event @event) + { + return ParseHexId(@event["TargetId"], out var id) ? id : 0; + } + + public static Vector3 SourcePosition(this Event @event) + { + return JsonConvert.DeserializeObject(@event["SourcePosition"]); + } + + public static Vector3 TargetPosition(this Event @event) + { + return JsonConvert.DeserializeObject(@event["TargetPosition"]); + } + + public static Vector3 EffectPosition(this Event @event) + { + return JsonConvert.DeserializeObject(@event["EffectPosition"]); + } + + public static uint DirectorId(this Event @event) + { + return ParseHexId(@event["DirectorId"], out var id) ? id : 0; + } + + public static uint StatusId(this Event @event) + { + return JsonConvert.DeserializeObject(@event["StatusId"]); + } + + public static uint StackCount(this Event @event) + { + return JsonConvert.DeserializeObject(@event["StackCount"]); + } + + public static uint Param(this Event @event) + { + return JsonConvert.DeserializeObject(@event["Param"]); + } +} + + +public static class Extensions +{ + public static void TTS(this ScriptAccessory accessory, string text, bool isTTS, bool isDRTTS) + { + if (isDRTTS) + { + accessory.Method.SendChat($"/pdr tts {text}"); + } + else if (isTTS) + { + accessory.Method.TTS(text); + } + } +} \ No newline at end of file diff --git a/03-Heavensward/Trials-Extreme/Ravana-Extreme.cs b/03-Heavensward/Trials-Extreme/Ravana-Extreme.cs index 5e36042..4c11cc4 100644 --- a/03-Heavensward/Trials-Extreme/Ravana-Extreme.cs +++ b/03-Heavensward/Trials-Extreme/Ravana-Extreme.cs @@ -27,9 +27,39 @@ public class Ravana v0.0.0.1: LV60 罗波那歼殛战 初版绘制 """; + + + + [ScriptMethod(name: "光焰【序】(钢铁)", eventType: EventTypeEnum.StartCasting, eventCondition: ["ActionId:3772"])] + public void 光焰序(Event @event, ScriptAccessory accessory) + { + var dp = accessory.Data.GetDefaultDrawProperties(); + dp.Name = "光焰序"; + dp.Color = accessory.Data.DefaultDangerColor; + dp.Owner = @event.SourceId(); + dp.Scale = new Vector2(15f); + dp.DestoryAt = 15700; + dp.ScaleMode = ScaleMode.ByTime; + accessory.Method.SendDraw(DrawModeEnum.Default, DrawTypeEnum.Circle, dp); + } + + [ScriptMethod(name: "光焰【破】(扇形)", eventType: EventTypeEnum.StartCasting, eventCondition: ["ActionId:3776"])] + public void 光焰破(Event @event, ScriptAccessory accessory) + { + var dp = accessory.Data.GetDefaultDrawProperties(); + dp.Name = "光焰破"; + dp.Color = accessory.Data.DefaultDangerColor; + dp.Owner = @event.SourceId(); + dp.Scale = new Vector2(40f); + dp.Radian = 330f.DegToRad(); + dp.DestoryAt = 15700; + accessory.Method.SendDraw(DrawModeEnum.Default, DrawTypeEnum.Fan, dp); + } + } +#region public static class EventExtensions { private static bool ParseHexId(string? idStr, out uint id) @@ -159,3 +189,4 @@ public static class Extensions } } } +#endregion \ No newline at end of file diff --git a/OnlineRepo.json b/OnlineRepo.json index 961a146..ccb0354 100644 --- a/OnlineRepo.json +++ b/OnlineRepo.json @@ -1,11 +1,24 @@ [ + { + "Name": "疯狂战舰无限回廊", + "Guid": "c76136e1-1b5b-4cfb-a677-4cc0917fa050", + "Version": "0.0.0.1", + "Author": "Tetora", + "Repo": "https://github.com/Hibiya615/TetoraKAScript", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/04-Stormblood/Dungeon/theFractalContinuum-Hard.cs", + "Note": "v0.0.0.1:\r\n疯狂战舰无限回廊 副本绘制\r\n注意:BOSS2三斗神与尾王光柱地火未经实战测试,若有误请带ARR反馈", + "UpdateInfo": "", + "TerritoryIds": [ + 743 + ] + }, { "Name": "伊弗利特歼灭战", "Guid": "d3d532f1-0707-427f-ac04-871a22022c11", "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/the_Bowl_of_Embers(Hard).cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Trials/Ifrit(Hard).cs", "Note": "", "UpdateInfo": "", "TerritoryIds": [ @@ -18,7 +31,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/theStrikingTree(Hard).cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Trials/Ramuh(Hard).cs", "Note": "v0.0.0.1:\r\nLV50 拉姆歼灭战 初版绘制", "UpdateInfo": "", "TerritoryIds": [ @@ -31,7 +44,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Thornmarch(Hard).cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Trials/Good_King_Moggle-Hard.cs", "Note": "v0.0.0.1:\r\nLV50 莫古力贤王歼灭战\r\n纯整活无意义,不喜欢可以不用\r\n台词暂时适用于CN版,暂未适配其他语言端", "UpdateInfo": "", "TerritoryIds": [ @@ -44,7 +57,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/the_Hydra.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Trials/Hydra.cs", "Note": "", "UpdateInfo": "", "TerritoryIds": [ @@ -57,7 +70,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Urth's_Fount.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Trials/Odin.cs", "Note": "v0.0.0.1:\r\nLV50 奥丁歼灭战 初版绘制", "UpdateInfo": "", "TerritoryIds": [ @@ -70,7 +83,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/BattleOnTheBigBridge.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Trials/BattleOnTheBigBridge.cs", "Note": "v0.0.0.1:\r\nLV50 大桥上的决斗 初版绘制", "UpdateInfo": "", "TerritoryIds": [ @@ -83,7 +96,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/03-Heavensward/Zurvan.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/03-Heavensward/Trials/Zurvan.cs", "Note": "v0.0.0.1:\r\nLV60 祖尔宛歼灭战 初版绘制", "UpdateInfo": "", "TerritoryIds": [ @@ -96,7 +109,7 @@ "Version": "0.0.0.2", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/04-Stormblood/Emanation.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/04-Stormblood/Trial/Lakshmi.cs", "Note": "v0.0.0.2:\r\nLV70 吉祥天女歼灭战 初版绘制", "UpdateInfo": "", "TerritoryIds": [ @@ -109,7 +122,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/04-Stormblood/theRoyalMenagerie.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/04-Stormblood/Trial/Shinryu.cs", "Note": "v0.0.0.1:\r\nLV70 神龙歼灭战 初版绘制", "UpdateInfo": "", "TerritoryIds": [ @@ -122,7 +135,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/06-EndWalker/the_Voidcast_Dais.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/06-EndWalker/Trial/Golbez.cs", "Note": "", "UpdateInfo": "", "TerritoryIds": [ @@ -135,7 +148,7 @@ "Version": "0.0.0.11", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Thornmarch-Extreme.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Trials-Extreme/Good_King_Moggle(Extreme).cs", "Note": "v0.0.0.11:\r\nLV50 莫古力贤王歼殛战 初版绘制", "UpdateInfo": "", "TerritoryIds": [ @@ -148,7 +161,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/04-Omega_Quests/Normal/O11n.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/04-Stormblood/Raid-Omega_Quests/Normal/O11n.cs", "Note": "v0.0.0.1:\r\nLV70 欧米茄时空狭缝 阿尔法幻境3(欧米茄)初版绘制", "UpdateInfo": "", "TerritoryIds": [ @@ -161,7 +174,7 @@ "Version": "0.0.0.11", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/05-Eden/Normal/E1n.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/05-Shadowbringers/Raid-Eden/Normal/E1n.cs", "Note": "v0.0.0.11:\r\nLV80 伊甸希望乐园 觉醒之章1(至尊伊甸)初版绘制", "UpdateInfo": "", "TerritoryIds": [ @@ -174,7 +187,7 @@ "Version": "0.0.0.2", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/05-Eden/Normal/E8n.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/05-Shadowbringers/Raid-Eden/Normal/E8n.cs", "Note": "v0.0.0.2:\r\nLV80 伊甸希望乐园 共鸣之章4(构想希瓦)初版绘制", "UpdateInfo": "修正镜子范围错误", "TerritoryIds": [ @@ -187,7 +200,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/05-Eden/Normal/E10n.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/05-Shadowbringers/Raid-Eden/Normal/E10n.cs", "Note": "", "UpdateInfo": "", "TerritoryIds": [ @@ -200,7 +213,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/05-Eden/Normal/E12n.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/05-Shadowbringers/Raid-Eden/Normal/E12n.cs", "Note": "v0.0.0.1:\r\nLV80 伊甸希望乐园 再生之章4(伊甸之约)初版绘制", "UpdateInfo": "", "TerritoryIds": [ @@ -213,7 +226,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/06-Pand%C3%A6monium/Normal/P10n.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/06-EndWalker/Raid-Pand%C3%A6monium/Normal/P10n.cs", "Note": "v0.0.0.1:\r\nLV90 万魔殿 荒天之狱2(万魔殿)初版绘制", "UpdateInfo": "", "TerritoryIds": [ @@ -265,19 +278,6 @@ 796 ] }, - { - "Name": "疯狂战舰无限回廊", - "Guid": "c76136e1-1b5b-4cfb-a677-4cc0917fa050", - "Version": "0.0.0.1", - "Author": "Tetora", - "Repo": "https://github.com/Hibiya615/TetoraKAScript", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/04-Stormblood/theFractalContinuum-Hard.cs", - "Note": "v0.0.0.1:\r\n疯狂战舰无限回廊 副本绘制\r\n注意:BOSS2三斗神与尾王光柱地火未经实战测试,若有误请带ARR反馈", - "UpdateInfo": "", - "TerritoryIds": [ - 743 - ] - }, { "Name": "激斗畏惧装甲之秘密武器", "Guid": "5f55a121-1fcc-48ce-a0e8-b6fbd4ce8489", diff --git a/TestScriptRepo.json b/TestScriptRepo.json index 7ceab06..8763f3f 100644 --- a/TestScriptRepo.json +++ b/TestScriptRepo.json @@ -40,7 +40,7 @@ "Version": "0.0.0.1", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript/tree/main", - "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Bahamute_NormalRaid.cs", + "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/02-A-Realm-Reborn/Raid-Bahamute/T03_T09_T13_for_BLU.cs", "Note": "v0.0.0.1:\r\n巴哈姆特大迷宫 普通难度绘制\r\n目前支持:T5\r\n计划中:T9 T13", "UpdateInfo": "", "TerritoryIds": [