TinTin++ setup for Aardwolf MUD
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.

89 lines
2.3 KiB

  1. #class quest kill
  2. #class quest open
  3. #NOP ############################
  4. #NOP ### GMCP Quest Handler
  5. #NOP ############################
  6. #EVENT {IAC SB GMCP comm.quest IAC SE}
  7. {
  8. #var {GMCP[COMM][QUEST]} {%0};
  9. #if {"$GMCP[COMM][QUEST][action]" == "start"}
  10. {
  11. $repchan @Y[@RQuest Requested@Y]@w: @YTarget@w=@R$GMCP[COMM][QUEST][targ]@w. @YRoom@w=@R$GMCP[COMM][QUEST][room]@w. @YArea@w=@R$GMCP[COMM][QUEST][area]@w.;
  12. #var quest_timer {<fca>ACTIVE<099>};
  13. #format {quest[start]} {%T};
  14. };
  15. #elseif {"$GMCP[COMM][QUEST][action]" == "fail"}
  16. {
  17. $repchan @W\{-=@RQuest Failed@W=-\}@w;
  18. #var quest {};
  19. #var temp {};
  20. #var $GMCP[COMM][QUEST] {};
  21. #var action {};
  22. };
  23. #elseif {"$GMCP[COMM][QUEST][action]" == "comp"}
  24. {
  25. #format {quest[end]} {%T};
  26. #math {quest[time]} {$quest[end] - $quest[start]};
  27. #var quest_timer 30;
  28. #tic quest_timer
  29. {
  30. #math quest_timer {$quest_timer - 1};
  31. #if $quest_timer==0 {#untic quest_timer;#var quest_timer <cfa>READY<099>};
  32. } {60} ;
  33. #if {$GMCP[COMM][QUEST][pracs] != 0}
  34. {
  35. #if {"$quest[bonus]" != ""}
  36. {
  37. #var quest[bonus] {$quest[bonus]@w, @R$GMCP[COMM][QUEST][pracs] prac};
  38. }
  39. {
  40. #var {quest[bonus]} { @Y[@WBonus: @R$GMCP[COMM][QUEST][pracs] prac};
  41. };
  42. #var quest[bonus] {$quest[bonus]@Y]@w};
  43. };
  44. #if {$GMCP[COMM][QUEST][trains] != 0}
  45. {
  46. #if {"$quest[bonus]" != ""}
  47. {
  48. #var quest[bonus] {$quest[bonus]@w, @R$GMCP[COMM][QUEST][trains] train};
  49. }
  50. {
  51. #var {quest[bonus]} { @Y[@WBonus: @R$GMCP[COMM][QUEST][trains] train};
  52. };
  53. #var quest[bonus] {$quest[bonus]@Y]@w};
  54. };
  55. #if {$GMCP[COMM][QUEST][tp] != 0}
  56. {
  57. #if {"$quest[bonus]" != ""}
  58. {
  59. #var quest[bonus] {$quest[bonus]@w, @R$GMCP[COMM][QUEST][tp] tp};
  60. }
  61. {
  62. #var {quest[bonus]} { @Y[@WBonus: @R$GMCP[COMM][QUEST][tp] tp};
  63. };
  64. #var quest[bonus] {$quest[bonus]@Y]@w};
  65. };
  66. $repchan @R[@YQuest Completed@R] @Y[@WQp: @R$GMCP[COMM][QUEST][totqp]@Y] $quest[time] secs $quest[bonus]@w;
  67. #var quest {};
  68. #var temp {};
  69. #var GMCP[COMM][QUEST] {};
  70. #var action {};
  71. };
  72. #elseif {"$GMCP[COMM][QUEST][action]" == "ready"}
  73. {
  74. $repchan @W\{-=@RQuest Time@W=-\}@w;
  75. #var quest_timer {<129>READY<099>};
  76. #bell;
  77. };
  78. #if {$debug}
  79. {
  80. #showme %1
  81. };
  82. #nop;
  83. }
  84. #class quest close