Builder/Builder and Denizen: Difference between revisions

From Citizens Wiki
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Harry's Home Constructions==
Examples of things to do combining Denizen and Builder


Hire a Builder to build your house.
== Continuous Rebuilding ==
If you want a builder to look busy and continuously rebuild and destroy a schematic, you would use a setup like this.


Coming soon!
Create a Task script in any yml file the denizen scripts folder like the following.
 
{| class="wikitable collapsible collapsed"
! Joe the Builder Script and Assignment
|-
| <pre>
---- assignments.yml ----


<pre>
---- script.yml ----
---- script.yml ----
 
Rebuild:
  Type: Task
  Script:
    - execute as_npc "builder <npc.id> build excavate oncomplete:Rebuild"
</pre>
</pre>
|}
==Janitor Jerry==
Jerry fixes up a building once a day.
Coming soon!


{| class="wikitable collapsible collapsed"
Now create a builder, load the desired schematic, set an origin, and call ''/builder build oncomplete:Rebuild''
! Jerry the Janitor Scripts and Assignment
|-
| <pre>
---- assignments.yml ----
Denizens:                        
  Jerry:
    Scheduled Activities:
    - 12:00 RebuildActivity
 
---- script.yml ----


RebuildActivity:
The builder will build the schematic, and then run the task, which will build it again with the ''excavate'' option that will tear it down first, and the cycle will continue forever.
  Type: Activity
  Requirements:
    Mode: None
  Activities:
    List:
    - 1 TASK SCRIPT:RebuildTask DELAY:300


RebuildTask
You can use this script for as many builders/schematics you want without having to change anything.
  Type: Task
  Script:
    - EXECUTE ASSERVER "builder <NPCID> load myBuilding"
    - EXECUTE ASSERVER "builder <NPCID> origin schematic"
    - EXECUTE ASSERVER "builder <NPCID> build"
</pre>
|}

Latest revision as of 02:10, 9 August 2013

Examples of things to do combining Denizen and Builder

Continuous Rebuilding

If you want a builder to look busy and continuously rebuild and destroy a schematic, you would use a setup like this.

Create a Task script in any yml file the denizen scripts folder like the following.

---- script.yml ----
Rebuild:
  Type: Task
  Script:
    - execute as_npc "builder <npc.id> build excavate oncomplete:Rebuild"

Now create a builder, load the desired schematic, set an origin, and call /builder build oncomplete:Rebuild

The builder will build the schematic, and then run the task, which will build it again with the excavate option that will tear it down first, and the cycle will continue forever.

You can use this script for as many builders/schematics you want without having to change anything.