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.

59 lines
1.5 KiB

  1. #class affcap kill
  2. #class affcap open
  3. /*
  4. This script will capture spell output, gag it, and put it in a file called 'affects' in your $dir.
  5. Todo: have it sort the list and display in descending order from longest duration to shortest
  6. */
  7. #action {^You are affected by the following:$}
  8. {
  9. #show <179>Capturing Affects List<099>;
  10. #line gag;
  11. #list affects clear;
  12. #var aff_count 1;
  13. #line log {$dir/affects} {<179>--Affects--<099>}
  14. }
  15. #action {^Spell : %* \(%d:%d\)$}
  16. {
  17. #line gag;
  18. #list affects[$aff_count] add {%1;00;%2;%3};
  19. #math aff_count {$aff_count + 1}
  20. }
  21. #action {^Spell : %* \(%d:%d:%d\)$}
  22. {
  23. #line gag;
  24. #list affects[$aff_count] add {%1;%2;%3;%4};
  25. #math aff_count {$aff_count + 1}
  26. }
  27. #action {^You are affected by %d skills and %d spells.$}
  28. {
  29. #foreach $affects[] {x}
  30. {
  31. #if {$affects[$x][2]==0 && $affects[$x][3]<2}
  32. {
  33. #line log {$dir/affects} {<119>$affects[$x][2]:$affects[$x][3]:$affects[$x][4] : $affects[$x][1]<099>}
  34. };
  35. #elseif {$affects[$x][2]==0 && $affects[$x][3]<5}
  36. {
  37. #line log {$dir/affects} {<139>$affects[$x][2]:$affects[$x][3]:$affects[$x][4] : $affects[$x][1]<099>}
  38. };
  39. #elseif {$affects[$x][2]==0 && $affects[$x][3]<10}
  40. {
  41. #line log {$dir/affects} {<169>$affects[$x][2]:$affects[$x][3]:$affects[$x][4] : $affects[$x][1]<099>}
  42. };
  43. #else
  44. {
  45. #line log {$dir/affects} {<029>$affects[$x][2]:$affects[$x][3]:$affects[$x][4] : $affects[$x][1]<099>}
  46. }
  47. };
  48. #line log {$dir/affects} {\nSkills <029>%1 <099>Spells <029>%2<099>\n};
  49. }
  50. #class affcap close