Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [-1:0:0, 1:0:0, 0:0:1, 0:0:-1] %%vec
- :Blocks4{ ## Block -> [Blocks]
- @@vec ${OVER SWAP ADDBLOCK} SWAP DROP
- }
- :GetPlatform{ ## Block -> [Blocks]
- <B ARRAY SWAP ADD %temp
- 200 %l
- BEGIN
- () @temp LEN
- () @l
- AND
- WHILE
- ARRAY @temp &{Blocks4 JOIN} UNIQUE @temp &AREM @result &AREM ?ID %x
- @temp @result JOIN UNIQUE %result
- @x %temp
- @l 1 - %l
- REPEAT
- @result
- }
- :FillIsland{ ## block ->
- "Scan area" .
- GetPlatform
- "Filling ..." .
- ${
- ME 0 GET >BL
- -1 ADDBLOCK
- ME 1 GET >BL
- -1 ADDBLOCK
- ME RANDOM 0.5 > IF 1 ELSE 2 THEN GET >BL
- -1 ADDBLOCK
- ME 2 GET >BL
- } %floor
- 0 %deg
- BEGIN
- @floor FALSE << OR
- WHILE
- @floor &{DUP Blocks4 ?ID LEN 4 D- RANDOM 2.2 @deg D+ D* D+ 0 > IF -1 ADDBLOCK ME 2 GET >BL ELSE DROP THEN}
- @floor ${-1 ADDBLOCK} ?ID %floor
- @deg 0.1 D+ 3 MIN %deg
- REPEAT
- "Completed. select next block" .
- }
- "Select block to fill or air to finish" .
- SUB {
- EVENT(PLAYER) ME =! IF RETURN THEN
- EVENT(BLOCK) %b
- EVENT(CANCEL)
- @b IF
- @b FillIsland
- ELSE
- SEND(fin)
- "Finish" .
- END
- THEN
- } REG(PlayerInteract) AWAIT(fin)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement