The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

Difference between revisions of "User:Ikuu/For-WR"

From A Tale in the Desert
Jump to navigationJump to search
(New page: <pre> #!/usr/bin/perl -w $z = "00"; while (<>) { # Add the tooltip s-(\d)(\d)(\d)(\d)(\d)(\d)(\d)-<div title="Sagging:::$1, Wilting:::$2, Musty:::$3, Fat:::$4, Rustle:::$5, Shrivel::...)
 
(No difference)

Latest revision as of 04:34, 5 May 2009

#!/usr/bin/perl -w

$z = "00";

while (<>) {
  # Add the tooltip
  s-(\d)(\d)(\d)(\d)(\d)(\d)(\d)-<div title="Sagging:::$1, Wilting:::$2, Musty:::$3, Fat:::$4, Rustle:::$5, Shrivel:::$6, Shimmer:::$7">$1$2$3$4$5$6$7</div>-;
  # Translate index into abbrev
  s/::0/AS/g;
  s/::1/MG/g;
  s/::2/PO/g;
  s/::3/SL/g;
  s/::4/SV/g;
  s/::5/TV/g;
  s/::6/TL/g;
  # Standardize each number's output format
  s/(\d+\.\d+)/  $1$z/g;  # Prepend spaces and append zeroes
  s/\|\|(\d+)\|/||  $1.000|/g;	# No decimal point? Add it
  s/\|\|(\d+)$/||  $1.000/g;	# No decimal point in number listed at end of line? Add it
  s/ *([ 0-9][ 0-9][0-9]\.\d\d\d)\d*/$1/g;	# Prune the extra leading spaces and trailing zeroes
  print $_;
}