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
|
2012-04-03 07:17:43 -06:00
|
|
|
local u=engine.cast(df.unit,values[onfunction.hints["Die"].creature])
|
|
|
|
|
|
|
|
print(u.name.first_name.." died")
|
2011-08-20 14:13:14 -06:00
|
|
|
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
|