added screenshot

master
DonBatman 2016-03-18 08:07:47 -07:00
parent ee8f6ba40e
commit 443381d3c6
2 changed files with 128 additions and 122 deletions

204
chat.lua
View File

@ -1,122 +1,128 @@
minetest.register_on_chat_message(function(name, message, playername, player)
local cmd ="/chats" minetest.register_chatcommand("chats", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/chats' then func = function(text)
local player = minetest.env:get_player_by_name(name) minetest.chat_send_player(name,"Available commands - /afk, /back, /here, /there, /happy, /sad, /surprised, /mad, /funny, /crazy, /hurt, /mining")
minetest.chat_send_player(name, "Available commands - /afk, /back, /here, /there, /happy, /sad, /surprised, /mad, /funny, /crazy, /hurt, /mining")
return true return true
end end,
end })
local cmd ="/afk" minetest.register_chatcommand("afk", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/afk' then func = function(text)
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_all(name.." is AFK! ") minetest.chat_send_all(name.." is AFK! ")
return true return true
end end,
end })
local cmd ="/back" minetest.register_chatcommand("back", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/back' then func = function(text)
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_all(name.." is Back! ") minetest.chat_send_all(name.." is Back! ")
return true return true
end end,
end })
local cmd ="/happy" minetest.register_chatcommand("gtg", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/happy' then func = function(text)
local player = minetest.env:get_player_by_name(name) minetest.chat_send_all(name.." needs to go now. Bye!")
return true
end,
})
minetest.register_chatcommand("bbl", {
privs = {talk = true},
func = function(text)
minetest.chat_send_all(name.." is leaving and will be back later.")
return true
end,
})
minetest.register_chatcommand("lol", {
privs = {talk = true},
func = function(text)
minetest.chat_send_all(name.." is laughing out loud! Ha Ha Ha Ha Ha Ha Ha ")
return true
end,
})
minetest.register_chatcommand("happy", {
privs = {talk = true},
func = function(text)
minetest.chat_send_all(name.." is Happy! ") minetest.chat_send_all(name.." is Happy! ")
return true return true
end end,
end })
local cmd ="/sad" minetest.register_chatcommand("sad", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/sad' then func = function(text)
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_all(name.." is Sad! ") minetest.chat_send_all(name.." is Sad! ")
return true return true
end end,
end })
local cmd ="/surprised" minetest.register_chatcommand("surprised", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/surprised' then func = function(text)
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_all(name.." is Surprised! ") minetest.chat_send_all(name.." is Surprised! ")
return true return true
end end,
end })
local cmd ="/mad" minetest.register_chatcommand("mad", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/mad' then func = function(text)
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_all(name.." is Soooooooooo Mad! ") minetest.chat_send_all(name.." is Soooooooooo Mad! ")
return true return true
end end,
end })
local cmd ="/here"
if message:sub(0, #cmd) == cmd then minetest.register_chatcommand("here", {
if message == '/here' then privs = {talk = true},
local player = minetest.env:get_player_by_name(name) func = function(text)
minetest.chat_send_all("The amazing "..name.." is here! ") minetest.chat_send_all("The amazing "..name.." is here! ")
return true return true
end end,
end })
local cmd ="/there" minetest.register_chatcommand("there", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/there' then func = function(text)
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_all(name.." is not there! "..name.." is here") minetest.chat_send_all(name.." is not there! "..name.." is here")
return true return true
end end,
end })
local cmd ="/funny" minetest.register_chatcommand("funny", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/funny' then func = function(text)
local player = minetest.env:get_player_by_name(name) minetest.chat_send_all(name.." is soooooooooooo funny! ")
minetest.chat_send_all(name.." is sooooooooooooooooooooooooooooo funny! ")
return true return true
end end,
end })
local cmd ="/crazy" minetest.register_chatcommand("crazy", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/crazy' then func = function(text)
local player = minetest.env:get_player_by_name(name) minetest.chat_send_all(name.." is losing their mind! ")
minetest.chat_send_all(name.." is losing thier mind! ")
return true return true
end end,
end })
local cmd ="/max" minetest.register_chatcommand("hurt", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/max' then func = function(text)
local player = minetest.env:get_player_by_name(name) minetest.chat_send_all(name.." is hurt! ")
return true
end,
})
minetest.register_chatcommand("mining", {
privs = {talk = true},
func = function(text)
minetest.chat_send_all(name.." is Mining! ")
return true
end,
})
minetest.register_chatcommand("max", {
privs = {talk = true},
func = function(text)
minetest.chat_send_all("Max is the greatest guy ever! Except for Batman. Batman is better!") minetest.chat_send_all("Max is the greatest guy ever! Except for Batman. Batman is better!")
return true return true
end end,
end })
local cmd ="/bat" minetest.register_chatcommand("bat", {
if message:sub(0, #cmd) == cmd then privs = {talk = true},
if message == '/bat' then func = function(text)
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_all("Batman is the greatest guy ever! Except for Max. Max is better!") minetest.chat_send_all("Batman is the greatest guy ever! Except for Max. Max is better!")
return true return true
end end,
end })
local cmd ="/hurt"
if message:sub(0, #cmd) == cmd then
if message == '/hurt' then
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_all(name.." is hurt!")
return true
end
end
local cmd ="/mining"
if message:sub(0, #cmd) == cmd then
if message == '/mining' then
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_all(name.." is mining!")
return true
end
end
end)

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB