- 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


TitleUntitled Paste
TypeDenizen Script
Date2020/11/14 03:02:51 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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
30900
gielinor_mining_handler:
  type: assignment
  debug: false
  actions:
    on click:
      # - ████████ [ Check for cooldown ] ████████
      - if <npc.has_flag[harvest_cooldown]>:
        - stop
      # % ████████ [ Definitions ] ████████
      - define ore_node_type  <npc.flag[type]>
      - define ore_type <npc.flag[type]>_ore
      - define ore_name <script.data_key[ore_handling_data.<[ore_type]>.display_name]>
      - define minimum_level <script.data_key[ore_handling_data.<[ore_type]>.minimum_level]>
      - define success_chance <script.data_key[ore_handling_data.<[ore_type]>.success_chance]>
      - define exp_amount <script.data_key[ore_handling_data.<[ore_type]>.exp_amount]>
      - define respawn_time <script.data_key[ore_handling_data.<[ore_type]>.respawn_time]>
      # $ ████████ [ ADD VALUE FOR SKILL MODIFIER ] ████████
      - define mining_level_bonus <PLAYER.DEEZNUTZ.AYYYLMAO>
      # $ ████████ [ ADD CHECK FOR CAPE ] ████████
      - if player wearing mining skill cape:
        - define cape_chance <element[5]>
      - else:
        - define cape_chance <element[0]>

      # % ████████ [ mining skill level check ] ████████
      - if <player.flag[skills_mining]> < <[minimum_level]>:
        - narrate format:colorize_red "You must have <[minimum_level]> mining in order to harvest <[ore_name]>."
        - stop
      # % ████████ [ roll for success. ] ████████
      # $ ████████ [ ADD CHECK FOR MODIFIERS ] ████████
      - define mining_result <util.random.int[0].to[100]>
      - if <[mining_result].add[<[mining_level_bonus]>]> >= success_chance:
        - give <[ore_type]>
        - run add_xp def:<[exp_amount]>|mining
        # % ████████ [ Chance for gloves/etc to not despawn. ] ████████
        # $ ████████ [ ADD SYNTAX FOR PLAYER EQUIPMENT CHECK ] ████████
        - if <player.flag[gloves]> == mining_gloves && <script.data_key[ore_handling_data.<[ore_type]>.mining_gloves_chance]> > 0:
          - define chance <util.random.int[0].to[100]>
          - if <[chance]> < <<script.data_key[ore_handling_data.<[ore_type]>.mining_gloves_chance].sub[<[cape_chance]>]>:
            - stop
        - if <player.flag[gloves]> == expert_mining_gloves && <script.data_key[ore_handling_data.<[ore_type]>.expert_mining_gloves_chance]> > 0:
          - define chance <util.random.int[0].to[100]>
          - if <[chance]> < <script.data_key[ore_handling_data.<[ore_type]>.expert_mining_gloves_chance].sub[<[cape_chance]>]>:
            - stop
        - if <player.flag[gloves]> == superior_mining_gloves && <<script.data_key[ore_handling_data.<[ore_type]>.superior_mining_gloves_chance]>.sub[<[cape_chance]>]> > 0:
          - define chance <util.random.int[0].to[100]>
          - if <[chance]> < <script.data_key[ore_handling_data.<[ore_type]>.superior_mining_gloves_chance].sub[<[cape_chance]>]>:
            - stop
        # % ████████ [ Set cooldown, and equip models on timer. ] ████████
        - if <[respawn_time]> > 0:
          - flag <context.npc> harvest_cooldown d:<[respawn_time]>s
          - equip <context.npc> head:[<[ore_node_type]>_depleted]
          - wait <[respawn_time]>s
          - equip <context.npc> head:[<[ore_node_type]>_ready]

  ore_handling_data:
#-    template_ore:
#-        minimum_level:
#-        success_chance:
#-        exp_amount:
#-        respawn_time:
#-        mining_gloves_chance:
#-        superior_mining_gloves_chance:
#-        expert_mining_gloves_chance:
#-        display_name:
    chocolate_ore:
        minimum_level: 0
        success_chance: 
        exp_amount: 0
        respawn_time: 0
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name: Chocolate
    copper_ore:
        minimum_level: 1
        success_chance: 
        exp_amount: 17.5
        respawn_time: 2.4
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name"Copper Ore"
    elemental_rock_ore:
        minimum_level: 1
        success_chance: 
        exp_amount: 1
        respawn_time: 5.4|11.4|23.4
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name"Elemental Rocks"
    tin_ore:
        minimum_level: 1
        success_chance: 
        exp_amount: 17.5
        respawn_time: 2.4
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name"Tin Ore"
    clay_ore:
        minimum_level: 1
        success_chance: 
        exp_amount: 5
        respawn_time: 1.2
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name: Clay
    rune_ore:
        minimum_level: 1
        success_chance: 
        exp_amount: 5
        respawn_time: 0
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name"Rune Essence"
    limestone_ore:
        minimum_level: 10
        success_chance: 
        exp_amount: 26.5
        respawn_time: 5.4
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name: Limestone
    blurite_ore:
        minimum_level: 10
        success_chance: 
        exp_amount: 17.5
        respawn_time: 25
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name"Blurite Ore"
    iron_ore:
        minimum_level: 15
        success_chance: 
        exp_amount: 35
        respawn_time: 5.4
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name"Iron Ore"
    daeyalt_ore:
        minimum_level: 20
        success_chance: 
        exp_amount: 17.5
        respawn_time: 28
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name"Daeyalt Ore"
    silver_ore:
        minimum_level: 20
        success_chance: 
        exp_amount: 40
        respawn_time: 60
        mining_gloves_chance: 50
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 50
        display_name"Silver Ore"
    ash_ore:
        minimum_level: 22
        success_chance: 
        exp_amount: 10
        respawn_time: 30
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name: Ash
    coal_ore:
        minimum_level: 30
        success_chance: 
        exp_amount: 50
        respawn_time: 30
        mining_gloves_chance: 40
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 40
        display_name"Coal Ore"
    pay-dirt_ore:
        minimum_level: 30
        success_chance: 
        exp_amount: 60
        respawn_time: 60
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name: Pay-Dirt
    sandstone_ore:
        minimum_level: 35
        success_chance: 
        exp_amount: 30|40|50|60
        respawn_time: 5
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name: Sandstone
    gold_ore:
        minimum_level: 40
        success_chance: 
        exp_amount: 65
        respawn_time: 60
        mining_gloves_chance: 33
        superior_mining_gloves_chance: 
        expert_mining_gloves_chance: 34
        display_name"Gold Ore"
    gem_ore:
        minimum_level: 40
        success_chance: 
        exp_amount: 65
        respawn_time: 59.4
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name: Gems
    sulphur_ore:
        minimum_level: 42
        success_chance: 
        exp_amount: 25
        respawn_time: 25.2
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name: Sulphur
    granite_ore:
        minimum_level: 45
        success_chance: 
        exp_amount: 50|60|75
        respawn_time: 5
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name: Granite
    mithril_ore:
        minimum_level: 55
        success_chance: 
        exp_amount: 80
        respawn_time: 120
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 25
        expert_mining_gloves_chance: 25
        display_name"Mithril Ore"
    lunar_ore:
        minimum_level: 60
        success_chance: 
        exp_amount: 0
        respawn_time: 0
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name"Lunar Ore"
    daeyaltshard_ore:
        minimum_level: 60
        success_chance: 
        exp_amount: 5
        respawn_time: 60
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name"Daeyalt shards"
    lovakite_ore:
        minimum_level: 65
        success_chance: 
        exp_amount: 10
        respawn_time: 35
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name"Lovakite Ore"
    adamantite_ore:
        minimum_level: 70
        success_chance: 
        exp_amount: 95
        respawn_time: 240
        mining_gloves_chance: 
        superior_mining_gloves_chance: 16
        expert_mining_gloves_chance: 17
        display_name"Adamantite Ore"
    softclay_ore:
        minimum_level: 70
        success_chance: 
        exp_amount: 5
        respawn_time: 1.2
        mining_gloves_chance: 
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 0
        display_name"Soft Clay"
    runite_ore:
        minimum_level: 85
        success_chance: 
        exp_amount: 125
        respawn_time: 720|360
        mining_gloves_chance: 
        superior_mining_gloves_chance: 12
        expert_mining_gloves_chance: 13
        display_name"Runite Ore"
    amethyst_ore:
        minimum_level: 92
        success_chance: 
        exp_amount: 240
        respawn_time: 75
        mining_gloves_chance: 0
        superior_mining_gloves_chance: 0
        expert_mining_gloves_chance: 25
        display_name"Amethyst Ore"



RawRaw



Pastes made: 79783