8d6 @verb #9019:"test" none none none rdo #9019 @program #9019:"test" none none none "Copied from Q (#2731):test Jan 30 16:12:27 2002" player:tell("[HTML Gradients]") player:tell() player:tell("What do you want your gradient to say? (use numbers and characters)") string = $command_utils:read("what you want your gradient to say") strlen = length(string) player:tell("How many fgcolours do you want to define? (use numbers only)") fgcols = $command_utils:read("the number of fgcolours") fgcols = toint(fgcols) player:tell("How many bgcolours do you want to define? (use numbers only)") bgcols = $command_utils:read("the number of bgcolours") bgcols = toint(bgcols) player:tell(" [What we have so far:") player:tell(" You want: ", fgcols, " foreground colour(s).") player:tell(" You want: ", bgcols, " background colour(s).") player:tell(" You want: \"", string, "\" as your text.") player:tell(" Which is ", strlen, " characters long.") if (fgcols > strlen || bgcols > strlen) player:tell("Wait a second...") player:tell() suspend(1) if (fgcols > strlen) player:tell("There are more foreground colours wanted than the number of character in the string!") else player:tell("There are more foreground colours wanted than the number of character in the string!") endif return else player:tell("All good so far!") endif fglist = "" for x in [1..fgcols] fglist = {@fglist, $command_utils:read(tostr("input foreground colour #", x))} endfor bglist = "" for x in [1..bgcols] bglist = {@bglist, $command_utils:read(tostr("input background colour #", x))} endfor if (fgcols <= 1 || bgcols <= 1 || (fgcols <= 1 && bgcols <= 1)) return endif player:tell(toliteral(fglist) + ";" + toliteral(strlen)) fggra = $gu:literal_multi_grad(fglist, strlen) bggra = $gu:literal_multi_grad(bglist, strlen) gradient = "" for x in [1..strlen] gradient = gradient + "" + string[x] + "" endfor player:tell(gradient) if ($command_utils:yes_or_no(tostr("Do you want to see the html code used? (Yes || No)"))) player:tell($html_utils:literal_text(gradient)) else return endif . 0