• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Custom LIB

_Aion_

Nothing Else
Joined
Jan 19, 2010
Messages
400
Solutions
4
Reaction score
10
Location
Jequie,Bahia,Brazil
I'm looking for an old lib, I saw it more or less between 2010-2013 here on the forum.
it was a lib that when it was active, it showed all the functions that was being executed at the moment in real time, I don't remember who the author was or what the area was, I just remember it was here in otland.
If anyone has or knows where I can get it I would be grateful.
I had it in an old datapack, but my PC burned and I lost all the old files
 
I'm going to guess you probably saw this... it used to be included with the Lua source tarball.

Lua:
-- trace calls
-- example: lua -ltrace-calls bisect.lua

local level=0

local function hook(event)
 local t=debug.getinfo(3)
 io.write(level," >>> ",string.rep(" ",level))
 if t~=nil and t.currentline>=0 then io.write(t.short_src,":",t.currentline," ") end
 t=debug.getinfo(2)
 if event=="call" then
  level=level+1
 else
  level=level-1 if level<0 then level=0 end
 end
 if t.what=="main" then
  if event=="call" then
   io.write("begin ",t.short_src)
  else
   io.write("end ",t.short_src)
  end
 elseif t.what=="Lua" then
  io.write(event," ",t.name or "(Lua)"," <",t.linedefined,":",t.short_src,">")
 else
 io.write(event," ",t.name or "(C)"," [",t.what,"] ")
 end
 io.write("\n")
end

debug.sethook(hook,"cr")
level=0

You also have a nice array of other options.
 
I'm going to guess you probably saw this... it used to be included with the Lua source tarball.

Lua:
-- trace calls
-- example: lua -ltrace-calls bisect.lua

local level=0

local function hook(event)
local t=debug.getinfo(3)
io.write(level," >>> ",string.rep(" ",level))
if t~=nil and t.currentline>=0 then io.write(t.short_src,":",t.currentline," ") end
t=debug.getinfo(2)
if event=="call" then
  level=level+1
else
  level=level-1 if level<0 then level=0 end
end
if t.what=="main" then
  if event=="call" then
   io.write("begin ",t.short_src)
  else
   io.write("end ",t.short_src)
  end
elseif t.what=="Lua" then
  io.write(event," ",t.name or "(Lua)"," <",t.linedefined,":",t.short_src,">")
else
io.write(event," ",t.name or "(C)"," [",t.what,"] ")
end
io.write("\n")
end

debug.sethook(hook,"cr")
level=0

You also have a nice array of other options.

This is not it, it was one that we just need to put in the "lib" folder on the server and reload or I don't remember if it was in globalevents, I remember it was something simple, it was just to implement and reload.
 
Back
Top