dungeon.tin 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #nop 房间信息解析模块之副本管理;
  2. VAR {当前副本} {gCurrentDungeon} {主站};
  3. VAR {上一个副本} {gPrevDungeon} {主站};
  4. event.Define {map/EnterDungeon} {无参} {$MODULE} {进入副本,副本的名称在变量 gCurrentDungeon 中。};
  5. event.Define {map/LeaveDungeon} {无参} {$MODULE} {离开副本,副本的名称在变量 gPrevDungeon 中。};
  6. event.Define {map/EnterDungeonIdle} {无参} {$MODULE} {进入副本,且不再 busy,副本的名称在变量 gCurrentDungeon 中。};
  7. event.Define {map/LeaveDungeonIdle} {无参} {$MODULE} {离开副本,且不再 busy,副本的名称在变量 gPrevDungeon 中。};
  8. event.HandleOnce {map/init} {map/dungeon} {map} {map.Dungeon.Init};
  9. #alias {map.Dungeon.Init} {
  10. event.Handle {map/GotRoomInfo} {map/dungeon} {map} {map.Dungeon.locate};
  11. event.Handle {map/EnterDungeon} {map/dungeon} {map} {map.EnterDungeon.notice};
  12. event.Handle {map/LeaveDungeon} {map/dungeon} {map} {map.LeaveDungeon.notice};
  13. event.Handle {map/EnterDungeonIdle} {map/dungeon} {map} {map.EnterDungeon.notice idle};
  14. event.Handle {map/LeaveDungeonIdle} {map/dungeon} {map} {map.LeaveDungeon.notice idle};
  15. };
  16. #alias {map.EnterDungeon.notice} {
  17. #if { "%1" == "idle" } {
  18. warnLog 你来到了「$gCurrentDungeon」,你不忙。;
  19. };
  20. #else {
  21. warnLog 你来到了「$gCurrentDungeon」。;
  22. #tick dungeon.checkbusy {checkbusy} 1;
  23. busy.Wait {
  24. #untick dungeon.checkbusy;
  25. event.Emit map/EnterDungeonIdle;
  26. };
  27. };
  28. };
  29. #alias {map.LeaveDungeon.notice} {
  30. #if { "%1" == "idle" } {
  31. okLog 你离开了「$gPrevDungeon」,你不忙。;
  32. };
  33. #else {
  34. okLog 你离开了「$gPrevDungeon」。;
  35. #tick dungeon.checkbusy {checkbusy} 1;
  36. busy.Wait {
  37. #untick dungeon.checkbusy;
  38. event.Emit map/LeaveDungeonIdle;
  39. };
  40. };
  41. };
  42. #alias {map.Dungeon.locate} {
  43. #if { "$gMapRoom[name]" == "" } {
  44. errLog 房间信息解析不正确。;
  45. #return;
  46. };
  47. #local dungeon {主站};
  48. #if { "$gMapRoom[name]" == "%+1..S[%+1..S]" } {
  49. #local dungeon {$gMapRoom[name]};
  50. #replace dungeon {%+1..S[%+1..S]} {&2};
  51. #replace dungeon {任务副本} {};
  52. #replace gMapRoom[name] {[{[^\[]*}]} {};
  53. #replace gMapRoom[colorName] {[{[^\[]*}]} {};
  54. };
  55. #if { "$dungeon" == "$gCurrentDungeon" } {
  56. #return;
  57. };
  58. #var gPrevDungeon {$gCurrentDungeon};
  59. #var gCurrentDungeon {$dungeon};
  60. #if { "$dungeon" == "主站" } {
  61. event.Emit map/LeaveDungeon;
  62. };
  63. #else {
  64. event.Emit map/EnterDungeon;
  65. };
  66. };
  67. #action {^准备进入%S⏳$E} {
  68. map.dungeon.change {%1};
  69. };
  70. #action {^准备退出%S...$E} {
  71. map.dungeon.change {%1};
  72. };
  73. #alias {map.dungeon.change} {
  74. #local dungeon {%1};
  75. #nop 计有:藏经阁、鄱阳湖、万安塔、保卫襄阳、剿匪、团战、大航海等常规任务副本;
  76. #nop 及剑心居、北侠影视城、游侠等三个特别副本;
  77. #if { "$dungeon" != "{\[(.*)任务副本\]|北侠影视城|剑心居|游侠}" } {
  78. #return;
  79. };
  80. #class map.dungeon.change open;
  81. #action {^你进入了%1。{|ID=map/dungeon}$} {map.dungeon.change.done};
  82. #action {^你退出了%1。{|ID=map/dungeon}$} {map.dungeon.change.done};
  83. #alias {map.dungeon.change.sync} {
  84. #class map.dungeon.change kill;
  85. #untick map.dungeon.change.sync;
  86. sync.Ignore map.dungeon.change.sync;
  87. look;
  88. };
  89. #alias {map.dungeon.change.done} {
  90. xtt.Tick {map.dungeon.change.sync} {
  91. sync.Ignore map.dungeon.change.sync;
  92. sync.Wait {map.dungeon.change.sync} {map.dungeon.change.sync};
  93. } 1;
  94. };
  95. #delay {map.dungeon.change.wait} {map.dungeon.change.done} 5;
  96. #class dungeon.enter.wait close;
  97. };
  98. #action {^请使用 leave 自己的id 来退出副本。$E} {leave $user[id]; #line gag};
  99. #alias {enter jxj} {enter jianxinju} {5.5};