Skip to content

Instantly share code, notes, and snippets.

@kaeza

kaeza/init.lua Secret

Last active March 10, 2019 01:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kaeza/6b84b70f891f973b818de36a18f82184 to your computer and use it in GitHub Desktop.
Save kaeza/6b84b70f891f973b818de36a18f82184 to your computer and use it in GitHub Desktop.
PONIES
-- Colors taken from HexChat (mIRC std colors?)
local colors = {
"#d3d7cf",
"#2e3436",
"#3465a4",
"#4e9a06",
"#cc0000",
"#8f3902",
"#5c3566",
"#ce5c00",
"#c4a000",
"#73d216",
"#11a879",
"#58a19d",
"#57799e",
"#a04265",
"#555753",
"#888a85",
"#d3d7cf",
"#2e3436",
"#3465a4",
"#4e9a06",
"#cc0000",
"#8f3902",
"#5c3566",
"#ce5c00",
"#c4a000",
"#73d216",
"#11a879",
"#58a19d",
"#57799e",
"#a04265",
"#555753",
"#888a85",
"#d3d7cf",
"#204a87",
"#25292b",
"#fafaf8",
"#8f3902",
"#3465a4",
"#0000ff",
"#ce5c00",
"#888a85",
"#a40000",
}
local function OMGponies(str)
local t = { }
for i = 1, #str do
local c = str:sub(i, i)
t[i] = minetest.colorize(colors[(i % #colors) + 1], c)
end
return table.concat(t)
end
minetest.register_chatcommand("fab", {
description = OMGponies("OMG ponies!!1!!!one!!"),
params = "<ponies>",
func = function(_, p)
minetest.chat_send_all(OMGponies(p))
end,
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment