diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-07-10 17:04:29 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-07-10 17:04:29 -0400 |
| commit | 1de5f9ac6f038bfed2230cc1272b253794b2f41a (patch) | |
| tree | 15bc9d515f1f48c036522afb7cc71f60243849a9 /gamemode/shared/sparkel.lua | |
| download | artery-1de5f9ac6f038bfed2230cc1272b253794b2f41a.tar.gz artery-1de5f9ac6f038bfed2230cc1272b253794b2f41a.tar.bz2 artery-1de5f9ac6f038bfed2230cc1272b253794b2f41a.zip | |
Initial commit
Diffstat (limited to 'gamemode/shared/sparkel.lua')
| -rw-r--r-- | gamemode/shared/sparkel.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gamemode/shared/sparkel.lua b/gamemode/shared/sparkel.lua new file mode 100644 index 0000000..5882aac --- /dev/null +++ b/gamemode/shared/sparkel.lua @@ -0,0 +1,17 @@ + +function sparkel(...) + local arg = {...} + local looparg = type(arg[1]) == "string" and string.Explode(" ",arg[1],false) or arg + --One pass to find the high and low point + local max,min = tonumber(looparg[1]),tonumber(looparg[1]) + for k,v in pairs(looparg) do + v = tonumber(v) + max = max > v and max or v + min = min < v and min or v + end + local scale = (max-min)/7 + for k,v in pairs(looparg) do + Msg(utf8.char(9600+(1+(v/scale)))) + end + Msg("\n") +end |
