- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


Titlesentry
TypeDenizen Script
Date2014/07/15 15:33:17 UTC-07:00
ByGuest
Other
Paste
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
9800
Sentry:
  type: assignment
  interact scripts:
  - 100 TheSentry
  actions:
    on assignment:
    - trigger name:click toggle:true
TheSentry:
  type: interact
  steps: 
    1:
      click trigger:
        script:
        - if <npc.owner> = <player> {
          - chat "go to your city and walk until i teleport to you then tell me your faction name. Then say 'point one' for one part of the wall.  Then say 'point two' for the other side of the wall. then walk to the starting place and say 'origin' and i will start to make a circuit"
          - execute as_server "sentry <npc.id> guard <player.name>"
          }
          else {
          - chat "Good day to you sir."
          }
      chat trigger:
        'faction':
          trigger"my faction name is /Regex.+/"
          script:
          - execute as_server "sentry <npc.id> ignore add faction:<player.chat_history>"
          - chat "Your faction has been registered"
        'point1':
          trigger"this is your /point1/"
          script:
          - narrate "point one registered."
          - ^flag <npc> pos1:<player.location>
        'point2':
          trigger"this is your /point2/"
          script:
          - narrate "point two registered."
          - ^flag <npc> pos2:<player.location>
        'origin':
          trigger"this is your /origin/"
          script:
          - narrate "The sentry begins to patrol."
          - execute as_server "sentry <npc.id> guard"
          - ^flag <npc> origin:<player.location>
          #- execute as_server "sentry <npc.id> target add entity:all"
          - zap step:execute
    2:
      click trigger:
        script:
        - if <npc.owner> = <player> {
          - chat "Hello my lord which task would you like me to do?"
          - chat "Would you like me to continue or be your bodyguard"
          - zap 'step:ChooseTask'
          }
          else {
          - chat "Hello mate how are you?"
          - zap step:1
          }
    'ChooseTask':
      chat trigger:
        'miner':
          trigger"I want you to /continue/."
          script:
          - zap <execute> 
        'farmer':
          trigger"I want you to be a /bodyguard/."
          script:
          - zap 'step:bodyguard'
        'return':
          trigger"I want you to /return/."
          script:
          - zap 'step:bodyguard'
    'continue':
      click trigger:
        script:
        - chat "Hello sir just making my rounds."
    'bodyguard':
      click trigger:
        script:
        - chat "Welcome to the bodyguard menu say hold to make me stop then follow for me to continue to guard you"
        - zap 'step:Stop'
    'stop':
      chat trigger:
        'Stop':
          trigger"/Stop/!."
          script:
          - execute as_server "sentry <npc.id> guard"
        'Follow':
          triger"/Follow/ me!"
          script:
          - execute as_server "sentry <npc.id> guard <player.name>"
execute:
  type: task
  script:
  - chat "meow"
  - ~walk <npc> <npc.flag[pos1]>
  - ~walk <npc> <npc.flag[pos2]>
  - ~walk <npc> <npc.flag[origin]>
  - zap <TheSentry> step:ChooseTask



RawRaw



Pastes made: 64327