Denizen/Commands: Difference between revisions

From Citizens Wiki
No edit summary
No edit summary
Line 16: Line 16:
{{Denizen Command
{{Denizen Command
|assignment|[{set}<nowiki>|</nowiki>remove] ("script:name")
|assignment|[{set}<nowiki>|</nowiki>remove] ("script:name")
|Set or remove an assignment for an NPC.
|Set or remove an assignment for the NPC.




Line 48: Line 48:
<pre>
<pre>
- sit "location:300,65,300,world"
- sit "location:300,65,300,world"
- sit "<anchor:Chair>"
- sit "location:<anchor:Chair>"
- stand
- stand
</pre>
</pre>
Line 105: Line 105:
|shoot|[entity:name] (ride) (burn) (explode) (location:x,y,z,world) ("script:name")
|shoot|[entity:name] (ride) (burn) (explode) (location:x,y,z,world) ("script:name")
|Makes the NPC shoot out an entity. All valid entity names can be found [http://jd.bukkit.org/rb/apidocs/org/bukkit/entity/EntityType.html here].
|Makes the NPC shoot out an entity. All valid entity names can be found [http://jd.bukkit.org/rb/apidocs/org/bukkit/entity/EntityType.html here].
Entities can be shot towards a location. If no location is specified, they will be shot in the direction the NPC is looking. You can also choose a script that will be run when the entity reaches the location.
Moreover, you can use the ride argument to ride an entity, the burn one to set it on fire, and the explode one to have it explode once it reaches the location or gets stuck.


'''Examples'''
'''Examples'''
<pre>
<pre>
- strike "location:200,73,200,world"
- shoot entity:zombie
- strike no_damage "<anchor:Mountaintop>"
- shoot entity:arrow location:<player.location>
- shoot entity:fireball location:<player.location> "script:Shoot Fireball"
- shoot entity:cow ride burn explode "location:<anchor:Hill>" "script:Bovine Destruction"
</pre>
</pre>
}}
}}
Line 122: Line 128:
<pre>
<pre>
- strike "location:200,73,200,world"
- strike "location:200,73,200,world"
- strike no_damage "<anchor:Mountaintop>"
- strike no_damage "location:<anchor:Mountaintop>"
</pre>
</pre>
}}
}}

Revision as of 18:16, 9 February 2013

announce

announce ["announcement text"]
Displays a message that every player on the server can read.


Examples

- announce "The skeleton invasion has ended."
- announce "<player.name> has joined the blue team!"


assignment

assignment [{set}|remove] ("script:name")
Set or remove an assignment for the NPC.


Examples

- assignment set "script:Evil Wizard"
- assignment remove


attack

attack (stop)
Make the NPC attack or stop attacking the player.


Examples

- attack
- attack stop


chair

chair (sit|stand) (location:x,y,z,world)
Make the NPC sit or stand at a location.


Examples

- sit "location:300,65,300,world"
- sit "location:<anchor:Chair>"
- stand


follow

follow (stop)
Make the NPC follow or stop following the player.


Examples

- follow
- follow stop


random

random [#]
Run a single one out of a number of commands, chosen at random.


Examples

- random 3
- chat "One."
- chat "Two."
- chat "Three."

In the above example, only one of the three chat commands will be run.

- random 2
- chat "One."
- chat "Two."
- chat "Three."

In this example, either "One" or "Two" will be displayed, but "Three" will always be displayed.

- random 3
- attack
- chat "Get out of here!"
- runtask "script:Call Reinforcements"

Here, the NPC will either attack the player, tell the player to leave, or run a script in which it calls for reinforcements.


shoot

shoot [entity:name] (ride) (burn) (explode) (location:x,y,z,world) ("script:name")
Makes the NPC shoot out an entity. All valid entity names can be found here.

Entities can be shot towards a location. If no location is specified, they will be shot in the direction the NPC is looking. You can also choose a script that will be run when the entity reaches the location.

Moreover, you can use the ride argument to ride an entity, the burn one to set it on fire, and the explode one to have it explode once it reaches the location or gets stuck.

Examples

- shoot entity:zombie
- shoot entity:arrow location:<player.location>
- shoot entity:fireball location:<player.location> "script:Shoot Fireball"
- shoot entity:cow ride burn explode "location:<anchor:Hill>" "script:Bovine Destruction"


strike

strike (no_damage) [location:x,y,z,world]
Makes lightning strike a location, optionally without causing any damage.


Examples

- strike "location:200,73,200,world"
- strike no_damage "location:<anchor:Mountaintop>"