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.

39 lines
1.6 KiB

  1. #FUNCTION {percent_color}
  2. {
  3. #var {percent_store} {};
  4. #if {%1 > 80} { #format {percent_store} {%c%d<099>} {bold green} {%1} };
  5. #if {%1 < 80 && %1 > 30} { #format {percent_store} {%c%d<099>} {bold yellow} {%1} };
  6. #if {%1 < 30} { #format {percent_store} {%c%d<099>} {bold red} {%1} };
  7. #return $percent_store;
  8. }
  9. #ALIAS {prompt_statmon}
  10. {
  11. #math hp_percent {((1.00*$hp) / $maxhp)*100};
  12. #math mana_percent {((1.00*$mana) / $maxmana)*100};
  13. #math moves_percent {((1.00*$moves) / $maxmoves)*100};
  14. #var {c_hp_percent} {@percent_color{$hp_percent}};
  15. #var {c_mana_percent} {@percent_color{$mana_percent}};
  16. #var {c_moves_percent} {@percent_color{$moves_percent}};
  17. #var {hp_prompt} {<039>$hp<099>/<139>$maxhp<099>hp ($c_hp_percent%)};
  18. #var {mana_prompt} {<069>$mana<099>/<169>$maxmana<099>m ($c_mana_percent%)};
  19. #var {moves_prompt} {<049>$moves<099>/<149>$maxmoves<099>mv ($c_moves_percent%)};
  20. #var {prompt} {<$hp_prompt | $mana_prompt | $moves_prompt>};
  21. #if {$state == 8}
  22. {
  23. #var {c_enemy_health} {@percent_color{$enemy_health}};
  24. #var {battleprompt} {<119>$enemy<099>: $c_enemy_health%};
  25. #var {prompt} {$prompt $battleprompt};
  26. };
  27. #elseif {$state == 9 || $state == 11} { #var {prompt} {$prompt <159>RESTING<099>}};
  28. #showme {$prompt} {1};
  29. #var {c_hunger} {@percent_color{$hunger}};
  30. #var {c_thirst} {@percent_color{$thirst}};
  31. #var {top_prompt} {[Quest: <169>$quest[timer]<099> | TNL: <059>$tnl<099> | Align: <149>$align<099> | Hunger/Thirst: $c_hunger%/$c_thirst%]};
  32. #showme {$top_prompt} {2};
  33. };