Build me a house with protection


Author: hunter_rich
Created: 2013-07-30T20:47:05-0400
Edited: 2013-07-30T20:47:05-0400
Denizen Version: 0.9.1
Views: 18
Downloads: 923
Likes: 1


WGET
Description: Assign this to a NPC and he will build you a house then create a worldguard region and make the player a member of it. Automatic protection :D

the builder script was taken from b3dsage's script uploaded October 2012, thanks bud.

Enjoy

"faen_hut_builder":
    type: assignment

    actions:
      on assignment:
      - trigger name:chat toggle:true
      - trigger name:click toggle:true

    interact scripts:
    - 10 Builder_script

Builder_script:
  Type: Interact   
  Requirements:
    Mode: None
  Steps:
      1:
        Click Trigger:
            Script:
            - CHAT "Hail <PLAYER.NAME>! I am the hut builder, do you require a hut building?"
            - HINT
        Chat Trigger:
            '1':
                Trigger: /Yes/ please.
                Script:
                - CHAT "Great! now lets see"
                - FLAG "BuildingType:faen_hut"
                - EXECUTE ASSERVER "npc select <NPC.ID>"
                - ^EXECUTE ASSERVER "builder load faen_hut"
                - CHAT "A hut wont take long, we need to find a location though so let me know when your ready to find a location."
                - ZAP 3
            '2':
                Trigger: /No/, I do not need help right now.
                Script:
                - CHAT "Very well then, take care."
      2:
        Click Trigger:
            Script:
            - CHAT "Let me check what you can build."
            - ^WAIT 2
            - CHAT "Ok would you like a hut or a farm?."
        Chat Trigger:
            '1':
                Trigger: I would like to build a /hut/. 
                Script:
                - FLAG "BuildingType:faen_hut"
                - EXECUTE ASSERVER "npc select bob"
                - ^EXECUTE ASSERVER "builder load faen_hut"
                - CHAT "A hut wont take long, we need to find a location let me know when your ready to find a location."
                - ZAP 3
      3:
        Click Trigger:
            Script:
            - CHAT "Just say when you're ready."
            - HINT
        Chat Trigger:
            '1':
                Trigger: I am /ready/ to go.
                Script:
                - CHAT "Excellent, I love building, let me when you've found a spot."
                - follow
                - 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
        Chat Trigger:
            '1':
                Trigger: This is the /spot/.
                Script:
                - follow stop
                - EXECUTE ASOP "npc select <NPC.ID>"
                - EXECUTE ASOP "npc move"                
                - EXECUTE ASOP "/pos1"
                - EXECUTE ASOP "/pos2"
# you can make the area to be claimed larger by altering the following lines
                - EXECUTE ASOP "/expand 4 n"
                - EXECUTE ASOP "/expand 5 s"
                - EXECUTE ASOP "/expand 4 e"
                - EXECUTE ASOP "/expand 5 w"
                - EXECUTE ASOP "/expand 8 u"
                - 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 <NPC.ID>"
                - ^EXECUTE ASP "trait sentry"
                - CHAT "Very well then."
                - RUNTASK Script:GoHome
                - ZAP 1
      5:
        Click Trigger:
            Script:
            - CHAT "Are you ready to start?"
            - HINT
        Chat Trigger:
            '1':
                Trigger: /Mark/ the corners first.
                Script:
                - CHAT "Okay, it'll just take a second..."
                - EXECUTE ASSERVER "npc select <NPC.ID>"
                - ^EXECUTE ASSERVER "builder mark"
                - WALKTO: <PLAYER.NAME>
                - CHAT "If that meets your approval, I will start. Otherwise, we could change things."
                - HINT
            '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 <NPC.ID>"
                - ^EXECUTE ASSERVER "builder build oncomplete:Complete"
                - EXECUTE ASOP "region define <PLAYER.NAME>s_Hut"
                - EXECUTE ASOP "region addmember <PLAYER.NAME>s_Hut <PLAYER.NAME>"
                - EXECUTE ASOP "region flag <PLAYER.NAME>s_Hut greeting Welcome to <PLAYER.NAME>s Hut"
#edit the following line to alter the parent, on my server the world was name faen
                - EXECUTE ASOP "region setparent <PLAYER.NAME>s_Hut faen"
                - ZAP 1
            '5':
                Trigger: /Nevermind/, maybe later.
                Script:
                - CHAT "Very well then, I will return home."
                - RUNTASK Script:GoHome
                - ZAP 1
Complete:
    Type: Task
    Script:
    - CHAT "Your hut is completed <PLAYER.NAME>!"
    - EXECUTE ASSERVER "npc select <NPC.ID>"
    - ^EXECUTE ASSERVER "npc moveto 676 73 827"
 
GoHome:
  Type: Task   
  Script:
  - EXECUTE ASSERVER "npc select <NPC.ID>"
#the follow line should be edited so that your npc returns to your desired location
  - ^EXECUTE ASSERVER "npc moveto 676 73 827"




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