Version MFF.

This commit is contained in:
sys4-fr 2018-09-08 16:15:55 +02:00
parent 878dbcb2c7
commit e10ce6152b
5 changed files with 82 additions and 29 deletions

20
Copyright README.txt Normal file
View File

@ -0,0 +1,20 @@
Copyright (C) UjEdwin 2015
Your rights:
1: Use it / for public/servers
2: Take parts of the code
3: Edit the mod
V2
A easy way to make your own serverguide with books!
All new players will get ther own books too.
You can easy add / change tabs, content and the title of it.
To craft the book: craft 2 sticks
To show it, type /guide
or
/giveme serverguide:book
or
/giveme guide

View File

@ -1,5 +0,0 @@
# serverguide
License: CC0
Change the settings / text in the lua file

View File

@ -1 +0,0 @@
The serverguide

View File

@ -1,14 +1,44 @@
local serverguide_Book_title="The server guide" local serverguide_Book_title="The server guide"
local serverguide_Tab_Text_1="Server info\n Type /guide to see this" local serverguide_Tab_Text_1=[[
local serverguide_Tab_Text_2="Server Rules \nNo ask for privs or admin stuff \nNo swearing or bad names (like God, fuc...)\nNo griefing\nNo bad stealing or steal people's usernames\nNo hacking\nDon't mess up with moderators or admins" Server info
local serverguide_Tab_Text_3="Staff (moderator or admins)" MinetestForFun Server (hardcore)
local serverguide_Tab_Text_4="Commands:\nSet your home with /sethome say /home to teleport back \nSee who are online /status" Base server (classic) of the MinetestForFun Team
local serverguide_Tab_Text_5="Help info\nHelp you self\n Only call a moderator or admin if you\n get problems that you cant fix it by own" ]]
local serverguide_Tab_Text_2= [[
1) No intentional try to disturb the server's stability will be tolerated.
2) Cheating (hack, modified client, ...) is forbidden on this server.
Be fair-play and learn to play according to the rules.
3) On the server, PVP is authorized and theft/grief as well, to the exception
of public buildings. (remember to use the areas mod to protect your buildings)
4) Please do not spam or flood.
5) Each player is responsible of his/her own account, we can't be held
liable for any illegitimate use of it.
6) Try to avoid 1x1 towers and overall destroying the environment, anywhere
that is. This way the server will stay as beautiful, wild and
natural as possible.
7) Do not ask to be a member of the server staff.
8) Swearing, racism, hate speech and the like is strictly prohibited.
]]
local serverguide_Tab_Text_3= [[
Rulers info (moderator or admins)
Adminitrator : Darcidride
Moderators : Cyberpangolin, crabman, Mg
]]
local serverguide_Tab_Text_4=[[
Commands:
- /guide : show this guide
]]
local serverguide_Tab_Text_5=[[
Help info
Help you self
Call moderators/administrator if you have questions on the server
or need specific help.
]]
local serverguide_Tab_1="Server" local serverguide_Tab_1="Server"
local serverguide_Tab_2="Rules" local serverguide_Tab_2="Rules"
local serverguide_Tab_3="Staff" local serverguide_Tab_3="Rulers"
local serverguide_Tab_4="Commands" local serverguide_Tab_4="Commands"
local serverguide_Tab_5="Help" local serverguide_Tab_5="Help"
@ -46,25 +76,34 @@ minetest.register_tool("serverguide:book", {
description = serverguide_Book_title, description = serverguide_Book_title,
inventory_image = "default_book.png", inventory_image = "default_book.png",
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
serverguide_guide(user,1) if pointed_thing.type == "node" then
return itemstack local pos = pointed_thing.under
local node = minetest.get_node_or_nil(pos)
local def = node and minetest.registered_nodes[node.name]
if def and def.on_punch then
minetest.registered_nodes[node.name].on_punch(pos, node, user, pointed_thing)
return itemstack
end
end
serverguide_guide(user,1)
return itemstack
end, end,
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.under local pos = pointed_thing.under
local node = minetest.get_node_or_nil(pos) local node = minetest.get_node_or_nil(pos)
local def = node and minetest.registered_nodes[node.name] local def = node and minetest.registered_nodes[node.name]
if not def or not def.buildable_to then if not def or not def.buildable_to then
pos = pointed_thing.above pos = pointed_thing.above
node = minetest.get_node_or_nil(pos) node = minetest.get_node_or_nil(pos)
def = node and minetest.registered_nodes[node.name] def = node and minetest.registered_nodes[node.name]
if not def or not def.buildable_to then return itemstack end if not def or not def.buildable_to then return itemstack end
end
if minetest.is_protected(pos, placer:get_player_name()) then return itemstack end
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
minetest.set_node(pos, {name = "serverguide:guide",param2 = fdir,})
itemstack:take_item()
return itemstack
end end
if minetest.is_protected(pos, placer:get_player_name()) then return itemstack end
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
minetest.set_node(pos, {name = "serverguide:guide",param2 = fdir,})
itemstack:take_item()
return itemstack
end
}) })
minetest.register_alias("guide", "serverguide:book") minetest.register_alias("guide", "serverguide:book")
minetest.register_craft({output = "serverguide:book",recipe = {{"default:stick","default:stick"},}}) minetest.register_craft({output = "serverguide:book",recipe = {{"default:stick","default:stick"},}})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB