This repository was archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhomev3.sk
More file actions
155 lines (143 loc) · 6.36 KB
/
homev3.sk
File metadata and controls
155 lines (143 loc) · 6.36 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#HomeV3 - home.sk、homev2を改良したSkript - Created by ringo360xd
#!=======[DO NOT EDIT]=======
Variables:
#*Prefix
{homev3.prefix} = "&a[&bHomeV3&a]&f"
options:
version: 3.0.1-stable
hv3api: https://github.com/MCSV-Network/HomeV3/raw/main/hv3version
#!=======[DO NOT EDIT]=======
#*==========[OPTIONS]==========
checkupdate: true #アップデートをチェックするか(デフォルト: true)
#*==========[OPTIONS]==========
#*NOTIFY UPDATE
on join:
if {hv3.update} is "true":
if player has permission "admin" or "homev3.update":
send "%{homev3.prefix}%&aNew version aviliable!"
send "&c{@version} &e-> &a%{hv3.latest}%"
send "&eType /hv3update to update!"
#!======================================[ON LOAD / SERVER START]======================================
on load:
if {hv3.version} is not set:
loop all players:
if loop-player has permission "admin":
send "%{homev3.prefix}%&"
send "%{homev3.prefix}%&eHomeV3を導入するには再起動が必要です!"
on skript load:
send "[HomeV3] Enabling HomeV3" to console
if file "plugins/Skript/scripts/core.sk" doesn't exist:
send "[HomeV3] oops! Core.sk doesn't exist."
send "[HomeV3] Downloading Core.sk..."
download file from "https://github.com/MCSV-Network/Core/raw/main/core.sk" to file "plugins/Skript/scripts/"
send "[HomeV3] Enabling Core.sk..."
reload script file "core.sk"
send "[HomeV3] Done!"
if directory "plugins/Skript/scripts/HomeV3" doesn't exist:
send "[HomeV3] oops! HomeV3 files doesn't exist."
send "[HomeV3] Downloading HomeV3 files..."
create directory "plugins/Skript/scripts/HomeV3"
download file from "https://github.com/MCSV-Network/HomeV3/raw/main/HomeV3/homev3-updater.sk" to file "plugins/Skript/scripts/HomeV3/homev3-updater.sk"
download file from "https://github.com/MCSV-Network/HomeV3/raw/main/HomeV3/homev3-functions.sk" to file "plugins/Skript/scripts/HomeV3/homev3-functions.sk"
download file from "https://github.com/MCSV-Network/HomeV3/raw/main/HomeV3/homev3-gui.sk" to file "plugins/Skript/scripts/HomeV3/homev3-gui.sk"
download file from "https://github.com/MCSV-Network/HomeV3/raw/main/HomeV3/homev3-main.sk" to file "plugins/Skript/scripts/HomeV3/homev3-main.sk"
send "[HomeV3] Enabling HomeV3 files..."
reload script "/HomeV3/homev3-functions.sk"
reload script "/HomeV3/homev3-gui.sk"
reload script "/HomeV3/homev3-main.sk"
reload script "/HomeV3/homev3-updater.sk"
send "[HomeV3] Done!"
set {hv3.version} to "{@version}"
send "[HomeV3] Successfully Enabled HomeV3" to console
send "&b=================" to console
send "&bHome&dV3 ({@version})" to console
send "Created by ringoXD" to console
send "Github: &bhttps://github.com/MCSV-Network/HomeV3" to console
send "&b=================" to console
#*CHECK UPDATE===
if {@checkupdate} is false:
delete {hv3.checkupdate}
if {@checkupdate} is true:
set {hv3.checkupdate} to true
send "[HomeV3] Checking Updates..." to console
set {_v} to text from url "{@hv3api}"
if {_v} is not set:
send "[HomeV3] Failed to check new version! Check internet connection." to console
stop
if {_v} = "{@version}":
send "[HomeV3] No updates aviliable." to console
if {hv3.update} is set:
send "[HomeV3] Updating HomeV3 scripts..." to console
delete file "plugins/Skript/scripts/HomeV3/homev3-functions.sk"
delete file "plugins/Skript/scripts/HomeV3/homev3-gui.sk"
delete file "plugins/Skript/scripts/HomeV3/homev3-main.sk"
delete file "plugins/Skript/scripts/HomeV3/homev3-updater.sk"
delete file "plugins/Skript/scripts/homev3.sk"
wait a tick
download file from "https://github.com/MCSV-Network/HomeV3/raw/main/homev3.sk" to file "plugins/Skript/scripts/homev3.sk"
download file from "https://github.com/MCSV-Network/HomeV3/raw/main/HomeV3/homev3-updater.sk" to file "plugins/Skript/scripts/HomeV3/homev3-updater.sk"
download file from "https://github.com/MCSV-Network/HomeV3/raw/main/HomeV3/homev3-functions.sk" to file "plugins/Skript/scripts/HomeV3/homev3-functions.sk"
download file from "https://github.com/MCSV-Network/HomeV3/raw/main/HomeV3/homev3-gui.sk" to file "plugins/Skript/scripts/HomeV3/homev3-gui.sk"
download file from "https://github.com/MCSV-Network/HomeV3/raw/main/HomeV3/homev3-main.sk" to file "plugins/Skript/scripts/HomeV3/homev3-main.sk"
send "[HomeV3] Reloading HomeV3 sub files..." to console
reload script "/HomeV3/homev3-functions.sk"
reload script "/HomeV3/homev3-gui.sk"
reload script "/HomeV3/homev3-main.sk"
reload script "/HomeV3/homev3-updater.sk"
send "[HomeV3] Done!" to console
delete {hv3.update}
delete {hv3.latest}
send "[HomeV3] Reloading homev3.sk..." to console
reload script "homev3.sk"
else:
send "[HomeV3] New version aviliable! {@version} -> %{_v}%" to console
set {hv3.update} to true
set {hv3.latest} to {_v}
send "Type /hv3update to update!" to console
#!======================================[ON LOAD / SERVER START]======================================
#!======================================[CHECK UPDATE]======================================
every hour:
if {@checkupdate} is true:
set {hv3.checkupdate} to true
send "[HomeV3] Checking Updates..." to console
set {_v} to text from url "{@hv3api}"
if {_v} is not set:
send "[HomeV3] Failed to check new version! Check internet connection." to console
stop
if {_v} = "{@version}":
send "[HomeV3] No updates aviliable." to console
else:
send "[HomeV3] New version aviliable! {@version} -> %{_v}%" to console
set {hv3.update} to true
set {hv3.latest} to {_v}
send "Type /hv3update to update!" to console
#!======================================[CHECK UPDATE]======================================
command /hv3update:
permission: admin
trigger:
hv3updater(player)
command /hv3man [<text>] [<text>]:
permission: admin
trigger:
if command sender is not console:
send "&cコンソールからのみ実行できます!" to sender
stop
if arg-1 is not set:
send "Usage: /hv3man reload (main/function/gui)"
stop
if arg-1 is "reload":
if arg-2 is not set:
send "Incorrect arguments."
stop
if arg-2 is "main":
reload script file "/HomeV3/homev3-main.sk"
send "Success!"
stop
if arg-2 is "function":
reload script file "/HomeV3/homev3-functions.sk"
send "Success!"
stop
if arg-2 is "gui":
reload script file "/HomeV3/homev3-gui.sk"
send "Success!"
stop