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.
![]()


-
View User Profile
-
Send Message
Posted Jun 10, 2014Hello, I run a small towny server and was wondering how you would make a npc of a npc town target enemy nations. I noticed there was a target type to do this (nationenemies:Name) but have no idea how you would actually do it.
-
View User Profile
-
Send Message
Posted Jun 9, 2014how can I set that the guard only a specific group (group manager) attacks?
-
View User Profile
-
Send Message
Posted Jun 8, 2014@Matysm
The fix for crackshot is pretty simple, although it will requires us to use an event priority that bukkit says not to. Also will need testing to make sure it doesn't affect anything else. Stay tuned.
-
View User Profile
-
Send Message
Posted Jun 4, 2014@mcmonkey4eva
Ah I see, thank you for clearing that up. Well denizens can be targeted by crackshot guns so if you guys do write a full functioning script do tell me. In the meantime I suppose I am going to have to try and implement crackshot support myself. What reassures me is that normal citizens take crackshot gun damage.
-
View User Profile
-
Send Message
Posted Jun 4, 2014@Matysm
You misinterpret the dev situation of these plugins.
Citizens is maintained by a single person (fullwall). He's not available much... generally when we need to check something Citizens-related, we just jump into the code ourselves. Sentry is by jrbudda, who's super inactive and only really shows up to add builds to the BukkitDev page. Lately, I've been doing the majority of the maintenance... jrbudda doesn't like other people changing around his plugin much, so I'm limited to just version-compatibility and fixing obvious bugs. Fixing a bug with CrackShot would probably involve adding code to specifically interact with CrackShot. Sentry is designed to readily take any damage sent through an EntityDamageByEntity Bukkit event... if crackshot isn't firing that, that's a crackshot problem, not Sentry. To fix it, we'd have to rework damage to be taken however crackshot applies it... which might work for crackshot, but then break compatibility with other plugins.
Regardless, any possible fix would require the assistance of a crackshot developer, and none seem to be coming forward to help with it.
I'd recommend looking into Denizen - http://wiki.citizensnpcs.co/Denizen - the NPC scripting engine, which is watched by an active community and a large number of devs (Aufdemrand in charge, me doing most of the code-work lately as auf is busy too, Morph/Jeebs around to help, and tons of random inexperienced programmers throwing their help in whenever needed) - and making sure CrackShot applies damage to Denizen vulnerable NPCs. Since Sentry development has been dropped to 'bare-maintenance', we're considering replacing Sentry entirely with a Denizen script - here's a basic example of that (an early attempt at doing the replacement, far from fully functional, and it requires a Denizen build that isn't released yet, as its development is spawning the need for a lot of new Denizen script features) - http://mcmonkey.org/haste/4996
-
View User Profile
-
Send Message
Posted Jun 4, 2014First off let me start by saying this feature has already been requested by many and that it would satisfy more than just the community I am aiding. I was curious as to why guns from the crackshot plugin affect and hurt citizens but not sentries.The moment I make a citizen from citizen 2 a sentry, he becomes invulnerable to crackshot attacks. Considering you guys are friends with the guys at citizens it doesn't seem outlandish to propose that you try and have a powwow and see what they have that you don't. I was considering having my boys do it, but I came here first as both an act of respect to you guys and your plugin but also because I think that others besides I wish to see this change occur.
Thank you very much for your time.
-
View User Profile
-
Send Message
Posted May 16, 2014Hey,
please help me with my problem (or fix/improve that): http://aikar.co/timings.php?url=7473068
I have set the logictask interval to 25, it doesnt makes a difference to the default worth 10.
-
View User Profile
-
Send Message
Posted May 15, 2014@Conorserver
Make sure you have the appropriate Sentry version for 1.7.5 - you can find it on the wiki: http://wiki.citizensnpcs.co/Sentry
-
View User Profile
-
Send Message
Posted May 15, 2014This is broken for me on 1.7.5 it doesn't let you make them sentries!
-
View User Profile
-
Send Message
Posted May 14, 2014Still a problem.
-
View User Profile
-
Send Message
Posted May 13, 2014@Gr0up115
Updates are on the wiki: http://wiki.citizensnpcs.co/Sentry
-
View User Profile
-
Send Message
Posted May 13, 2014When is this going to be updated? It's the only plugin that doesn't work for 1.7.9 for me..
-
View User Profile
-
Send Message
Posted May 12, 2014@matze135
That's something to ask the War plugin devs about probably. The Sentry dev who tried to add plugin cross-support isn't active anymore.
-
View User Profile
-
Send Message
Posted May 11, 2014Sorry for my english.I translate this messege.
A question to the NPC and the War Plugin.
When i hit a npc in the war arena come this chat message:
"Your target is not playing in a warzone",
Can you somehow get points if you have a Citizens NPC Kills ?
I have citizens 2.0.13#1128 and sentry 1.8.2 with spigot 1.7.9
-
View User Profile
-
Send Message
Posted May 10, 2014@Romanovski
Woops, never patched the internal version number. Yeah, 1.8.2 will still show as '1.8.1'.
If your NPCs are disappearing, you have a different issue... I recommend getting help with that on the Citizens IRC: http://webchat.esper.net/?channels=citizens
-
View User Profile
-
Send Message
Posted May 10, 2014I downloaded 1.8.2, deleted both Citezens and Sentry plugin folders, Citizens is 2.0.13 Snapshot. Once I start the server I see Sentry 1.8.1 still. I know I deleted the old Sentry.jar. I'm running 1.7.9 spigot server. The real problem is my NPCs vanish after server reboot. I know it usually means that the Sentry plugin is not up to date. Shouldn't the sentry show up 1.8.2 since that is what I downloaded instead of 1.8.1? Is the download link for 1.8.2 pointing to the right version of Sentry? By the way I googled my brains out regarding getting 1.8.2 for 2 days now before posting here.
Thanks for all your hard work. I love your plugin. Keep up the good work.
-
View User Profile
-
Send Message
Posted Apr 29, 2014@Xdecupl0r
You're running 1.7.5, not 1.7.2
The Sentry version you want is 1.8.1
-
View User Profile
-
Send Message
Posted Apr 29, 2014@mcmonkey4eva
Cheers mate, much appreciated.
-
View User Profile
-
Send Message
Posted Apr 29, 2014@mcmonkey4eva
Well that's what i did i guess YOU didn't read what i wrote on my post :
"I already tried with the v. 1.8.0 (12/10/13) and the v. 1.7.1 (11/07/1) but that's still not working.."
I still tried this morning with these versions ( Sentry 1.8.0 Release 1.7.2 ) which are supposed to match with my 1.7.2 CB ( i got the latest Citizens 2 build ) but anyway there are still some errors :
java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R1/Packet
Don't tell me that i need to find my appropriate version on the "updates" box i already did and that's not working, i ain't the only one having errors like that.
-
View User Profile
-
Send Message
Posted Apr 28, 2014@Xdecupl0r
Are you freakin' serious. Can you read my post before replying to it?
For the 9000th time:
FIND THE
APPROPRIATE
VERSION
OF SENTRY
FOR
YOUR SERVER
ON THE WIKI
http://wiki.citizensnpcs.co/Sentry
IN THE 'UPDATES' BOX