- 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








The script repo is an archive of historical scripts. For modern scripts, or to post your own, please use the Scripts forum section.





Staff Pick: Double Doors


By Morphan1
Created: 2014/12/26 15:42:01 UTC-08:00 (9 years and 363 days ago)
Edited: 2017/08/24 13:00:41 UTC-07:00 (7 years and 121 days ago)
Likes: 4

Staff pick as of: 2014/12/28 16:29:16 UTC-08:00 (9 years and 361 days ago)
Denizen Version: 0.9.6
Script Version: 1.1
Description:

Makes all non-iron doors that are set up as double doors open together when right clicked.


Download script | View raw script
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
4600

DoubleDoorsEvents:
  type: world
  debug: false
  default constants:
    directions:
    - 0,0,1
    - 1,0,0
    - 0,0,-1
    - -1,0,0
    - 0,0,-1
    - -1,0,0
    - 0,0,1
    - 1,0,0
  events:
    on player right clicks block:
    - define loc <context.location.block>
    - if <def[loc].material.name.ends_with[door]> {
      - define data <def[loc].material.data>
      - if %data% > 7 {
        - define loc <context.location.block.sub[0,1,0]>
        - define data <def[loc].material.data>
        }
      - define direction <script.constant[directions].get[<def[data].add[1]>]>
      - define top_data <def[loc].add[0,1,0].material.data>
      - define other <def[loc].add[%direction%]>
      - define other_top <def[other].add[0,1,0].material.data>
      - if <def[other].material.name.ends_with[door]> && <def[other].material.data> == %data% && %other_top% != %top_data% {
        - switch %other%
        - flag server "DoubleDoorScriptUsageCountNumberV2:++"
        - queue clear
        }
      - define other <def[loc].sub[%direction%]>
      - define other_top <def[other].add[0,1,0].material.data>
      - if <def[other].material.name.ends_with[door]> && <def[other].material.data> == %data% && %other_top% != %top_data% {
        - switch %other%
        - flag server "DoubleDoorScriptUsageCountNumberV2:++"
        - flag server "DoubleDoorScriptUsageCountNumber:++"
        }
      }
    on system time hourly:
    - webget "http://stats.denizenscript.com/tracker?script=12&version=your%20mom&used=<server.flag[DoubleDoorScriptUsageCountNumber]>&actual_used=<server.flag[DoubleDoorScriptUsageCountNumberV2]>"
    - flag server "DoubleDoorScriptUsageCountNumberV2:0" 








View History