commit cdbc8e364849ba057490707db83cab881d44ba2a Author: Elkien3 Date: Wed Aug 22 02:19:07 2018 +0500 initial commit diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..73c3c20 --- /dev/null +++ b/Readme.md @@ -0,0 +1,16 @@ +##Interact: A mod for Minetest. + +This mod is designed to automatically grant new players on a server interact. A formspec will be show when the player joins, and there is a command to bring the formspec up later in the game. +There are 3 screens that they go through. The first one is a check if they like griefing (One for really stupid griefers!), the next checks if the player just wants to look round the server, and the final one shows the rules, and asks the player to accept them. Finally, there is a screen which offers the player a quiz, which s/he has to complete successfully to get interact. + +Almost everything in the mod can be configured to how you want it. + +####Configuring the mod: +You will probably want to replace the default rules with your own in rules.lua. Also, the quiz should be adapted to your rules, thus the quiz questions are found in rules.lua also. + +Everything else that you need to configure the mod can be found in config.lua. If you want to, have a look over it before running the mod, to see if everything seems to be as you want it! + +####Notes: +1. This mod is based on the (old) [rules](https://github.com/CraigyDavi/Craig-Server_game/blob/df8beb15e6b02ab6dd22f94349453c51819238c4/mods/_misc/rules.lua) on [Craig's Server.](https://forum.minetest.net/viewtopic.php?f=10&t=7010) +2. That mod was, in turn based on this [mod.](https://github.com/ChaosWormz/mt_terms_of_use) +3. I may add randomly selected messages at some point. diff --git a/config.lua b/config.lua new file mode 100644 index 0000000..3d154c6 --- /dev/null +++ b/config.lua @@ -0,0 +1,42 @@ +interact = {} + +interact.configured = true --Change this to true when you've configured the mod! +interact.default_language = "english" + +--Which answer is needed for the quiz questions. interact.quiz1-4 takes true or false. +--True is left, false is right. +--Please, please spell true and false right!!! If you spell it wrong it won't work! +--interact.quiz can be 1, 2 or 3. +--1 is the top one by the question, 2 is the bottom left one, 3 is the bottom right one. +--Make sure these agree with your answers! + +interact.quiz1 = true +interact.quiz2 = true +interact.quiz3 = false +interact.quiz4 = true +interact.quiz_multi = 3 + +--Which screens to show. +interact.screen1 = true --The welcome a first question screen. +interact.screen2 = true --The visit or interact screen. +interact.screen4 = true --The quiz screen. + +--Ban or kick griefers? Default is kick, set to true for ban. +interact.grief_ban = false + +--Kick, ban or ignore players who disagree with the rules. +--Options are "kick" "ban" "nothing" +interact.disagree_action = "nothing" + +--The fouth screen-- +--Should there be a back to rules button? +interact.s4_to_rules_button = true + + +--What to do on a wrong quiz. +--Options are "kick" "ban" "reshow" "rules" and "nothing" +interact.on_wrong_quiz = "reshow" + + +--The priv required to use the /rules command. If fast is a default priv, I recomend replacing shout with that. +interact.priv = {shout = true} diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..e69de29 diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..f0ec0d1 --- /dev/null +++ b/description.txt @@ -0,0 +1,3 @@ +A mod that gives the interact priv to players who want it. +It displays the rules, and then provides a simple quiz on them. +If the player completes the quiz sucsesfully, then s/he is given interact. diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..60a348f --- /dev/null +++ b/init.lua @@ -0,0 +1,280 @@ +rule_table = {} +rule_language = {} +dofile(minetest.get_modpath("interact") .. "/rules-english.lua") --I put the rules in their own file so that they don't get lost/overlooked! +dofile(minetest.get_modpath("interact") .. "/rules-russian.lua") +dofile(minetest.get_modpath("interact") .. "/rules-deutsch.lua") +dofile(minetest.get_modpath("interact") .. "/config.lua") + +local rule1 = 0 +local rule2 = 0 +local rule3 = 0 +local rule4 = 0 +local multi = 0 + +local all_languages = interact.default_language +for k in pairs(rule_table) do + if k ~= interact.default_language then + all_languages = all_languages..", "..k + if rule_table[k].secondaryname then + all_languages = all_languages.." ("..rule_table[k].secondaryname..")" + end + end +end + +local function make_formspec(player, language) + if not language then language = interact.default_language end + local name = player:get_player_name() + local size = { "size[10,4]" } + table.insert(size, "label[1,0.5;List of Languages (eg: /rules english)]") + table.insert(size, "label[1,1;"..all_languages.."]") + table.insert(size, "label[0.5,0;" ..rule_table[language].s1_header.. "]") + table.insert(size, "label[0.5,3.25;" ..rule_table[language].s1_l2.. "]") + table.insert(size, "label[0.5,3.75;" ..rule_table[language].s1_l3.. "]") + table.insert(size, "button_exit[5.5,3.4;2,0.5;no;" ..rule_table[language].s1_b1.. "]") + table.insert(size, "button[7.5,3.4;2,0.5;yes;" ..rule_table[language].s1_b2.. "]") + return table.concat(size) +end + +local function make_formspec2(player, language) + if not language then language = interact.default_language end + local name = player:get_player_name() + local size = { "size[10,4]" } + table.insert(size, "label[0.5,0.5;" ..rule_table[language].s2_l1.. "]") + table.insert(size, "label[0.5,1;" ..rule_table[language].s2_l2.. "]") + table.insert(size, "button_exit[2.5,3.4;3.5,0.5;interact;" ..rule_table[language].s2_b1.. "]") + table.insert(size, "button_exit[6.4,3.4;3.6,0.5;visit;" ..rule_table[language].s2_b2.. "]") + return table.concat(size) +end + +local function make_formspec3(player, language) + if not language then language = interact.default_language end + local size = { "size[10,8]" } + table.insert(size, "textarea[0.5,0.5;9.5,7.5;TOS;" ..rule_table[language].s3_header.. ";" ..rule_table[language].rules.. "]") + table.insert(size, "button[5.5,7.4;2,0.5;decline;" ..rule_table[language].s3_b2.. "]") + table.insert(size, "button_exit[7.5,7.4;2,0.5;accept;" ..rule_table[language].s3_b1.. "]") + return table.concat(size) +end + +local function make_formspec4(player, language) + if not language then language = interact.default_language end + local name = player:get_player_name() + local size = { "size[10,9]" } + if interact.s4_to_rules_button == true then + table.insert(size, "button_exit[7.75,0.25;2.1,0.1;rules;" ..rule_table[language].s4_to_rules.. "]") + end + table.insert(size, "label[0.25,0;" ..rule_table[language].s4_header.."]") + table.insert(size, "label[0.5,0.5;" ..rule_table[language].question1.."]") + table.insert(size, "checkbox[0.25,1;rule1_true;" ..rule_table[language].s4_question1_true.."]") + table.insert(size, "checkbox[4,1;rule1_false;" ..rule_table[language].s4_question1_false.. "]") + table.insert(size, "label[0.5,2;" ..rule_table[language].question2.. "]") + table.insert(size, "checkbox[0.25,2.5;rule2_true;" ..rule_table[language].s4_question2_true.. "]") + table.insert(size, "checkbox[4,2.5;rule2_false;" ..rule_table[language].s4_question2_false.. "]") + table.insert(size, "label[0.5,3.5;" ..rule_table[language].question3.. "]") + table.insert(size, "checkbox[0.25,4;rule3_true;" ..rule_table[language].s4_question3_true.. "]") + table.insert(size, "checkbox[4,4;rule3_false;" ..rule_table[language].s4_question3_false.. "]") + table.insert(size, "label[0.5,5;" ..rule_table[language].question4.. "]") + table.insert(size, "checkbox[0.25,5.5;rule4_true;" ..rule_table[language].s4_question4_true.. "]") + table.insert(size, "checkbox[4,5.5;rule4_false;" ..rule_table[language].s4_question4_false.."]") + table.insert(size, "label[0.5,6.5;" ..rule_table[language].multiquestion.. "]") + table.insert(size, "checkbox[4.75,6.25;multi_choice1;" ..rule_table[language].mq_answer1.. "]") + table.insert(size, "checkbox[0.25,7;multi_choice2;" ..rule_table[language].mq_answer2.. "]") + table.insert(size, "checkbox[4.75,7;multi_choice3;" ..rule_table[language].mq_answer3.."]") + table.insert(size, "button_exit[3,8.4;3.5,0.5;submit;" ..rule_table[language].s4_submit.."]") + return table.concat(size) +end + +local server_formspec = "size[10,4]" .. + "label[0.5,0.5;Hey, you! Yes, you, the admin! What do you think you're doing]" .. + "label[0.5,0.9;ignoring warnings in the terminal? You should watch it carefully!]" .. + "label[0.5,1.5;Before you do anything else, open rules.lua in the interact mod]" .. + "label[0.5,1.9;and put your rules there. Then, open config.lua, and look at the]" .. + "label[0.5,2.3;settings. Configure them so that they match up with your rules.]" .. + "label[0.5,2.7;Then, set interact.configured to true, and this message will go away]" .. + "label[0.5,3.1;once you've restarted the server.]" .. + "label[0.5,3.6;Thank you!]" + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "interact_welcome" then return end + local name = player:get_player_name() + local language = rule_language[name] or interact.default_language + if fields.no then + if interact.screen2 == false then + minetest.after(1, function() + minetest.show_formspec(name, "interact_rules", make_formspec3(player, language)) + end) + else + minetest.after(1, function() + minetest.show_formspec(name, "interact_visit", make_formspec2(player, language)) + end) + end + return + elseif fields.yes then + if interact.grief_ban ~= true then + --minetest.kick_player(name, rule_table[language].msg_grief) + minetest.chat_send_player(name, rule_table[language].msg_grief) + else + minetest.ban_player(name) + end + return + end +end) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "interact_visit" then return end + local name = player:get_player_name() + local language = rule_language[name] or interact.default_language + if fields.interact then + minetest.after(1, function() + minetest.show_formspec(name, "interact_rules", make_formspec3(player, language)) + end) + return + elseif fields.visit then + minetest.chat_send_player(name, rule_table[language].visit_msg) + minetest.log("action", name.. " is just visiting.") + return + end +end) + + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "interact_rules" then return end + local name = player:get_player_name() + local language = rule_language[name] or interact.default_language + if fields.accept then + if interact.screen4 == false then + if minetest.check_player_privs(name, interact.priv) then + minetest.chat_send_player(name, rule_table[language].interact_msg1) + minetest.chat_send_player(name, rule_table[language].interact_msg2) + local privs = minetest.get_player_privs(name) + privs.interact = true + minetest.set_player_privs(name, privs) + minetest.log("action", "Granted " ..name.. " interact.") + end + else + minetest.after(1, function() + minetest.show_formspec(name, "interact_quiz", make_formspec4(player, language)) + end) + end + return + elseif fields.decline then + if interact.disagree_action == "kick" then + minetest.kick_player(name, rule_table[language].disagree_msg) + elseif interact.disagree_action == "ban" then + minetest.ban_player(name) + else + minetest.chat_send_player(name, rule_table[language].disagree_msg) + end + return + end +end) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "interact_quiz" then return end + local name = player:get_player_name() + local language = rule_language[name] or interact.default_language + if fields.rules then + minetest.after(1, function() + minetest.show_formspec(name, "interact_rules", make_formspec3(player, language)) + end) + return + end + if fields.rule1_true then rule1 = true + elseif fields.rule1_false then rule1 = false + elseif fields.rule2_true then rule2 = true + elseif fields.rule2_false then rule2 = false + elseif fields.rule3_true then rule3 = true + elseif fields.rule3_false then rule3 = false + elseif fields.rule4_true then rule4 = true + elseif fields.rule4_false then rule4 = false + elseif fields.multi_choice1 then multi = 1 + elseif fields.multi_choice2 then multi = 2 + elseif fields.multi_choice3 then multi = 3 end + if fields.submit and rule1 == interact.quiz1 and rule2 == interact.quiz2 and + rule3 == interact.quiz3 and rule4 == interact.quiz4 and multi == interact.quiz_multi then + rule1 = 0 + rule2 = 0 + rule3 = 0 + rule4 = 0 + multi = 0 + if minetest.check_player_privs(name, interact.priv) then + minetest.chat_send_player(name, rule_table[language].interact_msg1) + minetest.chat_send_player(name, rule_table[language].interact_msg2) + local privs = minetest.get_player_privs(name) + privs.interact = true + minetest.set_player_privs(name, privs) + minetest.log("action", "Granted " ..name.. " interact.") + end + elseif fields.submit then + rule1 = 0 + rule2 = 0 + rule3 = 0 + rule4 = 0 + multi = 0 + if interact.on_wrong_quiz == "kick" then + minetest.kick_player(name, rule_table[language].wrong_quiz_kick_msg) + elseif interact.on_wrong_quiz == "ban" then + minetest.ban_player(name) + elseif interact.on_wrong_quiz == "reshow" then + minetest.chat_send_player(name, rule_table[language].quiz_try_again_msg) + minetest.after(1, function() + minetest.show_formspec(name, "interact_quiz", make_formspec4(player, language)) + end) + elseif interact.on_wrong_quiz == "rules" then + minetest.chat_send_player(name, rule_table[language].quiz_rules_msg) + minetest.after(1, function() + minetest.show_formspec(name, "interact_rules", make_formspec3(player, language)) + end) + else + minetest.chat_send_player(name, rule_table[language].quiz_fail_msg) + end + end +end) + +minetest.register_chatcommand("rules",{ + params = "", + description = "Shows the server rules", + privs = interact.priv, + func = function (name,params) + local player = minetest.get_player_by_name(name) + local language = rule_language[name] or interact.default_language + if params ~= "" and rule_table[params:lower()] then + language = params:lower() + rule_language[name] = language + elseif params ~= "" then + minetest.chat_send_player(name, "There is no translation for '"..params:lower().."', Opening rules in '"..language.."'") + end + if interact.screen1 ~= false then + minetest.after(1, function() + minetest.show_formspec(name, "interact_welcome", make_formspec(player, language)) + end) + elseif interact.screen2 ~= false then + minetest.after(1, function() + minetest.show_formspec(name, "interact_visit", make_formspec2(player, language)) + end) + else + minetest.after(1, function() + minetest.show_formspec(name, "interact_rules", make_formspec3(player, language)) + end) + end + end +}) + +minetest.register_on_joinplayer(function(player) + local name = player:get_player_name() + local language = rule_language[name] or interact.default_language + if not minetest.get_player_privs(name).interact then + if interact.screen1 ~= false then + minetest.show_formspec(name, "interact_welcome", make_formspec(player, language)) + elseif interact.screen2 ~= false then + minetest.show_formspec(name, "interact_visit", make_formspec2(player, language)) + else + minetest.show_formspec(name, "interact_rules", make_formspec3(player, language)) + end + elseif minetest.get_player_privs(name).server and interact.configured == false then + minetest.show_formspec(name, "interact_no_changes_made", server_formspec) + end +end) + +if not interact.configured then + minetest.log("warning", "Mod \"Interact\" has not been configured! Please open config.lua in its folder and configure it. See the readme of the mod for more details.") +end diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..5915f63 --- /dev/null +++ b/license.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Amaz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..9458ed8 --- /dev/null +++ b/mod.conf @@ -0,0 +1,7 @@ +name = interact +title = Interact +author = Amaz +description = A mod that gives the interact priv to players who want it and who have agreed to the rules. +license = MIT +forum = https://forum.minetest.net/viewtopic.php?f=11&t=11200 +version = 1.0 diff --git a/rules-deutsch.lua b/rules-deutsch.lua new file mode 100644 index 0000000..af9f1a1 --- /dev/null +++ b/rules-deutsch.lua @@ -0,0 +1,103 @@ +--The actual rules. +local language = "german" --must be all lowercase +local yes = "Ja." +local no = "Nein." +rule_table[language] = { +secondaryname = "deutsch", --secondary name, usually the language name in english, or in the actual language. + +rules = [[ +Regeln: + +1. Spielerkämpfe sind erlaubt. Loggen sie nicht immer ab und ein! +2. Sei nicht *übermäßig* grausam, destruktiv oder unangemessen. +3. Sie dürfen fluchen, aber machen sie das nicht öfter und spammen Sie nicht. +4. Kein "Dating" oder ähnliches. +5. Räume ganze Wälder nicht ohne Neupflanzung aus. +6. Wenn du ein Königreich überfallen lässt, während seine Mitglieder offline sind, darfst du nicht viel zerstören oder stehlen. +7. Bitte behalte deine Gebäude zu mittelalterlichen Zeiten und befolge die Gesetze der Physik. +8. Gehackte Clients oder csms, die einen pvp-Vorteil bieten, sind nicht erlaubt. (Es ist jedoch erlaubt, ohne WLAN durch Wände zu gehen.) + +Denken Sie daran: Eine gewisse Zerstörung während des Krieges ist O.K. "Sei einfach nicht *übermäßig* grausam" +]], + +--The questions on the rules, if the quiz is used. +--The checkboxes for the first 4 questions are in config.lua +question1 = "Dürfen sie Spielerkämpfe machen?", +question2 = "Solltest du nach dem Zerstörung des Bäumes, wieder neu bepflanzen?", +question3 = "Dürfen Sie Mädchen, die online sind, küssen, stattdessen Smoothes zu geben?", +question4 = "Darfst du ab und zu etwas von deinen Feinden zerstören?", +multiquestion = "Welchen Baustil müssen sie verwenden?", + +--The answers to the multiple choice questions. Only one of these should be true. +mq_answer1 = "Moderne, super große Wolkenkratzer.", +mq_answer2 = "Raumstationen, oben im Himmel.", +mq_answer3 = "Mittelalterlich, ohne fliegende Teile.", + +--The first screen-- +--The text at the top. +s1_header = "Hallo, willkommen bei Persistent Kingdoms!", +--Lines one and two. Make sure each line is less than 70 characters, or they will run off the screen. +s1_l2 = "Könnten Sie bitte sagen, wenn Sie gerne viele Dinge griefen?", +s1_l3 = "Griefing zerstört Orte und richtet in Allgemein Chaos ein.", +--The buttons. Each can have 15 characters, max. +s1_b1 = "Nein!", +s1_b2 = "Ja!", + +--The message to send kicked griefers. +msg_grief = "Eine Menge der *Grief* wird herabgeschraubt. Leichte Kriegszerstörungen lassen wir noch gelten.", + +--The second screen-- +--Lines one and two. Make sure each line is less than 70 characters, or they will run off the screen. +s2_l1 = "Möchtest du also interact haben oder möchtest du Dinge auf dem Server anschauen?", +s2_l2 = "", +--The buttons. These ones can have a maximum of 26 characters. +s2_b1 = "Ja, ich möchte interact haben!", +s2_b2 = "Ich möchte Dinge anschauen.", + +--The message the player is sent if s/he is just visiting. +visit_msg = "Viel Spaß beim Schauen! Wenn Sie interagieren möchten, schreib '/rules' im chat, um den Vorgang der Regeln wiederholen.", + +--The third screen-- +--The header for the rules box, this can have 60 characters, max. +s3_header = "Hier sind die Regeln:", + +--The buttons. Each can have 15 characters, max. +s3_b1 = "Ich stimme zu", +s3_b2 = "Ich stimme nicht zu", + +--The message to send players who disagree when they are kicked for disagring with the rules. +disagree_msg = "Dann tschüß! Sie müssen den Regeln zustimmen, um auf dem Server zu spielen.", + +--The back to rules button. 13 characters, max. +s4_to_rules = "Zurück zu den Regeln", + +--The header for screen 4. 60 characters max, although this is a bit of a squash. I recomend 55 as a max. +s4_header = "Zeit für ein Quiz über die Regeln!", + +--Since the questions are intrinsically connected with the rules, they are to be found in rules.lua +--The trues are limited to 24 characters. The falses can have 36 characters. + +s4_question1_true = yes, +s4_question1_false = no, +s4_question2_true = yes, +s4_question2_false = no, +s4_question3_true = yes, +s4_question3_false = no, +s4_question4_true = yes, +s4_question4_false = no, + +s4_submit = "Einreichen!", + +--The message to send the player if reshow is the on_wrong_quiz option. +quiz_try_again_msg = "Versuch es noch einmal.", +--The message sent to the player if rules is the on_wrong_quiz option. +quiz_rules_msg = "Schau dir die Regeln nochmal an:", +--The kick reason if kick is the on_wrong_quiz option. +wrong_quiz_kick_msg = "Achten Sie beim nächsten Mal mehr Aufmerksamkeit!", +--The message sent to the player if nothing is the on_wrong_quiz option. +quiz_fail_msg = "Sie haben eine Frage falsch beantwortet. Schreib '/rules' im Chat, um es erneut zu versuchen. (lies sie sorgfältig)", + +--The messages send to the player after interact is granted. +interact_msg1 = "Danke, dass du die Regeln akzeptiert hast, jetzt kannst du mit den Dingen interagieren.", +interact_msg2 = "Viel Glück! Schreib '/guide' im Chat, um loszulegen!", +} \ No newline at end of file diff --git a/rules-english.lua b/rules-english.lua new file mode 100644 index 0000000..673f67d --- /dev/null +++ b/rules-english.lua @@ -0,0 +1,103 @@ +--The actual rules. +local language = "english" --must be all lowercase +local yes = "Yes." +local no = "No." +rule_table[language] = { +secondaryname = nil, --secondary name, usually the language name in english, or in the actual language. + +rules = [[ +Rules: + +1. PVP is allowed. Don't Combat log! +2. Don't be *overly* cruel, destructive, or inappropriate. +3. Keep swearing to a minimum, and don't spam. +4. No "Dating" or the like. +5. Don't clear out entire forests without replanting. +6. If you raid a kingdom while it's members are offline, you may not destroy or steal much. +7. Please keep your builds medieval-ish times, and follow the laws of physics. +8. Hacked clients or csms that give a pvp advantage are disallowed. (However, lagging through walls is allowed.) + +Remember: A some destruction during war is O.K. just "Don't be *overly* cruel" +]], + +--The questions on the rules, if the quiz is used. +--The checkboxes for the first 4 questions are in config.lua +question1 = "Is PVP is allowed?", +question2 = "Should you replant after your tree genocide?", +question3 = "Can you give online girls big, online smooches?", +question4 = "Can you destroy a bit of your enemies's stuff every once in a while?", +multiquestion = "What building style to use?", + +--The answers to the multiple choice questions. Only one of these should be true. +mq_answer1 = "Modern, super tall Skyscrapers.", +mq_answer2 = "Space stations, up in the sky.", +mq_answer3 = "Medieval, with no flying parts.", + +--The first screen-- +--The text at the top. +s1_header = "Hello, welcome to Persistent Kingdoms!", +--Lines one and two. Make sure each line is less than 70 characters, or they will run off the screen. +s1_l2 = "Could you please tell me if you like to grief a lot?", +s1_l3 = "Griefing is destroying places and generally making a mess.", +--The buttons. Each can have 15 characters, max. +s1_b1 = "No, I don't.", +s1_b2 = "Yes, I do!", + +--The message to send kicked griefers. +msg_grief = "A *lot* of griefing is looked down upon, though some war destruction might be ok.", + +--The second screen-- +--Lines one and two. Make sure each line is less than 70 characters, or they will run off the screen. +s2_l1 = "So, do you want interact, or do you just want to look around the server?", +s2_l2 = "", +--The buttons. These ones can have a maximum of 26 characters. +s2_b1 = "Yes, I want interact!", +s2_b2 = "I just want to look round.", + +--The message the player is sent if s/he is just visiting. +visit_msg = "Have a nice time looking round! If you want interact just type /rules, and you can go through the process again!", + +--The third screen-- +--The header for the rules box, this can have 60 characters, max. +s3_header = "Here are the rules:", + +--The buttons. Each can have 15 characters, max. +s3_b1 = "I agree", +s3_b2 = "I disagree", + +--The message to send players who disagree when they are kicked for disagring with the rules. +disagree_msg = "Bye then! You have to agree to the rules to play on the server.", + +--The back to rules button. 13 characters, max. +s4_to_rules = "Back to rules", + +--The header for screen 4. 60 characters max, although this is a bit of a squash. I recomend 55 as a max. +s4_header = "Time for a quiz on the rules!", + +--Since the questions are intrinsically connected with the rules, they are to be found in rules.lua +--The trues are limited to 24 characters. The falses can have 36 characters. + +s4_question1_true = yes, +s4_question1_false = no, +s4_question2_true = yes, +s4_question2_false = no, +s4_question3_true = yes, +s4_question3_false = no, +s4_question4_true = yes, +s4_question4_false = no, + +s4_submit = "Submit!", + +--The message to send the player if reshow is the on_wrong_quiz option. +quiz_try_again_msg = "Have another go.", +--The message sent to the player if rules is the on_wrong_quiz option. +quiz_rules_msg = "Have another look at the rules:", +--The kick reason if kick is the on_wrong_quiz option. +wrong_quiz_kick_msg = "Pay more attention next time!", +--The message sent to the player if nothing is the on_wrong_quiz option. +quiz_fail_msg = "You answered a question incorrectly. type in '/rules' to try again. (read them carefully)", + +--The messages send to the player after interact is granted. +interact_msg1 = "Thanks for accepting the rules, you now are able to interact with things.", +interact_msg2 = "Happy Kingdoming! Do /guide for help getting started!", +} \ No newline at end of file diff --git a/rules-russian.lua b/rules-russian.lua new file mode 100644 index 0000000..533a6a2 --- /dev/null +++ b/rules-russian.lua @@ -0,0 +1,102 @@ +--The actual rules. +local language = "russian" --must be all lowercase +local yes = "да." +local no = "нет." +rule_table[language] = { +secondaryname = "русский", --secondary name, usually the language name in english, or in the actual language. +rules = [[ +Rules: + +1. PVP разрешен. +2. Не будьте чрезмерно жестокими, разрушительными или неуместными. +3. не ругайтесь слишком много, и не спам. +4. нет "знакомства". +5. Не уничтожайте целые леса без посадки снова. +6. Если вы совершаете набег на королевство, когда его члены находятся в автономном режиме, вы не можете много разрушать или украсть. +7. Пожалуйста, строите только средневековую эпоху и следуйте законам физики. +8. Взломанные клиенты или csms, которые дают преимущество pvp, запрещены. (Однако допускается «отставание» через стены.) + +Помните: некоторые разрушения во время войны разрешены. просто «Не будьте чрезмерно жестокими» +]], + +--The questions on the rules, if the quiz is used. +--The checkboxes for the first 4 questions are in config.lua +question1 = "Разрешено ли PVP?", +question2 = "если вы снова сажаете деревья после их резки?", +question3 = "Можете ли вы дать онлайн-девушкам большие, онлайн-поцелуи?", +question4 = "Можете ли вы уничтожить небольшую часть здания ваших врагов?", +multiquestion = "Какой стиль строительства вы должны использовать?", + +--The answers to the multiple choice questions. Only one of these should be true. +mq_answer1 = "Современные, высокие высокие небоскребы.", +mq_answer2 = "Космические станции, вверх по небу.", +mq_answer3 = "Средневековые, без летающих частей.", + +--The first screen-- +--The text at the top. +s1_header = "Привет, добро пожаловать в Persistent Kingdoms!", +--Lines one and two. Make sure each line is less than 70 characters, or they will run off the screen. +s1_l2 = "действительно хотите уничтожить или 'grief'?", +s1_l3 = "'Griefing' уничтожает пространство и создает беспорядок.", +--The buttons. Each can have 15 characters, max. +s1_b1 = "Нет, не знаю.", +s1_b2 = "Да!", + +--The message to send kicked griefers. +msg_grief = "Много griefing смотрится сверху вниз, хотя какое-то разрушение войны может быть в порядке.", + +--The second screen-- +--Lines one and two. Make sure each line is less than 70 characters, or they will run off the screen. +s2_l1 = "Итак, вы хотите взаимодействовать, или просто хотите посмотреть вокруг сервера?", +s2_l2 = "", +--The buttons. These ones can have a maximum of 26 characters. +s2_b1 = "Да, я хочу взаимодействовать!", +s2_b2 = "Я просто хочу, чтобы оглядеться.", + +--The message the player is sent if s/he is just visiting. +visit_msg = "Приятного просмотра! Если вы хотите взаимодействовать, просто введите '/rules russian', и вы сможете снова пройти процесс!", + +--The third screen-- +--The header for the rules box, this can have 60 characters, max. +s3_header = "Вот правила:", + +--The buttons. Each can have 15 characters, max. +s3_b1 = "согласен", +s3_b2 = "я не согласен", + +--The message to send players who disagree when they are kicked for disagring with the rules. +disagree_msg = "До свидания! Вы должны согласиться с правилами игры на сервере.", + +--The back to rules button. 13 characters, max. +s4_to_rules = "Вернуться к правилам", + +--The header for screen 4. 60 characters max, although this is a bit of a squash. I recomend 55 as a max. +s4_header = "Время для викторины по правилам!", + +--Since the questions are intrinsically connected with the rules, they are to be found in rules.lua +--The trues are limited to 24 characters. The falses can have 36 characters. + +s4_question1_true = yes, +s4_question1_false = no, +s4_question2_true = yes, +s4_question2_false = no, +s4_question3_true = yes, +s4_question3_false = no, +s4_question4_true = yes, +s4_question4_false = no, + +s4_submit = "регистрировать!", + +--The message to send the player if reshow is the on_wrong_quiz option. +quiz_try_again_msg = "попробуй еще раз.", +--The message sent to the player if rules is the on_wrong_quiz option. +quiz_rules_msg = "Попробуйте еще раз взглянуть на правила:", +--The kick reason if kick is the on_wrong_quiz option. +wrong_quiz_kick_msg = "Обратите внимание в следующий раз!", +--The message sent to the player if nothing is the on_wrong_quiz option. +quiz_fail_msg = "Вы ответили на вопрос неправильно. введите '/rules', чтобы повторить попытку. (внимательно прочитайте их)", + +--The messages send to the player after interact is granted. +interact_msg1 = "Спасибо, что приняли правила, теперь вы можете взаимодействовать с вещами.", +interact_msg2 = "повеселись! Я предлагаю найти других российских игроков, чтобы объединиться. '/guide'", +} \ No newline at end of file diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..eb544ba Binary files /dev/null and b/screenshot.png differ