Exactly, This is mineTESTChinchow wrote: if you want minecraft things go play minecraft
Post your mod requests/ideas here
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
-------------------------------------------------------------------------------------------------------------------------------------------------------------
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
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
The nodeboxes for the opened and the closed state are easy to do but there are two problems: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
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.
How about a teslacoil one that would emit lightning around it and shock the player it touches and it could be harvested with lightning rods and crafted into useful things
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
Mods: Orichalcum Stonebricks Extra Chests
Oh, well it's....impossiblePilzAdam wrote:The nodeboxes for the opened and the closed state are easy to do but there are two problems: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
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.
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
It *may* be possible (theoretically, haven't tested it).Josh wrote:Oh, well it's....impossiblePilzAdam wrote:The nodeboxes for the opened and the closed state are easy to do but there are two problems: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
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.
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.
Last edited by kaeza on Fri Dec 28, 2012 04:01, edited 1 time in total.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
Animation is possible with the new models code and an entity. I may do this part...kaeza wrote:It *may* be possible (theoretically, haven't tested it).Josh wrote:Oh, well it's....impossiblePilzAdam 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.
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.
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).
See also the MT-Faithful texture pack (work in progress).
OK I'm gonna suggest a mod that I was gonna make and just wanted more ideas to add to it but it got closed because someone mistook it for a request so now it is I want a mod that adds more liquids other than water and lava
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
Mods: Orichalcum Stonebricks Extra Chests
1. Am I doggy or is everyone doggy cause if everyone is doggy @doggy would be hard to understandRagnar wrote:@doggy i could make an expansion pack for my mod with new liquids, that you can tweak to make a new mod maybe
2.go ahead looking forward to it
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
Mods: Orichalcum Stonebricks Extra Chests
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.
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.
Last edited by cactuz_pl on Sat Dec 29, 2012 11:55, edited 1 time in total.
Nope
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
This is untested code: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.
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.")
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)
Isn't that just making a new glass with a 0 in the area that determines durability?TheMan wrote:HOW ABOUT A [FORCEFIELD]
*Made of cery clear undestructible glass.
*It can reduce griefing.
COULD THIS BE DONE?
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
Mods: Orichalcum Stonebricks Extra Chests
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
That has already been done. See this topic, in particular the "full clip".TheMan wrote:HOW ABOUT A [FORCEFIELD]
*Made of cery clear undestructible glass.
*It can reduce griefing.
COULD THIS BE DONE?
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
Thanks, this code almost works.PilzAdam wrote: This is untested code: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)
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).
Nope
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
Fixed line 14 and 15 (change desc to param):cactuz_pl wrote:Thanks, this code almost works.PilzAdam wrote: This is untested code: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)
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).
Code: Select all
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
end
Code: Select all
future_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)
Still it doesn't remember list, future_banlist.txt doesn't exist (in world folder). But server starts.
When I created future_banlist.txt in world folder, I can see on server start:
Thanks
When I created future_banlist.txt in world folder, I can see on server start:
Code: Select all
Server: error:
...(path to mod folder)/init.lua:49: bad argument #1 to
Code: Select all
minetest.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)
Last edited by cactuz_pl on Sun Dec 30, 2012 18:36, edited 1 time in total.
Nope
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
The mod generates the file. You cant add names to this file. You have to add them all in-game with the command.cactuz_pl wrote:Still it doesn't remember list, future_banlist.txt doesn't exist (in world folder). But server starts.
When I created future_banlist.txt in world folder, I can see on server start:
Code: Select all
Server: error: ...(path to mod folder)/init.lua:49: bad argument #1 to
ThanksCode: Select all
minetest.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)
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
New version (should fix the save issue):cactuz_pl wrote:So I did.
File is not created.
Yes I made it but after failure.
Code: Select all
future_ban_list = {}
local file = io.open(minetest.get_worldpath().."/future_banlist.txt", "r")
if file then
future_ban_list = minetest.deserialize(file:read("*all"))
file:close()
if not future_ban_list then
future_ban_list = {}
end
end
local function save_file()
local file = io.open(minetest.get_worldpath().."/future_banlist.txt", "w")
if file then
file:write(minetest.serialize(future_ban_list))
file:close()
end
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.")
save_file()
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.")
save_file()
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)
save_file()
end
end
end
end)
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
I dont want to create a topic, you can do this if you want to. License: WTFPL.cactuz_pl wrote:Now it works perfectly.
Thank you, and sorry for wasting your time. I hope you will create new topic with this mod.
Last edited by PilzAdam on Sun Dec 30, 2012 20:24, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 12 guests