markveidemanis wrote:hi, can someone make a mod that lets some people on a server be in creative mode, and some in survival mode. possible like a command: /gamemode [creative/survival]
thanks
4aiman wrote:I've found some topic about the "fun" (http://minetest.net/forum/viewtopic.php?id=4050) and want to expand the griefing theme.
The main point of some users was that protection make it impossible to come an conquer some area like it happened in the real history - with the destruction of the buildings and so on. I do NOT appreciate griefing, but that topic make me think that it could be some fun in griefing IF:
- each player by placing any block obtains exlusive rights to the area around that block (placed block + one block around that);
- if the area is taken allready, the player should get a mesage of that very fact;
- the owner of that area should be notified that he have a message, asking for building on his territory;
- there were protection of the buildings made by currently offline players;
- the buildings must be destroyable only when their owner can protect them e.g. when he or she is online;
- there should be parties or "home city" identification and that should be displayed near the nickname;
- only parties that has declared "war" to each other could grief each other's buildings;
- only councilium of all party members may decide to declare a war;
- war would be declared when no less than 70% is for it;
- those, who was against the war should have a chance to switch their parties (but not for any of that which would be at war with their current);
- those, who was against the war should have a chance to create a new party;
- those, who was against the war must be able to live in ther houses undisturbed, but if they would go outside - they can get killed - a war is a war, jus consider neutral citizen house=bunker ;)
I believe with that implemented some people would enjoy it ;)
Maro wrote:A Mobs (creepers and villagers) mod and an Armor mod.
Chinchow wrote:if you want minecraft things go play minecraft
Josh wrote:Pilzadam's quest
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Salutation's sir Pilzadam the noble king of minetest challeges you to make a Realistic-looking chest like you see in dungeons and other similar places. It's look can be 3D shaped, size is your choice and it has to open. Succeed in your quest and you will receive a mese cookie.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
P.S: You don't have to make this, but it would be intresting :)
PilzAdam wrote:Josh wrote:Pilzadam's quest
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Salutation's sir Pilzadam the noble king of minetest challeges you to make a Realistic-looking chest like you see in dungeons and other similar places. It's look can be 3D shaped, size is your choice and it has to open. Succeed in your quest and you will receive a mese cookie.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
P.S: You don't have to make this, but it would be intresting :)
The nodeboxes for the opened and the closed state are easy to do but there are two problems:
1.: The animation to open the chest isnt possible.
2.: There are no callbacks in the API to register when a chest is opened/closed.
Josh wrote:PilzAdam wrote:Josh wrote:Pilzadam's quest
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Salutation's sir Pilzadam the noble king of minetest challeges you to make a Realistic-looking chest like you see in dungeons and other similar places. It's look can be 3D shaped, size is your choice and it has to open. Succeed in your quest and you will receive a mese cookie.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
P.S: You don't have to make this, but it would be intresting :)
The nodeboxes for the opened and the closed state are easy to do but there are two problems:
1.: The animation to open the chest isnt possible.
2.: There are no callbacks in the API to register when a chest is opened/closed.
Oh, well it's....impossible :(
kaeza wrote:Josh wrote:PilzAdam wrote:The nodeboxes for the opened and the closed state are easy to do but there are two problems:
1.: The animation to open the chest isnt possible.
2.: There are no callbacks in the API to register when a chest is opened/closed.
Oh, well it's....impossible :(
It *may* be possible (theoretically, haven't tested it).
First you make two nodes: a closed chest, and an open chest. Then, you make it so punching the node switches the node (i.e: changes the open one to the closed one and viceversa), and you only define right-clicking for the "open" chest.
EDIT: I may do it if someone makes the nodebox for me.
EDIT2: BTW, yes, the animation may also be possible using some clever way, like how falling nodes and mesecons movestones are implemented.
Are you saying that I put an abnormal brain into a seven and a half foot long, fifty-four inch wide GORILLA?
Ragnar wrote:@doggy i could make an expansion pack for my mod with new liquids, that you can tweak to make a new mod maybe =)
Are you saying that I put an abnormal brain into a seven and a half foot long, fifty-four inch wide GORILLA?
cactuz_pl wrote:Ban which works even when player is offline, and when he trying to connect server is adding his IP to banlist.
Edit:
Command will add name to "future ban list". Server could compare logged player's name with this list and ban if name match to the list.
future_ban_list = {}
minetest.register_chatcommand("future_ban", {
params = "<playername> | leave playername out to see the future ban list",
description = "The player will be banned when trying to join",
privs = {ban=true},
func = function(name, param)
if param == "" then
minetest.chat_send_player(name, "Future ban list: " .. dump(future_ban_list))
return
end
if not minetest.env:get_player_by_name(param) then
table.insert(future_ban_list, param)
minetest.chat_send_player(name, desc .. " to future ban list added.")
minetest.log("action", name .. " added " .. desc .. " to future ban list.")
return
end
if not minetest.ban_player(param) then
table.insert(future_ban_list, param)
minetest.chat_send_player(name, desc .. " to future ban list added.")
minetest.log("action", name .. " added " .. desc .. " to future ban list.")
else
local desc = minetest.get_ban_description(param)
minetest.chat_send_player(name, "Banned " .. desc .. ".")
minetest.log("action", name .. " bans " .. desc .. ".")
end
end
})
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
for _,n in ipairs(future_ban_list) do
if n == name then
if not minetest.ban_player(name) then
minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
else
local desc = minetest.get_ban_description(name)
minetest.log("action", desc .. " banned (from future ban list).")
end
end
end
end)
TheMan wrote:HOW ABOUT A [FORCEFIELD]
*Made of cery clear undestructible glass.
*It can reduce griefing.
COULD THIS BE DONE?
TheMan wrote:HOW ABOUT A [FORCEFIELD]
*Made of cery clear undestructible glass.
*It can reduce griefing.
COULD THIS BE DONE?
PilzAdam wrote:This is untested code:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
future_ban_list = {}
minetest.register_chatcommand("future_ban", {
params = "<playername> | leave playername out to see the future ban list",
description = "The player will be banned when trying to join",
privs = {ban=true},
func = function(name, param)
if param == "" then
minetest.chat_send_player(name, "Future ban list: " .. dump(future_ban_list))
return
end
if not minetest.env:get_player_by_name(param) then
table.insert(future_ban_list, param)
minetest.chat_send_player(name, desc .. " to future ban list added.") <----LUA ERROR
minetest.log("action", name .. " added " .. desc .. " to future ban list.") <---- LUAERROR
return
end
if not minetest.ban_player(param) then
table.insert(future_ban_list, param)
minetest.chat_send_player(name, desc .. " to future ban list added.")
minetest.log("action", name .. " added " .. desc .. " to future ban list.")
else
local desc = minetest.get_ban_description(param)
minetest.chat_send_player(name, "Banned " .. desc .. ".")
minetest.log("action", name .. " bans " .. desc .. ".")
end
end
})
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
for _,n in ipairs(future_ban_list) do
if n == name then
if not minetest.ban_player(name) then
minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
else
local desc = minetest.get_ban_description(name)
minetest.log("action", desc .. " banned (from future ban list).")
end
end
end
end)
cactuz_pl wrote:PilzAdam wrote:This is untested code:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
future_ban_list = {}
minetest.register_chatcommand("future_ban", {
params = "<playername> | leave playername out to see the future ban list",
description = "The player will be banned when trying to join",
privs = {ban=true},
func = function(name, param)
if param == "" then
minetest.chat_send_player(name, "Future ban list: " .. dump(future_ban_list))
return
end
if not minetest.env:get_player_by_name(param) then
table.insert(future_ban_list, param)
minetest.chat_send_player(name, desc .. " to future ban list added.") <----LUA ERROR
minetest.log("action", name .. " added " .. desc .. " to future ban list.") <---- LUAERROR
return
end
if not minetest.ban_player(param) then
table.insert(future_ban_list, param)
minetest.chat_send_player(name, desc .. " to future ban list added.")
minetest.log("action", name .. " added " .. desc .. " to future ban list.")
else
local desc = minetest.get_ban_description(param)
minetest.chat_send_player(name, "Banned " .. desc .. ".")
minetest.log("action", name .. " bans " .. desc .. ".")
end
end
})
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
for _,n in ipairs(future_ban_list) do
if n == name then
if not minetest.ban_player(name) then
minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
else
local desc = minetest.get_ban_description(name)
minetest.log("action", desc .. " banned (from future ban list).")
end
end
end
end)
Thanks, this code almost works.
There are two errors in 14 and 15 line, I don't know how to fix them so I removed them.
Mod is working(adding to list and banning on join) but when turn off my local server, mod forgets "future_ban_list" (no new files are created).
if not minetest.env:get_player_by_name(param) then
table.insert(future_ban_list, param)
minetest.chat_send_player(name, param .. " to future ban list added.") -- Fixed
minetest.log("action", name .. " added " .. param .. " to future ban list.") -- Fixed
return
endfuture_ban_list = {}
local file = io.open(minetest.get_worldpath().."/future_banlist.txt")
if file then
future_ban_list = minetest.deserialize(file:read("*all"))
file:close()
end
minetest.register_chatcommand("future_ban", {
params = "<playername> | leave playername out to see the future ban list",
description = "The player will be banned when trying to join",
privs = {ban=true},
func = function(name, param)
if param == "" then
minetest.chat_send_player(name, "Future ban list: " .. dump(future_ban_list))
return
end
if not minetest.env:get_player_by_name(param) then
table.insert(future_ban_list, param)
minetest.chat_send_player(name, param .. " to future ban list added.")
minetest.log("action", name .. " added " .. param .. " to future ban list.")
local file = io.open(minetest.get_worldpath().."/future_banlist.txt")
if file then
file:write(minetest.serialize(future_ban_list))
file:close()
end
return
end
if not minetest.ban_player(param) then
table.insert(future_ban_list, param)
local file = io.open(minetest.get_worldpath().."/future_banlist.txt")
if file then
file:write(minetest.serialize(future_ban_list))
file:close()
end
minetest.chat_send_player(name, desc .. " to future ban list added.")
minetest.log("action", name .. " added " .. desc .. " to future ban list.")
else
local desc = minetest.get_ban_description(param)
minetest.chat_send_player(name, "Banned " .. desc .. ".")
minetest.log("action", name .. " bans " .. desc .. ".")
end
end
})
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
for i,n in ipairs(future_ban_list) do
if n == name then
if not minetest.ban_player(name) then
minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
else
local desc = minetest.get_ban_description(name)
minetest.log("action", desc .. " banned (from future ban list).")
table.remove(future_ban_list, i)
end
end
end
end)
Server: error:
...(path to mod folder)/init.lua:49: bad argument #1 tominetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
for i,n in ipairs(future_ban_list) do <------------------------------ 49th line
if n == name then
if not minetest.ban_player(name) then
minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
else
local desc = minetest.get_ban_description(name)
minetest.log("action", desc .. " banned (from future ban list).")
table.remove(future_ban_list, i)
end
end
end
end)Users browsing this forum: Google [Bot] and 8 guests