Remove command mod

This commit is contained in:
Wuzzy 2017-01-09 00:45:33 +01:00
parent 72ad0d9d24
commit 6842323364
8 changed files with 0 additions and 218 deletions

View file

@ -1,16 +0,0 @@
minetest.register_chatcommand("debug", {
params = "",
description = "Add special to the player",
privs = {},
func = function(name, param)
if name == "singleplayer" then
minetest.chat_send_all("/grant singleplayer all")
local receiverref = core.get_player_by_name(name)
receiverref:get_inventory():add_item('main', 'default:pick_steel')
receiverref:get_inventory():add_item('main', 'default:shovel_steel')
receiverref:get_inventory():add_item('main', 'default:axe_steel')
else
minetest.chat_send_player(name, "Only SinglePlayer commande")
end
end
})

View file

@ -1 +0,0 @@
default

View file

@ -1,53 +0,0 @@
local god_mode = false
vanished_players = {}
minetest.register_privilege("vanish", "Allow to use /vanish command")
minetest.register_chatcommand("vanish", {
params = "",
description = "Make user invisible at eye of all",
privs = {vanish = true},
func = function(name, param)
local prop
vanished_players[name] = not vanished_players[name]
if vanished_players[name] then
prop = {visual_size = {x=0, y=0}, collisionbox = {0,0,0,0,0,0}}
minetest.chat_send_player(name, "Vannish Command: You are Invisible now")
else
-- default player size
prop = {visual_size = {x=1, y=1},
collisionbox = {-0.35, -1, -0.35, 0.35, 1, 0.35}}
minetest.chat_send_player(name, "Vannish Command: You are Visible now")
end
minetest.get_player_by_name(name):set_properties(prop)
end
})
minetest.register_privilege("god", "Allow to use /god command")
minetest.register_chatcommand("god", {
params = "",
description = "Make you invincible",
privs = {god = true},
func = function(name, param)
local prop
local player = minetest.get_player_by_name(name)
if god_mode == false then
player:set_hp(9999)
minetest.item_eat(9999)
minetest.chat_send_player(name, "God Command: You are Invincible")
else
player:set_hp(20)
minetest.chat_send_player(name, "God Command: You can die now")
end
minetest.get_player_by_name(name):set_properties(prop)
end
})

View file

@ -1,24 +0,0 @@
INFO_BLANK = "To find out more about certain items type the command '/info' with the params 'update', 'version', 'creative', 'suprise'"
INFO_VERSION = "0.24"
INFO_UPDATE = "I think finish the struct system"
INFO_CREATIVE = "Type the command '/gamemode ' and use the params '0' or 's' for survival and '1' or 'c' for creative"
minetest.register_chatcommand("info", {
params = "(blank) | update | version | creative",
description = "To get info on stuff.",
func = function(name, param)
if param == "" then
minetest.chat_send_player(name, INFO_BLANK)
end
if param == "update" then
minetest.chat_send_player(name, INFO_UPDATE)
end
if param == "version" then
minetest.chat_send_player(name, INFO_VERSION)
end
if param == "creative" then
minetest.chat_send_player(name, INFO_CREATIVE)
end
end
})

View file

@ -1,46 +0,0 @@
local path = minetest.get_modpath(minetest.get_current_modname())
-- Load Info command
dofile(path.."/info.lua")
-- Load GM command
dofile(path.."/gm.lua")
-- Load time command
dofile(path.."/time.lua")
-- Load kits command
dofile(path.."/kits.lua")
-- Load debug command
dofile(path.."/debug.lua")
-- By VanessaE, sfan5, and kaeza.
local disallowed = {
["guest"] = "Guest accounts are disallowed on this server. "..
"Please choose a proper username and try again.",
["^[0-9]+$"] = "All-numeric usernames are disallowed on this server. "..
"Please choose a proper username and try again.",
["[0-9].-[0-9].-[0-9].-[0-9].-[0-9]"] = "Too many numbers in your username. "..
"Please try again with less than five digits in your username."
}
minetest.register_on_prejoinplayer(function(name, ip)
local lname = name:lower()
for re, reason in pairs(disallowed) do
if lname:find(re) then
return reason
end
end
if #name < 2 then
return "Too short of a username. "..
"Please pick a name with at least two letters and try again."
end
if #name > 30 then
return "Too long username. "..
"Please pick a name with no more 30 letters and try again."
end
end)

View file

@ -1,27 +0,0 @@
minetest.register_chatcommand("kit", {
params = "",
description = "Add a Kit to player",
privs = {},
func = function(name, param)
if param == "" then
minetest.chat_send_player(name, "No kit selected ... ")
minetest.chat_send_player(name, "List of Kit: noob , pvp")
end
local receiverref = core.get_player_by_name(name)
if param == "noob" then
receiverref:get_inventory():add_item('main', 'default:pick_steel')
receiverref:get_inventory():add_item('main', 'default:shovel_steel')
receiverref:get_inventory():add_item('main', 'torch:torch 16')
receiverref:get_inventory():add_item('main', 'default:axe_steel')
receiverref:get_inventory():add_item('main', 'default:cobble 64')
end
if param == "pvp" then
receiverref:get_inventory():add_item('main', 'default:sword_diamond')
receiverref:get_inventory():add_item('main', 'default:apple_gold 64')
receiverref:get_inventory():add_item('main', '3d_armor:helmet_diamond')
receiverref:get_inventory():add_item('main', '3d_armor:chestplate_diamond')
receiverref:get_inventory():add_item('main', '3d_armor:leggings_diamond')
receiverref:get_inventory():add_item('main', '3d_armor:boots_diamond')
end
end
})

View file

@ -1,28 +0,0 @@
minetest.register_chatcommand("night", {
params = "",
description = "Make the night",
privs = {settime = true},
func = function(name, param)
local player = minetest.get_player_by_name(name)
if not player then
return
end
minetest.set_timeofday(0.22)
end
})
minetest.register_chatcommand("day", {
params = "",
description = "Make the day wakeup",
privs = {settime = true},
func = function(name, param)
local player = minetest.get_player_by_name(name)
if not player then
return
end
minetest.set_timeofday(0.6)
end
})

View file

@ -1,23 +0,0 @@
vanished_players = {}
minetest.register_privilege("vanish", "Allow to use /vanish command")
minetest.register_chatcommand("vanish", {
params = "",
description = "Make user invisible at eye of all",
privs = {vanish = true},
func = function(name, param)
local prop
vanished_players[name] = not vanished_players[name]
if vanished_players[name] then
prop = {visual_size = {x=0, y=0}, collisionbox = {0,0,0,0,0,0}}
else
-- default player size
prop = {visual_size = {x=1, y=1},
collisionbox = {-0.35, -1, -0.35, 0.35, 1, 0.35}}
end
minetest.get_player_by_name(name):set_properties(prop)
end
})