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.

116 lines
4.5 KiB

  1. #CLASS {missiontimers_letters} {kill};
  2. #CLASS {missiontimers_letters} {open};
  3. #NOP [1 = Local, 2= Far Away, 3 = Distant Lands, 4 = Difficult Customer]
  4. #VAR {dead_letter_rewards} {
  5. {4 Ankh-Morpork dollars}{1}
  6. {8 Ankh-Morpork dollars}{2}
  7. {3 Djelian talents and 5 Djelian tooni}{3}
  8. {4 Lancre crowns and 2 Lancre shillings}{3}
  9. {7 Ephebian decadrachmae and 2 Ephebian stater}{3}
  10. {2 Ankh-Morpork ten-dollars}{3}
  11. {2 Genuan forins and 5 Genuan livres}{3}
  12. {1 Klatchian ten dinar and 2 Klatchian two dinar coins}{3}
  13. {1 Agatean Empire ten-rhinu and 5 Agatean Empire rhinu}{3}
  14. {7 Lancre crowns and 5 Lancre shillings}{4}
  15. {2 Agatean Empire ten-rhinu and 5 Agatean Empire rhinu}{4}
  16. {6 Djelian talents and 5 Djelian tooni}{4}
  17. {4 Genuan forins and 3 Genuan livres}{4}
  18. {3 Ankh-Morpork ten-dollars and 2 Ankh-Morpork dollars}{4}
  19. {1 Ephebian mina and 5 Ephebian decadrachmae}{4}
  20. {1 Agatean Empire fifty-rhinu and 2 Agatean Empire ten-rhinu}{5}
  21. {9 Ankh-Morpork ten-dollars}{5}
  22. {1 Lancre sovereign and 1 Lancre tencrown}{5}
  23. {3 Ephebian minae and 5 Ephebian decadrachmae}{5}
  24. {1 Genuan ducat and 2 Genuan forins}{5}
  25. }
  26. #var {missions[letter][active_list]} {};
  27. #var {missions[letter][retry_list]} {};
  28. #ALIAS {/letter_returned} {
  29. #list {missions[letter][retry_list]} {find} {$GMCP[charinfo][name]} {letter_current};
  30. #if {$letter_current == 0} {
  31. #list {missions[letter][retry_list]} {add} {$GMCP[charinfo][name]};
  32. #line sub variable {
  33. #delay {600} {
  34. #nop Print message
  35. #format {letter_retry_line} {%c[MH] %c*%c %s%c can now request a new letter from Frank.} {bold blue} {bold yellow} {bold green}{$GMCP[charinfo][name]} {bold blue};
  36. #echo {$letter_retry_line};
  37. #unvar {letter_retry_line};
  38. #nop Remove player from state list
  39. #list {missions[letter][retry_list]} {find} {$GMCP[charinfo][name]} {letter_current_inner};
  40. #list {missions[letter][retry_list]} {delete} {$letter_current_inner};
  41. };
  42. };
  43. };
  44. #unvar {letter_current};
  45. };
  46. #ALIAS {return letter} {
  47. #send {return letter};
  48. /letter_returned;
  49. };
  50. #ACTION {^You offer to give a letter to Frank} {
  51. /letter_returned;
  52. };
  53. #ACTION {^You have been awarded %d experience points and given %+} {
  54. #nop You have been awarded 60407 experience points and given 2 Agatean Empire ten-rhinu and 5 Agatean Empire rhinu.
  55. -- Last difficulty completion seen for future salute trigger
  56. local iLastDifficultyCompleted = 0
  57. -- Detected a reward string, record a difficulty level in preperation for the salute line
  58. function QuowMissionReward (sName, sLine, wildcards)
  59. sCashValue = wildcards[1]
  60. if (sQuowRewards[sCashValue] ~= nil) then
  61. iLastDifficultyCompleted = sQuowRewards[sCashValue]
  62. else
  63. -- See if we were waiting for an Ozzie pottery timer?
  64. if (IsTimer("StoPotteryWaiting_" .. sCurrentCharacter) == 0) then
  65. AddTimer ("StoLatPottery_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify")
  66. elseif (IsTimer("OCPennieMission_" .. sCurrentCharacter) == 0) then
  67. AddTimer ("OCPennieLaced_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify")
  68. end
  69. end
  70. end
  71. }
  72. <trigger
  73. enabled="y"
  74. keep_evaluating="n"
  75. match="^(?:> )?You have been awarded [0-9]{1,7} experience points and given (.+?)\.$"
  76. regexp="y"
  77. script="QuowMissionReward"
  78. name="QuowMissionReward"
  79. sequence="40"
  80. >
  81. </trigger>
  82. #ACTION {^You salute smartly as you deliver a letter} {
  83. -- Saw a successful delivery mission, start a timer if we have a known difficulty completion value
  84. function QuowLetterSuccess (sName, sLine, wildcards)
  85. if (bNotificationTimers ~= true) then
  86. return
  87. end
  88. if (iLastDifficultyCompleted == 1) then
  89. AddTimer ("DeadLetterLocal_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify")
  90. elseif (iLastDifficultyCompleted == 2) then
  91. AddTimer ("DeadLetterCloseby_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify")
  92. elseif (iLastDifficultyCompleted == 3) then
  93. AddTimer ("DeadLetterFaraway_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify")
  94. elseif (iLastDifficultyCompleted == 4) then
  95. AddTimer ("DeadLetterDistant_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify")
  96. elseif (iLastDifficultyCompleted == 5) then
  97. AddTimer ("DeadLetterDifficult_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify")
  98. end
  99. iLastDifficultyCompleted = 0
  100. end
  101. };
  102. #CLASS {missiontimers_letters} {close};