Denizen/Commands: Difference between revisions
< Denizen
Davidcernat (talk | contribs) No edit summary |
Davidcernat (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
==List of commands== | ==List of commands== | ||
===Script flow=== | ===Script flow=== | ||
{{Denizen Command | |||
|assignment|[{set}<nowiki>|</nowiki>remove] ("script:name") | |||
|Set or remove an assignment for the NPC. If set or remove aren't specified, it will set by default. | |||
'''Examples''' | |||
<pre> | |||
- assignment set "script:Evil Wizard" | |||
- assignment remove | |||
- assignment "script:Pet Cat" | |||
</pre> | |||
}} | |||
{{Denizen Command | {{Denizen Command | ||
| | |random|[#] | ||
| | |Run a single one out of a number of commands, chosen at random. | ||
'''Examples''' | '''Examples''' | ||
<pre> | <pre> | ||
- | - random 3 | ||
- | - chat "One." | ||
- chat "Two." | |||
- chat "Three." | |||
</pre> | |||
In the above example, only one of the three chat commands will be run. | |||
<pre> | |||
- random 2 | |||
- chat "One." | |||
- chat "Two." | |||
- chat "Three." | |||
</pre> | |||
In this example, either "One" or "Two" will be displayed, but "Three" will always be displayed. | |||
<pre> | |||
- random 3 | |||
- attack | |||
- chat "Get out of here!" | |||
- runtask "script:Call Reinforcements" | |||
</pre> | </pre> | ||
Here, the NPC will either attack the player, tell the player to leave, or run a script in which it calls for reinforcements. | |||
}} | }} | ||
===Messages=== | |||
{{Denizen Command | {{Denizen Command | ||
| | |announce|["announcement text"] | ||
| | |Displays a message that every player on the server can read. | ||
'''Examples''' | '''Examples''' | ||
<pre> | <pre> | ||
- | - announce "The skeleton invasion has ended." | ||
- | - announce "<player.name> has joined the blue team!" | ||
</pre> | </pre> | ||
}} | }} | ||
===Denizen interaction=== | |||
Line 69: | Line 112: | ||
- follow stop | - follow stop | ||
</pre> | </pre> | ||
}} | }} | ||
Line 124: | Line 132: | ||
</pre> | </pre> | ||
}} | }} | ||
===World interaction=== | |||
Revision as of 04:03, 11 February 2013
List of commands
Script flow
assignment | [{set}|remove] ("script:name") |
---|---|
Set or remove an assignment for the NPC. If set or remove aren't specified, it will set by default.
- assignment set "script:Evil Wizard" - assignment remove - assignment "script:Pet Cat" |
random | [#] |
---|---|
Run a single one out of a number of commands, chosen at random.
- 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. |
Messages
announce | ["announcement text"] |
---|---|
Displays a message that every player on the server can read.
- announce "The skeleton invasion has ended." - announce "<player.name> has joined the blue team!" |
Denizen interaction
attack | (stop) |
---|---|
Make the NPC attack or stop attacking the player.
- attack - attack stop |
chair | (sit|stand) (location:x,y,z,world) |
---|---|
Make the NPC sit or stand at a location.
- sit "location:300,65,300,world" - sit "location:<anchor:Chair>" - stand |
follow | (stop) |
---|---|
Make the NPC follow or stop following the player.
- follow - follow stop |
shoot | [entity:name] (ride) (burn) (explode) (location:x,y,z,world) ("script:name") |
---|---|
Makes the NPC shoot out an entity. All valid entity names are 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 Another Fireball" - shoot entity:minecart ride "location:<anchor:Rollercoaster>" - shoot entity:cow ride burn explode "location:<anchor:Hill>" "script:Bovine Destruction" |
World interaction
strike | (no_damage) [location:x,y,z,world] |
---|---|
Makes lightning strike a location, optionally without causing any damage.
- strike "location:200,73,200,world" - strike no_damage "location:<anchor:Mountaintop>" |