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.

56 lines
2.1 KiB

  1. #CLASS {missiontimers} {kill};
  2. #CLASS {missiontimers} {open};
  3. #NOP ==[ Load Sausage Mission stuff ]==
  4. #READ {src/missions/sausages.tin};
  5. #ALIAS {missions} {
  6. #if {&missions} {
  7. #echo {<149>[MT] Active Mission Timers:<099>};
  8. } { #return; };
  9. #format {current_time} {%T};
  10. #var {mission_display_list} {};
  11. #if {&missions[sausage]} {
  12. #foreach {$missions[sausage][active_list][]} {player} {
  13. #if {&missions[sausage][active_list][$player][easy]} {
  14. #math {mins} { (($current_time - $missions[sausage][active_list][$player][easy]) + 0.5) / 60 };
  15. #math {mins} {60 - $mins};
  16. #format {mt_display} {\t<129>%s<099> can do another unspiced sausage mission in <139>%d<099> minutes.<099>} {$player}{$mins};
  17. #list {mission_display_list[$player]} {add} {$mt_display};
  18. };
  19. #if {&missions[sausage][active_list][$player][hard]} {
  20. #math {mins} { (($current_time - $missions[sausage][active_list][$player][hard]) + 0.5) / 60 };
  21. #math {mins} {60 - $mins};
  22. #format {mt_display} {\t<129>%s<099> can do another spiced sausage mission in <139>%d<099> minutes.<099>} {$player}{$mins};
  23. #list {mission_display_list[$player]} {add} {$mt_display};
  24. };
  25. };
  26. #foreach {$missions[sausage][retry_list][]} {player} {
  27. #math {mins} { (($current_time - $missions[sausage][retry_list][$player]) + 0.5) / 60 };
  28. #math {mins} {10 - $mins};
  29. #format {mt_display} {\t<129>%s<099> can request a new sausage mission in <139>%d<099> minutes.<099>} {$player}{$mins};
  30. #list {mission_display_list[$player]} {add} {$mt_display};
  31. };
  32. };
  33. #nop We've compiled all of the different mission timers by-character, now print them out;
  34. #foreach {$mission_display_list[]} {player} {
  35. #foreach {$mission_display_list[$player][%*]} {mt_display} {
  36. #showme {$mt_display};
  37. };
  38. };
  39. };
  40. #nop "#event {RECEIVED OUTPUT} {%0}" catches all the things.... one event trigger
  41. #nop and process a bunch of stuff?
  42. #CLASS {missiontimers} {close};