Denizen/0.7/Interact Scripts/Commands: Difference between revisions

From Citizens Wiki
No edit summary
Line 19: Line 19:
- ENGAGE NPCID:2</pre>
- ENGAGE NPCID:2</pre>
}}
}}
{{Denizen Command Color|mintcream|
{{Denizen Command Color 2|mintcream|
DISENGAGE
DISENGAGE
|(NPCID:[#])
|(NPCID:[#])
| <p>Allowed an <tt>ENGAGED</tt> Denizen to be interacted with again, the counterpart to the <tt>ENGAGE</tt> command. Can also specify the NPCID of a different Denizen</p>
| <p>Allowed an <tt>ENGAGED</tt> Denizen to be interacted with again, the counterpart to the <tt>ENGAGE</tt> command. Can also specify the NPCID of a different Denizen</p>
}}
}}
{{Denizen Command Color|mintcream|
{{Denizen Command Color 2|mintcream|
ZAP
ZAP
|([Step #])&nbsp;('SCRIPT:[Name of Script]')&nbsp;(DURATION:[#])&nbsp;('RANDOM:[#] (#)')
|([Step #])&nbsp;('SCRIPT:[Name of Script]')&nbsp;(DURATION:[#])&nbsp;('RANDOM:[#] (#)')
Line 34: Line 34:
- ZAP 'SCRIPT:Another Script' 6</pre>
- ZAP 'SCRIPT:Another Script' 6</pre>
}}
}}
{{Denizen Command Color|mintcream|
{{Denizen Command Color 2|mintcream|
WAIT
WAIT
|[# of Seconds]&nbsp;&nbsp;(QUEUE:TASK<nowiki>|</nowiki>TRIGGER)
|[# of Seconds]&nbsp;&nbsp;(QUEUE:TASK<nowiki>|</nowiki>TRIGGER)
Line 42: Line 42:
- WAIT 30 QUEUE:TASK</pre>
- WAIT 30 QUEUE:TASK</pre>
}}
}}
{{Denizen Command Color|mintcream|
{{Denizen Command Color 2|mintcream|
FLAG
FLAG
|'[Flag Name]'&nbsp;OR&nbsp;'[[Flag Name]:[Flag Value]]'&nbsp;OR&nbsp;[[Flag Name]:++|--]'&nbsp;(DURATION:[#])
|'[Flag Name]'&nbsp;OR&nbsp;'[[Flag Name]:[Flag Value]]'&nbsp;OR&nbsp;[[Flag Name]:++|--]'&nbsp;(DURATION:[#])
Line 53: Line 53:
- FLAG HasHealingFlag DURATION:180</pre>
- FLAG HasHealingFlag DURATION:180</pre>
}}
}}
{{Denizen Command Color|mintcream|
{{Denizen Command Color 2|mintcream|
FINISH
FINISH
|('SCRIPT:[Name of Script]')
|('SCRIPT:[Name of Script]')
Line 61: Line 61:
- FINISH 'SCRIPT:Another Script'</pre>
- FINISH 'SCRIPT:Another Script'</pre>
}}
}}
{{Denizen Command Color|mintcream|
{{Denizen Command Color 2|mintcream|
FAIL
FAIL
|('SCRIPT:[Name of Script]')
|('SCRIPT:[Name of Script]')
Line 69: Line 69:
- FAIL 'SCRIPT:Magic Feathers'</pre>
- FAIL 'SCRIPT:Magic Feathers'</pre>
}}
}}
{{Denizen Command Color|mintcream|
{{Denizen Command Color 2|mintcream|
RESET
RESET
|('SCRIPT:[Name of Script]')
|('SCRIPT:[Name of Script]')
Line 81: Line 81:
====Server Commands====
====Server Commands====
<div style="margin-right:2.0em; padding:10px; font-family:museo-sans; font-size:110%;">
<div style="margin-right:2.0em; padding:10px; font-family:museo-sans; font-size:110%;">
{{Denizen Command Color|aliceblue|
{{Denizen Command Color 2|aliceblue|
EXECUTE
EXECUTE
| [ASPLAYER|ASSERVER|ASNPC] '[command with arguments]'
| [ASPLAYER|ASSERVER|ASNPC] '[command with arguments]'
Line 96: Line 96:
These commands show some text to the player interacting, and usually to bystanders around. Note that all text commands must be surrounded by quotes single ' or double ". See: [[Which_Quotes|Which Quotes?]] for more information. Text commands also have some auto-formatting, such as making sure no words will be cut off on long messages, and applying color codes. See: [[Color_Codes|Denizen Color Codes]]. Formatting for how NPCs and Players talk can be customized in the [[config.yml]].
These commands show some text to the player interacting, and usually to bystanders around. Note that all text commands must be surrounded by quotes single ' or double ". See: [[Which_Quotes|Which Quotes?]] for more information. Text commands also have some auto-formatting, such as making sure no words will be cut off on long messages, and applying color codes. See: [[Color_Codes|Denizen Color Codes]]. Formatting for how NPCs and Players talk can be customized in the [[config.yml]].


{{Denizen Command Color|lavender|
{{Denizen Command Color 2|lavender|
CHAT
CHAT
|["The text to chat."] (NPCID:[#]) (NOPLAYER)
|["The text to chat."] (NPCID:[#]) (NOPLAYER)
Line 107: Line 107:
</pre>
</pre>
}}
}}
{{Denizen Command Color|lavender|
{{Denizen Command Color 2|lavender|
WHISPER  
WHISPER  
|["The text to whisper."] (NPCID:[#]) (NOPLAYER)
|["The text to whisper."] (NPCID:[#]) (NOPLAYER)
Line 117: Line 117:
</pre>
</pre>
}}
}}
{{Denizen Command Color|lavender|
{{Denizen Command Color 2|lavender|
SHOUT  
SHOUT  
|["The text to chat."] (NPCID:[#]) (NOPLAYER)
|["The text to chat."] (NPCID:[#]) (NOPLAYER)
Line 127: Line 127:
</pre>
</pre>
}}
}}
{{Denizen Command Color|lavender|
{{Denizen Command Color 2|lavender|
EMOTE  
EMOTE  
|['The text to emote.'] (NPCID:[#])
|['The text to emote.'] (NPCID:[#])
Line 138: Line 138:
</pre>
</pre>
}}
}}
{{Denizen Command Color|lavender|
{{Denizen Command Color 2|lavender|
NARRATE
NARRATE
|['The text to narrate.']
|['The text to narrate.']
Line 147: Line 147:
</pre>
</pre>
}}
}}
{{Denizen Command Color|lavender|
{{Denizen Command Color 2|lavender|
ANNOUNCE  
ANNOUNCE  
|['The text to announce.']
|['The text to announce.']
Line 161: Line 161:
Denizen NPC commands are meant to help bring your Denizen to life by allowing fine-control of small movements. These are not necessarily meant for making the Denizen NPC do large/long activities, those will instead be done by the [[Activity Engine]], which is just now starting to be implemented into Denizen. The next 'large' update will focus on Activities.
Denizen NPC commands are meant to help bring your Denizen to life by allowing fine-control of small movements. These are not necessarily meant for making the Denizen NPC do large/long activities, those will instead be done by the [[Activity Engine]], which is just now starting to be implemented into Denizen. The next 'large' update will focus on Activities.


{{Denizen Command Color|mintcream|
{{Denizen Command Color 2|mintcream|
LOOK
LOOK
|LOOK [[DIRECTION]|BOOKMARK:[BOOKMARK_NAME]|[CLOSE|AWAY]] (NPCID:[#]) (DURATION:[#])
|LOOK [[DIRECTION]|BOOKMARK:[BOOKMARK_NAME]|[CLOSE|AWAY]] (NPCID:[#]) (DURATION:[#])
Line 192: Line 192:
The commands below require Vault and a valid permissions and economy system. Though Vault is not required to use Denizen, the commands below DO require Vault and its dependencies to be installed. Remember: Vault is not an economy or permissions system, merely a hook to help Denizen connect to your favorite systems!
The commands below require Vault and a valid permissions and economy system. Though Vault is not required to use Denizen, the commands below DO require Vault and its dependencies to be installed. Remember: Vault is not an economy or permissions system, merely a hook to help Denizen connect to your favorite systems!


{{Denizen Command Color| whitesmoke|
{{Denizen Command Color 2| whitesmoke|
PERMISS
PERMISS
|<nowiki>[permission.node]|['GROUP:group name'] (WORLD)|('WORLD:NAME')</nowiki>
|<nowiki>[permission.node]|['GROUP:group name'] (WORLD)|('WORLD:NAME')</nowiki>
Line 203: Line 203:
</pre>
</pre>
}}
}}
{{Denizen Command Color| whitesmoke|
{{Denizen Command Color 2| whitesmoke|
REFUSE
REFUSE
|<nowiki>[permission.node]|['GROUP:group name'] (WORLD)|('WORLD:NAME')</nowiki>
|<nowiki>[permission.node]|['GROUP:group name'] (WORLD)|('WORLD:NAME')</nowiki>
Line 219: Line 219:
These commands do something physical to the world or player.
These commands do something physical to the world or player.


{{Denizen Command Color|wheat|
{{Denizen Command Color 2|wheat|
SWITCH  
SWITCH  
|[BOOKMARK:Location Bookmark] or [BOOKMARK:DenizenName:LocationBookmark]
|[BOOKMARK:Location Bookmark] or [BOOKMARK:DenizenName:LocationBookmark]
Line 241: Line 241:
*: </code>Teleports the player interacting to a bookmark or Denizen/ <code>
*: </code>Teleports the player interacting to a bookmark or Denizen/ <code>


{{Denizen Command Color|wheat|
{{Denizen Command Color 2|wheat|
STRIKE
STRIKE
|(DENIZEN) (LocationBookmark (NODAMAGE) (NPCID:#)
|(DENIZEN) (LocationBookmark (NODAMAGE) (NPCID:#)
Line 263: Line 263:


====Player Interaction Commands====
====Player Interaction Commands====
{{Denizen Command Color|palegreen|
{{Denizen Command Color 2|palegreen|
GIVE
GIVE
| [MONEY or ID or ID:Data or MATERIAL:Data or MATERIAL] (QTY:#)
| [MONEY or ID or ID:Data or MATERIAL:Data or MATERIAL] (QTY:#)
Line 276: Line 276:
</pre>
</pre>
}}
}}
{{Denizen Command Color|palegreen|
{{Denizen Command Color 2|palegreen|
TAKE  
TAKE  
| [MONEY or ITEMINHAND or ID or ID:Data or MATERIAL:Data or MATERIAL] (QTY:#)
| [MONEY or ITEMINHAND or ID or ID:Data or MATERIAL:Data or MATERIAL] (QTY:#)
Line 291: Line 291:
}}
}}


{{Denizen Command Color|palegreen|
{{Denizen Command Color 2|palegreen|
CAST
CAST
| [SPELL:SpellName] (DURATION:#) (POWER:#) (NPC:#) (PLAYER:PlayerName)
| [SPELL:SpellName] (DURATION:#) (POWER:#) (NPC:#) (PLAYER:PlayerName)

Revision as of 09:28, 18 August 2012

Interact Script Commands

Note: There are plenty more to come, be patient, more are coming! Have ideas for a good command? Let me know!

[] indicates required field, () indicates an optional field, OR indicates alternative usage.

Script Flow Commands

These commands have no external affect on the world, but can control the flow of scripts within Denizen. Though not required, and with the exception of WAIT, it is generally recommended to run these as Instant Commands to ensure smooth Script feedback to players.

{{Denizen Command Color 2|mintcream| FLAG |'[Flag Name]' OR '[[Flag Name]:[Flag Value]]' OR [[Flag Name]:++|--]' (DURATION:[#])

|

Requires one of the above arguments. FLAG store variables, or 'flags', to a Player. This can be used to keep track of information that can be check against with the FLAGGED requirement. Usage of the command is easy, and can be used in 3 different ways. A Boolean (true/false) value can be set with only a flag name. If set, the value is TRUE. When RESET, it is FALSE. FLAG can also set Integer (or number) variables, and easily increment or decrease them with the use of the ++ and -- arguments accordingly. The command can also store a String value, see the example below. Using a DURATION will revert the value of the flag to the previous value, if during the duration the flag has not changed.

Example Usages

- FLAG 'Sample Boolean Flag'
- FLAG Alignment:++
- FLAG Alignment:--
- FLAG 'Active Item:60 Feathers'
- FLAG HasHealingFlag DURATION:180

}}

Server Commands

Text Commands

These commands show some text to the player interacting, and usually to bystanders around. Note that all text commands must be surrounded by quotes single ' or double ". See: Which Quotes? for more information. Text commands also have some auto-formatting, such as making sure no words will be cut off on long messages, and applying color codes. See: Denizen Color Codes. Formatting for how NPCs and Players talk can be customized in the config.yml.

Denizen NPC Commands

Denizen NPC commands are meant to help bring your Denizen to life by allowing fine-control of small movements. These are not necessarily meant for making the Denizen NPC do large/long activities, those will instead be done by the Activity Engine, which is just now starting to be implemented into Denizen. The next 'large' update will focus on Activities.

* FOLLOW [PLAYER|NOBODY] *: Makes the Denizen follow the player, or stop following the player.

  • WALKTO [Location Bookmark]
    Makes the Denizen walk to a specified location.

Note: I'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.

  • WALK [Z] [X] [Y] Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)
    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's current location.
  • RETURN
    Can be used after initiating a WALK command. This will make the denizen return to its previous location.

RESPAWN [Location Bookmark]

  • Despawns the Denizen and respawns it to a bookmarked location.

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.

Vault Commands

The commands below require Vault and a valid permissions and economy system. Though Vault is not required to use Denizen, the commands below DO require Vault and its dependencies to be installed. Remember: Vault is not an economy or permissions system, merely a hook to help Denizen connect to your favorite systems!

World Interaction Commands

These commands do something physical to the world or player.


  • SPAWN [ENTITY_TYPE] [AMOUNT] (Location Bookmark)
    Spawns a specified amount of entities. If the location bookmark is missing, they will spawn near the Denizen.
  • TELEPORT [Denizen Name] OR [BOOKMARK:BookmarkName] OR ['BOOKMARK:Denizen Name:BookmarkName']
    Teleports the player interacting to a bookmark or Denizen/

Player Interaction Commands