- 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
Date2017/11/13 02:49:43 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
7300
NODES_COMMAND:
    type: command
    name: nodes
    script:
    - choose "<context.args.get[1]>":
        - case "create":
            - choose "<context.args.get[2]>":
                - case "copper":
                    - flag server nodes.quartz_ore:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created a copper node at <player.location.chunk>!"
                - case "iron":
                    - flag server nodes.iron_ore:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created an iron at <player.location.chunk>!"
                - case "gold":
                    - flag server nodes.gold_ore:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created a gold node at <player.location.chunk>!"
                - case "sapphire":
                    - flag server nodes.lapis_ore:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created a sapphire node at <player.location.chunk>!"
                - case "stone":
                    - flag server nodes.stone:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created a stone node at <player.location.chunk>!"
                - case "misc":
                    - flag server nodes.misc:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created a misc node at <player.location.chunk>!"
                - case "sparkstone":
                    - flag server nodes.sparkstone:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created a sparkstone node at <player.location.chunk>!"
                - case "whitestone":
                    - flag server nodes.whitestone:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created a whitestone node at <player.location.chunk>!"
                - case "wood":
                    - flag server nodes.wood:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created a wood node at <player.location.chunk>!"
                - case "herb":
                    - flag server nodes.herb:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created a herb node at <player.location.chunk>!"
                - case "fauna":
                    - flag server nodes.fauna:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created a fauna node at <player.location.chunk>!"
                - case "clay":
                    - flag server nodes.clay:->:<player.location.chunk>
                    - narrate "<&a>You have successfully created a clay node at <player.location.chunk>!"
                - default:
                    - narrate "<&c>That is not a valid node type! Valid node types are:"
                    - narrate "<&c>copper, iron, gold, sapphire, stone, whitestone, wood, herb, fauna, clay, misc, sparkstone."
        - case "remove":
            - foreach <server.list_flags[nodes.]> {
                - if <server.flag[<def[value]>].contains[<player.location.chunk>]> {
                    - flag server <server.flag[nodes.].before[<&dot>]>:->:<player.location.chunk>:!
                }
            }
        - default:
            - narrate "<&c>That is not a valid nodes command! Valid nodes commands are: create, remove."
            
NODES_REPLENISH:
    type: world
    events:
        on player breaks block:
        - foreach <server.list_flags[nodes.].after[<&dot>]> {
            - narrate "<server.list_flags[nodes.].after[<&dot>]>"
            - if <def[value].contains[<context.location>]> {
                - flag server replenishing.<context.location>:<context.material> duration:30s
                - narrate "replenishing.<context.location>:<context.material>"
            }
        }
        on system time minutely:
        - foreach <server.list_flags[replenishing.]> {
            - if <def[value].is_expired> == true {
                - modifyblock <def[value].after[replenishing.]> <server.flag[<def[value]>]>
            }
        }



RawRaw



Pastes made: 76991