forked from mtcontrib/serverguide
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
f5a1d2667e | |||
ffea40645e | |||
e19ebf5692 |
@ -1,20 +0,0 @@
|
|||||||
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
|
|
5
README.md
Normal file
5
README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# serverguide
|
||||||
|
|
||||||
|
Licenses: LGPL-2.1
|
||||||
|
|
||||||
|
Change the settings / text in the lua file
|
1
description.txt
Normal file
1
description.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
The serverguide
|
85
init.lua
85
init.lua
@ -1,44 +1,14 @@
|
|||||||
local serverguide_Book_title="The server guide"
|
local serverguide_Book_title="The server guide"
|
||||||
|
|
||||||
local serverguide_Tab_Text_1=[[
|
local serverguide_Tab_Text_1="Server info\n Type /guide to see this"
|
||||||
Server info
|
local serverguide_Tab_Text_2="Server Rules \nDon't ask for privs or admin stuff \nNo swearing or bad words (like god, fuc...)\nNo griefing\nDon't steal or take other people's usernames\nNo hacking\nDon't mess with moderators or admins"
|
||||||
MinetestForFun Server (hardcore)
|
local serverguide_Tab_Text_3="Staff (moderator or admins)"
|
||||||
Base server (classic) of the MinetestForFun Team
|
local serverguide_Tab_Text_4="Commands:\nSet your home with /sethome, say /home to teleport back \nSee who is online with /status"
|
||||||
]]
|
local serverguide_Tab_Text_5="Help info\nHelp yourself\n Only call a moderator or admin if you\n encounter problems that you cant fix by yourself"
|
||||||
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="Rulers"
|
local serverguide_Tab_3="Staff"
|
||||||
local serverguide_Tab_4="Commands"
|
local serverguide_Tab_4="Commands"
|
||||||
local serverguide_Tab_5="Help"
|
local serverguide_Tab_5="Help"
|
||||||
|
|
||||||
@ -76,34 +46,25 @@ 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)
|
||||||
if pointed_thing.type == "node" then
|
serverguide_guide(user,1)
|
||||||
local pos = pointed_thing.under
|
return itemstack
|
||||||
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"},}})
|
||||||
|
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
Reference in New Issue
Block a user