skills.tin 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. #nop ╭───技能列表(共十六项)─┬─────────────┬──────┬──────┬──────╮
  2. #nop │名称 │ID │描述 │级别 │最大级别 │
  3. #nop ├───一项职业技能────┼─────────────┼──────┼──────┼──────┤
  4. #nop │ 占卜之术 │divination │不足挂齿 │82.0 │387 │
  5. #nop ├───六项基本知识────┼─────────────┼──────┼──────┼──────┤
  6. #nop │ 禅宗心法 │buddhism │半生不熟 │153.0 │- │
  7. #nop │ 鉴定之术 │identification │初窥门径 │54.0 │- │
  8. #nop │ 读书写字 │literate │半生不熟 │152.0 │- │
  9. #nop │ 医术 │medical-skill │新学乍用 │30.0 │- │
  10. #nop │ 妙手空空 │stealing │新学乍用 │10.0 │- │
  11. #nop │ 道家养生术 │taoism │深不可测 │948.23 │- │
  12. #nop ├───六项基本功夫────┼─────────────┼──────┼──────┼──────┤
  13. #nop │ 基本拳法 │cuff │半生不熟 │386.0 │387 │
  14. #nop │ 基本轻功 │dodge │半生不熟 │386.0 │387 │
  15. #nop │ 基本内功 │force │半生不熟 │386.0 │387 │
  16. #nop │ 基本招架 │parry │半生不熟 │386.0 │387 │
  17. #nop │ 基本剑法 │sword │半生不熟 │386.0 │387 │
  18. #nop ├───四项特殊功夫────┼─────────────┼──────┼──────┼──────┤
  19. #nop │□太极剑法 │taiji-jian │半生不熟 │386.0 │387 │
  20. #nop │□太极拳 │taiji-quan │半生不熟 │386.0 │387 │
  21. #nop │□太极神功 │taiji-shengong │第五重楼 │387.0 │387 │
  22. #nop │□梯云纵 │tiyunzong │半生不熟 │386.0 │387 │
  23. #nop ╰─────────────┴─────────────┴──────┴────北大侠客行────╯
  24. #nop;
  25. #function {basic_char_skills.Init} {
  26. #class data/basic/char open;
  27. #var char[Skills] {};
  28. #class data/basic/char close;
  29. #return true;
  30. };
  31. #alias {skills} {char.skills};
  32. #alias {sk} {char.skills};
  33. #alias {cha} {char.skills};
  34. #alias {char.skills} {
  35. #local args {%0};
  36. #if { "$args" == "" } {
  37. #line oneshot #action {^╭───技能列表(共%*项){(─|┬)*}──╮$} {
  38. char.skills.parse.output;
  39. };
  40. };
  41. xtt.Send skills %0;
  42. };
  43. #alias {char.skills.parse.output} {
  44. #class {ParseSkills} open;
  45. #var char[Skills][currentType] {};
  46. #gag {^│名称};
  47. #action {^├───%%1项%%2──} {
  48. #var char[Skills][currentType] {%%2};
  49. };
  50. #local RST {\e[0m};
  51. #local RST__ {\e[2;37;0m};
  52. #local __I__ {$RST__│};
  53. #action {~^$RST│%*│%*│%*│%*│%*│{|ID=char.skills}} {
  54. #local line {%%0};
  55. #local code {%%2};
  56. #local level {%%4};
  57. #local limit {%%5};
  58. #replace {code} {\x1b[2;37;0m} {};
  59. #replace {level} {\x1b[2;37;0m} {};
  60. #replace {limit} {\x1b[2;37;0m} {};
  61. #replace level {+} {};
  62. #if { "$limit" == "%s%d%s" } {
  63. #math limit {$limit + 0};
  64. };
  65. #else {
  66. #local limit {0};
  67. };
  68. #if { $limit > 0 } {
  69. #nop 给技能加上彩色进度条,用来表示当前级别距离上限的程度;
  70. #local newCode {@__char_skills_colorit__{{$code};$level;$limit}};
  71. #replace code { } {};
  72. #replace line {$code\x1b[2;37;0m%s} {$newCode\e[0m};
  73. #echo {%s} {@Beautify{{$line}}};
  74. #local line {Skill/%%1/%%2/%%3/%%4/$limit};
  75. #replace line { } {};
  76. #showme {$line};
  77. #line gag;
  78. };
  79. };
  80. #action {^Skill/{□|Θ|}%%2/%%3/%%4/%%5/%%6$} {
  81. #local type ${char[Skills][currentType]};
  82. #local enabled {%%1};
  83. #local name {%%2};
  84. #local code {%%3};
  85. #local rank {%%4};
  86. #local level {%%5};
  87. #local limit {%%6};
  88. #replace name { } {};
  89. #if { "$enabled" == "□" } {
  90. #format enabled {true};
  91. };
  92. #else {
  93. #format enabled {false};
  94. };
  95. #var {char[Skills][$name]} {
  96. {name}{$name}
  97. {type}{$type}
  98. {enabled}{$enabled}
  99. {code}{$code}
  100. {rank}{$rank}
  101. {level}{$level}
  102. {limit}{$limit}
  103. };
  104. #line gag;
  105. };
  106. #action {^╰───{(┴|─)*}─%S────╯{|ID=char.skills}$} {
  107. #unvar char[Skills][currentType];
  108. #class {ParseSkills} kill;
  109. };
  110. #action {^你不是查看过吗?{|ID=char/skills}$} {
  111. #unvar char[Skills][currentType];
  112. #class {ParseSkills} kill;
  113. };
  114. event.HandleOnce GA {char.skills} {char} {
  115. #unvar char[Skills][currentType];
  116. #class {ParseSkills} kill;
  117. #nop 吞参数专用,不要删除本行,也不要在末尾加分号或是别的语句
  118. };
  119. #class {ParseSkills} close;
  120. };
  121. #function {__char_skills_colorit__} {
  122. #local code {%1};
  123. #local level {%2};
  124. #local limit {%3};
  125. #local p {};
  126. #math p {$level * 100 / $limit};
  127. #format p {%d} {$p};
  128. #local color {};
  129. #if { $p < 15 } {
  130. #format color {%s} {<071>};
  131. };
  132. #elseif { $p < 30 } {
  133. #format color {%s} {<171>};
  134. };
  135. #elseif { $p < 60 } {
  136. #format color {%s} {<003>};
  137. };
  138. #elseif { $p < 90 } {
  139. #format color {%s} {<074>};
  140. };
  141. #elseif { $p < 100 } {
  142. #format color {%s} {<134>};
  143. };
  144. #elseif { $p == 100 } {
  145. #format color {%s} {<132>};
  146. };
  147. #elseif { $p > 100 } {
  148. #format color {%s} {<506>};
  149. };
  150. #local len {};
  151. #local len2 {};
  152. #local len3 {};
  153. #format {len} {%L} {$code};
  154. #format {code} {%p} {$code};
  155. #format {len2} {%L} {$code};
  156. #math len3 {$len - $len2};
  157. #format {code} {%s%${len3}s} {$code} {$p%};
  158. #local leftLen {};
  159. #math leftLen {$len * $level / $limit};
  160. #format leftLen {%d} {$leftLen};
  161. #local left {};
  162. #format {left} {${color}%.${leftLen}s<070>} {$code};
  163. #local right {};
  164. #local rightLen {};
  165. #math rightLen {$len - $leftLen};
  166. #format {right} {%r} {$code};
  167. #format {right} {%.${rightLen}s} {$right};
  168. #format {right} {<g08>%r} {$right};
  169. #return {$left$right};
  170. };