- 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


TitleBlock Regen
TypeDenizen Script
Date2017/11/17 08:30:06 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
5800
on player breaks block:
    - if <context.location.cuboids.parse[notable_name].contains_any[<s@Config.yaml_key[invincibilityzones]>]> || !<s@Config.list_keys[materials].include[quartz_ore].contains_any[<context.material.after[@]>]> {
      - determine cancelled
      } 
    - determine passively cancelled
    - define item <player.item_in_hand>
    - if <context.material.contains[quartz_ore]> {
      - ^run s@BonusPoints_Stealthy d:<player> instantly
      - if !<server.has_flag[bonuspoints.madrushhunter]> {
        - flag player bonuspoints.madrush:1
        }
      - flag player score:+:1
      - define earnedxp <s@Config.yaml_key[XPValues.score].mul[<s@Config.yaml_key[XPValues.xppacks.<server.flag[xppack]||none>]>]>
      - yaml set id:<player> Lobby.currencies.xp:+:<def[earnedxp]>
      - narrate "<&b><&l>Scored Point!<&r><&a> +<def[earnedxp]> XP"
      - yaml set id:<player> Shift.gamestats.solo.solopoints:++
      - yaml set id:<player> Shift.gamestats.general.alltimepoints:++
      - playsound <server.list_online_players> sound:BLOCK_NOTE_PLING volume:1.2 pitch:2
      - queue clear
      }
    - modifyblock <context.location> bedrock
    - flag player bonuspoints.minimalist:0
    - define bonus <def[item].enchantments.level[LOOT_BONUS_BLOCKS]||0>
    - define materials <s@Config.list_keys[materials].include[podzol]>
    - if <context.material.contains_text[podzol]> {
      - define quantity <util.random.int[<s@Config.yaml_key[materials.podzol.minq]>].to[<s@Config.yaml_key[materials.podzol.maxq].add_int[<def[bonus]>]>]>
      - give <s@Config.yaml_key[materials.podzol.reward]> quantity:<def[quantity]>
      - if <s@Config.list_keys[materials.podzol].contains[bonus]> { 
        - give <s@Config.yaml_key[materials.podzol.bonus]> quantity:1
        }
        else {
        - define quantity <util.random.int[<s@Config.yaml_key[materials.<context.material.bukkit_enum>.minq]>].to[<s@Config.yaml_key[materials.<context.material.bukkit_enum>.maxq].add_int[<def[bonus]>]>]>
        - give <s@Config.yaml_key[materials.<context.material.bukkit_enum>.reward]> quantity:<def[quantity]>
        - if <s@Config.list_keys[materials.<context.material.bukkit_enum>].contains[bonus]> { 
          - give <s@Config.yaml_key[materials.<context.material.bukkit_enum>.bonus]> quantity:1 
          }
        }
      }
      - yaml set id:<player> Shift.gamestats.general.alltimeblocksmined:++
      - define MinerUnlock li@<s@Config.yaml_key[classunlock.Miner.1]>|<s@Config.yaml_key[classunlock.Miner.2]>|<s@Config.yaml_key[classunlock.Miner.3]>
      - define mined <yaml[<def[enemy]>].read[Shift.gamestats.general.alltimeblocksmined]>
      - if <def[MinerUnlock].contains[<def[mined]>]> {
        - narrate "<&a><&k>!!<&r> <&b><&l>You<&sq>ve just unlocked the <&3><&l>Miner Level <def[MinerUnlock].find[<def[mined]>]> <&b><&l>class! <&a><&k>!!<&r>" targets:<def[enemy]>
        - yaml set id:<def[enemy]> Shift.classes.Miner:<def[MinerUnlock].find[<def[mined]>]>
        }
    - if <context.material.bukkit_enum.contains[gold_ore]> {
      - flag player alltimegoldoremined:+:1
      - define CapitalistUnlock li@<s@Config.yaml_key[classunlock.Capitalist.1]>|<s@Config.yaml_key[classunlock.Capitalist.2]>|<s@Config.yaml_key[classunlock.Capitalist.3]>
      - define goldmined <yaml[<def[enemy]>].read[Shift.gamestats.general.alltimegioldblocksmined]>
      - if <def[CapitalistUnlock].contains[<def[goldmined]>]> {
        - narrate "<&a><&k>!!<&r> <&b><&l>You<&sq>ve just unlocked the <&3><&l>Capitalist Level <def[CapitalistUnlock].find[<def[goldmined]>]> <&b><&l>class! <&a><&k>!!<&r>" targets:<def[enemy]>
        - yaml set id:<def[enemy]> Shift.classes.Capitalist:<def[CapitalistUnlock].find[<def[goldmined]>]>
        }
      }
    - run s@ToolDamage d:<def[item]> instantly
    - wait <s@Config.yaml_key[BlockRegen.<context.material.bukkit_enum>]>
    - modifyblock <context.location> <context.material>



RawRaw



Pastes made: 78237