Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Title ]]--
- title = {
- [1] = "titre_mapmaker",
- }
- --[[ Translation ]]--
- system.translation = {
- en = {
- intro = "Are you good in counting? Why don't you try to count how many grounds there are in this map? !Try it!",
- stats = "Stats were disabled in this round.",
- credits = "Event developed by Bolodefchoco.",
- currentScore = "You currently have %s points!",
- nochances = "You spent all your chances!",
- troll = "You've completed the event! Why don't you troll your roommates saying random commands? Hehe",
- enigma = "What ground am I?",
- grounds = {
- {"Wood","I am derived from trees"},
- {"Ice","Polar bears love me"},
- {"Trampoline","You see me in circus"},
- {"Lava","I killed Pompeii"},
- {"Chocolate","I am delicious"},
- {"Earth","I'm one of the 4 elements"},
- {"Grass","I am always greener on the other side"},
- {"Sand","You often put your coconut on me"},
- {"Cloud","\"You believe, you can fly, you can touch\".. me"},
- {"Water","2 molecules of hydrogen and 1 molecule of oxygen"},
- {"Stone","Sticks and me's"},
- {"Snow","I can be an angel or a man"},
- {"Rectangle","My area ignores two sides"},
- {"Circle","3.14 is my number"},
- {"Spiderweb","The Incy Wincy uses me"},
- },
- },
- br = {
- intro = "Você é bom em contar? Por que você não tenta contar quantos pisos existem neste mapa? !Prove!",
- stats = "Estatísticas foram desativadas nesta partida.",
- credits = "Evento desenvolvido por Bolodefchoco.",
- currentScore = "Você atualmente tem %s pontos!",
- nochances = "Você gastou todas as suas chances!",
- troll = "Você completou o evento! Por que não trolla seus colegas de sala dizendo comandos aleatórios? Hehe",
- enigma = "Que piso sou eu?",
- grounds = {
- {"Madeira","Sou derivada das árvores"},
- {"Gelo","Ursos polares me amam"},
- {"Trampolim","Você me vê no circo"},
- {"Lava","Eu matei Pompéia"},
- {"Chocolate","Eu sou delicioso"},
- {"Terra","Eu sou um dos 4 elementos"},
- {"Grama","Eu sou sempre mais verde do outro lado da cerca"},
- {"Areia","Você sempre põe seu coco em mim"},
- {"Nuvem","\"You believe, you can fly, you can touch\".. eu"},
- {"Água","2 moléculas de hidrogênio e 1 molécula de oxigênio"},
- {"Pedra","Paus e Eus"},
- {"Neve","Eu posso ser um anjo ou um boneco"},
- {"Retângulo","Minha área ignora dois lados"},
- {"Circulo","3,14 é meu número"},
- {"Teia de Aranha","A Dona Aranha me usa"},
- },
- },
- es = {
- intro = "¿Eres bueno contando? ¿Por qué no intentas contar cuántos suelos hay en este mapa? ¡!Inténtalo!",
- stats = "Las estadísticas fueron deshabilitadas en esta ronda.",
- credits = "Evento desarrollado por Bolodefchoco.",
- currentScore = "¡Actualmente tienes %s puntos!",
- nochances = "¡Gastaste todas tus oportunidades!",
- troll = "¡Has completado el evento! ¿Por qué no trolleas a tus compañeros de sala diciendo comandos al azar? Jeje",
- enigma = "¿Qué suelo soy?",
- grounds = {
- {"Madera","Soy derivado de los árboles"},
- {"Hielo","Los osos polares me aman"},
- {"Trampolín","Me ves en los circos"},
- {"Lava","Maté a Pompeya"},
- {"Chocolate","Soy delicioso"},
- {"Tierra","Soy uno de los cuatro elementos"},
- {"Hierba","Yo, la mala, nunca muero"},
- {"Arena","Con frecuencia pones tu coco sobre mi"},
- {"Nube","\"You believe, you can fly, you can touch\".. me"},
- {"Agua","2 moléculas de hidrógeno y 1 de oxígeno"},
- {"Piedra","Tropezar dos veces conmigo"},
- {"Nieve","Puedo ser un ángel o un hombre"},
- {"Rectángulo","Mi área ignora dos lados"},
- {"Círculo","3.14 es mi número"},
- {"Telaraña","Incy Wincy me usa"},
- },
- },
- ro = {
- intro = "Ești bun la numărat? De ce nu încerci să numeri câte terenuri sunt pe această hartă? Încearcă!",
- stats = "Statisticile sunt dezactivate în această rundă.",
- credits = "Evenimentul a fost creat de Bolodefchoco.",
- currentScore = "În acest moment ai % puncte!",
- nochances = "Ți-ai folosit toate șansele!",
- troll = "Ai terminat deja evenimentul! De ce nu păcălești ceilalți jucători de pe sală cu niște comenzi aleatoare? Hehe",
- enigma = "Pe ce teren mă aflu?",
- grounds = {
- {"Lemn","Sunt făcut din copaci"},
- {"Gheață","Urșii polari mă iubesc"},
- {"Trambulină","Mă poți vedea la circ"},
- {"Lavă","Am distrus Pompeiul"},
- {"Ciocolată","Sunt delicioasă"},
- {"Pământ","Sunt unul dintre cele patru elemente"},
- {"Iarbă","Sunt întotdeauna mai verde la vecini"},
- {"Nisip","Mă aflu în clepsidră"},
- {"Nor","Cu capul în ..."},
- {"Apă","Două molecule de hidrogen și o moleculă de oxigen"},
- {"Piatră","Se ridică de pe inimă"},
- {"Zăpadă","Pot să fiu un înger sau un om"},
- {"Dreptunghi","Sunt un pătrat mai alungit"},
- {"Cerc","3.14 este numărul meu preferat"},
- {"Pânză de păianjen","Sunt folosită de Spider-Man"},
- },
- },
- ar = {},
- fr = {
- intro = "Savez-vous compter ? Pourquoi n'essayeriez-vous pas de compter combien il y a de sols sur cette carte, allez hop hop hop !",
- stats = "Les statistiques ont été désactivées pour cette partie.",
- credits = "Développé par Bolodefchoco.",
- currentScore = "Vous avez actuellement %s points!",
- nochances = "Vous avez épuisé toutes vos chances.",
- troll = "Vous avez terminé ! Trollez à votre tour vos petits camarades de jeu. Haha ^_^",
- enigma = "Quel sol suis-je?",
- grounds = {
- {"Bois","Je suis le squelette de la forêt"},
- {"Glace","Je suis piétiné par les pingouins"},
- {"Trampoline","Je suis idéal pour les acrobaties"},
- {"Lave","Je suis détesté à Pompéi"},
- {"Chocolat","Je suis délicieux"},
- {"Terre","Je suis la mère de toute chose"},
- {"Herbe","Je suis chouchouté par les golfeurs"},
- {"Sable","Je côtoie coquillages et noix de coco"},
- {"Nuage","J'ai souvent votre tête en moi"},
- {"Eau","Je suis également connu sous le nom de H2O"},
- {"Pierre","Je suis aussi un prénom"},
- {"Neige","Je suis fâchée avec le soleil"},
- {"Rectangle","J'ai horreur des arrondis"},
- {"Rond","Je ne jure que par pi"},
- {"Toile d'Araignée","Je n'ai aucun lien avec SpiderCochon"},
- },
- },
- pl = {
- intro = "Jesteś dobry w liczeniu? Czemu nie spróbujesz ile jest gruntów na tej mapie? ! Dawaj!",
- stats = "Statystyki są wyłączone w tej rundzie.",
- credits = "Event stworzony przez Bolodefchoco.",
- currentScore = "Masz %s punktów!",
- nochances = "Zmarnowałeś wszystkie swoje szanse!",
- troll = "Zakończyłeś event! Czemu nie spróbujesz strollować swoich towarzyszy w pokoju pisząc różne komendy? Hehe",
- enigma = "Jakim gruntem jestem?",
- grounds = {
- {"Drewno","Jestem z drzewa"},
- {"Lód","Misie polarne mnie kochają"},
- {"Trampolina","Widzisz mnie w cyrku"},
- {"Lawa","Ja zniszczyłem Pompeje"},
- {"Czekolada","Jestem smaczna"},
- {"Ziemia","Jestem jedna z czterech elementów"},
- {"Trawa","Jestem zawsze bardziej zielona po drugiej stronie"},
- {"Piasek","Często kładziesz kokos na mnie"},
- {"Chmura","\"You believe, you can fly, you can touch\".. mnie"},
- {"Woda","2 cząsteczki wodoru i 1 cząsteczka tlenu"},
- {"Kamień","Patyki i ja"},
- {"Śnieg","Mogę być śniegiem albo człowiekiem"},
- {"Trójkąt","Moje pole ignoruje dwa boki"},
- {"Koło","3.14 w mojej liczbie"},
- {"Pajęczyna","Incy Wincy mnie używa"},
- },
- },
- }
- system.translation.pt = system.translation.br
- system.communityTranslation = system.translation.en
- for k,v in next,system.translation do
- if k == tfm.get.room.community then
- system.communityTranslation = v
- break
- end
- end
- --[[ Data ]]--
- serialization = function(x)
- if type(x) == "table" then
- local t = x
- local str = ""
- for index,value in next,t do
- local prefix,tbOption = (type(value)=="string" and "_@" or type(value)=="boolean" and "_!" or type(value)=="number" and "_#" or type(value)=="table" and "_%" or ""),(type(value)~="table" and tostring(value) or "+&"..serialization(value):gsub(";","?").."&-")
- str = str .. ':' .. tostring(index) .. prefix .. tbOption .. ";"
- end
- return str
- elseif type(x) == "string" then
- local s = x
- local list = {}
- for str in s:gmatch("(.-);") do
- local varName,valueType,value = str:match(':(.-)_(%p)(.+)')
- if varName~=nil then
- varName = tonumber(varName) or varName
- if valueType == "@" then
- list[varName] = tostring(value)
- elseif valueType == "!" then
- list[varName] = value=="true"
- elseif valueType == "#" then
- list[varName] = tonumber(value)
- elseif valueType == "%" then
- list[varName] = serialization(value:gsub("+&",""):gsub("&-",""):gsub("%?",";"))
- end
- end
- end
- return list
- end
- end
- eventPlayerDataLoaded = function(n,d)
- if d ~= "" and d:find(":eventMapmakerScore") then
- info[n].db = serialization(d)
- else
- system.savePlayerData(n,serialization(info[n].db))
- end
- info[n].dataLoaded = true
- tfm.exec.chatMessage("<font color='#3EC0E3'>[•] "..system.communityTranslation.intro,n)
- tfm.exec.chatMessage("<CE>[•] "..system.communityTranslation.currentScore:format(info[n].db.eventMapmakerScore),n)
- if info[n].db.eventMapmakerScore > 29 then
- if not info[n].db.eventMapmakerTitle then
- tfm.exec.chatMessage("<CE>[•] "..system.communityTranslation.grounds[info[n].db.eventMapmakerEnigma][2]..". "..system.communityTranslation.enigma,n)
- else
- tfm.exec.chatMessage("<CE>[•] "..system.communityTranslation.grounds.troll,n)
- end
- end
- end
- --[[ eventNewGame ]]--
- system.grounds = 0
- info = {}
- eventNewGame = function()
- system.grounds = 0
- for n,p in next,tfm.get.room.playerList do
- info[n] = {
- db = {
- eventMapmakerScore = 0,
- eventMapmakerEnigma = math.random(#system.translation.en.grounds),
- eventMapmakerTitle = false
- },
- dataLoaded = false,
- chance = 2,
- mapDone = false,
- }
- system.loadPlayerData(n)
- end
- tfm.exec.chatMessage("<ROSE>[•] ".. system.communityTranslation.stats)
- local xml = tfm.get.room.xmlMapInfo.xml:match("<S>(.*)</S>")
- xml:gsub("<S ",function()
- system.grounds = system.grounds + 1
- end)
- end
- --[[ chatCommand ]]--
- deactivateAccents=function(str)
- local letters = {a = {"á","â","à","å","ã","ä"},e = {"é","ê","è","ë"},i = {"í","î","ì","ï"},o = {"ó","ô","ò","õ","ö"},u = {"ú","û","ù","ü"}}
- for k,v in next,letters do
- for i = 1,#v do
- str = str:gsub(v[i],tostring(k))
- end
- end
- return str
- end
- eventChatCommand = function(n,c)
- if info[n].dataLoaded then
- info[n].chance = info[n].chance - 1
- if info[n].chance > 0 then
- if info[n].db.eventMapmakerScore < 30 then
- if c == tostring(system.grounds) then
- info[n].chance = 0
- info[n].mapDone = true
- info[n].db.eventMapmakerScore = info[n].db.eventMapmakerScore + 1
- tfm.exec.chatMessage("<VP>:)",n)
- --system.savePlayerData(n,serialization(info[n].db))
- else
- if not info[n].mapDone then
- tfm.exec.chatMessage("<R>:(",n)
- end
- end
- else
- if not info[n].db.eventMapmakerTitle then
- c = deactivateAccents(c:gsub(" ","")):lower()
- local groundName = system.communityTranslation.grounds[info[n].db.eventMapmakerEnigma][1]
- groundName = deactivateAccents(groundName:gsub(" ","")):lower()
- if groundName == c then
- --system.giveEventGift(n,title[1])
- info[n].db.eventMapmakerTitle = true
- system.savePlayerData(n,serialization(info[n].db))
- tfm.exec.chatMessage("<CE>[•] "..system.communityTranslation.credits,n)
- info[n].mapDone = true
- else
- if not info[n].mapDone then
- tfm.exec.chatMessage("<R>:(",n)
- end
- end
- end
- end
- else
- if not info[n].mapDone then
- tfm.exec.chatMessage("<R>"..system.communityTranslation.nochances.." :(",n)
- end
- end
- end
- end
- for i = 0,50 do
- system.disableChatCommandDisplay(tostring(i),true)
- end
- for k,v in next,system.communityTranslation.grounds do
- system.disableChatCommandDisplay(v[1],true)
- system.disableChatCommandDisplay(v[1]:lower(),true)
- system.disableChatCommandDisplay(v[1]:upper(),true)
- end
- --[[ Map ]]--
- table.random=function(t)
- return (type(t)=="table" and t[math.random(#t)] or math.random())
- end
- tfm.exec.newGame("#"..table.random({7,17}))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement