- 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


TitleNPC Dialogue
TypeDenizen Script
Date2016/12/26 15:01:52 UTC-08: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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
19700
#############################################
#####        MADE BY { Xanderpitz        #####
#####     /npc assign --set Paladin     #####
#############################################

Paladin:
    type: assignment
    debug: true
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
        - trigger name:proximity state:true
    interact scripts:
    - 1 Paladin_interact

Paladin_interact:
    type: interact
    debug: true
    first_dialogue:
    - narrate "<&7>[<&b>Paladin<&7>] <&e><&l>Greetings! How may I assist you?"
    - narrate "<&c>1. <&7>I'd like to start a quest."
    - narrate "<&c>2. <&7>I'd like to become a <&e>Knight<&7>."
    - narrate "<&c>3. <&7>Nevermind."
    - narrate "<&a>Type 1, 2, or 3 in chat to answer."
    - flag player clicked
    second_dialogue:
    - narrate "<&7>[<&b>Paladin<&7>] <&a>Ah, I see you've read up on becoming a Knight. So, will you join the Royal Guard?"
    - narrate "<&c>1. <&7>Yes."
    - narrate "<&c>2. <&7>No."
    - flag player clicked
    - flag player peasant_to_knight:!
    - flag player path_to_knight
    steps:
        '1':
            Click trigger:
                Script:
                - if !<player.has_flag[peasant_to_knight]> {
                  - inject locally first_dialogue
                  } else if <player.has_flag[peasant_to_knight]> {
                  - inject locally second_dialogue }
            Proximity trigger:
                exit:
                  Script:
                  - if <player.has_flag[clicked]> && !<player.has_flag[peasant_to_knight]> && !<player.has_flag[newknight]> {
                    - narrate "<&7>[<&b>Paladin<&7>] <&a>Fare thee well..."
                    - flag player clicked:!
                    } else if <player.has_flag[path_to_knight]> {
                    - narrate "<&7>[<&b>Paladin<&7>] <&a>Ah, seems you need more time. Very well."
                    - flag player clicked:!
                    } else if <player.has_flag[newknight]> {
                    - narrate "<&7>[<&b>Paladin<&7>] <&a>Good luck and welcome aboard!"
                    - flag player clicked:!
                    - flag player newknight:!
                    } else if <player.has_flag[denied]> {
                    - flag player denied:! }
                  - queue clear
            Chat trigger:
                '1':
                  trigger: /1/
                  Script:
                  - if <player.has_flag[clicked]> {
                    - if <player.has_permission[essentials.kits.knight]> {
                      - narrate "<&e>[<&b>Paladin<&e>] <&c>Sorry, but I haven't got any quests for you at the moment. Check back later!"
                      - wait 3s
                      - inject locally first_dialogue instantly
                      } else if <player.has_permission[essentials.kits.peasant]> {
                        - if !<player.has_flag[peasant1]> && !<player.has_flag[peasant2]> && !<player.has_flag[path_to_knight]> {
                          - narrate "<&e>[<&b>Paladin<&e>] <&c>Sorry bud, gotta be a Knight first. We are looking for recruits though, are you interested?"
                          - narrate "<&c>1. <&7>Sure, sign me up!"
                          - narrate "<&c>2. <&7>No, I'll walk my own path."
                          - narrate "<&a>Type 1 or 2 in chat to answer."
                          - flag player peasant1
                          } else if <player.has_flag[peasant1]> && !<player.has_flag[peasant2]> && !<player.has_flag[path_to_knight]> {
                          - narrate "<&e>[<&b>Paladin<&e>] <&a>Ah, excellent! First we must go over some details. What would you like to hear about?"
                          - narrate "<&c>1. <&7>Quests"
                          - narrate "<&c>2. <&7>Kits and Perks"
                          - narrate "<&c>3. <&7>Upgrades"
                          - narrate "<&c>4. <&7>All set. Sign me up!!!"
                          - narrate "<&c>5. <&7>Nah, nevermind..."
                          - narrate "<&a>Type 1, 2, 3, 4, or 5 in chat to answer."
                          - flag player peasant2
                          - flag player peasant1:!
                          } else if <player.has_flag[peasant2]> && !<player.has_flag[peasant1]> && !<player.has_flag[path_to_knight]> {
                          - narrate "<&e>[<&b>Paladin<&e>] <&c>The king hasn't assigned the royal guard any quests yet, but he will very soon!"
                          - wait 2s
                          - narrate "<&e>[<&b>Paladin<&e>] <&a>What would you like to hear about?"
                          - narrate "<&c>1. <&7>Quests"
                          - narrate "<&c>2. <&7>Kits and Perks"
                          - narrate "<&c>3. <&7>Upgrades"
                          - narrate "<&c>4. <&7>All set. Sign me up!!!"
                          - narrate "<&c>5. <&7>Nah, nevermind..."
                          - narrate "<&a>Type 1, 2, 3, 4, or 5 in chat to answer."
                          } else if <player.has_flag[path_to_knight]> {
                          - narrate "<&e>[<&b>Paladin<&e>] <&a>It is decided then. Congratulations! Talk to me if you'd like to check on quests or other info about being a Knight!"
                          - narrate "<&b>Your class has been switched from <&a>Peasant <&b>to <&a>Knight<&b>."
                          - execute as_server "setrank <player.name> Knight class"
                          - flag player path_to_knight:!
                          - flag player newknight
                          }
                      } else {
                        - narrate "<&e>[<&b>Paladin<&e>] <&c>Sorry, you'll have to change classes to receive quests from me."
                        - wait 2s
                        - inject locally first_dialogue instantly }
                    } else if !<player.has_flag[clicked]> {
                      - queue clear }
                '2':
                  trigger: /2/
                  script:
                  - if <player.has_flag[clicked]> {
                    - if <player.has_permission[essentials.kits.knight]> {
                      - narrate "<&e>[<&b>Paladin<&e>] <&c>Uh, I<&sq>m assuming that's a joke, right?"
                      - wait 2s
                      - inject locally first_dialogue instantly
                      } else if <player.has_permission[essentials.kits.peasant]> {
                        - if !<player.has_flag[peasant1]> && !<player.has_flag[peasant2]> && !<player.has_flag[path_to_knight]> {
                          - narrate "<&e>[<&b>Paladin<&e>] <&a>Ah, excellent! First we must go over some details. What would you like to hear about?"
                          - narrate "<&c>1. <&7>Quests"
                          - narrate "<&c>2. <&7>Kits and Perks"
                          - narrate "<&c>3. <&7>Upgrades"
                          - narrate "<&c>4. <&7>All set. Sign me up!!!"
                          - narrate "<&c>5. <&7>Nah, nevermind..."
                          - narrate "<&a>Type 1, 2, 3, 4, or 5 in chat to answer."
                          - flag player peasant2
                          } else if <player.has_flag[peasant1]> && !<player.has_flag[peasant2]> && !<player.has_flag[path_to_knight]> {
                          - narrate "<&7>[<&b>Paladin<&7>] <&c>Very well. Be off then..."
                          - flag player peasant1:!
                          - flag player clicked:!
                          - queue clear
                          } else if <player.has_flag[peasant2]> && !<player.has_flag[peasant1]> && !<player.has_flag[path_to_knight]> {
                          - narrate "<&7>[<&b>Paladin<&7>] <&a>You can find info about Knights and Paladins by typing <&dq>/kit knightinfo<&dq>. All soldiers can resupply on armor and weapons daily through their kit."
                          - wait 3s
                          - narrate "<&e>[<&b>Paladin<&e>] <&a>What would you like to hear about?"
                          - narrate "<&c>1. <&7>Quests"
                          - narrate "<&c>2. <&7>Kits and Perks"
                          - narrate "<&c>3. <&7>Upgrades"
                          - narrate "<&c>4. <&7>All set. Sign me up!!!"
                          - narrate "<&c>5. <&7>Nah, nevermind..."
                          - narrate "<&a>Type 1, 2, 3, 4, or 5 in chat to answer."
                          } else if <player.has_flag[path_to_knight]> {  
                          - narrate "<&7>[<&b>Paladin<&7>] <&c>How unfortunate. Come see me again if you change your mind!"
                          - flag player path_to_knight:!
                          - flag player denied
                          - queue clear }
                      } else {
                        - narrate "<&7>[<&b>Paladin<&7>] <&c>You must leave your current class before changing classes."
                        - wait 2s
                        - inject locally first_dialogue instantly }
                    } else if !<player.has_flag[clicked]> {
                      - queue clear }
                '3':
                  trigger: /3/
                  script:
                  - if <player.has_flag[clicked]> {
                    - if <player.has_flag[peasant2]> && !<player.has_flag[peasant1]> && <player.has_permission[essentials.kits.peasant]> {
                      - narrate "<&7>[<&b>Paladin<&7>] <&a>You'll start as a Knight, but can be upgraded to Paladin by completeing Knight-related quests. Check your available quests with <&dq>/quests<&dq>"
                      - wait 3s
                      - narrate "<&e>[<&b>Paladin<&e>] <&a>What would you like to hear about?"
                      - narrate "<&c>1. <&7>Quests"
                      - narrate "<&c>2. <&7>Kits and Perks"
                      - narrate "<&c>3. <&7>Upgrades"
                      - narrate "<&c>4. <&7>All set. Sign me up!!!"
                      - narrate "<&c>5. <&7>Nah, nevermind..."
                      - narrate "<&a>Type 1, 2, 3, 4, or 5 in chat to answer."
                      } else {
                      - narrate "<&7>[<&b>Paladin<&7>] <&c>Very well."
                      - flag player clicked:!
                      - queue clear }
                    } else if !<player.has_flag[clicked]> {
                      - queue clear }
                '4':
                  trigger: /4/
                  script:
                  - if <player.has_flag[clicked]> {
                    - if <player.has_flag[peasant2]> {
                      - narrate "<&e>[<&b>Paladin<&e>] <&a>Wonderful news! I shall alert the king immediately. In the meantime, please read the Knight info guide by typing <&dq>/kit Knightinfo<&dq>."
                      - wait 2s
                      - narrate "<&e>[<&b>Paladin<&e>] <&a>Come speak to me again when you have read the book and are ready to become a knight!"
                      - flag player peasant_to_knight
                      - flag player peasant2:!
                      - flag player peasant1:!
                      - flag player clicked:!
                    } else if !<player.has_flag[clicked]> {
                      - queue clear }
                    }
                '5':
                  trigger: /5/
                  script:
                  - if <player.has_flag[clicked]> {
                    - if <player.has_flag[peasant2]> {
                      - narrate "<&e>[<&b>Paladin<&e>] <&c>Very well. Come talk to me again if you change your mind."
                      - flag player peasant2:!
                      - flag player clicked:!
                    } else if !<player.has_flag[clicked]> {
                      - queue clear }
                    }



RawRaw



Pastes made: 66590