Created
February 17, 2018 22:41
-
-
Save gallexme/0047e02034f7a252f11a3f2e4bc83385 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function KillAll() | |
for i, entity in pairs(System.GetEntitiesInSphereByClass(player:GetWorldPos(), 200, "NPC")) do | |
entity.soul:DealDamage(100, 100) | |
end | |
for i, entity in pairs(System.GetEntitiesInSphereByClass(player:GetWorldPos(), 200, "NPC_Female")) do | |
entity.soul:DealDamage(100, 100) | |
end | |
end | |
-- Opens a file in append mode | |
file = io.open("test.log", "a") | |
io.output(file) | |
function logall() | |
function deepdump(tbl) | |
local checklist = {} | |
local function dumpfunc(func, indent) | |
local tbl = debug.getinfo(func) | |
for k, v in pairs(tbl) do | |
io.write(indent .. k .. "[" .. type(v) .. "]" .. "(" .. tostring(v) .. ")" .. "\n") | |
end | |
end | |
local function innerdump(tbl, indent) | |
checklist[tostring(tbl)] = true | |
for k, v in pairs(tbl) do | |
io.write(indent .. k .. "[" .. type(v) .. "]" .. "(" .. tostring(v) .. ")" .. "\n") | |
if (type(v) == "function") then | |
dumpfunc((v), indent .. " ") | |
end | |
if (type(v) == "table" and not checklist[tostring(v)]) then | |
innerdump(v, indent .. " ") | |
end | |
end | |
end | |
io.write("=== DEEPDUMP -----\n" .. tostring(tbl)) | |
checklist[tostring(tbl)] = true | |
innerdump(tbl, "") | |
io.write("------------------\n") | |
end | |
deepdump(_G) | |
end | |
pcall(logall) | |
-- appends a word test to the last line of the filex | |
io.write("-- End of the test.lua file\n") | |
-- closes the open file | |
io.close(file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment