TinTin++ Configs for DiscworldMUD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.2 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. #CLASS {tpamonitor} {kill};
  2. #CLASS {tpamonitor} {open};
  3. #nop ### Turn TPA indicator on ###
  4. #action {^ * You are surrounded by a magical impact shield.$} {
  5. #var {tpa_status} {1};
  6. #var {tpa_color} {invisible};
  7. update_prompt;
  8. }
  9. #action {^ * You are surrounded by a %+ magical impact shield.$}
  10. {
  11. #var {tpa_status} {1};
  12. #var {tpa_color} {%1};
  13. update_prompt;
  14. }
  15. #action {^With a noise that sounds like "Plink!", everything around you flashes red for a moment.$} {
  16. #var {tpa_status} {1};
  17. #var {tpa_color} {invisible};
  18. #format {tpa_start} {%T};
  19. #nop Update ourselves in the group shield monitor;
  20. #variable {group_shields[$GMCP[charinfo][capname]][tpa]} {1};
  21. /writegroupshieldstofile
  22. update_prompt
  23. }
  24. #nop ### Turn TPA indicator off ###
  25. #action {^There is a sudden white flash. Your magical shield has broken.$} {
  26. #line {log} {$chat_file};
  27. #var {tpa_status} {0};
  28. #format {tpa_end} {%T};
  29. /break_tpa
  30. }
  31. #nop ### Track TPA colors ###
  32. #action {^As your shield absorbs the impact, it becomes visible as a %1 glow.$}
  33. {
  34. #var {tpa_color} {%1};
  35. update_prompt;
  36. }
  37. #action {^As your shield absorbs the impact, its glow changes from a %1 to a %2.$}
  38. {
  39. #var {tpa_color} {%2};
  40. update_prompt;
  41. }
  42. #action {^Your shield changes from a %1 to a %2.$}
  43. {
  44. #var {tpa_color} {%2};
  45. update_prompt;
  46. }
  47. #action {^Your shield stops glowing a %1 and lapses back into invisibility.$}
  48. {
  49. #var {tpa_color} {invisible};
  50. update_prompt;
  51. }
  52. #nop ### When TPA breaks show some info ###
  53. #alias {/break_tpa} {
  54. #showme {\a\a};
  55. #if {&{tpa_start}} {
  56. #math {tpa_dur} {$tpa_end - $tpa_start};
  57. #math {tpa_dur} {($tpa_dur - (60 - 1)) / 60};
  58. #echo {<168>*** TPA broken! (lasted for $tpa_dur minutes) ***<099>};
  59. }
  60. #nop Update ourselves in the group shield monitor;
  61. #variable {group_shields[$GMCP[charinfo][capname]][tpa]} {0};
  62. /writegroupshieldstofile
  63. #unvar {tpa_start};
  64. #unvar {tpa_end};
  65. update_prompt
  66. }
  67. #nop ### alias to reset TPA status, if it breaks and we didn't catch it ###
  68. #alias {tpareset} {
  69. #unvar {tpa_start};
  70. #unvar {tpa_end};
  71. #var {tpa_status} {0};
  72. }
  73. #var {tpa_status} {0};
  74. #CLASS {tpamonitor} {close};