0
0
Fork 0
MineClone2/mods/command/kits.lua

28 lines
1.2 KiB
Lua
Raw Normal View History

2015-06-29 19:55:56 +02:00
minetest.register_chatcommand("kit", {
params = "",
description = "Add a Kit to player",
privs = {},
func = function(name, param)
if param == "" then
2015-07-04 04:56:02 +02:00
minetest.chat_send_player(name, "No kit selected ... ")
minetest.chat_send_player(name, "List of Kit: noob , pvp")
2015-06-29 19:55:56 +02:00
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')
2015-07-04 04:56:02 +02:00
receiverref:get_inventory():add_item('main', 'torch:torch 16')
2015-06-29 19:55:56 +02:00
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
2015-07-04 04:56:02 +02:00
})