Ir para conteúdo

Featured Replies

Postado
  • Diretor
  • Este é um post popular.

Como diz o titulo? você pode gerar suas funções do seu tfs em um arquivo texto, para fazer isso é só ir na lib 050 e adicionar isso no final, depois é só ligar o seu servidor e assim todas funções do seu server vai aparecer no arquivo txt. "Isso é bom pra resolver problemas de scripts e trabalhar de forma melhor, com a manipulação do mesmo."

 

function getLuaFunctions()
	local str = ""
	for f,k in pairs(_G) do
		if type(k) == 'function' then
			str = str..f..','
		elseif type(k) == 'table' then
			for d,o in pairs(k) do
				if type(o) == 'function' then
					if f ~= '_G' and d ~= "_G" and f ~= 'package' then
						str = str..f.."."..d..','
					end
				elseif type(o) == 'table' then
					for m,n in pairs(o) do
						if type(n) == 'function' then
							if d == "_M" and m ~= "_M" and f ~= "_G" and f ~= 'package' then
								str = str..f.."."..m..","
							elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then
								str = str..f.."."..d..'.'..m..','
							end
						elseif type(n) == 'table' then
							for x,p in pairs(n) do
								if type(p) == 'function' then
									if m == "_M" and d ~= "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f.."."..d..'.'..x..','
									elseif m == "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f.."."..x..','
									elseif m ~= "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f..'.'..m..'.'..x..','
									elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then
										str = str..f.."."..d..'.'..m..'.'..x..','
									end
								end
							end
						end
					end
				end
			end
		end
	end
	return string.explode(str,',')
end

local k = getLuaFunctions()

local file__ = io.open('funcoes do seu servidor.txt','w')
table.sort(k)
for i=1,#k do
    if k[i] ~= "" then
        file__:write((i-1)..' - '..k[i]..'\n')
    end
end
file__:close()

Créditos: Mock

 

20230912_034613.png.cf49b650c34dd7d7b1f79bd49c70f53c.png

Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código.  #OpenSource #Programação #Contribuição

 

Postado
1 hora atrás, L3K0T disse:

Como diz o titulo? você pode gerar suas funções do seu tfs em um arquivo texto, para fazer isso é só ir na lib 050 e adicionar isso no final, depois é só ligar o seu servidor e assim todas funções do seu server vai aparecer no arquivo txt. "Isso é bom pra resolver problemas de scripts e trabalhar de forma melhor, com a manipulação do mesmo."

 


function getLuaFunctions()
	local str = ""
	for f,k in pairs(_G) do
		if type(k) == 'function' then
			str = str..f..','
		elseif type(k) == 'table' then
			for d,o in pairs(k) do
				if type(o) == 'function' then
					if f ~= '_G' and d ~= "_G" and f ~= 'package' then
						str = str..f.."."..d..','
					end
				elseif type(o) == 'table' then
					for m,n in pairs(o) do
						if type(n) == 'function' then
							if d == "_M" and m ~= "_M" and f ~= "_G" and f ~= 'package' then
								str = str..f.."."..m..","
							elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then
								str = str..f.."."..d..'.'..m..','
							end
						elseif type(n) == 'table' then
							for x,p in pairs(n) do
								if type(p) == 'function' then
									if m == "_M" and d ~= "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f.."."..d..'.'..x..','
									elseif m == "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f.."."..x..','
									elseif m ~= "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f..'.'..m..'.'..x..','
									elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then
										str = str..f.."."..d..'.'..m..'.'..x..','
									end
								end
							end
						end
					end
				end
			end
		end
	end
	return string.explode(str,',')
end

local k = getLuaFunctions()

local file__ = io.open('funcoes do seu servidor.txt','w')
table.sort(k)
for i=1,#k do
    if k[i] ~= "" then
        file__:write((i-1)..' - '..k[i]..'\n')
    end
end
file__:close()

Créditos: Mock

Irei usar ^ ^  

O Mock ainda existe? Kk

                                                                             1535210279_tumblr_o9b6yoxM1Z1tco8kto1_500(3).gif.f527686e19da738322c39555244decac.gif

                                                             Meus tópicos         

                                                         Se ajudei você deixe seu Rep! para fortalecer a amizade ^^

                                                                              Vamos ajudar o fórum a crescer mais.

                                                                          1641206641_gif-escudo-fla-3d(1).gif.a5d3c0c24824d5272a181aa91c5eda0c.gif

                                                                                                Mengão porra! . .

                                                                     tumblr_oxm8eriUeU1sqwgnro2_400.gif.22e347b2fc58fdfd88dbf84f4bdaa1bc.gif

                                                                                ----- NPC que vende informação -----

                                                                           -----Baú Que dá Outfit se tiver Level -----

                                                                     ----- [Npc] Que vende Stones (itens) por diamonds -----

 

 

                                                                       

                       

  • 4 months later...
Postado
Em 20/05/2020 em 20:15, L3K0T disse:

Como diz o titulo? você pode gerar suas funções do seu tfs em um arquivo texto, para fazer isso é só ir na lib 050 e adicionar isso no final, depois é só ligar o seu servidor e assim todas funções do seu server vai aparecer no arquivo txt. "Isso é bom pra resolver problemas de scripts e trabalhar de forma melhor, com a manipulação do mesmo."

 


function getLuaFunctions()
	local str = ""
	for f,k in pairs(_G) do
		if type(k) == 'function' then
			str = str..f..','
		elseif type(k) == 'table' then
			for d,o in pairs(k) do
				if type(o) == 'function' then
					if f ~= '_G' and d ~= "_G" and f ~= 'package' then
						str = str..f.."."..d..','
					end
				elseif type(o) == 'table' then
					for m,n in pairs(o) do
						if type(n) == 'function' then
							if d == "_M" and m ~= "_M" and f ~= "_G" and f ~= 'package' then
								str = str..f.."."..m..","
							elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then
								str = str..f.."."..d..'.'..m..','
							end
						elseif type(n) == 'table' then
							for x,p in pairs(n) do
								if type(p) == 'function' then
									if m == "_M" and d ~= "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f.."."..d..'.'..x..','
									elseif m == "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f.."."..x..','
									elseif m ~= "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then
										str = str..f..'.'..m..'.'..x..','
									elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then
										str = str..f.."."..d..'.'..m..'.'..x..','
									end
								end
							end
						end
					end
				end
			end
		end
	end
	return string.explode(str,',')
end

local k = getLuaFunctions()

local file__ = io.open('funcoes do seu servidor.txt','w')
table.sort(k)
for i=1,#k do
    if k[i] ~= "" then
        file__:write((i-1)..' - '..k[i]..'\n')
    end
end
file__:close()

Créditos: Mock

nossa, como o mock deu um arrodeio danado para fazer esse script.

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo