支持DRHelper

This commit is contained in:
南沢响也
2025-04-07 01:21:25 +08:00
parent 3d84022e34
commit 2a11219fbb
2 changed files with 68 additions and 15 deletions

View File

@@ -0,0 +1,6 @@
namespace The_Navel___EX._02_A_Realm_Reborn.Trials_Extreme;
public class Ifrit_Extreme_
{
}

View File

@@ -20,16 +20,76 @@ using System.Threading.Tasks;
namespace The_Navel___EX._04_Omega_Quests.Normal; namespace The_Navel___EX._04_Omega_Quests.Normal;
[ScriptType(guid: "2232ae84-c1e7-4382-88b4-d691887f27cf", name: "O11N", territorys: [800], [ScriptType(guid: "2232ae84-c1e7-4382-88b4-d691887f27cf", name: "O11N", territorys: [800],
version: "0.0.0.2" , author: "Tetora", note: noteStr)] version: "0.0.0.3" , author: "Tetora", note: noteStr)]
public class O11n public class O11n
{ {
const string noteStr = const string noteStr =
""" """
v0.0.0.2: v0.0.0.3:
LV70 3 LV70 3
DR 使
使1.4.9.0`DailyRoutines`
"""; """;
[UserSetting("TTS开关")]
public bool isTTS { get; set; } = true;
[UserSetting("弹窗文本提示开关")]
public bool isText { get; set; } = true;
[UserSetting("DR 自动雷力投射点蓄力")]
public bool isDRHelper { get; set; } = true;
[ScriptMethod(name: "雷力投射点 自动使用任务指令", eventType: EventTypeEnum.AddCombatant, eventCondition: ["DataId:9638"])]
public void Start(Event @event, ScriptAccessory accessory)
{
if (isDRHelper) accessory.Method.SendChat("/pdr load Alphascape3Helper");
}
#region 使DR模块源码
/*
public unsafe class Alphascape3Helper : DailyModuleBase
{
public override void Init()
{
DService.ClientState.TerritoryChanged += OnZoneChanged;
OnZoneChanged(DService.ClientState.TerritoryType);
}
private void OnZoneChanged(ushort zoneID)
{
FrameworkManager.Unregister(OnUpdate);
if (zoneID != 800) return;
FrameworkManager.Register(false, OnUpdate);
}
private static void OnUpdate(IFramework framework)
{
if (!Throttler.Throttle("Alphascape3Helper-OnUpdate", 1_500)) return;
if (DService.ClientState.TerritoryType != 800)
{
FrameworkManager.Unregister(OnUpdate);
return;
}
if (Control.GetLocalPlayer() == null) return;
var obj = DService.ObjectTable.FirstOrDefault(x => x.DataId == 9638 && x.ObjectKind == ObjectKind.BattleNpc);
if (obj == null || !obj.IsTargetable) return;
new UseActionPacket(ActionType.Action, 12911, obj.EntityId, Control.GetLocalPlayer()->Rotation).Send();
}
public override void Uninit()
{
DService.ClientState.TerritoryChanged -= OnZoneChanged;
FrameworkManager.Unregister(OnUpdate);
}
}
*/
#endregion
[ScriptMethod(name: "芥末爆弹(死刑)", eventType: EventTypeEnum.StartCasting, eventCondition: ["ActionId:12935"])] [ScriptMethod(name: "芥末爆弹(死刑)", eventType: EventTypeEnum.StartCasting, eventCondition: ["ActionId:12935"])]
public void (Event @event, ScriptAccessory accessory) public void (Event @event, ScriptAccessory accessory)
{ {
@@ -92,19 +152,6 @@ public class O11n
{ {
accessory.Method.RemoveDraw("突进"); accessory.Method.RemoveDraw("突进");
} }
/*
[ScriptMethod(name: "雷力投射点 开始", eventType: EventTypeEnum.Chat, eventCondition: ["Type:NPCDialogueAnnouncements", "Message:regex:^从欧米茄那里感知到了强烈的能量反应.*"])]
public void 雷力投射点Start(Event @event, ScriptAccessory accessory)
{
}
[ScriptMethod(name: "雷力投射点 结束", eventType: EventTypeEnum.Chat, eventCondition: ["Type:NPCDialogueAnnouncements", "Message:regex:^确认到防御力场生成完成.*"])]
public void 雷力投射点End(Event @event, ScriptAccessory accessory)
{
}
*/
[ScriptMethod(name: "芥末爆弹(连线)", eventType: EventTypeEnum.Tether, eventCondition: ["Id:0054"])] [ScriptMethod(name: "芥末爆弹(连线)", eventType: EventTypeEnum.Tether, eventCondition: ["Id:0054"])]
public async void (Event @event, ScriptAccessory accessory) public async void (Event @event, ScriptAccessory accessory)