What's new

[8.1-8.6]Sprawdzanie wszytkich funckji silnika

Status
Not open for further replies.

Aragornkk

Senior User
Joined
Oct 11, 2008
Messages
705
Reaction score
44
Ot?? coraz wi?cej os?b prosi o funkcje odpowiadaj?c? za co?.Skrypt nie daje nam parametr?w ale parametry mo?na znale?? wklejaj?c chcian? funkcje do Google. UWAGA: Nie pokazuje funkcji mySQL.


Autorem pierwotnym jest Capaverde (niestety nie posiadam linku do jego dzie?a)
link do skryptu umie?ci? Rahim,ale nie ka?dy go widzia?.


To jest skrypt actions, ale lepiej aby by?o to w funkcjach(lepsze rozpoznanie)
Code:
-- a Capaverde's production
local function sittable(k,v)
table.insert(tabela,{k,v})
end
local function sorttable(a,b) -- tried to put it into alphabetical order
return string.byte(a[1],1) < string.byte(b[1],1)
end
function onUse(cid, item, frompos, item2, topos)
tabela = {}
table.foreach(_G,sittable)
table.sort(tabela,sorttable)
for k,v in ipairs(tabela) do
if type(v[2]) == "function" then
doPlayerSendTextMessage(cid,22,v[1])
end
end
return 1
end

Wszelkie b??dy jakie macie mo?ecie zg?asza? w tym temacie, ja w miar? moich mo?liwo?ci spr?buje je rozwi?za?.
 

Aragornkk

Senior User
Joined
Oct 11, 2008
Messages
705
Reaction score
44
Odp: [8.1-8.6]Sprawdzanie wszytkich funckji silnika

Od?nie?am, nikt nie przetestowa? skryptu? Dziwne bo dzia? request p?ka od takich pr??b. Wystarczy tylko wklei? do notatnika wynik skryptu a nast?pnie szukamy to co b?dzie nam potrzebne.
 

Atlatrix

New User
Joined
May 7, 2009
Messages
7
Reaction score
0
Odp: [8.1-8.6]Sprawdzanie wszytkich funckji silnika

a ja przetestuje ;p
 

Don Muha

Advanced User
Joined
Aug 27, 2008
Messages
403
Reaction score
34
Odp: [8.1-8.6]Sprawdzanie wszytkich funckji silnika

Tzn.? Chodzi o to, ?e sprawdza jakie komendy s? na serwerze? Je?li tak to to jest lepsze:
PHP:
function getLuaFunctions()-- by Mock
	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()
--- Create file content your server function list
local file__ = io.open('Your Server Function List.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()
Made by Mock ;)
 

Yondaime

Advanced User
Joined
Apr 5, 2008
Messages
311
Reaction score
21
Odp: [8.1-8.6]Sprawdzanie wszytkich funckji silnika

jak go wkleic i jak uzywac?
 

Aragornkk

Senior User
Joined
Oct 11, 2008
Messages
705
Reaction score
44
Odp: [8.1-8.6]Sprawdzanie wszytkich funckji silnika

Don Muha
No ba pewnie ?e lepsze tylko ?e to co ty poda?e? zosta?o napisane stosunkowo niedawno a to co ja wklei?em pojawi?o si? ju? za czas?w pierwszych TFS?w. Nie zadzia?a to w starszych wersjach silnik?w 0.3.5 w d??.


Yondaime
Wklejasz tak jak zwyk?y skrypt actions a nast?pnie u?ywasz tego przedmiotu jaki sobie wybra?e? i masz wszystkie komendy kt?re posiadasz w silniku ( nie ma tych zwi?zanych z MYSQL)
 
Status
Not open for further replies.
Top