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

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

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB