<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.citizensnpcs.co/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Instinx</id>
	<title>Citizens Wiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.citizensnpcs.co/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Instinx"/>
	<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/Special:Contributions/Instinx"/>
	<updated>2026-07-07T05:41:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=TODO&amp;diff=3559</id>
		<title>TODO</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=TODO&amp;diff=3559"/>
		<updated>2012-09-27T15:36:02Z</updated>

		<summary type="html">&lt;p&gt;Instinx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== fullwall&#039;s TODO (please add under your name if you modify this) ==&lt;br /&gt;
* Templates&lt;br /&gt;
* Waypoint attachments&lt;br /&gt;
* Make rename update in save file&lt;br /&gt;
* NPC sitting&lt;br /&gt;
* In-place conversion db&amp;lt;-&amp;gt;yml&amp;lt;-&amp;gt;nbt&lt;br /&gt;
* waypoints move location somehow&lt;br /&gt;
* Giants don&#039;t attack back&lt;br /&gt;
* Some kind of issue with pathfinding range - npc teleports immediately.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;jrbudda&#039;&#039;&lt;br /&gt;
* Setting a navigator target makes the waypointprovider stop working. You still have to pause it, set target, then un-pause it to get it to resume waypointing.&lt;br /&gt;
* Fix NPCs looking 90 degrees in the wrong direction with multiworld&lt;br /&gt;
* Fix NPC yaw not applying on load&lt;br /&gt;
* Fix /reload duplicating NPCs&lt;br /&gt;
* Giants don&#039;t move.&lt;br /&gt;
* Add call to API to get the selected NPC for a CommandSender. (have to build against citizens.jar and get the NPCSelector now)&lt;br /&gt;
* Fix stuck-teleporting instantly when using waypoints?&lt;br /&gt;
* Integrate auf&#039;s Wander code into core as the WanderingWaypointProvider and make an Editor for it :)&lt;br /&gt;
* Work out kinks in SQL storage.&lt;br /&gt;
* Documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;instinx&#039;&#039;&lt;br /&gt;
* Add a visual effect to waypoint editor. Like each point changes to glowstone or some other block not typically used in flooring.&lt;br /&gt;
== User suggestions ==&lt;br /&gt;
* &#039;But I&#039;d love for a NPC to be able to have a waypoint where they &amp;quot;sit&amp;quot; for 4 minutes&#039; - Ridge&lt;br /&gt;
* Can you modify the /npc list command so it only show your owned npcs unless you have the citizans.admin permissions? -from JIRA.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1613</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1613"/>
		<updated>2012-06-18T23:04:24Z</updated>

		<summary type="html">&lt;p&gt;Instinx: /* Script Repository */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.6 Build #104&lt;br /&gt;
