Switch to edit mode.
Name(s): @coolr*ender1: player:tell("[HTML Gradients]")
2: player:tell()
3: player:tell("What do you want your gradient to say? (use numbers and characters)")
4: string = $command_utils:read("what you want your gradient to say")
5: strlen = length(string)
6: player:tell("How many fgcolours do you want to define? (use numbers only)")
7: fgcols = $command_utils:read("the number of fgcolours")
8: fgcols = toint(fgcols)
9: player:tell("How many bgcolours do you want to define? (use numbers only)")
10: bgcols = $command_utils:read("the number of bgcolours")
11: bgcols = toint(bgcols)
12: player:tell(" [What we have so far:")
13: player:tell(" You want: ", fgcols, " foreground colour(s).")
14: player:tell(" You want: ", bgcols, " background colour(s).")
15: player:tell(" You want: \"", string, "\" as your text.")
16: player:tell(" Which is ", strlen, " characters long.")
17: if (fgcols > strlen || bgcols > strlen)
18: player:tell("Wait a second...")
19: player:tell()
20: suspend(1)
21: if (fgcols > strlen)
22: player:tell("There are more foreground colours wanted than the number of character in the string!")
23: else
24: player:tell("There are more foreground colours wanted than the number of character in the string!")
25: endif
26: return
27: else
28: player:tell("All good so far!")
29: endif
30: fglist = {}
31: for x in [1..fgcols]
32: fglist = {@fglist, $command_utils:read(tostr("input foreground colour #", x))}
33: endfor
34: bglist = {}
35: for x in [1..bgcols]
36: bglist = {@bglist, $command_utils:read(tostr("input background colour #", x))}
37: endfor
38: if (fgcols <= 1 || bgcols <= 1 || (fgcols <= 1 && bgcols <= 1))
39: return
40: endif
41: fggra = $gu:literal_multi_grad(fglist, strlen)
42: bggra = $gu:literal_multi_grad(bglist, strlen)
43: gradient = ""
44: for x in [1..strlen]
45: gradient = gradient + "<font color=#" + fggra[x] + " bgcolor=#" + bggra[x] + "background=" + bggra[x] + ">" + string[x] + "</font>"
46: endfor
47: player:tell(gradient)
48: if ($command_utils:yes_or_no(tostr("Do you want to see the html code used? (Yes || No)")))
49: player:tell($html_utils:literal_text(gradient))
50: else
51: return
52: endif