Date: 2020/04/07 14:38:04 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
38
39
40
41
42
43
44
#ScriptVer 1.1
#Author Icecapade
#Date 2020-04-07
IcecapadeSitScript:
type: world
debug: false
events:
on player right clicks *stairs with air:
- if <player.has_flag[is_sit]> || <player.is_sneaking> || <context.location.material.half> == TOP:
- stop
- choose <context.location.material.direction>:
- case NORTH:
- spawn <context.location.add[0.5,-1.2,0.6]> armor_stand[visible=false;collidable=false;gravity=false] save:armor
- look <entry[armor].spawned_entity> <context.location.add[0.5,0,1]>
- case SOUTH:
- spawn <context.location.add[0.5,-1.2,0.4]> armor_stand[visible=false;collidable=false;gravity=false] save:armor
- look <entry[armor].spawned_entity> <context.location.add[0.5,0,-1]>
- case WEST:
- spawn <context.location.add[0.6,-1.2,0.5]> armor_stand[visible=false;collidable=false;gravity=false] save:armor
- look <entry[armor].spawned_entity> <context.location.add[1,0,0.5]>
- case EAST:
- spawn <context.location.add[0.4,-1.2,0.5]> armor_stand[visible=false;collidable=false;gravity=false] save:armor
- look <entry[armor].spawned_entity> <context.location.add[-1,0,0.5]>
- flag server armorstands:->:<player>/<entry[armor].spawned_entity>
- mount <player>|<entry[armor].spawned_entity>
- flag player is_sit
on player steers armor_stand flagged:is_sit:
- if <context.dismount>:
- teleport <context.entity.location.add[0,2.2,0]>
on player quits flagged:is_sit:
- inject Icecapade_CancelSitTask
on player enters vehicle flagged:is_sit:
- inject Icecapade_CancelSitTask
on player teleports flagged:is_sit:
- inject Icecapade_CancelSitTask
on player dies flagged:is_sit:
- inject Icecapade_CancelSitTask
Icecapade_CancelSitTask:
type: task
debug: false
script:
- remove <server.flag[armorstands].map_get[<player>]>
- flag player is_sit:!
- flag server armorstands:<-:<player>/<server.flag[armorstands].map_get[<player>]>