
Code: Select all
function onGive(self, npc, item)
if item.go.name == "md_sewer_package" then
-- do magic stuff here, the right item was given
return true
end
hudPrint("I have no need for this item")
return false
end
Code: Select all
npc_neutral.monster:addConnector("onDamage",self.go.id,"npcdamage")
function npcdamage(sender)
spawn("regular_mob",npc_neutral.level,npc_neutral.x,npc_neutral.y,npc_neutral.facing,npc_neutral.elevation,nil)
delayedCall(self.go.id,0.1,"killnpc")
end
function killnpc()
npc_neutral:destroy()
end