Skip to content

Instantly share code, notes, and snippets.

@kaeza

kaeza/init.lua Secret

Last active Mar 10, 2019
Embed
What would you like to do?
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