Sentry for Citizens2
![]() | ![]() |
---|
Sentry is a character plugin for the NPC plugin Citizens2. With Sentry, NPC's can be set to guard areas or act as bodyguards. Hostile targeting, retaliation, and a variety of options and stats allow a Sentry NPC to be customized to almost any guarding or combat situation.
Features
Sentries Can:
- Attack monsters, players, and groups automatically. Sentry also has built-in support for Factions, Towny, War and SimpleClans
- Kill, and be killed by, players, monsters, and the environment.
- Guard locations, paths, players, or other NPCs.
- Use ranged or melee weapons. Shoot arrows, fireballs, snowballs, eggs, lightning, and potions with deadly accuracy.
- Be configured with stats such as Strength, Health, Armor, Speed, Range and even Night Vision!
- Ride mounts!
- Work with Denizen to become Bosses and Quest NPCs that run scripts upon death.
Installation
- Install Citizens2 You must use the correct version for your version of Bukkit
- Download the correct Sentry from the Citizens Wiki. You must use the correct version for your version of Bukkit
- Place Sentry.jar in your minecraft /plugins/ directory. Start your server.
- Create a NPC with Citizens and give it the 'sentry' trait.
/npc create Town Guard --trait sentry
- Customize your Sentry's stats and options and you're ready to go.
A full list of commands and options is available on the Citizens 2 Wiki
Configuration
Sentry makes a config.yml in the plugins/Sentry folder on first load. Use this to tailor Sentry to your server. You can:
- Set defaults for new sentries
- Change or disable the item used for various attack types
- Add potion effects like slow or blindness to certain Sentry weapons.
- Add armor, strength and speed buffs to armor and weapons for Sentries.
- Set critical hit chances and messages.
The config.yml is commented with instructions.
@jrbudda
Everything seems to work except the iron sword I gave him breaks on me before i kill him. Is that something I've done wrong?
fix is on github 0.9.9.1v2
https://github.com/jrbudda/Sentry/downloads
@jrbudda
Ah i see it, its throwing a console error, fix invoming
@kustimork
Is that using DieLikePlayers or just the default?
@jrbudda
There is a new glitch now, the npc will agro like normal but when it takes enough damage to kill it, instead of dying it stops being aggressive towards you and walks back to its spawn point (set with /npc path) then it will take further damage from you but never die.
/npc despawn and respawning it lets you replay this scenario over and over
also when you do /sentry info it says status: isDead when its right in front of me
If your sentry's targets aren't working, check his nightvision stat and make sure it isn't 0.
There was a bug in 0.9.9 that would set it to 0 on new sentries if the config.yml was missing or damaged.
@kustimork
No.
and the update is now on the wiki.
@jrbudda
Another question while I have your attention. Is it possible to make the npc name show over the heads of monster npc's?
@jrbudda
Fantastic! I'll continue making my bandit camp! =D
@kustimork
Prolly tomorrow. you wont need to change anything.
@jrbudda
Any idea on when that is coming? Days, weeks?
After its fixed will I need to redo anything or shall I continue to make npc's in preparation for it being fixed in the future?
@kustimork
Yea sorry known bug I just discovered yesterday, will be fixed in next release!
This plugin is working great for all my needs but I've come across one thing that I can't seem to make work. The sentry wont drop its items. /sentry drops is on, I checked the saves.yml and it says true, it has items and when I kill it I only get exp and no items. I'm stuck on this problem, any ideas?
@zRations
There may be other protection plugins out there that set the damage to 0 like Modifyworld. I would try disabling them one by one to see which it is. If you find it let me know. Also do /plugins and putt he results on pastebin and paste here so I can take a look too.
@jrbudda
I am having the exact same problem as willkiller1234 but, I do not have modifyworld enabled. Nor do I even have a jar/folder for it. It has been completely removed yet my npc will not deal damage to me and I cannot deal damage to it. But mobs can take damage and deal damage to the npc.
@willkiller1234
That's a conflict with Modifyworld. you will have to disable it.
This plugin is great. One problem i have though is when i make a sentry then i try to attack it, it attacks me back but when i hit it it doesnt take any damage. It just repeatedly says damage done to sentry 0. I dont have my sentry are invincible anyway i can make it take damage?
@KoBro12
If it did that, I could probably make it so that a sentry can be a "Policeman" of sorts where a command gets issued when they hit a player with a stick causing them to be jailed. I would love to do that for my server where I purposefully allow PvP in the town but the sentries would jail people for pvp if they get caught.
If the characters took real damage from attacks, this woud be compatable with the plugin McMMO (Give EXP from damage on sentries, and skills woud work) and they woud be set on fire with fire enchantments.
And the plugin seems to not be able to handle a lot of NPCs at the same time. It works fine to a point where it says somthing about permission groups errors, even if you dont have group sentries.
@Lord_Majh
Short term is to get it back working like it was. I'll look at how to implement it properly on a per-sentry basis including armor decay in the future.