Date: 2021/03/05 02:10:07 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
#ScriptVer 1.2
#Author Icecapade
#Date 2021-03-05
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:<server.flag[armorstands].with[<player>].as[<entry[armor].spawned_entity>]||<map.with[<player>].as[<entry[armor].spawned_entity>]>>
- mount <player>|<entry[armor].spawned_entity>
- flag player is_sit
on player steers armor_stand:
- if <context.dismount>:
- define location <context.entity.location.add[0,2.2,0]>
- inject Icecapade_CancelSitTask
- teleport <[location]>
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].get[<player>]>
- flag player is_sit:!
- flag server armorstands:<server.flag[armorstands].exclude[<player>]>