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": | |
| 81 | set {_line2} to line 3 of event-block
| |
| 82 | replace "&b" in {_line2} with ""
| |
| 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
| |
| 101 | while {enableTA.%{_line2}%::%player%} is true:
| |
| 102 | wait a tick | |
| 103 | add 1 to {countTA.%{_line2}%::%player%}
| |
| 104 | if {goalTA.%{_line2}%::%player%} is true:
| |
| 105 | tickConvMSMS({countTA.%{_line2}%::%player%})
| |
| 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:
| |
| 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!" | |
| 110 | else if {recordTA.%{_line2}%::%player%} <= {countTA.%{_line2}%::%player%}:
| |
| 111 | tickConvMSMS({recordTA.%{_line2}%::%player%})
| |
| 112 | message "&f&l<&e&l< &e&lTA &e&l>&f&l> Congratulations to clear! &6(Best Time:&l%{tickConvMSMS}%&6)"
| |
| 113 | else if {recordTA.%{_line2}%::%player%} > {countTA.%{_line2}%::%player%}:
| |
| 114 | tickConvMSMS({recordTA.%{_line2}%::%player%})
| |
| 115 | set {recordTA.%{_line2}%::%player%} to {countTA.%{_line2}%::%player%}
| |
| 116 | message "&f&l<&e&l< &e&lTA &e&l>&f&l> &3自己記録を更新しました! &d(旧自己最高:&l%{tickConvMSMS}%&6)"
| |
| 117 | message "&f&l<&e&l< &e&lTA &e&l>&f&l> &3タイムアタックお疲れ様でした!" | |
| 118 | command "/execute %player% ~ ~ ~ entity.enderdragon.ambient master @p ~ ~ ~ 1 2" | |
| 119 | wait 2 tick | |
| 120 | command "/execute %player% ~ ~ ~ entity.enderdragon.ambient master @p ~ ~ ~ 1 1.3" | |
| 121 | wait 2 tick | |
| 122 | command "/execute %player% ~ ~ ~ entity.player.levelup master @p ~ ~ ~ 1 1" | |
| 123 | set {goalTA.%{_line2}%::%player%} to false
| |
| 124 | set {enableTA.%{_line2}%::%player%} to false
| |
| 125 | set {countTA.%{_line2}%::%player%} to 0
| |
| 126 | if line 2 of event-block is "&7&l:. &cgoal &7&l.:": | |
| 127 | set {_line2} to line 3 of event-block
| |
| 128 | replace "&b" in {_line2} with ""
| |
| 129 | if {enableTA.%{_line2}%::%player%} is false:
| |
| 130 | message "&f&l<&e&l< &e&lTA &e&l>&f&l> &cタイムアタックを開始していません" | |
| 131 | stop | |
| 132 | if distance between event-block and player > 2: | |
| 133 | message "&f&l<&e&l< &e&lTA &e&l>&f&l> &c近くまで来てからクリックしてください" | |
| 134 | stop | |
| 135 | set {goalTA.%{_line2}%::%player%} to true
| |
| 136 | clear {checkpoint.%{cpselect::%{_player}%}%::%{_player}%}
| |
| 137 | if line 2 of event-block is "&8Right click w": | |
| 138 | if block below player is air: | |
| 139 | message "&c&l<&4&l<&4&l WP &4&l>&c&l> &c空中で設定することはできません!" | |
| 140 | stop | |
| 141 | set {_line2} to line 3 of event-block
| |
| 142 | replace "&b" in {_line2} with ""
| |
| 143 | set {checkpoint.%{_line2}%::%player%} to location of player
| |
| 144 | set {_line2} to line 3 of event-block
| |
| 145 | replace "&b" in {_line2} with ""
| |
| 146 | set {cpselect::%player%} to {_line2}
| |
| 147 | message "&f&l<&e&l< &f&lWP &e&l>&f&l> &aWaypoint has been saved &7(%{editcp.name::%player%}%)"
| |
| 148 | command "/execute %player% ~ ~ ~ entity.player.levelup master @p ~ ~ ~ 1 2" | |
| 149 | command "/execute %player% ~ ~ ~ entity.player.levelup master @p ~ ~ ~ 1 1.8" | |
| 150 | ||
| 151 | command /goal [<player>]: | |
| 152 | permission: skript.admin | |
| 153 | trigger: | |
| 154 | set {_player} to arg 1
| |
| 155 | if arg 1 is not set: | |
| 156 | set {_player} to player
| |
| 157 | clear {checkpoint.%{cpselect::%{_player}%}%::%{_player}%}
| |
| 158 | add 1 to {clear.%{cpselect::%{_player}%}%::%{_player}%}
| |
| 159 | ||
| 160 | command /checkpoint [<player>]: | |
| 161 | aliases: /cp | |
| 162 | trigger: | |
| 163 | set {_player} to arg 1
| |
| 164 | if arg 1 is not set: | |
| 165 | set {_player} to player
| |
| 166 | teleport {_player} to location of {checkpoint.%{cpselect::%{_player}%}%::%{_player}%}
| |
| 167 | ||
| 168 | command /item [<player>]: | |
| 169 | trigger: | |
| 170 | set {_player} to arg 1
| |
| 171 | if arg 1 is not set: | |
| 172 | set {_player} to player
| |
| 173 | - | set slot 1 of player to stick named "&cCheck&9Point" |
| 173 | + | set slot 1 of player to quartz named "&aWaypoint" |