Denizen/Commands: Difference between revisions

From Citizens Wiki
No edit summary
No edit summary
Line 15: Line 15:


{{Denizen Command
{{Denizen Command
|assignment
|assignment|[{set}<nowiki>|</nowiki>remove] ("script:name")
|[{set}<nowiki>|</nowiki>remove] ("script:name")
|Set or remove an assignment for an NPC.
|Set or remove an assignment for an NPC.


Line 29: Line 28:


{{Denizen Command
{{Denizen Command
|attack
|attack|(stop)
|(stop)
|Make the NPC attack or stop attacking the player.
|Make the NPC attack or stop attacking the player.


Line 43: Line 41:


{{Denizen Command
{{Denizen Command
|chair
|chair|(sit<nowiki>|</nowiki>stand) (location:x,y,z,world)
|(sit<nowiki>|</nowiki>stand) (location:x,y,z,world)
|Make the NPC sit or stand at a location.
|Make the NPC sit or stand at a location.


Line 58: Line 55:


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


Line 94: Line 90:


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



Revision as of 17:36, 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 an 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 "<anchor:Chair>"
- stand


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.


strike

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 "<anchor:Mountaintop>"