Builder-Denizen


Author: b3dsage
Created: 2012-09-30T12:42:18-0400
Edited: 2012-10-09T06:31:38-0400
Denizen Version: 0.76
Views: 140
Downloads: 1203
Likes: 1


WGET
Description: v0.8
Changes:
None. First release.

Description:
This interactive script will have a denizen with the builder trait construct any schematic at the location you specify. IMPORTANT: You must know the filenames of the schematics you have loaded. When the NPC asks the type of building, you must enter the filename (less the extention) of the schematic you want AND NOTHING MORE. For example, to have him use the schematic "house2.schematic" you would simply say "house2".

To Do:
-Add "cancel building" command.
-Add ability to specify N/S/E/W rotation of schematic.
-Change builder origin to where Player is standing rather than NPC.
-Notify the user if the schematic they have requested was unable to load (due to it not existing or any other error).
-Provide a list of all available schematics.

PrepareToBuild:
  Type: Interact   
  Requirements:
    Mode: None
  Steps:
      1:
        Click Trigger:
            Script:
            - CHAT "Hello <PLAYER>! Do you need help constructing something?"
            - HINT SHORT
        Chat Trigger:
            '1':
                Trigger: /Yes/, I could use a bit of help.
                Script:
                - CHAT "Great! What type of building will we be working on?"
                - ZAP 2
            '2':
                Trigger: /No/, I do not need help right now.
                Script:
                - CHAT "Very well then, take care."
      2:
        Click Trigger:
            Script:
            - CHAT "Just tell me what you want me to build and we can get to work."
            - ^WAIT 1
            - CHAT "If you haven't looked through the building schematics yet, maybe you should start there first."
        Chat Trigger:
            '1':
                Trigger: I would like to build a /*/. 
                Script:
                - FLAG "BuildingType:<*>"
                - EXECUTE ASSERVER "npc select <NPCID>"
                - ^EXECUTE ASSERVER "builder load <FLAG.PLAYER:BuildingType>"
                - CHAT "A <FLAG.PLAYER:BuildingType>, eh? Let me know when you're ready to show me the location."
                - ZAP 3
      3:
        Click Trigger:
            Script:
            - CHAT "Just say when you're ready."
            - HINT SHORT
        Chat Trigger:
            '1':
                Trigger: I am /ready/ to go.
                Script:
                - CHAT "Tell me when we have arrived at the spot."
                - ^EXECUTE ASSERVER "npc select <NPCID>"
                - ^EXECUTE ASSERVER "trait sentry"
                - ^EXECUTE ASSERVER "sentry guard <PLAYER>"
                - ZAP 4
            '2':
                Trigger: I want to /change schematics/ first."
                Script:
                - CHAT "No problem at all, what do you want to build?"
                - ZAP 2
            '3':
                Trigger: /Nevermind/, maybe later.
                Script:
                - CHAT "Very well then."
                - RUNTASK Script:GoHome
                - ZAP 1
      4:
        Click Trigger:
            Script:
            - CHAT "Tell me when we've reached the spot."
            - HINT SHORT
        Chat Trigger:
            '1':
                Trigger: This is the /spot/.
                Script:
                - EXECUTE ASSERVER "npc select <NPCID>"
                - ^EXECUTE ASSERVER "builder origin"
                - ^EXECUTE ASSERVER "trait sentry"    
                - CHAT "Hey, this looks like a great location! Shall I mark the corners for you or just start building? Or should we change the location or plans?"
                - ZAP
            '2':
                Trigger: /Nevermind/, maybe later.
                Script:
                - EXECUTE ASSERVER "npc select <NPCID>"
                - ^EXECUTE ASSERVER "trait sentry"
                - CHAT "Very well then."
                - RUNTASK Script:GoHome
                - ZAP 1
      5:
        Click Trigger:
            Script:
            - CHAT "Are you ready to start?"
            - HINT SHORT
        Chat Trigger:
            '1':
                Trigger: /Mark/ the corners first.
                Script:
                - CHAT "Okay, it'll just take a second..."
                - EXECUTE ASSERVER "npc select <NPCID>"
                - ^EXECUTE ASSERVER "builder mark"
                - WALKTO: <PLAYER>
                - CHAT ""If that meets your approval, I will start. Otherwise, we could change things."
                - HINT SHORT
            '2':
                Trigger: I want a /new location/.
                Script:
                - CHAT "Alright... tell me when you're ready to get moving again."
                - ZAP 3
            '3':
                Trigger: I want to choose /new schematics/.
                Script:
                - CHAT "Alright... tell me when you're ready to get moving again."
                - ZAP 3
            '4':
                Trigger: /Start/ building.
                Script:
                - CHAT "I'm on it! I'll finish up here and then head back home."
                - EXECUTE ASSERVER "npc select <NPCID>"
                - ^EXECUTE ASSERVER "builder build oncomplete:GoHome"
                - ZAP 1
            '5':
                Trigger: /Nevermind/, maybe later.
                Script:
                - CHAT "Very well then."
                - RUNTASK Script:GoHome
                - ZAP 1
GoHome:
  Type: Task   
  Script:
  - WALKTO BOOKMARK:Home




Comments
No one has posted a comment! Post one below: