dfhack/plugins/Dfusion/luafiles/onfunction/plugin.lua

15 lines
392 B
Lua

2011-08-19 16:12:30 -06:00
mypos=engine.getmod("functions")
function DeathMsg(values)
2011-08-21 07:27:01 -06:00
local name
name=engine.peek(values[onfunction.hints["Die"].creature],ptt_dfstring)
print(name:getval().." died")
end
2011-08-19 16:12:30 -06:00
if mypos then
print("Onfunction already installed")
--onfunction.patch(0x189dd6+offsets.base())
2011-08-19 16:12:30 -06:00
else
onfunction.install()
dofile("dfusion/onfunction/locations.lua")
onfunction.SetCallback("Die",DeathMsg)
end