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
Any chance you could make that a configurable option? I would like certain cities to have guards with unbreakable items, but would like others to require players to replenish their supplies.
The weapon breaking appears to be due to an unexpected change in a recent build of Citizens2... working on a fix.
@theflyingpolyp
I'll look into that... I thought they were.
@skore87
At the moment, no. Possibly someday.
Would it be possible to add the ability for sentries to open (and maybe close them after going through) doors?
Is there a way to make the Sentry's weapon unbreakable? My guards work great for a few days, then I have to go around and equip them all with new swords because their original items have worn and broken from use.
@skore87
I really don't know. I've put in a ticket for Modifyworld and they say they are going to fix it on their end at some point.
@percentunit
use /sentry spawn to relocate the spawn point. Duplication on /citizens reload is a known bug and being worked on.
I got a kinda problem with this plugin :( everything is working fine exept 2 things, i cant move my npc's to their spawn location because if i do "/npc move" they will move there but after respawn not anymore and also for ""/npc tphere" the other problem is that my sentry's are duplicating their self. so i placed 2 guards and after a few min there are 4!
could someone help me with this problem thanks ^_^
@jrbudda
Zero damage. I have ModifyWorld on. Is there a permission node you know of to get around that problem? I don't actually use it and can disable it, but it would be good to know if there is a workaround.
@skore87
@skore87
Is nothing happening? or are you doing 0 damage? The 0 damage thing is a known conflict with Modifyworld.
@Geech
After a little toying around, if I give the name of the NPC OP it will work, so it is a permission node. Also I made sure that PVP is enabled too.
@skore87
I'm actually having the same problem, I can't damage any npc's that aren't named after me.
I'm not sure what I'm doing wrong but I am able to damage a sentry with my name, but none of the other sentries that I make. The npcs weren't sent to invincible either.
if you don't change a Builders origin and schematic, he can be used to rebuild things. You could make a sentry-denizen-builder that repairs his own guard shack once a day or whatever using a Denizen Activity Task.
@Sejsel
That would be amazing - even if the builder had a maintenance setting. My sentries had a full on lightning fight with some monsters and there was a a fair bit of fire damage afterwards - I dont really want to completely lock everything down with WorlfGuard as it gets too "nanny" like. If we had a maintenance guy that could even fix 80% of the stuff afterwards ..... but it could be really difficult.
@EngelBV
EngelBV - I had similar problems but if you have not done so already - make a point of hunting down the latest dev versions - think it was 360 for both Citizens 2 and sentry '9.8.1. It seemed to fix the immediate crash issue although did have a catastrophic kernel crash a few hours later but not sure what caused that as am testing many dev builds. Just make sure you back up !.
What about Sentry & Builder combo? I want to have city protected by Sentries, so the player can break blocks, but he will be attacked. The building should be rebuilt by Builder soon afterwards.
@EngelBV
Look at the installation instructions and known caveats on the download page.
@KoBro12
What do you mean about mcmmo?
@rossyell
I'll check on the blaze rod, could be a bug.
The server eventually crashes when the NPC is battling a mob, coming up with this error: Exception in server tick loopjava.lang.AbstractMethodError: net.aufdemrand.sentry.GiveUpStuckAction.run
at net.citizensnpcs.npc.ai.CitizensNavigator.stopNavigating(CitizensNavigator.java:145) at net.citizensnpcs.npc.ai.CitizensNavigator.updateStationaryStatus(CitizensNavigator.java:183) at net.citizensnpcs.npc.ai.CitizensNavigator.update(CitizensNavigator.java:160) at net.citizensnpcs.npc.CitizensNPC.update(CitizensNPC.java:163) at net.citizensnpcs.npc.entity.CitizensHumanNPC.update(CitizensHumanNPC.java:138) at net.citizensnpcs.npc.entity.EntityHumanNPC.h_(EntityHumanNPC.java:85) at net.minecraft.server.World.entityJoinedWorld(World.java:1239) at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:498) at net.minecraft.server.World.playerJoinedWorld(World.java:1221) at net.minecraft.server.World.tickEntities(World.java:1119) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:565) at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212) at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406) at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
Have loaded up the .9.8.1 version and edited the config file. Am battling with the blaze rod/ bows. Previously - for at least the blaze rod they shot - now they just use thme as melee fighters.
When I do the /sentry info it shows the sentry is hostile- but is not listing the blase-rod or bow.
Interesting enough the guys with the books are calling down lightning very effectively.