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.

60 lines
1.4 KiB

6 years ago
  1. #ALIAS {setsize} {rows 300;cols 148};
  2. #ALIAS {setmsize} {rows 300;cols 60};
  3. #ALIAS {^clear$} {
  4. #system {tput clear};
  5. #split {2} {1};
  6. setsize;
  7. };
  8. #ALIAS {htop} {
  9. #system {htop};
  10. };
  11. #ALIAS {rst} {
  12. #read {config.tin};
  13. setsize;
  14. shields;
  15. };
  16. #ALIAS {wiki} {
  17. #system {w3m https://dwwiki.mooo.com/w/index.php?search=%0};
  18. #split {2} {1};
  19. setsize;
  20. };
  21. #ALIAS {colourpalette}
  22. {
  23. #foreach {a;b;c;d;e;f} {cnt1}
  24. {
  25. #foreach {a;b;c;d;e;f} {cnt2}
  26. {
  27. #var result <000>;
  28. #foreach {a;b;c;d;e;f} {cnt3}
  29. {
  30. #var result $result <$cnt1$cnt2$cnt3> <<888>$cnt1$cnt2$cnt3><088>
  31. };
  32. #showme $result
  33. }
  34. }
  35. }
  36. #ALIAS {easyvote} {
  37. #system {lynx http://www.topmudsites.com/vote-pinkfish.html};
  38. };
  39. #ALIAS {minesolve %1 %2 %3} {
  40. #var {total} {%1};
  41. #var {hammer} {%2};
  42. #var {pickaxe} {%3};
  43. #var {solvecommand} {python3 -c 'import math; t,p,h = $total,$pickaxe,$hammer; pu,hu = int(math.floor(t/p)+1), int(math.floor(t/h)+1); print(*sorted([(i, j) for j in range(0,hu) for i in range(0,pu) if ((i*p) + (j*h) == t)], key=lambda t: t[1])[0]);'};
  44. #script {result} {$solvecommand};
  45. #replace {result[1]} { } {;};
  46. #list {solution} {create} {$result[1]};
  47. #format {minesolvedisplay} {<149>[MineSolver] Best solution is <139>%d<149> pickaxe strikes and <139>%d<149> hammer chips for a total of <159>%f<149> inches.<099>} {$solution[1]} {$solution[2]} {$total};
  48. #echo {$minesolvedisplay};
  49. };