Date: 2020/03/14 12:05:11 UTC-07:00
Type: Denizen 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
zoom:
debug: true
type: command
name: zoom
description: zoom
usage: /zoom
#permission:
aliases:
- z
script:
- if <context.args.is_empty>:
- if <player.flag[zoom]||null> == null:
- flag player zoom:default
- while <player.flag[zoom]||null> == default:
- adjust <player> fov_multiplier:-0.1
- actionbar '<&e><&l>Zoom<&f><&l>: <&a><&l>100<&pc> <&7>/z to toggle'
- wait 1s
- else:
- adjust <player> fov_multiplier
- actionbar <&r>
- flag player zoom:!
- else:
- if <context.args.get[1].is_decimal> && <context.args.size> == 1 && <context.args.get[1]> >= 1 && <context.args.get[1]> <= 100:
- if <context.args.get[1]> <= 50:
- adjust <player> fov_multiplier:<element[0.018].mul[<context.args.get[1]>].add[0.1]>
- flag player zoom:<context.args.get[1]>
- if <context.args.get[1]> > 50 && <context.args.get[1]> < 100:
- adjust <player> fov_multiplier:<element[-1].add[<element[0.02].mul[<context.args.get[1].sub[50]>]>]>
- flag player zoom:<context.args.get[1]>
- if <context.args.get[1]> == 100:
- adjust <player> fov_multiplier:-0.1
- flag player zoom:<context.args.get[1]>
- while <player.flag[zoom]||null> == <context.args.get[1]>:
- actionbar '<&e><&l>Zoom<&f><&l>: <&a><&l><context.args.get[1]><&pc> <&7>/z to toggle'
- wait 1s
- else:
- narrate '<&c>Incorrect command usage! Specify one number between 1 and 100'