| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- #nop 房间信息解析模块之副本管理;
- VAR {当前副本} {gCurrentDungeon} {主站};
- VAR {上一个副本} {gPrevDungeon} {主站};
- event.Define {map/EnterDungeon} {无参} {$MODULE} {进入副本,副本的名称在变量 gCurrentDungeon 中。};
- event.Define {map/LeaveDungeon} {无参} {$MODULE} {离开副本,副本的名称在变量 gPrevDungeon 中。};
- event.Define {map/EnterDungeonIdle} {无参} {$MODULE} {进入副本,且不再 busy,副本的名称在变量 gCurrentDungeon 中。};
- event.Define {map/LeaveDungeonIdle} {无参} {$MODULE} {离开副本,且不再 busy,副本的名称在变量 gPrevDungeon 中。};
- event.HandleOnce {map/init} {map/dungeon} {map} {map.Dungeon.Init};
- #alias {map.Dungeon.Init} {
- event.Handle {map/GotRoomInfo} {map/dungeon} {map} {map.Dungeon.locate};
- event.Handle {map/EnterDungeon} {map/dungeon} {map} {map.EnterDungeon.notice};
- event.Handle {map/LeaveDungeon} {map/dungeon} {map} {map.LeaveDungeon.notice};
- event.Handle {map/EnterDungeonIdle} {map/dungeon} {map} {map.EnterDungeon.notice idle};
- event.Handle {map/LeaveDungeonIdle} {map/dungeon} {map} {map.LeaveDungeon.notice idle};
- };
- #alias {map.EnterDungeon.notice} {
- #if { "%1" == "idle" } {
- warnLog 你来到了「$gCurrentDungeon」,你不忙。;
- #nop 万安塔进入的时候会丢失 GMCP 战斗标志。;
- #if { "$gCurrentDungeon" == "万安塔" } {char.MarkFight};
- };
- #else {
- warnLog 你来到了「$gCurrentDungeon」。;
- #tick dungeon.checkbusy {checkbusy} 1;
- busy.Wait {
- #untick dungeon.checkbusy;
- event.Emit map/EnterDungeonIdle;
- };
- };
- };
- #alias {map.LeaveDungeon.notice} {
- char.UnmarkFight;
- #if { "%1" == "idle" } {
- okLog 你离开了「$gPrevDungeon」,你不忙。;
- };
- #else {
- okLog 你离开了「$gPrevDungeon」。;
- #tick dungeon.checkbusy {checkbusy} 1;
- busy.Wait {
- #untick dungeon.checkbusy;
- event.Emit map/LeaveDungeonIdle;
- };
- };
- };
- #alias {map.Dungeon.locate} {
- #if { "$gMapRoom[name]" == "" } {
- errLog 房间信息解析不正确。;
- #return;
- };
- #local dungeon {主站};
- #if { "$gMapRoom[name]" == "%+1..S[%+1..S]" } {
- #local dungeon {$gMapRoom[name]};
- #replace dungeon {%+1..S[%+1..S]} {&2};
- #replace dungeon {副本$} {};
- #replace gMapRoom[name] {[{[^\[]*}]} {};
- #replace gMapRoom[colorName] {[{[^\[]*}]} {};
- };
- #elseif { "$gMapRoom[dungeon]" != "" } {
- #local dungeon {$gMapRoom[dungeon]};
- };
- #if { "$dungeon" == "$gCurrentDungeon" } {
- #return;
- };
- #var gPrevDungeon {$gCurrentDungeon};
- #var gCurrentDungeon {$dungeon};
- #if { "$dungeon" == "主站" } {
- event.Emit map/LeaveDungeon;
- };
- #else {
- event.Emit map/EnterDungeon;
- };
- };
- #action {^准备进入%S⏳$E} {
- map.dungeon.change {%1};
- };
- #action {^准备退出%S...$E} {
- map.dungeon.change {%1};
- };
- #alias {map.dungeon.change} {
- #local dungeon {%1};
- #if { "$dungeon" != "{剑心居|破阵任务|韩世忠任务|保卫襄阳|鄱阳湖|万安塔|藏经阁|剿匪|蛊神塔}" } {
- #return;
- };
- #class map.dungeon.change open;
- #action {^你进入了%1副本。{|ID=map/dungeon}$} {map.dungeon.change.done};
- #action {^你退出了%1{|副本}。{|ID=map/dungeon}$} {map.dungeon.change.done};
- #alias {map.dungeon.change.sync} {
- #class map.dungeon.change kill;
- #untick map.dungeon.change.sync;
- sync.Ignore map.dungeon.change.sync;
- look;
- };
- #alias {map.dungeon.change.done} {
- xtt.Tick {map.dungeon.change.sync} {
- sync.Ignore map.dungeon.change.sync;
- sync.Wait {map.dungeon.change.sync} {map.dungeon.change.sync};
- } 1;
- };
- #delay {map.dungeon.change.wait} {map.dungeon.change.done} 5;
- #class dungeon.enter.wait close;
- };
- #action {^请使用 leave 自己的id 来退出副本。$E} {leave $user[id]; #line gag};
- #alias {enter jxj} {enter jianxinju} {5.5};
- /*
- 2024/06/29 巡检结果:
- 准备进入剑心居⏳
- 你进入了剑心居副本。
- 剑心居[剑心居副本] - [野外]
- 准备退出剑心居...
- 你退出了剑心居副本。
- 准备进入破阵任务⏳
- 你进入了破阵任务副本。
- 阵眼[破阵任务副本] - [野外]
- 准备退出破阵任务...
- 你退出了破阵任务。
- 准备进入韩世忠任务⏳
- 你进入了韩世忠任务副本。
- 山腰[韩世忠任务副本] - [大宋国] [野外]
- 准备退出韩世忠任务...
- 你退出了韩世忠任务。
- 准备进入保卫襄阳⏳
- 你进入了保卫襄阳副本。
- 襄阳当铺[保卫襄阳副本] - [大宋国] [城内]
- 准备退出保卫襄阳...
- 你退出了保卫襄阳。
- 准备进入鄱阳湖⏳
- 你进入了鄱阳湖副本。
- 小船[鄱阳湖副本] - [野外]
- 准备退出鄱阳湖...
- 你退出了鄱阳湖。
- 准备进入万安塔⏳
- 你进入了万安塔副本。
- 万安塔一层[万安塔副本] - [大元国] [副本]
- 准备退出万安塔...
- 你退出了万安塔。
- 准备进入藏经阁⏳
- 你进入了藏经阁副本。
- 藏经阁入口[藏经阁副本] - [野外] [未定义]
- 准备退出藏经阁...
- 你退出了藏经阁。
- 准备进入剿匪⏳
- 你进入了剿匪副本。
- 山脚下[剿匪副本] - [野外] ☆
- 准备退出剿匪...
- 你退出了剿匪。
- 规律:
- 准备进入XXX⏳
- 你进入了XXX副本。
- 房间名[XXX副本] -
- 准备退出XXX...
- 你退出了XXX。
- 特例:
- 你退出了剑心居副本。—— 这里多了「副本」两个字。
- 万安塔一层[万安塔副本] - [大元国] [副本] —— 末尾多了「副本」。
- */
|