SHOW:
|
|
- or go back to the newest paste.
| 1 | every tick: | |
| 2 | loop all players: | |
| 3 | if {cooltimeTA::%loop-player%} is not set:
| |
| 4 | set {cooltimeTA::%loop-player%} to 0
| |
| 5 | if {cooltimeTA::%loop-player%} > 0:
| |
| 6 | remove 1 from {cooltimeTA::%loop-player%}
| |
| 7 | ||
| 8 | Function tickConvMSMS(i: integer): | |
| 9 | set {_second} to floor({_i}/20)
| |
| 10 | set {_tick} to {_i}-20*{_second}
| |
| 11 | set {_minute} to floor({_second}/60)
| |
| 12 | set {_second} to {_second}-60*{_minute}
| |
| 13 | set {_tick} to {_tick}*5
| |
| 14 | if {_tick} < 10:
| |
| 15 | set {__tick} to "0%{_tick}%"
| |
| 16 | else: | |
| 17 | set {__tick} to "%{_tick}%"
| |
| 18 | if {_second} < 10:
| |
| 19 | set {__second} to "0%{_second}%"
| |
| 20 | else: | |
| 21 | set {__second} to "%{_second}%"
| |
| 22 | if {_minute} < 10:
| |
| 23 | set {__minute} to "0%{_minute}%"
| |
| 24 | else: | |
| 25 | set {__minute} to "%{_minute}%"
| |
| 26 | set {tickConvMSMS} to "%{__minute}%:%{__second}%.%{__tick}%"
| |
| 27 | ||
| 28 | command /editcp [<text>] [<text>]: | |
| 29 | permission: skript.admin | |
| 30 | trigger: | |
| 31 | if arg 1 is "select": | |
| 32 | set {editcp.mode::%player%} to "s"
| |
| 33 | set {editcp.name::%player%} to arg 2
| |
| 34 | message "&aYou can set it by placing a signboard" | |
| 35 | else if arg 1 is "time": | |
| 36 | set {editcp.mode::%player%} to "t"
| |
| 37 | set {editcp.name::%player%} to arg 2
| |
| 38 | message "&aYou can set it by placing a signboard" | |
| 39 | else if arg 1 is "check": | |
| 40 | set {editcp.mode::%player%} to "c"
| |
| 41 | set {editcp.name::%player%} to arg 2
| |
| 42 | message "&aYou can set it by placing a signboard" | |
| 43 | else if arg 1 is "goal": | |
| 44 | set {editcp.mode::%player%} to "g"
| |
| 45 | set {editcp.name::%player%} to arg 2
| |
| 46 | message "&aYou can set it by placing a signboard" | |
| 47 | else if arg 1 is "off": | |
| 48 | set {editcp.mode::%player%} to "o"
| |
| 49 | clear {editcp.name::%player%}
| |
| 50 | message "&cswitched off setting of the signboard" | |
| 51 | else: | |
| 52 | message "&c[Error] &9/editcp &6<mode> <cp name>" | |
| 53 | message "&7mode: &eselect, time, check, goal, off" | |
| 54 | ||
| 55 | on place of sign: | |
| 56 | if {editcp.mode::%player%} is "s":
| |
| 57 | set line 1 of event-block to "&3■■&2■&1|-||&5Select&1||-|&2■&3■■" | |
| 58 | set line 2 of event-block to "&8Right click s" | |
| 59 | set line 3 of event-block to "&0%{editcp.name::%player%}%"
| |
| 60 | set line 4 of event-block to "&3■■&2■&1|-||&9ground&1||-|&2■&3■■" | |
| 61 | if {editcp.mode::%player%} is "t":
| |
| 62 | set line 1 of event-block to "&3■■&2■&1|-||&cTimeAttack&1||-|&2■&3■■" | |
| 63 | set line 2 of event-block to "&8Right click t" | |
| 64 | set line 3 of event-block to "&0%{editcp.name::%player%}%"
| |
| 65 | set line 4 of event-block to "&3■■&2■&1|-||&9ground&1||-|&2■&3■■" | |
| 66 | if {editcp.mode::%player%} is "w":
| |
| 67 | set line 1 of event-block to "&3■■&2■&1|-||&5WayPoint&1||-|&2■&3■■" | |
| 68 | set line 2 of event-block to "&8Right click w" | |
| 69 | set line 3 of event-block to "&0%{editcp.name::%player%}%"
| |
| 70 | set line 4 of event-block to "&3■■&2■&1|-||&9ground&1||-|&2■&3■■" | |
| 71 | if {editcp.mode::%player%} is "g":
| |
| 72 | set line 1 of event-block to "&3■■&2■&1|-||&6Goal&1||-|&2■&3■■" | |
| 73 | set line 2 of event-block to "&8Right click g" | |
| 74 | set line 3 of event-block to "&0%{editcp.name::%player%}%"
| |
| 75 | set line 4 of event-block to "&3■■&2■&1|-||&9ground&1||-|&2■&3■■" | |
| 76 | on rightclick: | |
| 77 | if player's held item is quartz named "&aWayPoint": | |
| 78 | event-block is not sign | |
| 79 | command "/cp %player%" | |
| 80 | - | if line 2 of event-block is "&8Right click s": |
| 80 | + | if line 2 of event-block is "&7&l:. &9Select &7&l.:": |
| 81 | set {_line2} to line 3 of event-block
| |
| 82 | replace "&b" in {_line2} with ""
| |
| 83 | - | set {cpselect::%player%} to {_line2}
|
| 83 | + | set {cpselect::%player%} to {_line2}
|
| 84 | message "&f&l<&e&l< &f&lWP &e&l>&f&l> &aWaypoint has been saved &7(%{editcp.name::%player%}%)"
| |
| 85 | command "/execute %player% ~ ~ ~ entity.player.levelup master @p ~ ~ ~ 1 2" | |
| 86 | command "/execute %player% ~ ~ ~ entity.player.levelup master @p ~ ~ ~ 1 1.6" | |
| 87 | if line 2 of event-block is "&8Right click t": | |
| 88 | {cooltimeTA::%player%} = 0
| |
| 89 | set {cooltimeTA::%player%} to 4
| |
| 90 | set {_line2} to line 3 of event-block
| |
| 91 | replace "&b" in {_line2} with ""
| |
| 92 | set {enableTA.%{_line2}%::%player%} to false
| |
| 93 | set {countTA.%{_line2}%::%player%} to 0
| |
| 94 | message "&f&l<&e&l< &e&lTA &e&l>&f&l> &f%{editcp.name::%player%}% のTAを開始しました。"
| |
| 95 | command "/execute %player% ~ ~ ~ entity.enderdragon.ambient master @p ~ ~ ~ 1 2" | |
| 96 | wait 2 tick | |
| 97 | command "/execute %player% ~ ~ ~ entity.enderdragon.ambient master @p ~ ~ ~ 1 1.3" | |
| 98 | wait 2 tick | |
| 99 | command "/execute %player% ~ ~ ~ entity.player.levelup master @p ~ ~ ~ 1 1" | |
| 100 | - | set {enableTA.%{_line2}%::%player%} to true
|
| 100 | + | set {enableTA.%{_line2}%::%player%} to true
|
| 101 | - | while {enableTA.%{_line2}%::%player%} is true:
|
| 101 | + | while {enableTA.%{_line2}%::%player%} is true:
|
| 102 | - | wait a tick |
| 102 | + | wait a tick |
| 103 | - | add 1 to {countTA.%{_line2}%::%player%}
|
| 103 | + | add 1 to {countTA.%{_line2}%::%player%}
|
| 104 | - | if {goalTA.%{_line2}%::%player%} is true:
|
| 104 | + | if {goalTA.%{_line2}%::%player%} is true:
|
| 105 | - | tickConvMSMS({countTA.%{_line2}%::%player%})
|
| 105 | + | tickConvMSMS({countTA.%{_line2}%::%player%})
|
| 106 | - | broadcast "&7[&6T&aA&7] &d%player%&a: &b'%{_line2}%' &e&l%{tickConvMSMS}% &7(%{countTA.%{_line2}%::%player%}%Tick)"
|
| 106 | + | broadcast "&7[&6T&aA&7] &d%player%&a: &b'%{_line2}%' &e&l%{tickConvMSMS}% &7(%{countTA.%{_line2}%::%player%}%Tick)"
|
| 107 | - | if {recordTA.%{_line2}%::%player%} is not set:
|
| 107 | + | if {recordTA.%{_line2}%::%player%} is not set:
|
| 108 | set {recordTA.%{_line2}%::%player%} to {countTA.%{_line2}%::%player%}
| |
| 109 | - | message "&f&l<&e&l< &e&lTA &e&l>&f&l> &eCongratulations to your first clear!" |
| 109 | + | |
| 110 | - | else if {recordTA.%{_line2}%::%player%} <= {countTA.%{_line2}%::%player%}:
|
| 110 | + | |
| 111 | tickConvMSMS({recordTA.%{_line2}%::%player%})
| |
| 112 | set {recordTA.%{_line2}%::%player%} to {countTA.%{_line2}%::%player%}
| |
| 113 | message "&f&l<&e&l< &e&lTA &e&l>&f&l> &3自己記録を更新しました! &d(旧自己最高:&l%{tickConvMSMS}%&6)"
| |
| 114 | message "&f&l<&e&l< &e&lTA &e&l>&f&l> &3タイムアタックお疲れ様でした!" | |
| 115 | command "/execute %player% ~ ~ ~ entity.enderdragon.ambient master @p ~ ~ ~ 1 2" | |
| 116 | wait 2 tick | |
| 117 | command "/execute %player% ~ ~ ~ entity.enderdragon.ambient master @p ~ ~ ~ 1 1.3" | |
| 118 | wait 2 tick | |
| 119 | command "/execute %player% ~ ~ ~ entity.player.levelup master @p ~ ~ ~ 1 1" | |
| 120 | set {goalTA.%{_line2}%::%player%} to false
| |
| 121 | set {enableTA.%{_line2}%::%player%} to false
| |
| 122 | set {countTA.%{_line2}%::%player%} to 0
| |
| 123 | - | set {goalTA.%{_line2}%::%player%} to false
|
| 123 | + | if line 2 of event-block is "&7&l:. &cgoal &7&l.:": |
| 124 | - | set {enableTA.%{_line2}%::%player%} to false
|
| 124 | + | set {_line2} to line 3 of event-block
|
| 125 | - | set {countTA.%{_line2}%::%player%} to 0
|
| 125 | + | replace "&b" in {_line2} with ""
|
| 126 | - | if line 2 of event-block is "&7&l:. &cgoal &7&l.:": |
| 126 | + | if {enableTA.%{_line2}%::%player%} is false:
|
| 127 | message "&f&l<&e&l< &e&lTA &e&l>&f&l> &cタイムアタックを開始していません" | |
| 128 | stop | |
| 129 | - | if {enableTA.%{_line2}%::%player%} is false:
|
| 129 | + | if distance between event-block and player > 2: |
| 130 | message "&f&l<&e&l< &e&lTA &e&l>&f&l> &c近くまで来てからクリックしてください" | |
| 131 | - | stop |
| 131 | + | stop |
| 132 | - | if distance between event-block and player > 2: |
| 132 | + | set {goalTA.%{_line2}%::%player%} to true
|
| 133 | clear {checkpoint.%{cpselect::%{_player}%}%::%{_player}%}
| |
| 134 | - | stop |
| 134 | + | if line 2 of event-block is "&7&l:. &eCheckPoint &7&l.:": |
| 135 | - | set {goalTA.%{_line2}%::%player%} to true
|
| 135 | + | if block below player is air: |
| 136 | message "&c&l<&4&l<&4&l WP &4&l>&c&l> &c空中で設定することはできません!" | |
| 137 | - | if line 2 of event-block is "&8Right click w": |
| 137 | + | stop |
| 138 | - | if block below player is air: |
| 138 | + | set {_line2} to line 3 of event-block
|
| 139 | replace "&b" in {_line2} with ""
| |
| 140 | - | stop |
| 140 | + | set {checkpoint.%{_line2}%::%player%} to location of player
|
| 141 | set {_line2} to line 3 of event-block
| |
| 142 | replace "&b" in {_line2} with ""
| |
| 143 | - | set {checkpoint.%{_line2}%::%player%} to location of player
|
| 143 | + | set {cpselect::%player%} to {_line2}
|
| 144 | message "&f&l<&e&l< &f&lWP &e&l>&f&l> &aWaypoint has been saved &7(%{editcp.name::%player%}%)"
| |
| 145 | command "/execute %player% ~ ~ ~ entity.player.levelup master @p ~ ~ ~ 1 2" | |
| 146 | - | set {cpselect::%player%} to {_line2}
|
| 146 | + | |
| 147 | ||
| 148 | command /goal [<player>]: | |
| 149 | permission: skript.admin | |
| 150 | trigger: | |
| 151 | set {_player} to arg 1
| |
| 152 | if arg 1 is not set: | |
| 153 | set {_player} to player
| |
| 154 | clear {checkpoint.%{cpselect::%{_player}%}%::%{_player}%}
| |
| 155 | add 1 to {clear.%{cpselect::%{_player}%}%::%{_player}%}
| |
| 156 | ||
| 157 | command /checkpoint [<player>]: | |
| 158 | aliases: /cp | |
| 159 | trigger: | |
| 160 | set {_player} to arg 1
| |
| 161 | if arg 1 is not set: | |
| 162 | set {_player} to player
| |
| 163 | teleport {_player} to location of {checkpoint.%{cpselect::%{_player}%}%::%{_player}%}
| |
| 164 | ||
| 165 | command /item [<player>]: | |
| 166 | trigger: | |
| 167 | set {_player} to arg 1
| |
| 168 | if arg 1 is not set: | |
| 169 | set {_player} to player
| |
| 170 | set slot 1 of player to quartz named "&aWaypoint" |