#CLASS {missiontimers_letters} {kill}; #CLASS {missiontimers_letters} {open}; #NOP [1 = Local, 2= Far Away, 3 = Distant Lands, 4 = Difficult Customer] #VAR {dead_letter_rewards} { {4 Ankh-Morpork dollars}{1} {8 Ankh-Morpork dollars}{2} {3 Djelian talents and 5 Djelian tooni}{3} {4 Lancre crowns and 2 Lancre shillings}{3} {7 Ephebian decadrachmae and 2 Ephebian stater}{3} {2 Ankh-Morpork ten-dollars}{3} {2 Genuan forins and 5 Genuan livres}{3} {1 Klatchian ten dinar and 2 Klatchian two dinar coins}{3} {1 Agatean Empire ten-rhinu and 5 Agatean Empire rhinu}{3} {7 Lancre crowns and 5 Lancre shillings}{4} {2 Agatean Empire ten-rhinu and 5 Agatean Empire rhinu}{4} {6 Djelian talents and 5 Djelian tooni}{4} {4 Genuan forins and 3 Genuan livres}{4} {3 Ankh-Morpork ten-dollars and 2 Ankh-Morpork dollars}{4} {1 Ephebian mina and 5 Ephebian decadrachmae}{4} {1 Agatean Empire fifty-rhinu and 2 Agatean Empire ten-rhinu}{5} {9 Ankh-Morpork ten-dollars}{5} {1 Lancre sovereign and 1 Lancre tencrown}{5} {3 Ephebian minae and 5 Ephebian decadrachmae}{5} {1 Genuan ducat and 2 Genuan forins}{5} } #var {missions[letter][active_list]} {}; #var {missions[letter][retry_list]} {}; #ALIAS {/letter_returned} { #list {missions[letter][retry_list]} {find} {$GMCP[charinfo][name]} {letter_current}; #if {$letter_current == 0} { #list {missions[letter][retry_list]} {add} {$GMCP[charinfo][name]}; #line sub variable { #delay {600} { #nop Print message #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}; #echo {$letter_retry_line}; #unvar {letter_retry_line}; #nop Remove player from state list #list {missions[letter][retry_list]} {find} {$GMCP[charinfo][name]} {letter_current_inner}; #list {missions[letter][retry_list]} {delete} {$letter_current_inner}; }; }; }; #unvar {letter_current}; }; #ALIAS {return letter} { #send {return letter}; /letter_returned; }; #ACTION {^You offer to give a letter to Frank} { /letter_returned; }; #ACTION {^You have been awarded %d experience points and given %+} { #nop You have been awarded 60407 experience points and given 2 Agatean Empire ten-rhinu and 5 Agatean Empire rhinu. -- Last difficulty completion seen for future salute trigger local iLastDifficultyCompleted = 0 -- Detected a reward string, record a difficulty level in preperation for the salute line function QuowMissionReward (sName, sLine, wildcards) sCashValue = wildcards[1] if (sQuowRewards[sCashValue] ~= nil) then iLastDifficultyCompleted = sQuowRewards[sCashValue] else -- See if we were waiting for an Ozzie pottery timer? if (IsTimer("StoPotteryWaiting_" .. sCurrentCharacter) == 0) then AddTimer ("StoLatPottery_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify") elseif (IsTimer("OCPennieMission_" .. sCurrentCharacter) == 0) then AddTimer ("OCPennieLaced_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify") end end end } #ACTION {^You salute smartly as you deliver a letter} { -- Saw a successful delivery mission, start a timer if we have a known difficulty completion value function QuowLetterSuccess (sName, sLine, wildcards) if (bNotificationTimers ~= true) then return end if (iLastDifficultyCompleted == 1) then AddTimer ("DeadLetterLocal_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify") elseif (iLastDifficultyCompleted == 2) then AddTimer ("DeadLetterCloseby_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify") elseif (iLastDifficultyCompleted == 3) then AddTimer ("DeadLetterFaraway_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify") elseif (iLastDifficultyCompleted == 4) then AddTimer ("DeadLetterDistant_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify") elseif (iLastDifficultyCompleted == 5) then AddTimer ("DeadLetterDifficult_" .. sCurrentCharacter, 1, 0, 0, "", 1061, "QuowMissionNotify") end iLastDifficultyCompleted = 0 end }; #CLASS {missiontimers_letters} {close};