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.
Ok, I'll definitely use it, then. Thanks again for the help!
@Dutch_Boy
Are you sure you used the command "/sentry health .." rather than some other plugin command that changes health values? (A lot of plugins can do it, but only Sentry's heath value controls what the Sentry respawns with!)
Problem. Gave a sentry 500 health. Killed him and he doesn't respawn with the same amount of health :(
@_Soccer
Denizen is designed to be easily learned by those with no outside experience - and has the unquestionably most helpful IRC channel in existence. As long as you know what you want to do (and it's possible to do on a Bukkit server), you will definitely either be able to find a way to do it, or at least have someone on Denizen's IRC channel show you how.
Hey, thanks for replying so fast :) ... I'll definitely look into these things, although I've no coding experience whatsoever. Would that change how easily this could be done?
@_Soccer
That sounds like something for a separate plugin - or, if you don't want to deal with that, a Denizen script ( http://wiki.citizensnpcs.co/Denizen ) would suffice.
It'd be relatively simple for a dScript to do what you're asking... a few command events, save/load Sentry styles to/from a YAML file, keep a flag to track spawned NPC count...
Hello, my brother and I have come up with a server idea based around factions & this plugin. The idea is that players rank up after having a certain amount of currency, granting them the ability to spawn in improved guards to defend their base. The higher the rank you are, the better the guards are that you can spawn in. Donors can spawn in guards with special abilities, and so on. Is there any way to have multiple preset guards like this, which can be spawned in by a single command if the player has access to it? Also, on the subject of permissions, would there be any way to allow them to spawn in only a certain amount of guards? For example: X rank only has permission to have 2 guards spawned in at once. I know this could be a large request based on how much of what I stated is already incorporated into the plugin, but I'm sure it'd make for a great server. We've shared the idea with countless people and they all agreed it would be awesome. So my question is.. how much of this is already possible and can easily be done / what would be difficult to do? Our server (if made) will definitely accredit the plugin for how much it's used, and it's likely we'd donate to you developers.
how do you make sentries die normally like a traitless NPC? I need this because of a plugin called phatloots
http://dev.bukkit.org/bukkit-plugins/phatloots
they won't read sentry deaths if the sentry is like a zombie or a villager
@mcmonkey4eva
Thanks
@taharahora
Would need the full error message, that's too little to work with.
@KevinEssence
As in, don't block combat with NPCs as PvP - if anything, treat it as PvE (like if the NPC were a mob)
@Cjfchris1
You're using the wrong version of Sentry for your CraftBukkit build. If you're running CB 1.7.9, download the latest Sentry version available above. Otherwise, find the appropriate version in the "Versions" box on the wiki: http://wiki.citizensnpcs.co/Sentry
I have been getting this error when /trait sentry "Please report this error: [See console] java.lang.NoCLassDefFoundError:net/minecraft/server/v1_7_R2/World
@mcmonkey4eva
Ignore npcs in which way?
using 1.8.2 it gives me 1.7.2 bukkit errors
14.06 01:16:18 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [craftbukkitdev.jar:git-Bukkit-1.7.2-R0.3-68-g8f0832a-b3080jnks] 14.06 00:55:55 [Server] ERROR Could not pass event EntityDamageByEntityEvent to Sentry v1.8.2
Even with denizen disabled, The timer is to quick, i put it for max time and it repsawns the same as it respawned with the default, within a blink of an eye.
@taharahora
Boss script error is something to take up with whoever wrote the boss script, not Sentry. How is the sentry respawn timer broken? If it's respawning too quickly... it might be a Denizen script inducing an earlier respawn. If it's too slow, then there might be an issue...
@mcmonkey4eva
So you can't assign an npc to a town? Dang XD thanks!
/sentry respawn doesnt work in 1.7.9 the timer is broken, also my boss script broke too it doesnt know what player killed the boss so it keeps quick respawning him... it worked before uuid's
@KevinEssence
You can use a Denizen script ( http://wiki.citizensnpcs.co/Denizen ) to add custom item drops to an NPC.
Also, to fix the PvP message... contact whoever made the PvP plugin and ask them to add code to ignore NPCs in the PvP control.
We have mob sentries that you can fight and they'll drop items, in order for them to drop items you need to make them a human character. We don't allow PVP in the area so you can still attack them, but get spammed with you are not in a pvp zone! Any way to fix this? Unless you can make it so other mobs can wear items and drop it, but seems as if only humans drop the stuff and can use ability items.
@Mrhallo19981
http://wiki.citizensnpcs.co/Sentry -> it's as simple as /sentry targets add group:NAMEHERE
@EmpiresCraft
Just do /sentry targets add nationenemies:YOUR_NATION_HERE