Skymagnum 234 Posted May 30, 2015 Share Posted May 30, 2015 (edited) Bom, para quem tá ligado naquele meme do dinossauro lá e pa. function tradufir(text) local words = { ["v"] = "f", ["s "] = "f", ["#@#"] = "f", ["s"] = "f", ["ç"] = "f", ["b"] = "f", ["mp"] = "mpf", ["t"] = "f", ["V"] = "F", ["S"] = "F", ["B"] = "F", ["T"] = "F" } trad = string.gsub(text, "%a", words) return trad end bugo o pastebin ;-;, ela ta pogada mas e que fiz com sono Edited May 30, 2015 by Skymagnum Link to comment Share on other sites More sharing options...
RigBy 285 Posted May 30, 2015 Share Posted May 30, 2015 (edited) Você já atingiu seu limite de reputações positivas para hoje Edited May 30, 2015 by RigBy Link to comment Share on other sites More sharing options...
Vodkart 1515 Posted May 30, 2015 Share Posted May 30, 2015 tb já fiz um parecido uma vez, era mais ou menos assim: function traduzir(text, traduz) return string.gsub(text, "%a", traduz) end local words = { ["o"] = "a", ["m"] = "n", } local x = traduzir("é um menino", words) print(x) --> retorna 'é un nenina' -------------- outro exemplo útil City_Name = "City is: <nome>" local x = City_Name:gsub("<nome>","Venore") print(x) Link to comment Share on other sites More sharing options...
Skymagnum 234 Posted May 30, 2015 Author Share Posted May 30, 2015 tb já fiz um parecido uma vez, era mais ou menos assim: function traduzir(text, traduz) return string.gsub(text, "%a", traduz) end local words = { ["o"] = "a", ["m"] = "n", } local x = traduzir("é um menino", words) print(x) --> retorna 'é un nenina' -------------- outro exemplo útil City_Name = "City is: <nome>" local x = City_Name:gsub("<nome>","Venore") print(x) Passa teo skype viado Link to comment Share on other sites More sharing options...
Vodkart 1515 Posted May 30, 2015 Share Posted May 30, 2015 passa o teu pq vc n pode receber mais msgs Link to comment Share on other sites More sharing options...
Recommended Posts