Denizen/Requirements: Difference between revisions

From Citizens Wiki
(Tags got deleted 0.o)
No edit summary
Line 1: Line 1:
Requirements are no longer needed as of 0.9 thanks to the - IF { .. } command, however they are still supported to avoid breaking old scripts. They are written near the top of interact scripts like so:
Requirements are no longer needed as of 0.9 thanks to the - IF { .. } command, however they are still supported to avoid breaking old scripts.
 
 
= How To Use Requirements =
 
They are written near the top of interact scripts like so:


<pre>MyInteractScript:
<pre>MyInteractScript:
Line 9: Line 14:
         - SecondReq etc. etc.</pre>
         - SecondReq etc. etc.</pre>


= List of requirements =  
= List Of Requirements =  


enchanted, flagged, holding, ingroup, item, isliquid, money, op, owner, permission, ispowered, oxygen, procedure, script, sneaking, storming, sunny, rainy, time, inregion
enchanted, flagged, holding, ingroup, item, isliquid, money, op, owner, permission, ispowered, oxygen, procedure, script, sneaking, storming, sunny, rainy, time, inregion

Revision as of 19:44, 6 August 2013

Requirements are no longer needed as of 0.9 thanks to the - IF { .. } command, however they are still supported to avoid breaking old scripts.


How To Use Requirements

They are written near the top of interact scripts like so:

MyInteractScript:
    Type: Interact
    Requirements:
        Mode: 
        List:
        - FirstReq
        - SecondReq etc. etc.

List Of Requirements

enchanted, flagged, holding, ingroup, item, isliquid, money, op, owner, permission, ispowered, oxygen, procedure, script, sneaking, storming, sunny, rainy, time, inregion

- enchanted (iteminhand)
- flagged [player/npc/global] [<name>([<#>])](:<value>)
- holding [<item>] [qty:<#>] [exact]
- ingroup (global) [<group>]
- item [<item>] (qty:<#>)
- isliquid [location:<location>]
- money [qty:<#>]
- op
- owner
- permission (global) [<permission>]
- ispowered [location:<location>]
- oxygen (range:below/equals/above) [qty:<#>]
- procedure [<script>]
- script [finished/failed] [script:<name>]
- sneaking
- storming (????????????????????) (This req is ill-defined)
- sunny
- rainy
- time [dawn/day/dusk/night]
- inregion [name:<region>]