--= Book (use to read or write to)
minetest.register_craftitem(":default:book", {
description = "Book (Use to Read or Write Book)",
inventory_image = "default_book.png",
groups = {book=1},
stack_max = 1,
on_use = function(itemstack, user, pointed_thing)
local text = itemstack:get_metadata()
local header = string.split(text, '££')[1] or ""
local writing = string.split(text, '££')[2] or ""
local formspec = "size[8,8]"..
default.gui_bg..default.gui_bg_img..default.gui_slots..
"textarea[.5,.5;7.5,7;text;Book (Authored by "..header..");"..
minetest.formspec_escape(writing).."]"..
"button_exit[3,7;2,1;ok;Close]"
minetest.show_formspec(user:get_player_name(), "default:book", formspec)
end,
})
minetest.register_on_player_receive_fields(function (player, formname, fields)
-- If text entered in book then check for changes, sign and save
if ((formname == "default:book") and fields and fields.text) then
local stack = player:get_wielded_item()
if (stack:get_name() and minetest.get_item_group(stack:get_name(), "book") ~= 0) then
local text = stack:to_table()
local header = string.split(text.metadata, '££')[1] or ""
local writing = string.split(text.metadata, '££')[2] or ""
if fields.text ~= writing then
text.metadata = player:get_player_name().."££"..fields.text
player:set_wielded_item(ItemStack(text))
end
end
end
end)
TenPlus1 wrote:Titanius caught you building underneath spawn waters which was against rules at spawn, so privs were stripped...
TenPlus1 wrote:Titanius caught you building underneath spawn waters which was against rules at spawn, so privs were stripped...
ack wrote:As auouymous asked where are we allowed to build ?
Phiwari123 wrote:There is a red circle around spawn which shows where the spawn waters end. It was added yesterday to prevent any new misunderstandings to happen.
saxmax wrote:Hi guys, glad to see you also on a forum.
I'm still on the beginning of my adventure in this fantastic server, and i would like to thank the admins, you doing great work.
By the way, if i can ask, i stumbled on this while exploring, the other day..
It was flying, and it was fleshy, i killed it. Wat was it? o.O
iDevMe wrote:Just a bug from the old horse mod... that's pretty much it.
Kilarin wrote:iDevMe wrote:Just a bug from the old horse mod... that's pretty much it.
I've caught them FLYING. But what was most frustrating, was TenPlus1 was nearby and I tried to show it to him. He couldn't see it. Made me look like a crazy guy. I mean, crazier than normal. Chasing invisible pink ghosts kind of crazy. Which is not my NORMAL kind of crazy. Honest....
TenPlus1 wrote:It is now possible to write inside a book and read them by holding book and USE'ing it... Finally something to store inside bookshelves or leave players offline notes...
Also, a suggestion box has been setup at spawn for any messages to admin :)
--code--
4aiman wrote:Anyway, can I have my privileges changed?
Users browsing this forum: No registered users and 16 guests