prompt.tin 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. #var lib_ui_prompt[META] {
  2. {NAME} {提示栏插件}
  3. {DESC} {支持丰富的自定义选项,用户可用此模块定制自己的 UI。}
  4. {AUTHOR} {担子炮}
  5. };
  6. /*
  7. prompt 插件把整个屏幕划分为七个区域,从上到下依次为:
  8. Top line1
  9. Top line2
  10. ...
  11. Top lineN
  12. ----------- TopSepBar --------------
  13. (游戏区)
  14. ----------- MidSepBar --------------
  15. Bot line1
  16. Bot line2
  17. ...
  18. Bot lineN
  19. ----------- BotSepBar --------------
  20. <提示符>:(输入区)
  21. 输入区前面的提示符部分可以用 API prompt.Change 来修改。
  22. 除输入区和游戏区之外,剩下五个区域都可以定制,用来显示信息内容(以下称为字段)。
  23. 每一行都可以有多个字段。字段在视觉上由两部分组成,字段标签和字段内容。
  24. 其显示样式分别可以控制,并受到几个 prompt 特性的影响,下面会分别予以介绍。
  25. 字段的编排是高度可定制的,每个字段的标签、内容、颜色、显示风格、行为属性,
  26. 都可以通过自己修改 #list prompt-fields 来修改。下面是对 #list prompt-fields
  27. 的格式说明,但不建议直接在此处修改变量,请通过 etc/ui-settings.tin 来修改。
  28. prompt 模块在启动时会自动加载该文件。
  29. #list prompt-fields 是一个列表,其中中每个元素是一个 tt++ table,代表一个字段。
  30. tt++ table 由一组选项和与之对应的选项值来组成,用来说明想要定制的字段的选项。
  31. 下面是所有可供设置的字段选项:
  32. 1. place 枚举值 可选项: {Top|TopSepBar|MidSepBar|Bot|BotSepBar}
  33. 希望将字段显示在屏幕上的什么位置。
  34. 其中 {Top} 和 {Bot} 支持多行,其它三个只有一行。
  35. 默认为 BotSepBar。
  36. 2. line 自然数
  37. 只有 place={Top|Bot} 才支持 line,代表第几行,最上面是第一行。
  38. 默认为 1。
  39. 3. order 自然数
  40. 在同一行中的次序,默认按照在 list 中出现的顺序来排序。
  41. 4. label 中英文字符串
  42. 字段标签,每个字段都可以有一个标签,显示在内容前面。
  43. 默认为空白。
  44. 5. color tintin 格式的颜色代码,例如 <ddd>
  45. 字段值的颜色,通过该选项可以为字段值指定一个与配色主题不一样的颜色。
  46. 一般来说只有极个别选项才需要特别的颜色,没必要为每个选项都指定颜色,
  47. 因为那样的话你还不如去设置配色主题,参见下面配色主题的设置。
  48. 默认为空白,代表采用配色主题。
  49. 6. name 英文字符串 不能为空
  50. 字段名称,必须唯一,不能重复。
  51. 7. width 整数
  52. 字段内容的宽度,如果字段内容长度变化较大,可以设置一个固定宽度,以免晃动。
  53. 默认为 0,表示按照内容长度自动适配。
  54. 8. visibility 枚举值 {HideEmpty|HideCool|HideZero|HideLabel|Always}
  55. 含义如下:
  56. * HideEmpty 如果字段内容为空则不予显示。
  57. * HideCool 如果内容已陈旧则不予显示。请参考 cooldown 选项。
  58. * HideZero 如果倒计时归零则不予显示。请参考 countdown 选项。
  59. * HideLabel 仅显示字段内容,不显示字段标签。
  60. * Always 总是显示该字段的标签和内容。
  61. 所有的 Hide* 选项自动拥有 HideEmpty 语义。
  62. 默认为 HideEmpty。
  63. 9. cooldown 非负整数
  64. 该字段的有效时间。超过有效时间没有更新的字段将在视觉上予以弱化显示,以提醒
  65. 用户。也就是说,如果 cooldown 不为 0,则该字段被更新时其标签将会以颜色主题
  66. 中 HotLabel 所指定的风格显示(意指新鲜的内容),之后持续若干秒后,转为由
  67. CoolLabel 所指定的风格显示(意指陈旧的内容)。
  68. 持续时间由 cooldown 字段的值来决定,单位为秒。
  69. 陈旧的内容遇到 visibility=HideCool 时则不予显示。
  70. 如果 cooldown 为 0,则不会以 CoolLabel 风格显示。
  71. 默认值为 0。
  72. 10. countdown 枚举值 {Auto|Clock|Seconds}
  73. 倒计时类型的字段。其内容为一个非负整数,代表需要倒计时的秒数,或者也可以夹杂
  74. 于文字内容当中,此时文字内容中所有形如 (%d) 的内容将会被替换成倒计时显示。
  75. 本插件会自动为该字段更新其内容,使得用户能够看到倒计时的效果。
  76. 倒计时有两种显示样式,本选项设置为 Clock 时,显示为时钟样式(N天HH:MM:SS),
  77. 设置为 Seconds 时,显示为读秒样式(N秒)。设置为 Auto 时则根据剩余时间长短,
  78. 自动切换两种显示效果。
  79. 倒计时类型的字段,如果同时设置了 visibility=HideZero,那么倒计时归零后会自动
  80. 隐藏该字段。
  81. 在倒计时存续期间,该字段的 cooldown 属性将会被抑制,直到倒计时归零后才起作用。
  82. 这条规则确保倒计时字段即使设置了 visibility=HideCool,也至少会完成倒计时,而
  83. 倒计时结束后,如果 cooldown 时间比倒计时时间还要长,则还会继续显示一段时间之
  84. 后才会被隐藏。
  85. */
  86. #var prompt-fields {};
  87. #list prompt-fields create {};
  88. #nop 配色主题,注意这里不要直接嵌入 SGR(ansi codes),否则计算宽度时会有问题。;
  89. #var prompt-theme {
  90. {Disable}{<bbc>}
  91. {BusyColor}{<030>}
  92. {BattleColor}{<110>}
  93. {BattleBusyColor}{<500><110>}
  94. {TopSepBar}{<020>}
  95. {MidSepBar}{<020>}
  96. {BotSepBar}{<020>}
  97. {HotLabel}{<100><F399>}
  98. {CoolLabel}{<100>}
  99. {Value}{<070>}
  100. };
  101. #nop 自定义图标;
  102. #var prompt-icon {
  103. {DisableRefresh}{🚫}
  104. };
  105. #nop 热键绑定;
  106. #var global-key-bindings {};
  107. #list global-key-bindings create {
  108. {{key}{\cos} {action}{prompt.ToggleSwitch}}
  109. };
  110. #var prompt-top-max-line {0};
  111. #var prompt-bot-max-line {0};
  112. #nop 所有的字段值的字典;
  113. #var prompt-dict {};
  114. #nop 上次实际绘制屏幕的时间;
  115. #var prompt-refresh {
  116. {global}{false}
  117. {lines} {false}
  118. {prompt}{false}
  119. };
  120. #nop 提示符;
  121. #var prompt-prompt {Input};
  122. #function {lib_ui_prompt.Init} {
  123. load-file {etc/ui-settings.tin};
  124. prompt.Set {};
  125. prompt.bindKey;
  126. prompt.Enable;
  127. #return true;
  128. };
  129. #nop 设置字段值,被设置的字段值将立即显示在屏幕上;
  130. #alias {prompt.Set} {
  131. #local fields {%1};
  132. #local now {};
  133. #format now {%T};
  134. #local field {};
  135. #foreach {*fields[]} {field} {
  136. #var prompt-dict[$field] {
  137. {updateTime}{$now}
  138. {showTime}{$now}
  139. {value}{$fields[$field]}
  140. };
  141. };
  142. };
  143. #nop 设置提示符,提示符位于屏幕最下方输入区的首部,用作指示整个游戏所处的状态;
  144. #alias {prompt.Change} {
  145. #local text {%1};
  146. #var prompt-prompt {$text};
  147. prompt.refresh;
  148. };
  149. #nop 设置字段值,被设置的字段值将立即显示在屏幕上,但会在一段时间后消失;
  150. #alias {prompt.SetAwhile} {
  151. #local id {%1};
  152. #local value {%2};
  153. #local secs {%3};
  154. #if { "$secs" == "" } {
  155. #local secs {5};
  156. };
  157. prompt.Set {{$id}{$value}};
  158. #line sub {VARIABLES} {
  159. #delay prompt-set-awhile-$id {
  160. prompt.Set {{$id}{}};
  161. } {$secs};
  162. };
  163. };
  164. #nop 显示字段值;
  165. #alias {prompt.refresh} {
  166. #local topMaxLine {0};
  167. #local botMaxLine {0};
  168. #local topLines {};
  169. #local botLines {};
  170. #local topSepBar {};
  171. #local midSepBar {};
  172. #local botSepBar {};
  173. #foreach {*{prompt-fields[]}} {idx} {
  174. #local field {${prompt-fields[$idx]}};
  175. #if { "$field[visibility]" == "" } {
  176. #local field[visibility] {HideEmpty};
  177. };
  178. #switch {"$field[place]"} {
  179. #case {"Top"} {
  180. #while {1} {
  181. #if { $field[line] <= $topMaxLine } {
  182. #break;
  183. };
  184. #math topMaxLine {$topMaxLine + 1};
  185. #local topLines[$topMaxLine] {};
  186. };
  187. #if { "$field[order]" == "" } {
  188. #local field[order] {@eval{ @max{0;*topLines[$field[line]][]} + 1 }};
  189. };
  190. #local topLines[$field[line]][$field[order]] {$field};
  191. };
  192. #case {"Bot"} {
  193. #while {1} {
  194. #if { $field[line] <= $botMaxLine } {
  195. #break;
  196. };
  197. #math botMaxLine {$botMaxLine + 1};
  198. #local botLines[$botMaxLine] {};
  199. };
  200. #if { "$field[order]" == "" } {
  201. #local field[order] {@eval{ @max{0;*botLines[$field[line]][]} + 1 }};
  202. };
  203. #local botLines[$field[line]][$field[order]] {$field};
  204. };
  205. #case {"TopSepBar"} {
  206. #if { "$field[order]" == "" } {
  207. #local field[order] {@eval{ @max{0;*topSepBar[]} + 1 }};
  208. };
  209. #local topSepBar[$field[order]] {$field};
  210. };
  211. #case {"MidSepBar"} {
  212. #if { "$field[order]" == "" } {
  213. #local field[order] {@eval{ @max{0;*midSepBar[]} + 1 }};
  214. };
  215. #local midSepBar[$field[order]] {$field};
  216. };
  217. #case {"BotSepBar"} {
  218. #if { "$field[order]" == "" } {
  219. #local field[order] {@eval{ @max{0;*botSepBar[]} + 1 }};
  220. };
  221. #local botSepBar[$field[order]] {$field};
  222. };
  223. #default {
  224. #echo {配置有误,请检查。place=[%s]} {$field[place]};
  225. };
  226. };
  227. };
  228. #local allBarColor {};
  229. #if { "${prompt-dict[busy][value]}" == "true" } {
  230. #local allBarColor {${prompt-theme[BusyColor]}};
  231. };
  232. #if { "${prompt-dict[battle][value]}" == "true" } {
  233. #local allBarColor {${prompt-theme[BattleColor]}};
  234. };
  235. #if { "${prompt-dict[battle][value]}" == "true" && "${prompt-dict[busy][value]}" == "true" } {
  236. #local allBarColor {${prompt-theme[BattleBusyColor]}};
  237. };
  238. #if { "${prompt-dict[disable][value]}" != "" } {
  239. #local allBarColor {${prompt-theme[Disable]}};
  240. };
  241. #if { &topSepBar[] > 0 } {
  242. #math topMaxLine {$topMaxLine + 1};
  243. };
  244. #if { $botMaxLine == 0 && ( &midSepBar[] == 0 || &midSepBar[] == 0 ) } {
  245. #local botMaxLine {1};
  246. };
  247. #else {
  248. #math botMaxLine {$botMaxLine + 2};
  249. };
  250. #local content {};
  251. #list content create {};
  252. #local line {};
  253. #local delta {0};
  254. #foreach {*topLines[]} {line} {
  255. #local fields {$topLines[$line]};
  256. #local text {@__prompt_build_line__{{$fields}}};
  257. #if { $text[width] > 0 } {
  258. #local realLine {};
  259. #math realLine {$line - $delta};
  260. #list content {add} {{{line}{$realLine}{text}{$text[text]}}};
  261. };
  262. #else {
  263. #math delta {$delta + 1};
  264. #math topMaxLine {$topMaxLine - 1};
  265. };
  266. };
  267. #if { &topSepBar[] > 0 } {
  268. #local text {@__prompt_build_line__{{$topSepBar}}};
  269. #if { $text[width] == 0 && $topMaxLine == 1 } {
  270. #math topMaxLine {$topMaxLine - 1};
  271. };
  272. #else {
  273. #local barColor {${prompt-theme[TopSepBar]}};
  274. #if { "$allBarColor" != "" } {#local barColor {$allBarColor}};
  275. #local text {@__prompt_fill_line__{{$text[text]};{$text[width]};$barColor}};
  276. #list content {add} {{{line}{$topMaxLine}{text}{$text}}};
  277. };
  278. };
  279. #if { &botSepBar[] > 0 || $botMaxLine > 0 } {
  280. #local text {@__prompt_build_line__{{$botSepBar}}};
  281. #local barColor {${prompt-theme[BotSepBar]}};
  282. #if { "$allBarColor" != "" } {#local barColor {$allBarColor}};
  283. #local text {@__prompt_fill_line__{{$text[text]};{$text[width]};$barColor}};
  284. #list content {add} {{{line}{-2}{text}{$text}}};
  285. };
  286. #local delta {0};
  287. #local line {0};
  288. #if { &botLines[] > 0 } {
  289. #loop {&botLines[]} {1} {line} {
  290. #local fields {$botLines[$line]};
  291. #local text {@__prompt_build_line__{{$fields}}};
  292. #if { $text[width] > 0 } {
  293. #local realLine {};
  294. #math realLine {$line - $botMaxLine - 1};
  295. #list content {add} {{{line}{$realLine}{text}{$text[text]}}};
  296. };
  297. #else {
  298. #math botMaxLine {$botMaxLine - 1};
  299. };
  300. };
  301. };
  302. #if { &midSepBar[] > 0 || &botLines[] > 0 } {
  303. #local text {@__prompt_build_line__{{$midSepBar}}};
  304. #local barColor {${prompt-theme[MidSepBar]}};
  305. #if { "$allBarColor" != "" } {#local barColor {$allBarColor}};
  306. #local text {@__prompt_fill_line__{{$text[text]};{$text[width]};$barColor}};
  307. #math line {$botMaxLine + 1};
  308. #list content {add} {{{line}{-$line}{text}{$text}}};
  309. };
  310. #if { "${prompt-top-max-line}" != "$topMaxLine" || "${prompt-bot-max-line}" != "$botMaxLine" } {
  311. #local lineWidth {};
  312. #screen get COLS lineWidth;
  313. #local spaceLine {};
  314. #format spaceLine {%-${lineWidth}s} {};
  315. #local newMax {$topMaxLine};
  316. #while { $newMax < ${prompt-top-max-line} } {
  317. #math newMax {$newMax + 1};
  318. #echo {{$spaceLine}{$newMax}};
  319. };
  320. #local newMax {$botMaxLine + 1};
  321. #while { $newMax < ${prompt-bot-max-line} } {
  322. #math newMax {$newMax + 1};
  323. #echo {{$spaceLine}{-$newMax}};
  324. };
  325. #var prompt-top-max-line {$topMaxLine};
  326. #var prompt-bot-max-line {$botMaxLine};
  327. #split {$topMaxLine} {$botMaxLine};
  328. };
  329. #local idx {};
  330. #foreach {*content[]} {idx} {
  331. #local line {$content[$idx]};
  332. #echo {{%s}{$line[line]}} {$line[text]};
  333. };
  334. #local prompt {${prompt-prompt}};
  335. #if { "$prompt" != "" } {
  336. #local prompt {$prompt: };
  337. #echo {{$prompt}{-1}};
  338. };
  339. };
  340. #function {__prompt_build_line__} {
  341. #local fields {%1};
  342. #local text {};
  343. #local order {};
  344. #local lineWidth {0};
  345. #foreach {*fields[]} {order} {
  346. #local field {$fields[$order]};
  347. #local name {$field[name]};
  348. #local label {$field[label]};
  349. #local color {$field[color]};
  350. #local width {$field[width]};
  351. #local value {${prompt-dict[$name]}};
  352. #local now {};
  353. #format now {%T};
  354. #nop 所有的 Hide* 选项自动拥有 HideEmpty 语义。;
  355. #if { "$field[visibility]" == "Hide%*" && "$value[value]" == "" } {
  356. #continue;
  357. };
  358. #nop 检查是否是倒计时,以及倒计时是否已经归零;
  359. #local zero {undef};
  360. #if { "$field[countdown]" != "" } {
  361. #local seconds {};
  362. #math seconds {$now - ${prompt-dict[$name][showTime]}};
  363. #replace value[value] {^%+1..d$} {@__prompt_countdown__{&1;$seconds}};
  364. #replace value[value] {(%+1..d)} {(@__prompt_countdown__{&1;$seconds})};
  365. #if { "$value[value]" != "{[1-9][0-9]*|.*\([1-9][0-9]*\).*}" } {
  366. #local zero {true};
  367. };
  368. #else {
  369. #local zero {false};
  370. };
  371. #var {prompt-dict[$name][showTime]} {$now};
  372. #var {prompt-dict[$name][value]} {$value[value]};
  373. #replace value[value] {^%+1..d$} {@__prompt_show_countdown__{$field[countdown];&1}};
  374. #replace value[value] {(%+1..d)} {(@__prompt_show_countdown__{$field[countdown];&1})};
  375. };
  376. #nop 如果设置了 HideZero,那么倒计时归零时,不予显示该字段。;
  377. #if { "$field[visibility]" == "HideZero" && "$zero" == "true" } {
  378. #continue;
  379. };
  380. #nop 检查是否已经是冷却了的字段,倒计时字段当倒计时持续时不会变为冷却;
  381. #local cool {false};
  382. #if { $field[cooldown] > 0 && $now - $value[updateTime] > $field[cooldown] && "$zero" != "false" } {
  383. #local cool {true};
  384. };
  385. #nop 如果设置了 HideCool,那么内容冷却之后则不予显示;
  386. #if { "$field[visibility]" == "HideCool" && "$cool" == "true" } {
  387. #continue;
  388. };
  389. #nop 如果设置了 HideLabel,那么不显示标签;
  390. #if { "$field[visibility]" == "HideLabel" } {
  391. #local label {};
  392. };
  393. #if { "$label" != "" } {
  394. #nop 如果全局开关已经禁用,则忽略所有配色,全部显示为禁用色;
  395. #if { "${prompt-dict[disable][value]}" != "" } {
  396. #replace label {^<{[a-zA-Z0-9]+}>} {};
  397. #local label {${prompt-theme[Disable]}$label};
  398. };
  399. #else {
  400. #nop 否则根据内容的新鲜程度自动改变颜色;
  401. #if { "$cool" == "true" } {
  402. #replace label {^<{[a-zA-Z0-9]+}>} {};
  403. #local label {${prompt-theme[CoolLabel]}$label};
  404. };
  405. #else {
  406. #local label {${prompt-theme[HotLabel]}$label};
  407. };
  408. };
  409. #local label {$label<070> };
  410. };
  411. #if { "$field[visibility]" == "HideLabel" } {
  412. #local label {};
  413. };
  414. #if { "$color" == "" } {
  415. #local color {${prompt-theme[Value]}};
  416. };
  417. #format value {$color%-${width}s<070>} {$value[value]};
  418. #math lineWidth {$lineWidth + @strWidth{$label} + @strWidth{$value}};
  419. #if { "$text" == "" } {
  420. #local text {$label$value};
  421. };
  422. #elseif { "$label$value" != "" } {
  423. #local text {$text $label$value};
  424. #math lineWidth {$lineWidth + 1};
  425. };
  426. };
  427. #return {{width}{$lineWidth}{text}{$text}};
  428. };
  429. #function {__prompt_countdown__} {
  430. #local value {%1};
  431. #local count {%2};
  432. #math value {$value - $count};
  433. #if { $value < 0 } {
  434. #local value {0};
  435. };
  436. #return {$value};
  437. };
  438. #function {__prompt_show_countdown__} {
  439. #local type {%1};
  440. #local secs {%2};
  441. #local ret {};
  442. #if { "$type" == "Auto" } {
  443. #if { $secs < 600 } {
  444. #local type {Seconds};
  445. };
  446. #else {
  447. #local type {Clock};
  448. };
  449. };
  450. #if { "$type" == "Seconds" } {
  451. #local ret {${secs}s};
  452. };
  453. #elseif { "$type" == "Clock" } {
  454. #if { $secs > 86400 } {
  455. #math ret {$secs / 86400};
  456. #local ret {$ret天};
  457. #math secs {$secs % 86400};
  458. };
  459. #local hour {};
  460. #local mins {};
  461. #math hour {$secs / 3600};
  462. #math secs {$secs % 3600};
  463. #math mins {$secs / 60};
  464. #math secs {$secs % 60};
  465. #format ret {%s%%02d:%%02d:%%02d} {$ret} {$hour} {$mins} {$secs};
  466. };
  467. #return {$ret};
  468. };
  469. #function {__prompt_fill_line__} {
  470. #local text {%1};
  471. #local width {%2};
  472. #local color {%3};
  473. #local newText {@trim{$text}};
  474. #math width {$width + @strWidth{$newText} - @strWidth{$text}};
  475. #local screenWidth {0};
  476. #screen get COLS screenWidth;
  477. #local leftLen {0};
  478. #local rightLen {0};
  479. #math leftLen {($screenWidth - $width) / 2 - 1};
  480. #math rightLen {$screenWidth - $leftLen - $width - 2};
  481. #local left {};
  482. #format {left} {%${leftLen}s} {};
  483. #replace {left} { } {─};
  484. #local right {};
  485. #format {right} {%${rightLen}s} {};
  486. #replace {right} { } {─};
  487. #if { $leftLen < 0 } {
  488. #format {newText} {%$screenWidth.${screenWidth}s} {$newText};
  489. #return {$newText};
  490. };
  491. #elseif { "$newText" == "" } {
  492. #return {$color$left──$right<070>};
  493. };
  494. #else {
  495. #return {$color$left<070> $newText $color$right<070>};
  496. };
  497. };
  498. #event {SCREEN RESIZE} {
  499. #var prompt-top-max-line {0};
  500. #var prompt-bot-max-line {0};
  501. prompt.refresh;
  502. #buffer end;
  503. };
  504. #event {CATCH IAC SB NAWS} {#0};
  505. #alias {prompt.UpdateHP} {
  506. prompt.Set {
  507. {exp}{$char[HP][经验显示]}
  508. {pot}{$char[HP][潜能显示]}
  509. {battle}{$char[HP][战斗中]}
  510. {busy}{$char[HP][忙]}
  511. }
  512. };
  513. #alias {prompt.UpdateSM} {
  514. #local effect {$char[STATUS][持续效果]};
  515. #replace effect {秒)} {)};
  516. prompt.Set {
  517. {yunqi}{$char[STATUS][气血恢复]}
  518. {status}{$char[STATUS][健康状态]}
  519. {persist}{$effect}
  520. }
  521. };
  522. #alias {prompt.Disable} {
  523. prompt.Set {{disable}{${prompt-icon[DisableRefresh]}}};
  524. prompt.refresh;
  525. #untick prompt.refresh;
  526. };
  527. #alias {prompt.Enable} {
  528. prompt.Set {{disable}{}};
  529. Tick prompt.refresh {prompt.refresh} 1;
  530. };
  531. #alias {prompt.ToggleSwitch} {
  532. #if { "${prompt-dict[disable][value]}" == "" } {
  533. prompt.Disable;
  534. };
  535. #else {
  536. prompt.Enable;
  537. };
  538. };
  539. #alias {prompt.bindKey} {
  540. #local idx {};
  541. #foreach {*{global-key-bindings[]}} {idx} {
  542. #local key {${global-key-bindings[$idx][key]}};
  543. #local code {${global-key-bindings[$idx][action]}};
  544. #line sub var #macro {$key} {$code};
  545. };
  546. };
  547. #alias {prompt.test} {
  548. #local fullme {<010>很久没有进行机器人检查(fullme)了,任务奖励将受到影响。<070>};
  549. #local fullme {http://pkuxkx.com/antirobot/robot.php?filename=1576762922984895};
  550. prompt.Set { {URL}{$fullme} };
  551. prompt.Set {
  552. {pot}{357.75万}
  553. {exp}{7510.56万}
  554. {expSpd}{11.88万/小时}
  555. {profit}{308金币/小时}
  556. };
  557. prompt.Set {
  558. {job}{<171>乔峰}
  559. {stage}{寻找NPC}
  560. {area}{建康}
  561. {room}{中城}
  562. {npc}{庞九公}
  563. {type}{杀死}
  564. };
  565. };