| CITIZENSBUILD  = 2.0 Beta&lt;br /&gt;
| DEVSTATUS    = BETA&lt;br /&gt;
| DEPENDS = Vault&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastStableBuild/artifact/target/denizen-0.6.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/44002922/Start-up%20Kit.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; clear:both; margin-left:0.5em; margin-bottom:2.0em&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. Imagine interactive gate-keepers, magical wizards, experience trainers, bankers, talking townspeople and more! They can be used in thousands of different ways, from tutorials, to questing, to administrating.. your imagination is just about the limit!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Script Repository ==&lt;br /&gt;
&amp;lt;imagemap&amp;gt;Image:Script Repository.png|&lt;br /&gt;
rect 2 26 280 104 [http://form.jotform.us/form/21498151597160|]&lt;br /&gt;
rect 286 26 555 104 [https://www.dropbox.com/sh/hw6x3f980maa8d9/DNtzAw8cn3]&lt;br /&gt;
#&amp;lt;!-- Created by Online Image Map Editor (http://www.maschek.hu/imagemap/index) --&amp;gt;&lt;br /&gt;
&amp;lt;/imagemap&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change Log ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Here&#039;s what&#039;s new!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note to beta users pre-build 98:&#039;&#039;&#039; File structure has changed over the last few builds up to 98. The &amp;lt;code&amp;gt;Denizens:&amp;lt;/code&amp;gt; node now has its own YML file called assignments. You will need to create this file and cut/paste the node from your config.yml. It&#039;s also recommended that you download the new [[Denizen config.yml]] since some nodes have changed or been expanded upon. Denizen location and block bookmarks are also now stored in saves.yml. You will need to migrate those there, or recreate them before using scripts that use bookmarks. See [[#File Structure]] for more information on the new file structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.6 Build #104&#039;&#039;&#039;&lt;br /&gt;
* Added PLAYERTASK command. LOCATION QUESTS! (This is for you, Ratkoon)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.6 Build #98&#039;&#039;&#039;&lt;br /&gt;
* Update to file structure. saves.yml now contains all information that the denizen plugin writes. This includes player progression/completion/etc. information, denizen location bookmarks, etc. If edited by hand, probably best to shut down the server first. Any existing information in the players: node and denizen location bookmark information needs to be either recreated or migrated into saves.yml.&lt;br /&gt;
* Added HEAL and HURT commands. Use HEAL [# of health] or HURT [# of health]. &lt;br /&gt;
* Added CHANGE command to change the type of block at a block bookmark. Use CHANGE [Block Bookmark] [#:#|MATERIAL_TYPE]. &lt;br /&gt;
* Added ATTACK command. Use like FOLLOW. &lt;br /&gt;
* GIVE and TAKE should now also accept #:# format as well as MATERIAL_TYPE.&lt;br /&gt;
* Added ENGAGE and DISENGAGE commands. When a Denizen is ENGAGE&#039;d, no other interaction will be registered with the NPC until DISENGAGED. This could be useful for keeping players from &#039;repeating steps&#039; while mid-script. Use ^ENGAGE at the beginning of the script and DISENGAGE at the end.&lt;br /&gt;
* Requirements using items can now use #:# syntax to check item typeId and data.&lt;br /&gt;
* Requirements WORLD, POTION_EFFECT, NAME, PERMISSION, and GROUP can check for multiple names/nodes. &lt;br /&gt;
* FINISHED can now check for a specific amount of times a player has finished. Use: FINISHED # [name of script]. &lt;br /&gt;
* Script combiner should now only pick up .yml files.&lt;br /&gt;
* Various other bug fixes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.6 Build #82&#039;&#039;&#039;&lt;br /&gt;
* Requirements code reformat is done, thanks for being patient if you were watching the Jenkins!&lt;br /&gt;
* FINISH command now increments a counter so you can check for a certain number of FINISHes. Use: &amp;lt;code&amp;gt;FINISHED (# of times) [name of script]&amp;lt;/code&amp;gt;. The # is optional and will assume 1 if not specified. There&#039;s a chance that this broke any recorded FINISHes that may be in your config. Sorry about that. You can manually change them from True to 1 to fix this. New FINISHes will overwrite without any issues.&lt;br /&gt;
* TIME requirement can now check for DAWN and DUSK in addition to DAY and NIGHT.&lt;br /&gt;
* Requirements that use items can now use the #:# (typeId:data) format. So, for gray wool, 35:7. You can still specify just WOOL and any color will do.&lt;br /&gt;
* Script combiner will now only read .yml files, this fixes issues with hidden files in your scripts file corrupting the combined read-only-scripts.yml.&lt;br /&gt;
* NAME, WORLD, PERMISSION, GROUP, POTION_EFFECT can now all use multiple arguments. For example, &amp;lt;code&amp;gt;WORLD world_1 world_2 world_3 world_4&amp;lt;/code&amp;gt; will return true if one of the worlds listed matches. You can use up to 24 arguments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.6 Build #71&#039;&#039;&#039;&lt;br /&gt;
* Started code reformat, this will make it easier to extend.&lt;br /&gt;
* Added ability to use multiple scripts! Denizen will read any .yml file in the /plugins/Denizen/scripts/ folder. You will need to place your existing scripts.yml in that folder. Denizen will generate a read-only-scripts.yml to the main Denizen folder. This should be left alone. Also made config.yml generate automatically upon startup.&lt;br /&gt;
* Added config node chat_globally_if_no_chat_triggers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
You can see more at the full [[Denizen changelog]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known caveats ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
There are some &#039;issues&#039; with Denizen that we are aware of, and thought that you should be too. Keep in mind that we&#039;re working hard to fix these, as soon as possible.&lt;br /&gt;
&lt;br /&gt;
* I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away.&lt;br /&gt;
* When close to a Denizen that is RESPAWNing, it sometimes won&#039;t actually spawn until you back away from it.&lt;br /&gt;
* Multi-line CHATting loses color codes second line on.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are in BETA! Expect a few bugs here and there! There is little error handling for scripts that contain bad syntax, so if you are getting errors while processing a script, the first thing you should do it check the script syntax. I&#039;m working hard to catch errors, but every once in awhile you&#039;ll find one that requires a /reload or server restart. If you do come across any errors beyond bad syntax, please  report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m usually there working hard to add awesome features and squashing bugs.&lt;br /&gt;
&lt;br /&gt;
Denizen is not a drag-and-go type of plugin. In fact, Denizen won&#039;t do anything unless you assign and define scripts to NPCs. It&#039;s highly customizable and you should expect that to be able to write scripts, it is suggested you read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Denizens &#039;&#039;&#039;REQUIRES&#039;&#039;&#039; you to have [http://dev.bukkit.org/server-mods/vault/ Vault] installed. You also should have a Permissions System and and Economy System for best results.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting started with Denizen ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
The easiest way to use Denizen for the first time is to download the [http://dl.dropbox.com/u/44002922/Start-up%20Kit.zip Start-up Kit] with sample .yml configuration files and scripts. This includes the default config file, sample scripts, and sample assignments to get you started. Denizen relies on a few files to run properly, so let&#039;s first go over the file structure.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== File Structure ===&lt;br /&gt;
[[File:Figure 1 - Denizen file structure.png|250px|thumb|right|Denizen File Structure]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Denizen requires the use of a few different YML files to operate properly. This includes a config.yml, assignments.yml, scripts, and saves.yml. &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== config.yml ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
The Denizen config.yml contains nodes to alter the stock behavior and look of Denizen. You&#039;ll notice that Denizen does not create its own config.yml. Why is this? Denizen stores its entire config inside memory, so it&#039;s not necessary to have a copy inside the Denizen folder unless you need to change the defaults. You can use the config.yml to override those defaults. Not having Denizen write to the config.yml itself (as well as scripts files, and assignments.yml) ensures that upon a &amp;lt;code&amp;gt;/denizen reload&amp;lt;/code&amp;gt;, the config.yml, between a save and reload, is never changed when you don&#039;t want it to. This also keeps code comments inside the YML files stay intact, exactly the way you left them from last edit allowing you to leave yourself and others detailed notes and ideas.&lt;br /&gt;
&lt;br /&gt;
This file can be reloaded into from disk to Denizen memory at any time by using &amp;lt;code&amp;gt;/denizen reload&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See: [[Denizen config.yml]] for a stock copy and explanation of all available options.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== assignments.yml ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
This YML is where you can define all the options and information for your Denizen NPCs. This will be explained further along in this document, but the most common information in this file is [Interact Script Assignments], [Activity Script Schedule], and [Custom Interact Texts].&lt;br /&gt;
&lt;br /&gt;
This file can be reloaded from disk into Denizen memory at any time by using &amp;lt;code&amp;gt;/denizen reload&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See: [[#A basic assignment]] for information on how to get started with assignments.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== saves.yml ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
This file is not meant to be edited by hand, Denizen will create and populate this file automatically as needed. It stores important information such as player progression, Denizen location and block bookmarks, active activity script progression and more. If you absolutely need to make changes by hand, it&#039;s best to stop the server, edit, and then restart your server, as this file is constantly being written to by Denizen which will overwrite any changes you make.&lt;br /&gt;
&lt;br /&gt;
This file saves periodically, and automatically, upon progression and a server stop.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== read-only-scripts.yml ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
This is another files that Denizen creates and should not be edited by hand. This is a combination of the files contained in the scripts folder that Denizen reads from. &lt;br /&gt;
&lt;br /&gt;
This file is populated on a server restart, or by using the &amp;lt;code&amp;gt;/denizen reload&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /scripts/ folder ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
This folder is where Denizen will read all the script information from. Upon a server load or &amp;lt;code&amp;gt;/denizen reload&amp;lt;/code&amp;gt;, the files are combined and put into the read-only-scripts.yml for the Denizen to read from. This allows better organization of scripts to be maintained, since the amount of scripts can easily get into the triple digits. &lt;br /&gt;
&lt;br /&gt;
The files in the plugins/Denizen/scripts/ folder can be named whatever you please, as long as they end in &amp;lt;code&amp;gt;.yml&amp;lt;/code&amp;gt;. Be sure not to duplicate script names from file to file as this will cause problems. &lt;br /&gt;
&lt;br /&gt;
See: [[#A basic trigger script]] for information on how to get started with scripts.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing Scripts and Assignments ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Still reading? Great! You&#039;re on your way to writing some sweet scripts. Let&#039;s start out with the basics: Trigger Scripts and Assignments. Denizen needs two things to be functional. A script, and an assignment. Scripts, obviously, hold instructions that are carried out when triggered. Assignments hold information on which scripts should trigger, and when. Bear with me, and keep reading!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== A basic trigger script ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. The great thing about a Denizen script is that it can be simple or advanced, short or long, thanks to a wide array of commands and functions at your disposal. Scripts can work with, extend, and rely on one another to create rich, interactive gameplay. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Remember: Scripts are defined in &amp;lt;code&amp;gt;plugins/Denizen/scripts/&amp;lt;/code&amp;gt; folder. They can be put into any YML file contained in that directory. You may need to create the directory yourself if no scripts yet exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &amp;lt;code&amp;gt;&#039;Daytime in the City&#039;&amp;lt;/code&amp;gt;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &amp;lt;code&amp;gt;&#039;Click Trigger&#039;&amp;lt;/code&amp;gt;, for it to activate the Requirements set must be met, more specifically &amp;lt;code&amp;gt;ALL&amp;lt;/code&amp;gt; of the requirements set. In this example, the only requirement is &amp;lt;code&amp;gt;TIME DAY&amp;lt;/code&amp;gt; which requires the current time in the world to be daytime. If the Requirements are met, the script defined in the &amp;lt;code&amp;gt;&#039;Click Trigger&#039;&amp;lt;/code&amp;gt; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== A basic assignment ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/assignments.yml and must be done by hand. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Requirements Met: &#039;Come back during the day!&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s break this down again. This assignement will work for Denizens named &amp;lt;code&amp;gt;&#039;Steve&#039;&amp;lt;/code&amp;gt;. Triggers that involve this NPC, such as a &amp;lt;code&amp;gt;&#039;Click Trigger&#039;&amp;lt;/code&amp;gt; will call the script named &amp;lt;code&amp;gt;&#039;Daytime in the City&#039;&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt; before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), the text defined in the &amp;lt;code&amp;gt;Texts:&amp;lt;/code&amp;gt; node called &#039;No Requirements Met&#039; will trigger instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;Come back during the day!&#039;. Note that the default &amp;lt;code&amp;gt;No Requirements Met&amp;lt;/code&amp;gt; text can be changed in the &amp;lt;code&amp;gt;config.yml&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multiple Script Assignments ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple scripts in different situations. This is done by assigning a priority to script assignments. Let&#039;s take this example configs below to see how script priority is handled. The below code references &amp;lt;code&amp;gt;assignments.yml&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;script.yml&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- assignments.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 0 Regular Joe&lt;br /&gt;
    - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- script.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - ENGAGE&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
        - DISENGAGE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen &amp;lt;code&amp;gt;Steve&amp;lt;/code&amp;gt; has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Things to Note, Thus Far ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document. No tabs are allowed in YAML files.&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase. Scripts names follow this rule too! &lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Assignments in Detail ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that will be declared in the Denizens node of assignments.yml. This section will update as functionality requires.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Trigger Scripts in detail ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Type&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/scripts/ folder. Any .yml file in that directory will be loaded into Denizen. For example purposes on this website, reference to script.yml is made.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== General layout of a Trigger Script ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: Trigger     # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Name Node ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Type Node ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Let&#039;s Denizen know the type of script. For trigger scripts, as explained in this section, use &amp;lt;code&amp;gt;TYPE: TRIGGER&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Requirements Node ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Mode Types =====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Requirements Types =====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) ...&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME|#:#]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME|#]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME|#:#]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night|Dusk|Dawn]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATION&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name) ...&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node] (or this permission.node) ...&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED (# of times) [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive! You can specify a certain number of times, as well. Using this as a negative requirement is a good way to put a limit on how many times a player can do a script.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group] (or this Group) ...&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Negative Requirements Types =====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Steps Node ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Trigger Types =====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For a list of commands, see [[#Script Commands]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Task Scripts in detail ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Task scripts are script that are called by either the RUNTASK command or PLAYERTASK command. These are more basic than trigger scripts since they have no requirements or step nodes. The types of commands are also more limited since there is no NPC Denizen associated with the script, but useful for certain situations.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== General layout of a Trigger Script ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: Task        # Type Node&lt;br /&gt;
  Script:           # Script Node&lt;br /&gt;
  - ...&lt;br /&gt;
  - ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using a Task Script with RUNTASK ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt; &lt;br /&gt;
Imagine a scenario where you&#039;d like to check a single outcome from multiple sources. Say, for instance, you have multiple &#039;quests&#039; that all have the same outcome. You could check the completion for each quest, or, you could have all the quests call a Task Script and check against that.&lt;br /&gt;
&lt;br /&gt;
This is a very basic example for something that can in theory be very complex. Imagination, hoooo!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Apple Reward&#039;: &lt;br /&gt;
  Type: Task    &lt;br /&gt;
  Script:       &lt;br /&gt;
  - NARRATE You&#039;ve received some APPLES. Nice!&lt;br /&gt;
  - GIVE APPLE 10&lt;br /&gt;
  - FINISH&lt;br /&gt;
&lt;br /&gt;
&#039;Apple Quest 1&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -FINISHED Apple Reward&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to my house, have some apples!&lt;br /&gt;
        - RUNTASK Apple Reward&lt;br /&gt;
  &lt;br /&gt;
&#039;Apple Quest 2&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -FINISHED Apple Reward&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to my orchard, have some apples!&lt;br /&gt;
        - RUNTASK Apple Reward&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using a Task Script with PLAYERTASK ====&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt; &lt;br /&gt;
Tasks scripts are very straight forward when using with a PLAYERTASK command. The script that is called when the &#039;player task&#039; is complete is a Task script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Graveyard Investigation&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Go investigate the graveyard for me!&lt;br /&gt;
        - PLAYERTASK LOCATION graveyard 20 120 Graveyard Search&lt;br /&gt;
&lt;br /&gt;
&#039;Graveyard Search&#039;: &lt;br /&gt;
  Type: Task    &lt;br /&gt;
  Script:       &lt;br /&gt;
  - NARRATE You are thoroughly spooked out. Maybe you should return to Dave.&lt;br /&gt;
  - FINISH&lt;br /&gt;
&lt;br /&gt;
&#039;Graveyard Investigated Complete&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - FINISHED Graveyard Search&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Ahhh, dang. You couldn&#039;t find anything? Ah well, thanks for your help!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
Note: There are plenty more to come, be patient, more are coming! Have ideas for a good command? Let me know!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ENGAGE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Blocks player interaction from triggering the NPC.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* DISENGAGE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Opens the NPC back up to player interaction.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PLAYERTASK LOCATION [Location Bookmark] [Duration in seconds] [Block leeway] [Task Script to trigger]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Starts a player task to the Denizen&#039;s location bookmark in which the player must stay within a certain amount of blocks (Block Leeway) for a specific duration. Once accomplished, a Task Script is called.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRESS [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a button is found at the block location, it will be pressed. Note: You may need a - WAIT 1 and a 2nd - PRESS [Block Bookmark] or the Denizen will hold the button.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Denizen in-game bukkit commands ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-right:2.0em; padding:10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen version&amp;lt;/code&amp;gt;&lt;br /&gt;
* Gives you an approximation of what build you are using. I&#039;ll probably ask you this if you come to #citizens for any tech support. &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1513</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1513"/>
		<updated>2012-05-30T05:26:03Z</updated>

		<summary type="html">&lt;p&gt;Instinx: Chglog Updates&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #60&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #208&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Script Repository:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://form.jotform.us/form/21498151597160 Submit your Denizens Scripts here to share.]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.dropbox.com/sh/hw6x3f980maa8d9/DNtzAw8cn3 View Shared Scripts]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #60&#039;&#039;&#039;&lt;br /&gt;
* Testing with concurrenthashmap.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #59&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;/denizen reload&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/denizen save&amp;lt;/code&amp;gt; can now be used in the console.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #58&#039;&#039;&#039;&lt;br /&gt;
* Check for interact_delay_in_ticks = 0. (Sparta)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #56&#039;&#039;&#039;&lt;br /&gt;
* Added FAIL command. Sets the script as &#039;FAILED&#039; for checking with requirements. Note: A script can still be FAILED and FINISHED, they are seperate. &lt;br /&gt;
* Added FAILED requirement. Use FAILED [Name of Script]. Remember: SCRIPT NAMES ARE CaSe SeNsItIvE!&lt;br /&gt;
* Added RESET command. This can be used to reset the FAILED or FINISHED status of a script. Use RESET FAILED|FINISHED [Name of Script].&lt;br /&gt;
* Added small warning on the /denizen help stating that many commands listed there do not yet work -- this is a beta, people, I&#039;m working on them :P &lt;br /&gt;
* Documenting /denizen adddata|decdata|getdata. Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
* Fixed WAIT command. It actually works as intended now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Denizens &#039;&#039;&#039;REQUIRES&#039;&#039;&#039; you to have [http://dev.bukkit.org/server-mods/vault/ Vault] installed. You also should have a Permissions System and and Economy System for best results.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml and must be done by hand, for now. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
* PRESS [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a button is found at the block location, it will be pressed. Note: You may need a - WAIT 1 and a 2nd - PRESS [Block Bookmark] or the Denizen will hold the button until the interact timeout.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Sentry&amp;diff=1512</id>
		<title>Sentry</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Sentry&amp;diff=1512"/>
		<updated>2012-05-30T05:01:00Z</updated>

		<summary type="html">&lt;p&gt;Instinx: /* Known caveats and upcoming features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Character&lt;br /&gt;
| PICTURE      = Sentry.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Sentry&lt;br /&gt;
| VERSION    = 0.5.6&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #195&lt;br /&gt;
| DEVSTATUS    = InDev&lt;br /&gt;
| DEPENDS     = Vault, and a permissions system&lt;br /&gt;
| DOWNLOADLINK  = http://dl.dropbox.com/u/129951/Sentry.jar&lt;br /&gt;
| DESCRIPTION  = Sentries guard entrances.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
Note: It has been brought to my attention that giving a Sentry waypoints will crash your server. I will investigate, but for now, avoid doing so.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;v. 0.5.6 beta&#039;&#039;&#039;&lt;br /&gt;
* Now working with the new builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;v. 0.5.5 beta&#039;&#039;&#039;&lt;br /&gt;
* Fixed bugs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;v. 0.5 beta&#039;&#039;&#039;&lt;br /&gt;
* Added the ability to specify targets.&lt;br /&gt;
* Added the ability to set the Health and Speed of a Sentry.&lt;br /&gt;
* &#039;Stuck&#039; Sentries now respawn after a while.&lt;br /&gt;
* Fixed the death handling.&lt;br /&gt;
* Fixed Sentries remembering their guard location on a restart.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;v. 0.3 beta&#039;&#039;&#039;&lt;br /&gt;
* Added ability to kill the NPCs. Swords kill faster. Built-in chance of criticals, etc.&lt;br /&gt;
* Fixed targeting code, should be more efficient now.&lt;br /&gt;
* Implemented respawning sequence.&lt;br /&gt;
&lt;br /&gt;
Up next: Warning targeted Players.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|75pYrGlIcFs}}&lt;br /&gt;
&lt;br /&gt;
==How to Use==&lt;br /&gt;
===Installation===&lt;br /&gt;
* Ensure Citizens2 and Vault are installed&lt;br /&gt;
* Download [http://dl.dropbox.com/u/129951/Sentry.jar Sentry.jar]&lt;br /&gt;
* Place Sentry.jar in your Plugins folder.&lt;br /&gt;
* Start Server&lt;br /&gt;
Note. Sentry folder and config.yml will generate when you add the first target or set the guard position.&lt;br /&gt;
&lt;br /&gt;
===General Information===&lt;br /&gt;
Sentries are useful for guarding areas from intruders.&lt;br /&gt;
Sentries guard a 10 square radius.&lt;br /&gt;
&lt;br /&gt;
To create a sentry, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/npc create &#039;[NPC Name]&#039; --char sentry&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once a desired guard location has been found, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/sentry guard&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a target, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/sentry target add [target]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid targets are player names, mob names, or player groups. For example, &amp;lt;code&amp;gt;/sentry target add zombie&amp;lt;/code&amp;gt; would make the Sentry target Zombies.&lt;br /&gt;
&lt;br /&gt;
Removing a target is just as easy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/sentry target remove [target]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also clear the target list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/sentry target clear&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set a Sentries speed or health, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/sentry health [1-20] and&lt;br /&gt;
/sentry speed [.1-1.0]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: default speed is .2 and default health is 20.&lt;br /&gt;
&lt;br /&gt;
You can give Sentries weapons to make them more lethal with the core /npc command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/npc equip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Known caveats and upcoming features==&lt;br /&gt;
&lt;br /&gt;
Sentries will be able to drop specific items, experience, etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Sentries with the same name seem to be causing problems.  Will fix ASAP.&amp;lt;br&amp;gt;&lt;br /&gt;
Sentries will have some form of waypoint capability.&amp;lt;br&amp;gt;&lt;br /&gt;
Sentries will drop Armor/Weapons on death.&lt;br /&gt;
&lt;br /&gt;
==Suggestions==&lt;br /&gt;
Suggestions are, of course, always welcome! Visit us in #citizens on [irc://irc.esper.net EsperNet].&lt;br /&gt;
&lt;br /&gt;
[[Category:Characters]]&lt;br /&gt;
&lt;br /&gt;
{{NavBox}}&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Sentry&amp;diff=1511</id>
		<title>Sentry</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Sentry&amp;diff=1511"/>
		<updated>2012-05-30T04:43:47Z</updated>

		<summary type="html">&lt;p&gt;Instinx: /* How to Use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Character&lt;br /&gt;
| PICTURE      = Sentry.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Sentry&lt;br /&gt;
| VERSION    = 0.5.6&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #195&lt;br /&gt;
| DEVSTATUS    = InDev&lt;br /&gt;
| DEPENDS     = Vault, and a permissions system&lt;br /&gt;
| DOWNLOADLINK  = http://dl.dropbox.com/u/129951/Sentry.jar&lt;br /&gt;
| DESCRIPTION  = Sentries guard entrances.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
Note: It has been brought to my attention that giving a Sentry waypoints will crash your server. I will investigate, but for now, avoid doing so.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;v. 0.5.6 beta&#039;&#039;&#039;&lt;br /&gt;
* Now working with the new builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;v. 0.5.5 beta&#039;&#039;&#039;&lt;br /&gt;
* Fixed bugs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;v. 0.5 beta&#039;&#039;&#039;&lt;br /&gt;
* Added the ability to specify targets.&lt;br /&gt;
* Added the ability to set the Health and Speed of a Sentry.&lt;br /&gt;
* &#039;Stuck&#039; Sentries now respawn after a while.&lt;br /&gt;
* Fixed the death handling.&lt;br /&gt;
* Fixed Sentries remembering their guard location on a restart.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;v. 0.3 beta&#039;&#039;&#039;&lt;br /&gt;
* Added ability to kill the NPCs. Swords kill faster. Built-in chance of criticals, etc.&lt;br /&gt;
* Fixed targeting code, should be more efficient now.&lt;br /&gt;
* Implemented respawning sequence.&lt;br /&gt;
&lt;br /&gt;
Up next: Warning targeted Players.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|75pYrGlIcFs}}&lt;br /&gt;
&lt;br /&gt;
==How to Use==&lt;br /&gt;
===Installation===&lt;br /&gt;
* Ensure Citizens2 and Vault are installed&lt;br /&gt;
* Download [http://dl.dropbox.com/u/129951/Sentry.jar Sentry.jar]&lt;br /&gt;
* Place Sentry.jar in your Plugins folder.&lt;br /&gt;
* Start Server&lt;br /&gt;
Note. Sentry folder and config.yml will generate when you add the first target or set the guard position.&lt;br /&gt;
&lt;br /&gt;
===General Information===&lt;br /&gt;
Sentries are useful for guarding areas from intruders.&lt;br /&gt;
Sentries guard a 10 square radius.&lt;br /&gt;
&lt;br /&gt;
To create a sentry, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/npc create &#039;[NPC Name]&#039; --char sentry&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once a desired guard location has been found, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/sentry guard&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a target, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/sentry target add [target]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid targets are player names, mob names, or player groups. For example, &amp;lt;code&amp;gt;/sentry target add zombie&amp;lt;/code&amp;gt; would make the Sentry target Zombies.&lt;br /&gt;
&lt;br /&gt;
Removing a target is just as easy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/sentry target remove [target]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also clear the target list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/sentry target clear&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set a Sentries speed or health, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/sentry health [1-20] and&lt;br /&gt;
/sentry speed [.1-1.0]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: default speed is .2 and default health is 20.&lt;br /&gt;
&lt;br /&gt;
You can give Sentries weapons to make them more lethal with the core /npc command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/npc equip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Known caveats and upcoming features==&lt;br /&gt;
&lt;br /&gt;
Sentries will be able to drop specific items, experience, etc.&lt;br /&gt;
Sentries with the same name seem to be causing problems.  Will fix ASAP.&lt;br /&gt;
&lt;br /&gt;
==Suggestions==&lt;br /&gt;
Suggestions are, of course, always welcome! Visit us in #citizens on [irc://irc.esper.net EsperNet].&lt;br /&gt;
&lt;br /&gt;
[[Category:Characters]]&lt;br /&gt;
&lt;br /&gt;
{{NavBox}}&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1510</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1510"/>
		<updated>2012-05-30T04:26:35Z</updated>

		<summary type="html">&lt;p&gt;Instinx: #58&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #58&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #208&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Script Repository:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://form.jotform.us/form/21498151597160 Submit your Denizens Scripts here to share.]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.dropbox.com/sh/hw6x3f980maa8d9/DNtzAw8cn3 View Shared Scripts]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #58&#039;&#039;&#039;&lt;br /&gt;
* Check for interact_delay_in_ticks = 0. (Sparta)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #56&#039;&#039;&#039;&lt;br /&gt;
* Added FAIL command. Sets the script as &#039;FAILED&#039; for checking with requirements. Note: A script can still be FAILED and FINISHED, they are seperate. &lt;br /&gt;
* Added FAILED requirement. Use FAILED [Name of Script]. Remember: SCRIPT NAMES ARE CaSe SeNsItIvE!&lt;br /&gt;
* Added RESET command. This can be used to reset the FAILED or FINISHED status of a script. Use RESET FAILED|FINISHED [Name of Script].&lt;br /&gt;
* Added small warning on the /denizen help stating that many commands listed there do not yet work -- this is a beta, people, I&#039;m working on them :P &lt;br /&gt;
* Documenting /denizen adddata|decdata|getdata. Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
* Fixed WAIT command. It actually works as intended now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Denizens &#039;&#039;&#039;REQUIRES&#039;&#039;&#039; you to have [http://dev.bukkit.org/server-mods/vault/ Vault] installed. You also should have a Permissions System and and Economy System for best results.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml and must be done by hand, for now. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
* PRESS [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a button is found at the block location, it will be pressed. Note: You may need a - WAIT 1 and a 2nd - PRESS [Block Bookmark] or the Denizen will hold the button until the interact timeout.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1509</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1509"/>
		<updated>2012-05-30T03:29:10Z</updated>

		<summary type="html">&lt;p&gt;Instinx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #56&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #208&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Script Repository:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://form.jotform.us/form/21498151597160 Submit your Denizens Scripts here to share.]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.dropbox.com/sh/hw6x3f980maa8d9/DNtzAw8cn3 View Shared Scripts]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #56&#039;&#039;&#039;&lt;br /&gt;
* Added FAIL command. Sets the script as &#039;FAILED&#039; for checking with requirements. Note: A script can still be FAILED and FINISHED, they are seperate. &lt;br /&gt;
* Added FAILED requirement. Use FAILED [Name of Script]. Remember: SCRIPT NAMES ARE CaSe SeNsItIvE!&lt;br /&gt;
* Added RESET command. This can be used to reset the FAILED or FINISHED status of a script. Use RESET FAILED|FINISHED [Name of Script].&lt;br /&gt;
* Added small warning on the /denizen help stating that many commands listed there do not yet work -- this is a beta, people, I&#039;m working on them :P &lt;br /&gt;
* Documenting /denizen adddata|decdata|getdata. Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
* Fixed WAIT command. It actually works as intended now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Denizens &#039;&#039;&#039;REQUIRES&#039;&#039;&#039; you to have [http://dev.bukkit.org/server-mods/vault/ Vault] installed. You also should have a Permissions System and and Economy System for best results.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml and must be done by hand, for now. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
* PRESS [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a button is found at the block location, it will be pressed. Note: You may need a - WAIT 1 and a 2nd - PRESS [Block Bookmark] or the Denizen will hold the button until the interact timeout.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1508</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1508"/>
		<updated>2012-05-30T03:27:49Z</updated>

		<summary type="html">&lt;p&gt;Instinx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #56&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #208&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039;Script Repository:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://form.jotform.us/form/21498151597160 Submit your Denizens Scripts here to share.]&amp;lt;BR&amp;gt;&lt;br /&gt;
[https://www.dropbox.com/sh/hw6x3f980maa8d9/DNtzAw8cn3 View Shared Scripts]&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #56&#039;&#039;&#039;&lt;br /&gt;
* Added FAIL command. Sets the script as &#039;FAILED&#039; for checking with requirements. Note: A script can still be FAILED and FINISHED, they are seperate. &lt;br /&gt;
* Added FAILED requirement. Use FAILED [Name of Script]. Remember: SCRIPT NAMES ARE CaSe SeNsItIvE!&lt;br /&gt;
* Added RESET command. This can be used to reset the FAILED or FINISHED status of a script. Use RESET FAILED|FINISHED [Name of Script].&lt;br /&gt;
* Added small warning on the /denizen help stating that many commands listed there do not yet work -- this is a beta, people, I&#039;m working on them :P &lt;br /&gt;
* Documenting /denizen adddata|decdata|getdata. Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
* Fixed WAIT command. It actually works as intended now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Denizens &#039;&#039;&#039;REQUIRES&#039;&#039;&#039; you to have [http://dev.bukkit.org/server-mods/vault/ Vault] installed. You also should have a Permissions System and and Economy System for best results.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml and must be done by hand, for now. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
* PRESS [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a button is found at the block location, it will be pressed. Note: You may need a - WAIT 1 and a 2nd - PRESS [Block Bookmark] or the Denizen will hold the button until the interact timeout.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1507</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1507"/>
		<updated>2012-05-30T03:26:07Z</updated>

		<summary type="html">&lt;p&gt;Instinx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #56&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #208&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039;Script Repository:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://form.jotform.us/form/21498151597160 Submit your Denizens Scripts here to share.]&amp;lt;BR&amp;gt;&lt;br /&gt;
[https://www.dropbox.com/sh/hw6x3f980maa8d9/DNtzAw8cn3 View Shared Scripts]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #56&#039;&#039;&#039;&lt;br /&gt;
* Added FAIL command. Sets the script as &#039;FAILED&#039; for checking with requirements. Note: A script can still be FAILED and FINISHED, they are seperate. &lt;br /&gt;
* Added FAILED requirement. Use FAILED [Name of Script]. Remember: SCRIPT NAMES ARE CaSe SeNsItIvE!&lt;br /&gt;
* Added RESET command. This can be used to reset the FAILED or FINISHED status of a script. Use RESET FAILED|FINISHED [Name of Script].&lt;br /&gt;
* Added small warning on the /denizen help stating that many commands listed there do not yet work -- this is a beta, people, I&#039;m working on them :P &lt;br /&gt;
* Documenting /denizen adddata|decdata|getdata. Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
* Fixed WAIT command. It actually works as intended now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Denizens &#039;&#039;&#039;REQUIRES&#039;&#039;&#039; you to have [http://dev.bukkit.org/server-mods/vault/ Vault] installed. You also should have a Permissions System and and Economy System for best results.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml and must be done by hand, for now. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
* PRESS [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a button is found at the block location, it will be pressed. Note: You may need a - WAIT 1 and a 2nd - PRESS [Block Bookmark] or the Denizen will hold the button until the interact timeout.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1506</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1506"/>
		<updated>2012-05-30T02:07:47Z</updated>

		<summary type="html">&lt;p&gt;Instinx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #48&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #202&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
[http://form.jotform.us/form/21498151597160 Submit your Denizens Scripts here to share.]&amp;lt;BR&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #56&#039;&#039;&#039;&lt;br /&gt;
* Added FAIL command. Sets the script as &#039;FAILED&#039; for checking with requirements. Note: A script can still be FAILED and FINISHED, they are seperate. &lt;br /&gt;
* Added FAILED requirement. Use FAILED [Name of Script]. Remember: SCRIPT NAMES ARE CaSe SeNsItIvE!&lt;br /&gt;
* Added RESET command. This can be used to reset the FAILED or FINISHED status of a script. Use RESET FAILED|FINISHED [Name of Script].&lt;br /&gt;
* Added small warning on the /denizen help stating that many commands listed there do not yet work -- this is a beta, people, I&#039;m working on them :P &lt;br /&gt;
* Documenting /denizen adddata|decdata|getdata. Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
* Fixed WAIT command. It actually works as intended now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Denizens &#039;&#039;&#039;REQUIRES&#039;&#039;&#039; you to have [http://dev.bukkit.org/server-mods/vault/ Vault] installed. You also should have a Permissions System and and Economy System for best results.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml and must be done by hand, for now. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
* PRESS [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a button is found at the block location, it will be pressed. Note: You may need a - WAIT 1 and a 2nd - PRESS [Block Bookmark] or the Denizen will hold the button until the interact timeout.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1505</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1505"/>
		<updated>2012-05-30T01:53:19Z</updated>

		<summary type="html">&lt;p&gt;Instinx: Add Script Submission link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #48&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #202&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
[https://secure.jotform.us/form/21498151597160 Submit your Denizens Scripts here to share.]&amp;lt;BR&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #56&#039;&#039;&#039;&lt;br /&gt;
* Added FAIL command. Sets the script as &#039;FAILED&#039; for checking with requirements. Note: A script can still be FAILED and FINISHED, they are seperate. &lt;br /&gt;
* Added FAILED requirement. Use FAILED [Name of Script]. Remember: SCRIPT NAMES ARE CaSe SeNsItIvE!&lt;br /&gt;
* Added RESET command. This can be used to reset the FAILED or FINISHED status of a script. Use RESET FAILED|FINISHED [Name of Script].&lt;br /&gt;
* Added small warning on the /denizen help stating that many commands listed there do not yet work -- this is a beta, people, I&#039;m working on them :P &lt;br /&gt;
* Documenting /denizen adddata|decdata|getdata. Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
* Fixed WAIT command. It actually works as intended now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Denizens &#039;&#039;&#039;REQUIRES&#039;&#039;&#039; you to have [http://dev.bukkit.org/server-mods/vault/ Vault] installed. You also should have a Permissions System and and Economy System for best results.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml and must be done by hand, for now. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
* PRESS [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a button is found at the block location, it will be pressed. Note: You may need a - WAIT 1 and a 2nd - PRESS [Block Bookmark] or the Denizen will hold the button until the interact timeout.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1504</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1504"/>
		<updated>2012-05-29T23:22:17Z</updated>

		<summary type="html">&lt;p&gt;Instinx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #48&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #202&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #56&#039;&#039;&#039;&lt;br /&gt;
* Added FAIL command. Sets the script as &#039;FAILED&#039; for checking with requirements. Note: A script can still be FAILED and FINISHED, they are seperate. &lt;br /&gt;
* Added FAILED requirement. Use FAILED [Name of Script]. Remember: SCRIPT NAMES ARE CaSe SeNsItIvE!&lt;br /&gt;
* Added RESET command. This can be used to reset the FAILED or FINISHED status of a script. Use RESET FAILED|FINISHED [Name of Script].&lt;br /&gt;
* Added small warning on the /denizen help stating that many commands listed there do not yet work -- this is a beta, people, I&#039;m working on them :P &lt;br /&gt;
* Documenting /denizen adddata|decdata|getdata. Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
* Fixed WAIT command. It actually works as intended now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Denizens &#039;&#039;&#039;REQUIRES&#039;&#039;&#039; you to have [http://dev.bukkit.org/server-mods/vault/ Vault] installed. You also should have a Permissions System and and Economy System for best results.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml and must be done by hand, for now. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
* PRESS [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a button is found at the block location, it will be pressed. Note: You may need a - WAIT 1 and a 2nd - PRESS [Block Bookmark] or the Denizen will hold the button until the interact timeout.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1503</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1503"/>
		<updated>2012-05-29T23:20:17Z</updated>

		<summary type="html">&lt;p&gt;Instinx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #48&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #202&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #56&#039;&#039;&#039;&lt;br /&gt;
* Added FAIL command. Sets the script as &#039;FAILED&#039; for checking with requirements. Note: A script can still be FAILED and FINISHED, they are seperate. &lt;br /&gt;
* Added FAILED requirement. Use FAILED [Name of Script]. Remember: SCRIPT NAMES ARE CaSe SeNsItIvE!&lt;br /&gt;
* Added RESET command. This can be used to reset the FAILED or FINISHED status of a script. Use RESET FAILED|FINISHED [Name of Script].&lt;br /&gt;
* Added small warning on the /denizen help stating that many commands listed there do not yet work -- this is a beta, people, I&#039;m working on them :P &lt;br /&gt;
* Documenting /denizen adddata|decdata|getdata. Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
* Fixed WAIT command. It actually works as intended now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Denizens &#039;&#039;&#039;REQUIRES&#039;&#039;&#039; you to have Vault installed. You also should have a Permissions System and and Economy System for best results.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml and must be done by hand, for now. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
* PRESS [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a button is found at the block location, it will be pressed. Note: You may need a - WAIT 1 and a 2nd - PRESS [Block Bookmark] or the Denizen will hold the button until the interact timeout.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1502</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1502"/>
		<updated>2012-05-29T02:11:21Z</updated>

		<summary type="html">&lt;p&gt;Instinx: /* Script Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #48&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #202&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #56&#039;&#039;&#039;&lt;br /&gt;
* Added FAIL command. Sets the script as &#039;FAILED&#039; for checking with requirements. Note: A script can still be FAILED and FINISHED, they are seperate. &lt;br /&gt;
* Added FAILED requirement. Use FAILED [Name of Script]. Remember: SCRIPT NAMES ARE CaSe SeNsItIvE!&lt;br /&gt;
* Added RESET command. This can be used to reset the FAILED or FINISHED status of a script. Use RESET FAILED|FINISHED [Name of Script].&lt;br /&gt;
* Added small warning on the /denizen help stating that many commands listed there do not yet work -- this is a beta, people, I&#039;m working on them :P &lt;br /&gt;
* Documenting /denizen adddata|decdata|getdata. Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
* Fixed WAIT command. It actually works as intended now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml and must be done by hand, for now. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
* PRESS [Block Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a button is found at the block location, it will be pressed. Note: You may need a - WAIT 1 and a 2nd - PRESS [Block Bookmark] or the Denizen will hold the button until the interact timeout.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1501</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1501"/>
		<updated>2012-05-28T20:05:08Z</updated>

		<summary type="html">&lt;p&gt;Instinx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #48&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #202&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #56&#039;&#039;&#039;&lt;br /&gt;
* Added FAIL command. Sets the script as &#039;FAILED&#039; for checking with requirements. Note: A script can still be FAILED and FINISHED, they are seperate. &lt;br /&gt;
* Added FAILED requirement. Use FAILED [Name of Script]. Remember: SCRIPT NAMES ARE CaSe SeNsItIvE!&lt;br /&gt;
* Added RESET command. This can be used to reset the FAILED or FINISHED status of a script. Use RESET FAILED|FINISHED [Name of Script].&lt;br /&gt;
* Added small warning on the /denizen help stating that many commands listed there do not yet work -- this is a beta, people, I&#039;m working on them :P &lt;br /&gt;
* Documenting /denizen adddata|decdata|getdata. Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;br /&gt;
* Fixed WAIT command. It actually works as intended now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml and must be done by hand, for now. Once you edit the config.yml, immediately save and use /denizen reload in-game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAILED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FAIL&amp;lt;/code&amp;gt;ed. Remember: Script names are case-sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FAIL&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as failed to check against with the requirement type &#039;FAILED&#039;. Note: A script can be both completed and failed!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESET [FINISHED|FAILED] [Name of Script]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets either FINISHED or FAILED of the specified script to False. Remember: Script names are case sensitive!&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [CLOSE|AWAY] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Craftbukkit and/or Minecraft Server.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]] Amplifier specifies &#039;level, strength, or duration&#039;, depending on the type of potion effect. Try 1-5 for most types.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen adddata|decdata|getdata&amp;lt;/code&amp;gt;&lt;br /&gt;
* Nothing to do with Denizens, really, but handy for checking/switching block data. Try it on a tree.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
	<entry>
		<id>https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1496</id>
		<title>Denizen/0.6</title>
		<link rel="alternate" type="text/html" href="https://wiki.citizensnpcs.co/index.php?title=Denizen/0.6&amp;diff=1496"/>
		<updated>2012-05-28T00:29:34Z</updated>

		<summary type="html">&lt;p&gt;Instinx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CharacterWithExamples&lt;br /&gt;
| PICTURE      = Denizen.png&lt;br /&gt;
| AUTHOR      = aufdemrand&lt;br /&gt;
| NAME         = Denizen&lt;br /&gt;
| VERSION    = 0.5.3 Build #48&lt;br /&gt;
| CITIZENSBUILD  = 2.0 dev build #202&lt;br /&gt;
| DEVSTATUS    = ALPHA&lt;br /&gt;
| DEPENDS = Vault, a permissions system, and an economy system&lt;br /&gt;
| DOWNLOADLINK  = http://ci.citizensnpcs.net/view/Characters/job/Denizen/lastSuccessfulBuild/artifact/target/denizen-0.5.3.jar&lt;br /&gt;
| DOWNLOADEXAMPLESLINK = http://dl.dropbox.com/u/129951/Denizen%20Alpha%20Example%20Configs.zip&lt;br /&gt;
| DESCRIPTION  = Scriptable, interactive citizens!&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens are a great way to add [http://en.wikipedia.org/wiki/MUD MUD-style] RPG Citizens (and some other features) to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. They can be used in hundreds (thousands?) of different ways, from tutorials, to questing, to administrating and more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Changelog:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #48&#039;&#039;&#039;&lt;br /&gt;
* Extended use of LOOK command. Can now specify a location bookmark to set Pitch and Yaw of a Denizen. Note: When making Location Bookmarks, your Pitch and Yaw are recorded along with your XYZ position. Use: LOOK [Location Bookmark]. Existing arguments, CLOSE and AWAY, are still valid. Additional note: LOOK CLOSE will override the set pitch/yaw, so be sure LOOK AWAY is used beforehand, or be sure LOOK CLOSE was not engaged.&lt;br /&gt;
* Fixed issue with RESPAWN command.&lt;br /&gt;
* Fixed issue with talking to Denizens close to one another. Players now only speak to the very closest Denizen.&lt;br /&gt;
* Added TELEPORT command to teleport the player to a Denizen&#039;s location bookmark. Use TELEPORT [Location Bookmark].&lt;br /&gt;
* Added REFUSE command to take a permission from the player. Use REFUSE [name.of.permission.node]. &lt;br /&gt;
&lt;br /&gt;
It is suggested you use the latest builds of C2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #42&#039;&#039;&#039;&lt;br /&gt;
* SWITCH now activates redstone. Sorry about that folks.&lt;br /&gt;
* WAIT command added.&lt;br /&gt;
* SPAWN command added.&lt;br /&gt;
* Other code optimizations/cleanup.&lt;br /&gt;
&lt;br /&gt;
Big thanks to the hardworking beta testers in #citizens! Thank you!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Build #25&#039;&#039;&#039;&lt;br /&gt;
* NARRATE command now replaces &amp;lt;NPC&amp;gt; properly.&lt;br /&gt;
* Denizens no longer requires you to be the owner of the NPC to use commands.&lt;br /&gt;
* Tweaked multi-line engine to accomodate for extra long names.&lt;br /&gt;
* ZAP now uses getName instead of getDisplayName (Sorry if this causes issues with current progress.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.3 Alpha&#039;&#039;&#039;&lt;br /&gt;
* Added SWITCH command. Denizens can now flip levers!&lt;br /&gt;
* Added Denizen Project to [http://ci.citizensnpcs.net/job/Denizen/ Citizens Jenkins]!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.2 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements WEARING and -TIME. Note: PermissionsBukkit users are still having problems with GROUP.&lt;br /&gt;
* Added FOLLOW, TAKE, NARRATE, and CAST commands.&lt;br /&gt;
Smaller update than I planned, stay tuned for more!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0.5.1 Alpha:&#039;&#039;&#039;&lt;br /&gt;
* Fixed requirements... they should all work now, except haven&#039;t tested requirements which can have an enchantment.&lt;br /&gt;
* Added the ability to give Denizens &#039;Location Bookmarks&#039;.  Use /denizen bookmark location [name].&lt;br /&gt;
* Added WALKTO, PERMISS, FINISH, RESPAWN, WEATHER and EXECUTE commands.&lt;br /&gt;
* Started to flesh out /denizen help&lt;br /&gt;
* Added activity scheduler.&lt;br /&gt;
&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away. Working on it.&lt;br /&gt;
&lt;br /&gt;
Up next: Activity scripts.&lt;br /&gt;
&lt;br /&gt;
Timeline:&amp;lt;br&amp;gt;&lt;br /&gt;
* Alpha -- You are here.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 1 -- All functionality used in the example config files.&amp;lt;br&amp;gt;&lt;br /&gt;
* Beta 2 -- Additional functionality additional content pre-documented in this wiki.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.0 -- Bug fixes from Beta plus your ideas and contributions.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1.5 -- Online script writer/manager.&amp;lt;br&amp;gt;&lt;br /&gt;
* 2.0 -- Profit???&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Before using Denizens ==&lt;br /&gt;
&lt;br /&gt;
Denizens are in ALPHA! Expect bugs! There is ZERO error handling for wrong scripts. If you would be so kind, please report them to the [http://www.github.com/aufdemrand/Denizen/issues Github Issues page for Denizens]. You can also get assistance with Denizens on the [irc://irc.esper.net #citizens IRC channel on EsperNET] from me (aufdemrand) when available. I&#039;m working hard to add awesome features and to squash any bugs.&lt;br /&gt;
&lt;br /&gt;
Scripts.yml and Config.yml need to be included in the /plugins/Denizen/ folder. Denizens won&#039;t do anything unless you assign and define scripts. This is not a drop-and-go type of plugin, instead it&#039;s highly customizable and you should expect that to be able to write scripts, you are suggested to read the entirety of this wiki document. I&#039;m always around IRC to help out, but please don&#039;t ask about the basics unless you have consulted here first.&lt;br /&gt;
&lt;br /&gt;
Some items in the wiki are  in &amp;lt;del&amp;gt;strikethrough&amp;lt;/del&amp;gt;. These are features that I have started to document, but have not yet been put into Denizen itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What will Denizens have to offer? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
There are lots of cool things that the Denizens plugin has to offer, such as:&lt;br /&gt;
* YAML scripted NPCs (Denizens) with a multitude of flexibility.&lt;br /&gt;
* Triggered scripts on click, chat, location, and more!&lt;br /&gt;
* Listener scripts run scripts when the player does a specific task.&lt;br /&gt;
* Activity scripts run around the clock, and keep your Denizens lively.&lt;br /&gt;
* MUD-like chat interface. &amp;lt;code&amp;gt;You say to the Denizen, &#039;Very RPG!&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Completely customizable user experience let&#039;s you keep Denizens within your theme.&lt;br /&gt;
&lt;br /&gt;
All these features are documented here, and it is recommended you read the entire document when using Denizens. First, let&#039;s get into the basics of scripted NPCs with Trigger Scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic trigger script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
First, we need a script. Scripts can be simple or very powerful, thanks to a wide array of commands and functions at your disposal. Each script has at least 2 parts, Requirements and Steps. For now, let&#039;s take this very simple script as an example. We&#039;ll get more detailed later on.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizen/scripts.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Daytime in the City&#039;:   &lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Day&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Welcome to the city! Isn&#039;t it beautiful in the daytime?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So what just happened there? A quick literal translation: This script is named &#039;Daytime in the City&#039;. This name is used when assigning Denizen NPCs their scripts to use. When the script is called by a trigger, in this case a &#039;Click Trigger&#039;, for it to activate the Requirements set must be met, more specifically ALL of the requirements set. In this example, the only requirement is that the time in the world is daytime. If the Requirements are met, the script defined in the &#039;Click Trigger&#039; is sent to be run. It will have the Denizen NPC chat to the player &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039;.&lt;br /&gt;
&lt;br /&gt;
But before the script can be triggered, it needs to be assigned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A basic assignment ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
In order for a Denizen to be associated with a script, he needs to be assigned to it. The following shows a simple assignment format. &lt;br /&gt;
&lt;br /&gt;
Assignments are defined in the Denizens node found in plugins/Denizen/config.yml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
    - 10 Daytime in the City  &lt;br /&gt;
    Texts:&lt;br /&gt;
      No Scripts To Trigger: &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another literal translation. This assignement will work for Denizens named &#039;Steve&#039;.  Triggers that involve this NPC, such as a &#039;Click Trigger&#039; will call the script named &#039;Daytime in the City&#039;. The 10 before the name is the script priority, useful when assigning multiple scripts, but we&#039;ll get into that next. If no scripts meet requirements (in this case -- if it&#039;s NOT daytime when clicking on Steve), &#039;No Scripts To Trigger&#039; will run instead. So to reiterate, if the player clicks on Steve during the daytime, the player will get a chat containing &#039;Welcome to the city! Isn&#039;t it beautiful in the daytime?&#039; If the player clicks during the nighttime, since the script requirements are not met, the player will see a chat containing &#039;I have nothing to say to you at this time.&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Multiple Scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
The key to Denizens being dynamic is their ability to handle multiple situations. This is done by multiple script assignments. Let&#039;s take this example configs below to see how script priority is handled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---- Config.yml ----&lt;br /&gt;
&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 0 Regular Joe&lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
&lt;br /&gt;
---- Scripts.yml ----&lt;br /&gt;
&lt;br /&gt;
&#039;Regular Joe&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: None&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt;! I supply builders only!&lt;br /&gt;
&lt;br /&gt;
&#039;Joe the Builder&#039;:&lt;br /&gt;
  Type: Trigger   &lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - PERMISSION modifyworld.*&lt;br /&gt;
  Steps:&lt;br /&gt;
    1:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Hello &amp;lt;PLAYER&amp;gt; the Builder! Take this shovel!&lt;br /&gt;
        - GIVE WOOD_SPADE 1&lt;br /&gt;
        - FINISH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denizen Steve has been assigned two scripts. Upon player interaction, each script is checked for met requirements. If only one script has their requirements met, it&#039;s clear what script will be returned. But what if both meet requirements? That&#039;s where the number before each script assigned comes in. Higher priority always wins. To break down this specific situation, if a player with the &#039;modifyworld.*&#039; permission clicks on Steve, both scripts meet the requirements, but since the script &#039;Joe the Builder&#039; has a priority of 10, and &#039;Regular Joe&#039; only has a priority of 0, &#039;Joe the Builder&#039; sends its script. &#039;Regular Joe&#039; is simply ignored. Denizens can be issued as many scripts as you want.  If two scripts have the same priority, the first in the list will be the one to trigger, if both scripts meet their requirements.&lt;br /&gt;
&lt;br /&gt;
== Some other basic things to note ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
Denizens with the same name use the same script assignments. The plus to this is the ability to quickly make &#039;generic NPCs&#039; such as a &#039;Townsman&#039; or &#039;Miner&#039;.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in plugins/Denizens/scripts.yml&lt;br /&gt;
&lt;br /&gt;
In the YAML files, nodes are case sensitive! &#039;Scripts:&#039; will work. &#039;scripts:&#039; will not! All nodes are first letter capital, rest of the word lowercase.&lt;br /&gt;
&lt;br /&gt;
= YAML Ain&#039;t Markup Lanugage =&lt;br /&gt;
&lt;br /&gt;
All the scripts and configuration nodes are in YAML. Remember! Spacing is CRITICAL when dealing with YAML files. Each parent node and sibling node should follow the spacing and formatting guidelines set forth by the YAML 1.0 standard.&lt;br /&gt;
&lt;br /&gt;
From the official 1.0 YAML Specs, this is section 4.2.1 on Indentation:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;YAML streams use lines and spaces to convey structure. This requires special processing rules for white space (space and tab).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character followed by zero or more space characters. With one notable exception, a node must be more indented than its parent node. All sibling nodes must use the exact same indentation level, however the content of each such node could be further indented. Indentation is used exclusively to delineate structure and is otherwise ignored; in particular, indentation characters must never be considered part of the document&#039;s content.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tab characters are not allowed in indentation since different systems treat tabs differently. To maintain portability, YAML&#039;s tab policy is conservative; they shall not be used. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In all the examples used in this guide, 2 spaces are used for indenting.  Generally, whatever you choose should be maintained through your YAML document.&lt;br /&gt;
&lt;br /&gt;
YAML tutorials can be intimidating, but [http://wiki.ess3.net/wiki/YAML_Tutorial this small tutorial on the Essentials wiki] is pretty useful for basic YAML, which is the extent of which Denizens uses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizens Node in detail =&lt;br /&gt;
&lt;br /&gt;
In addition to handling the script assignments, there are also a few other things that are declared in the Denizens node. Let&#039;s take this example to show the different options. Note: Some of the functionality in this has not yet been discussed, you may need to read further. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Denizens:                         &lt;br /&gt;
  &#039;Steve&#039;:                        &lt;br /&gt;
    Interact Scripts:                      &lt;br /&gt;
      - 10 Joe the Builder  &lt;br /&gt;
    Options:&lt;br /&gt;
      &amp;lt;del&amp;gt;Languages: HU EN&amp;lt;/del&amp;gt;&lt;br /&gt;
      &amp;lt;del&amp;gt;Chat Name: Steve the Master Builder&amp;lt;/del&amp;gt; &lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown: 600&amp;lt;/del&amp;gt;&lt;br /&gt;
    Texts:&lt;br /&gt;
      &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
      No Scripts To Trigger: I have nothing for you at this time!&lt;br /&gt;
      &amp;lt;del&amp;gt;Interact Cooldown: That&#039;s all I have for now! Come back later!&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Languages:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Adds a spoken/understood language to the Denizen. Languages are defined in the Languages: node. See: [[#Languages]]&amp;lt;/del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Finish Cooldown:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Sets a delay for the speed in which you can trigger scripts between &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;es. If the selected script only has a simple reward, this is a way to control how fast the player can re-trigger the NPC. In the above example, clicking on Steve will trigger the script &#039;Joe the Builder&#039; in which he hands over a Shovel. With an interact cooldown specified, it keeps the player from getting a shovel every click. Instead, the player must wait 600 seconds. This will also delay any other script from triggering, if the script is required! Useful scenario: Script 1 gives a wood shovel, Script 2 gives a wood sword, but requires Script 1 to be complete first. To keep the player from redeeming Script 2 right away, use a Finish Cooldown.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Chat Name:&amp;lt;/del&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;&amp;lt;del&amp;gt;Allows you to expand on a Denizens name, or completely change it. If this is set, all chat heard from the Denizen will use this &#039;Chat Name&#039; instead of the actual NPCs name, which can only be one word. Note: On Human NPCs, this will NOT change the name above them in-game. For now, that is coded into the Minecraft client, which this plugin can not modify.&amp;lt;/del&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Denizen Texts ==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
* No Scripts To Trigger:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If no scripts meet requirements, this message is CHATted instead.&lt;br /&gt;
&amp;lt;del&amp;gt;&amp;lt;code&amp;gt;&lt;br /&gt;
* Cooldown Not Yet Met:&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If an &amp;lt;code&amp;gt;Interact Cooldown:&amp;lt;/code&amp;gt; is set and not yet satisfied, this message is CHATted instead.&lt;br /&gt;
&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Scripts Node in detail =&lt;br /&gt;
&lt;br /&gt;
The general structure of a script should always include the &#039;Name&#039;, &#039;Requirements&#039;, and &#039;Steps&#039; nodes. These are required. You can optionally include &#039;Options&#039;, which include other conditions, such as if the script should have a cool-down or is not repeatable.&lt;br /&gt;
&lt;br /&gt;
Scripts are defined in the plugins/Denizen/config.yml under the Scripts: node. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General layout of a Script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Name of script&#039;:   # Name Node&lt;br /&gt;
  Type: ...         # Type Node&lt;br /&gt;
  Requirements:     # Requirements Node&lt;br /&gt;
    ...:&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
      - ...&lt;br /&gt;
  Steps:            # Steps Node&lt;br /&gt;
    ...:&lt;br /&gt;
      - ...&lt;br /&gt;
    ...:&lt;br /&gt;
  Options:          # Options Node&lt;br /&gt;
    ...:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Name Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node is pretty self-explanatory, but here are some things to keep in mind.&lt;br /&gt;
* Names, just like nodes are case-sensitive! &amp;lt;code&amp;gt;&#039;This script name&#039;&amp;lt;/code&amp;gt; is different than &amp;lt;code&amp;gt;&#039;THIS SCRIPT NAME&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Names that contain spaces must have single or double quotes around it. ie: &amp;lt;code&amp;gt;&amp;quot;This script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;This script&#039;:&amp;lt;/code&amp;gt; is acceptable.&lt;br /&gt;
* If the name includes a single quote in it, you must use double quotes around it, or &#039;escape&#039; the quote with another quote. ie: &amp;lt;code&amp;gt;&amp;quot;John&#039;s Script&amp;quot;:&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;John&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;s Script&#039;:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Type Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
I&#039;ve been getting questions about the type node. The truth is, while this isn&#039;t technically required as of yet, there will soon be a couple more different types of scripts, and for the sake of forward compatibility, I believe this node will be used to easily distinguish between the different types. For the scripts that are explained here, use &amp;lt;code&amp;gt;Type: Trigger&amp;lt;/code&amp;gt;. In the near future I have planned Activity type scripts and another types I haven&#039;t come up with a good name for, yet :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements Node ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;word-spacing:3;letter-spacing:2&amp;quot;&amp;gt;&lt;br /&gt;
This node sets the rules for the player to qualify for the script. There are a couple different options that you should know when using requirements. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - TIME Night&lt;br /&gt;
    - MONEY 1000000&lt;br /&gt;
    - STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would be a difficult script to obtain, for sure. To trigger, the time would have to be after 16000, but before 0, the player would need one million dollars on hand (or whatever economy you use), and the weather must be storming! But it shows the flexibility of requirements. First is the &#039;Mode&#039;. Currently there are three different types. Second is the requirement type, with arguments if applicable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mode Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field&lt;br /&gt;
&lt;br /&gt;
* ALL &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires all requirements listed to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
* ANY [#]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the specified number of requirements to be met, out of the total of requirements listed.&amp;lt;code&amp;gt;&lt;br /&gt;
* NONE &lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires NO requirements to be met.&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements Types ===&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* NAME [Player Name] (or this Player Name) (or this Player Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ITEM &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their inventory.  You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEARING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be wearing a specific piece of armor.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HOLDING &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[ITEM_NAME]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; (# of that item, or more)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have an item in their hand. You can also specify an amount and enchantment.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TIME [Day|Night]  OR  TIME [0-23999] [1-24000]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires day or night. Alternatively you can specify a time window.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* HUNGER [Full|Hungry|Starving]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific hunger state.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PRECIPITATING&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a rain or snow.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SUNNY&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires clear skies.  Note: This can still trigger at night as it does not check time.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WORLD [World Name] (or this World Name) (or this World Name..) (Etc..)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be in a specific world, or worlds.  You can check as many as you&#039;d like with one line.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISSION [this.permission.node]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires one of the listed permission nodes. Only one is required. If you require multiple permission nodes, use multiple entries.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LEVEL [This Level # or higher]  OR  LEVEL [At least this Level #] [But no more than this Level #]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific Minecraft XP level, or a range of levels.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISHED [Script Name]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires a specific script to be &amp;lt;code&amp;gt;FINISH&amp;lt;/code&amp;gt;ed, &#039;&#039;x&#039;&#039; amount of times or more.  If no number is provided, 1 time is assumed.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GROUP [Name of Group]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player be a member of a group. Requires a Permissions system that allows groups, such as PermissionsEX.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* MONEY [Amount of Money, or more]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to have at least a certain amount of money on hand. Requires an economy system, such as iConomy.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* POTIONEFFECT [POTION_EFFECT]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Requires the player to be under the influence of a specific potion. You can use &#039;ANY&#039; to specify the player just be under the influence of a potion, without being specific as to which type.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Negative Requirements Types ===&lt;br /&gt;
&lt;br /&gt;
Requirements can also be &#039;negative&#039; requirements. In the Requirements List, just place a &#039;-&#039; in front of the requirement to inverse its logic. For example, &#039;HOLDING IRON_SWORD&#039; would require the player to be holding an Iron Sword. &#039;-HOLDING IRON_SWORD&#039; would require the player to NOT be holding an Iron Sword. All requirements have a negative alternative, even ones whose function overlaps, such as &#039;-WEATHER Precipitating&#039; and &#039;WEATHER Sunny&#039; technically being the same thing. If anything, it can add to script readability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: All&lt;br /&gt;
    List:&lt;br /&gt;
    - -TIME Night&lt;br /&gt;
    - -MONEY 1000000&lt;br /&gt;
    - -STORMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Negative requirements completely change our original example around. For this script to trigger, time needs to be Day, the weather in the current world must NOT be storming, and the player must not have more than 1000000 units of currency on them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps Node ==&lt;br /&gt;
&lt;br /&gt;
Steps are the meat of the script. They control what to listen for and what actions to take. Each script can have multiple steps, each with multiple triggers. Let&#039;s use an example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;Welcome to Harbortown&#039;:&lt;br /&gt;
  Type: Trigger&lt;br /&gt;
  Requirements:&lt;br /&gt;
    Mode: NONE&lt;br /&gt;
  Steps:&lt;br /&gt;
    &#039;1&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT What&#039;s your name, stranger?&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: My name is /&amp;lt;PLAYER&amp;gt;/.&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Ah ha, your name sounds familiar! &lt;br /&gt;
          - CHAT Are you from around this area?&lt;br /&gt;
          - ZAP&lt;br /&gt;
    &#039;2&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - HINT&lt;br /&gt;
      Chat Trigger:&lt;br /&gt;
        &#039;1&#039;:&lt;br /&gt;
          Trigger: /Yes/, I grew up in Harbortown!&lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT I thought so, welcome back! &lt;br /&gt;
            Have you heard about Tom the Taylor? &lt;br /&gt;
            Isn&#039;t that just horrible?&lt;br /&gt;
          - ZAP 3 &lt;br /&gt;
        &#039;2&#039;:&lt;br /&gt;
          Trigger: /No/, you must be mistaken. &lt;br /&gt;
          Script:&lt;br /&gt;
          - CHAT Oh, sorry about that. &lt;br /&gt;
          - CHAT Hey, if you&#039;re looking for some work, &lt;br /&gt;
            Bill the Baker is understaffed! &lt;br /&gt;
            This is the bakery&#039;s busy season.&lt;br /&gt;
          - ZAP 4&lt;br /&gt;
    &#039;3&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT I wonder if Tom the Taylor is doing any better.&lt;br /&gt;
        - NARRATE Perhaps you should check on Tom the Taylor.&lt;br /&gt;
    &#039;4&#039;:&lt;br /&gt;
      Click Trigger:&lt;br /&gt;
        Script:&lt;br /&gt;
        - CHAT Oh, nice to see you again &amp;lt;PLAYER&amp;gt;!&lt;br /&gt;
        - CHAT Have you stopped by the bakery?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sub-sections below reference this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trigger Types ===&lt;br /&gt;
&lt;br /&gt;
Steps handle the flow of commands and messages with triggers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Denizen Triggers&#039;&#039;&#039; trigger from interaction with Denizens. They are defined in the Steps: node.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Click Trigger&#039;&#039;&#039;s activate when the Denizen is clicked on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Click Trigger:&lt;br /&gt;
  Script:&lt;br /&gt;
  - CHAT Scripts are nested as a list.&lt;br /&gt;
  - CHAT You can use any command that&lt;br /&gt;
    you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Chat Trigger&#039;&#039;&#039;s activate when players chat with Denizens. Players&#039; chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Chat Trigger:&lt;br /&gt;
  &#039;1&#039;:&lt;br /&gt;
    Trigger: The word needed to /Trigger/ is inside slashes. &lt;br /&gt;
    Script:&lt;br /&gt;
    - CHAT Scripts are nested as a list.&lt;br /&gt;
    - CHAT You can use any command that&lt;br /&gt;
      you&#039;d wish.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Script Commands ==&lt;br /&gt;
&lt;br /&gt;
Note: There are plenty more to come, some I&#039;ve even used in examples here but aren&#039;t in the alpha. Be patient, more are coming!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[] indicates required field, () indicates an optional field, OR indicates alternative usage.&lt;br /&gt;
&lt;br /&gt;
* ZAP (Step #)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Progresses the player through the steps. ZAP used alone will progress to the next step. ZAP with a number following will progress the player to a specific step.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FINISH&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Marks the script as completed to check against with the requirement type &#039;FINISHED&#039;.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WAIT [# of seconds]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Will hold a player&#039;s Command Que for a specific amount of seconds. You can use this to put delays in your script. All lines of a script after the hold will execute after the time has passed.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LOOK [Close|Away] or LOOK [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Toggle &#039;lookclose&#039; on the Denizen. Alternate use specifies a pitch/yaw from a Location bookmark.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* GIVE [ITEM_NAME] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Denizen will drop specified items.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TAKE [ITEM_NAME|MONEY] (Quantity)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes specific item or money from the player.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CHAT [The text to chat.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen talk to the player. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* NARRATE [The text to narrate.]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sends text to the player without branding the Denizen. Long messages will be formatted for multiple lines automatically.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* FOLLOW [PLAYER|NOBODY]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen follow the player, or stop following the player.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WALKTO [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk to a specified location.&amp;lt;code&amp;gt;&lt;br /&gt;
Note: I&#039;ve been having problems getting the NPCs to WALKTO a bookmarked location that is far away, perhaps in a different chunk? Working on it with the C2 team. I may have another workaround as well.&lt;br /&gt;
&lt;br /&gt;
* WALK [Z] [X] [Y]   Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen&#039;s current location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RETURN&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Can be used after initiating a WALK command.  This will make the denizen return to its previous location.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* EXECUTE [ASPLAYER|ASNPC|ASSERVER] [command to execute]    Ex: EXECUTE ASSERVER toggledownfall&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Executes a command, issues from either the Player, NPC, or Server. No need for a /.&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* STRIKE&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Strikes the player with lightning.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* WEATHER [Sunny|Stormy|Precipitating]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Sets the weather for the world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* RESPAWN [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Despawns the Denizen and respawns it to a bookmarked location.&amp;lt;CODE&amp;gt;&lt;br /&gt;
Note: There is something funny going on with NPCs spawning to a location you are very near to. You sometimes have to back away before they show up. This seems to be an issue with Bukkit.&lt;br /&gt;
&lt;br /&gt;
* TELEPORT [Location Bookmark]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Teleports the player interacting to the Denizen&#039;s specified Location Bookmark/ &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PERMISS [permission.node.to.add]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives to the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* REFUSE [permission.node.to.take]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Takes from the player interacting the specified permission node for the current world.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CAST [POTION_TYPE] [Duration in seconds] [Amplifier]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;Gives the player interacting a potion effect. Note: [[Alchemist#Valid_Effects | Valid potion types are the same as the Alchemist&#039;s.]]&amp;lt;CODE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* SWITCH [Block Bookmark] [ON|OFF]&lt;br /&gt;
*: &amp;lt;/code&amp;gt;If a lever is found at the block location, it will be switched ON or OFF.&amp;lt;CODE&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Denizen in-game bukkit commands =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen reload|save&amp;lt;/code&amp;gt;&lt;br /&gt;
* Reloads|saves the config.yml and scripts.yml. Useful for testing scripts without rebooting your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark location [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores a location to the selected Denizen for use with script commands such as RESPAWN and WALKTO. Note: Names can only be one word, and are unique to the Denizen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/denizen bookmark block [name]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Stores the Player crosshair&#039;s block location to the selected Denizen for use with script commands such as SWITCH. Note: Names can only be one word, and are unique to the Denizen.&lt;/div&gt;</summary>
		<author><name>Instinx</name></author>
	</entry>
</feed>