Date: 2014/12/05 14:38:28 UTC-08: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
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
# ---------------------------------------------------------------------------- #
# |
# |
# D o u b l e J u m p e r |
# |
# Let your players do double jumps |
# |
# |
# Author: |Anthony| |
# Version: 0.1 |
# dScript Version: 0.9.6-b1545 |
# |
# ---------------------------------------------------------------------------- #
# |
# |
# ABOUT: |
# |
# Players will be able to do double jumps. You can set a flag to let |
# some folks actually fly. |
# - flag <player> fly_enabled |
# |
# |
# ---------------------------------------------------------------------------- #
DoubleJump:
type: world
debug: false
speed: 0
events:
on player joins:
- wait 1t
- adjust <player> can_fly:true
on player walks:
- if <c.location.material.name.is[==].to[air]> {
- narrate "On Air"
}
on player jumps:
- while <player.location.standing_on.material.name.is[==].to[air]||false> {
- if <player.is_online.not> {
- while stop
}
- wait 1t
}
- adjust <player> can_fly:false
- wait 1t
- adjust <player> 'fall_distance:<c.location.distance[<player.location>].vertical.as_int>'
- narrate "fall distance <c.location.distance[<player.location>].vertical>"
- adjust <player> can_fly:true
# - adjust <player> can_fly:true
# - if <player.is_flying.not> {
# - narrate "no fly"
# - adjust <player> can_fly:false
# }
# else {
# - narrate "yes fly"
# }
on player changes gamemode:
- wait 1t
- adjust <player> can_fly:true
on player starts flying:
- if <player.has_flag[fly_enabled]||false>
|| <player.gamemode.id.is[==].to[1]> {
- queue clear
}
- wait 5t
- adjust <player> can_fly:false
- wait 5t
- adjust <player> fall_distance:0
- while <player.location.standing_on.material.name.is[==].to[air]||false> {
- if <player.is_online.not> {
- while stop
}
- wait 1t
}
- adjust <player> can_fly:true