- 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/12 03:46:30 UTC-07:00
ByBlackCoyote
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
3700
model_generator:
  type: world
  debug: true
  events:
    on model_pos1 command:
    - if <player.is_op.not> queue clear
    - flag <player> model_pos1:<player.location.cursor_on>
    - narrate "pos1 set"
    - determine fulfilled
    on model_pos2 command:
    - if <player.is_op.not> queue clear
    - flag <player> model_pos2:<player.location.cursor_on>
    - narrate "pos2 set"
    - determine fulfilled
    on model_base command:
    - if <player.is_op.not> queue clear
    - flag <player> model_base:<player.location.cursor_on>
    - narrate "base set"
    - determine fulfilled
    on model_generate command:
    - if <player.is_op.not> queue clear
    - narrate "generating model"
    - if <context.args.get[1].as_int||none> == none {
      - define increment 1
      } else {
      - define increment <context.args.get[1]>
      }
    - define cuboid "cu@<player.flag[model_pos1]>|<player.flag[model_pos2]>"
    - define model "<&lt>def[base]<&gt>"
    - foreach <def[cuboid].get_blocks> {
      - if <def[value].material> == m@air foreach next
      - define relative "<def[value].sub[<player.flag[model_base]>]>"
      - define model "<def[model]>|<&lt>def[base].add[<&lt>l@<def[relative].x.mul[%increment%]>,<def[relative].y.mul[%increment%]>,<def[relative].z.mul[%increment%]>.rotate_around_y[<&pc>yaw<&pc>]<&gt>]<&gt>"
      }
    - flag server "model:%model%"
    - determine fulfilled



RawRaw



Pastes made: 58443