- 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
Date2015/09/18 14:38:46 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
99
100
101
102
103
104
105
106
107
108
109
10900
Stoppigspawner:
  type: world
  events:
    on player places mob_spawner:
    - choose "<player.item_in_hand.display>":
      - case "Zombie Spawner":
        - adjust <context.location> spawner_type:e@zombie
      - case "Spider Spawner":
        - adjust <context.location> spawner_type:e@spider
      - case "CaveSpider Spawner":
        - adjust <context.location> spawner_type:e@cave_spider
      - case "Blaze Spawner":
        - adjust <context.location> spawner_type:e@blaze
      - case "Silverfish Spawner":
        - adjust <context.location> spawner_type:e@silverfish
      - case "Skeleton Spawner":
        - adjust <context.location> spawner_type:e@Skeleton
      - case "<&6>Empty Spider Cage":
        - narrate "You cannot place an emtpy cage. If this is not supposed to be an empty cage ask an Admin for help."
        - determine cancelled
      - case "<&6>Empty CaveSpider Cage":
        - narrate "You cannot place an emtpy cage. If this is not supposed to be an empty cage ask an Admin for help."
        - determine cancelled
      - case "<&6>Empty Zombie Cage":
        - narrate "You cannot place an emtpy cage. If this is not supposed to be an empty cage ask an Admin for help."
        - determine cancelled
      - case "<&6>Empty Skeleton Cage":
        - narrate "You cannot place an emtpy cage. If this is not supposed to be an empty cage ask an Admin for help."
        - determine cancelled
      - case "<&6>Empty Blaze Cage":
        - narrate "You cannot place an emtpy cage. If this is not supposed to be an empty cage ask an Admin for help."
        - determine cancelled
      - case "<&6>Empty Silverfish Cage":
        - narrate "You cannot place an emtpy cage. If this is not supposed to be an empty cage ask an Admin for help."
        - determine cancelled

looping:
  type: task
  script:
  - foreach <server.list_online_players> {
    - if <def[value].location.add[0,-1,0].spawner_type||none> == e@Spider {
      - if "<def[value].inventory.contains.display[Empty Spider Cage].qty[1]>" {
        - if <def[value].inventory.can_fit[bedrock].qty[1]> == true {
          - ^execute as_server 'give <def[value].name> minecraft:mob_spawner 1 0 {display:{Name:"Spider Spawner"}, BlockEntityTag:{EntityId:Spider}}'
          - ^execute as_server 'execute <def[value].name> ~ ~ ~ setblock ~ ~-1 ~ minecraft:air'
          - ^take "bydisplay:<&6>Empty Spider Cage" from:<def[value].inventory> qty:1
          } else {
          - execute as_server 'msg <def[value].name> Your inventory is full.'
          }
        }
      }
    - if <def[value].location.add[0,-1,0].spawner_type||none> == e@Zombie {
      - if "<def[value].inventory.contains.display[Empty Zombie Cage].qty[1]>" {
        - if <def[value].inventory.can_fit[bedrock].qty[1]> == true {
          - ^execute as_server 'give <def[value].name> minecraft:mob_spawner 1 0 {display:{Name:"Zombie Spawner"}, BlockEntityTag:{EntityId:Zombie}}'
          - ^execute as_server 'execute <def[value].name> ~ ~ ~ setblock ~ ~-1 ~ minecraft:air'
          - ^take "bydisplay:<&6>Empty Zombie Cage" from:<def[value].inventory> qty:1
          } else {
          - execute as_server 'msg <def[value].name> Your inventory is full.'
          }
        }
      }
    - if <def[value].location.add[0,-1,0].spawner_type||none> == e@Skeleton {
      - if "<def[value].inventory.contains.display[Empty Skeleton Cage].qty[1]>" {
        - if <def[value].inventory.can_fit[bedrock].qty[1]> == true {
          - ^execute as_server 'give <def[value].name> minecraft:mob_spawner 1 0 {display:{Name:"Skeleton Spawner"}, BlockEntityTag:{EntityId:Skeleton}}'
          - ^execute as_server 'execute <def[value].name> ~ ~ ~ setblock ~ ~-1 ~ minecraft:air'
          - ^take "bydisplay:<&6>Empty Skeleton Cage" from:<def[value].inventory> qty:1
          } else {
          - execute as_server 'msg <def[value].name> Your inventory is full.'
          }
        }
      }
    - if <def[value].location.add[0,-1,0].spawner_type||none> == e@Cave_Spider {
      - if "<def[value].inventory.contains.display[Empty CaveSpider Cage].qty[1]>" {
        - if <def[value].inventory.can_fit[bedrock].qty[1]> == true {
          - ^execute as_server 'give <def[value].name> minecraft:mob_spawner 1 0 {display:{Name:"CaveSpider Spawner"}, BlockEntityTag:{EntityId:CaveSpider}}'
          - ^execute as_server 'execute <def[value].name> ~ ~ ~ setblock ~ ~-1 ~ minecraft:air'
          - ^take "bydisplay:<&6>Empty CaveSpider Cage" from:<def[value].inventory> qty:1
          } else {
          - execute as_server 'msg <def[value].name> Your inventory is full.'
          }
        }
      }
    - if <def[value].location.add[0,-1,0].spawner_type||none> == e@Silverfish {
      - if "<def[value].inventory.contains.display[Empty Silverfish Cage].qty[1]>" {
        - if <def[value].inventory.can_fit[bedrock].qty[1]> == true {
          - ^execute as_server 'give <def[value].name> minecraft:mob_spawner 1 0 {display:{Name:"Silverfish Spawner"}, BlockEntityTag:{EntityId:Silverfish}}'
          - ^execute as_server 'execute <def[value].name> ~ ~ ~ setblock ~ ~-1 ~ minecraft:air'
          - ^take "bydisplay:<&6>Empty Silverfish Cage" from:<def[value].inventory> qty:1
          } else {
          - execute as_server 'msg <def[value].name> Your inventory is full.'
          }
        }
      }
    - if <def[value].location.add[0,-1,0].spawner_type||none> == e@Blaze {
      - if "<def[value].inventory.contains.display[Empty Blaze Cage].qty[1]>" {
        - if <def[value].inventory.can_fit[bedrock].qty[1]> == true {
          - ^execute as_server 'give <def[value].name> minecraft:mob_spawner 1 0 {display:{Name:"Blaze Spawner"}, BlockEntityTag:{EntityId:Blaze}}'
          - ^execute as_server 'execute <def[value].name> ~ ~ ~ setblock ~ ~-1 ~ minecraft:air'
          - ^take "bydisplay:<&6>Empty Blaze Cage" from:<def[value].inventory> qty:1
          } else {
          - execute as_server 'msg <def[value].name> Your inventory is full.'
          }
        }
      }
  }
  - run looping instantly delay:100t



RawRaw



Pastes made: 57256