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