added ability to protect npc's

This commit is contained in:
TenPlus1 2016-11-08 16:14:43 +00:00
parent 75474b10be
commit 49d696eda4
2 changed files with 4 additions and 0 deletions

View File

@ -106,6 +106,7 @@ mobs:register_mob("mobs_npc:igor", {
end end
end end
mobs:protect(self, clicker)
mobs:capture_mob(self, clicker, 0, 5, 80, false, nil) mobs:capture_mob(self, clicker, 0, 5, 80, false, nil)
end, end,
}) })

View File

@ -93,6 +93,9 @@ mobs:register_mob("mobs_npc:npc", {
-- capture npc with net or lasso -- capture npc with net or lasso
mobs:capture_mob(self, clicker, 0, 5, 80, false, nil) mobs:capture_mob(self, clicker, 0, 5, 80, false, nil)
-- protect npc with mobs:protector
mobs:protect(self, clicker)
-- by right-clicking owner can switch npc between follow and stand -- by right-clicking owner can switch npc between follow and stand
if self.owner and self.owner == name then if self.owner and self.owner == name then