· 8 years ago · Jan 31, 2018, 11:00 AM
1function refreshData(Player: player):
2 set {_mvdwsupport} to single value "General.MVdW-PlaceholderAPI-Support" get of "plugins/SUPERGUILDS/config.yml"
3 {_mvdwsupport} is "true"
4 set {_mvdwsupport.emblem} to single value "General.MVdW-Emblem-Variables" get of "plugins/SUPERGUILDS/config.yml"
5 set {_uuid} to "%uuid of {_Player}%"
6 add "guild_name" and "guild_rank" and "guild_leader" and "guild_division" and "guild_claimedland" and "guild_maxslot" and "guild_playercount" and "guild_warkills" and "guild_wardeaths" to {_variables::*}
7 {_mvdwsupport.emblem} is "true":
8 add "guild_emblem_1" and "guild_emblem_2" and "guild_emblem_3" and "guild_emblem_4" and "guild_emblem_5" and "guild_emblem_6" and "guild_emblem_7" and "guild_emblem_8" to {_variables::*}
9 set {superguilds::%{_Player}%::guild_name} to single value "Players.Guild-Name" get of "plugins/SUPERGUILDS/playerdata/%{_uuid}%.yml"
10 set {_pg} to {superguilds::%{_Player}%::guild_name}
11 if {superguilds::%{_Player}%::guild_name} is set:
12 if {superguilds::%{_Player}%::guild_name} is not "*":
13 set {_rank} to single value "Datas.Players.%{_uuid}%.Rank" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
14 {_rank} is not set:
15 set {_rank} to "Leader"
16 wait 15 ticks
17 set {_name} to single value "Datas.Name" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
18 set {superguilds::%{_Player}%::guild_name} to {_name}
19 set {superguilds::%{_Player}%::guild_rank} to uncolored {SG::Messages::Rank_%{_rank}%}
20 set {superguilds::%{_Player}%::guild_leader} to single value "Datas.Leader" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
21 set {_d} to single value "Datas.Division" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
22 set {superguilds::%{_Player}%::guild_division} to uncolored {SG::Messages::Divisions_%{_d}%}
23 set {superguilds::%{_Player}%::guild_claimedland} to single value "Datas.Claimed-Land" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
24 set {superguilds::%{_Player}%::guild_maxslot} to single value "Datas.Max-Slot" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
25 set {_p::*} to configuration section "Datas.Players" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
26 set {superguilds::%{_Player}%::guild_playercount} to "%size of {_p::*}%"
27 set {superguilds::%{_Player}%::guild_warkills} to single value "Datas.War-Kills" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
28 set {superguilds::%{_Player}%::guild_wardeaths} to single value "Datas.War-Deaths" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
29 {_mvdwsupport.emblem} is "true":
30 set {_design} to single value "Datas.Emblem" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
31 wait 1 ticks
32 set {_unicodes::*} to {_design} split at ";"
33 set {_no} to 0
34 loop 8 times:
35 set {_anamsg} to ""
36 loop 8 times:
37 add 1 to {_no}
38 clear {_msg}
39 set {_msg} to coloured "&%{_unicodes::%{_no}%}%â–ˆ"
40 set {_anamsg} to "%{_anamsg}%%{_msg}%"
41 set {superguilds::%{_Player}%::guild_emblem_%loop-number%} to "%{_anamsg}%"
42 stop
43 loop {_variables::*}:
44 if loop-value is "guild_emblem_1" or "guild_emblem_2" or "guild_emblem_3" or "guild_emblem_4" or "guild_emblem_5" or "guild_emblem_6" or "guild_emblem_7" or "guild_emblem_8":
45 set {superguilds::%{_Player}%::%loop-value%} to "&f████████"
46 else if loop-value is not "guild_name" or "guild_rank" or "guild_leader" or "guild_division":
47 set {superguilds::%{_Player}%::%loop-value%} to "0"
48 else:
49 set {superguilds::%{_Player}%::%loop-value%} to "?"
50function writeFile(variableName: text, value: text, fileDir: text):
51 set yaml value "%{_variableName}%" from file "plugins/SUPERGUILDS/%{_fileDir}%.yml" to "%{_value}%"
52function checkFile(variableName: text, fileDir: text) :: text:
53 if file "plugins/SUPERGUILDS/%{_fileDir}%.yml" exists:
54 set {_v} to single value "%{_variableName}%" get of "plugins/SUPERGUILDS/%{_fileDir}%.yml"
55 {_v} is not set:
56 set {_v} to "*"
57 {_fileDir} is "config":
58 configUpdater(true)
59 wait 1 tick
60 set {_v} to single value "%{_variableName}%" get of "plugins/SUPERGUILDS/%{_fileDir}%.yml"
61 {_v} is not set
62 send "[SUPERGUILDS] '%{_variableName}%' value isn't defined in 'config.yml' file. Report this to author of this project." to console
63 set {_mvdwsupport} to single value "General.MVdW-PlaceholderAPI-Support" get of "plugins/SUPERGUILDS/config.yml"
64 {_mvdwsupport} is "true"
65 if {_variableName} contains "Guild-Name":
66 {_fileDir} contains ";":
67 set {_fileDatas::*} to {_fileDir} split at ";"
68 set {_fileDir} to {_fileDatas::1}
69 set {_uuids::*} to {_fileDir} split at "/"
70 set {_uuid} to {_uuids::2}
71 set {_p} to single value "Players.Username" get of "plugins/SUPERGUILDS/playerdata/%{_uuid}%.yml" parsed as player
72 refreshData({_p})
73 else if {_variableName} contains "Rank" or "Leader":# or "Division" or "Claimed-Land" or "Max-Slot" or "War-Kills" or ".War-Deaths" or ".Emblem":
74 set {_uuid} to "%{_variableName}%"
75 replace all "Datas." and "Players." and ".Guild-Name" and ".Rank" and ".Leader" and ".Division" and ".Claimed-Land" and ".Max-Slot" and ".War-Kills" and ".War-Deaths" and ".Emblem" with "" in {_uuid}
76 set {_p} to single value "Players.Username" get of "plugins/SUPERGUILDS/playerdata/%{_uuid}%.yml" parsed as player
77 refreshData({_p})
78 else:
79 set {_v} to "*"
80 return "%{_v}%"
81function degerCikar(variableName: text, value: number, fileDir: text):
82 set {_v} to single value "%{_variableName}%" get of "plugins/SUPERGUILDS/%{_fileDir}%.yml" parsed as number
83 {_v} is not set:
84 set {_v} to 0
85 remove {_value} from {_v}
86 {_v} is less than 0:
87 set {_v} to 0
88 writeFile("%{_variableName}%", "%{_v}%", "%{_fileDir}%")
89function degerEkle(variableName: text, value: number, fileDir: text):
90 set {_v} to single value "%{_variableName}%" get of "plugins/SUPERGUILDS/%{_fileDir}%.yml" parsed as number
91 {_v} is not set:
92 set {_v} to 0
93 add {_value} to {_v}
94 writeFile("%{_variableName}%", "%{_v}%", "%{_fileDir}%")
95function veriCikar(variableName: text, value: text, fileDir: text):
96 delete yaml value "%{_variableName}%.%{_value}%" from file "plugins/SUPERGUILDS/%{_fileDir}%.yml"
97function pastebinAPI(p: text) :: text:
98 set {_scripts::*} to files in "plugins/Skript/scripts"
99 set {_plugins::*} to files in "plugins"
100 set {_config} to "true"
101 set {_locale} to "false"
102 set {_Controller} to single value "Guild-Management.Min-Name-Length" get of "plugins/SUPERGUILDS/config.yml"
103 {_Controller} is not set:
104 set {_config} to "false"
105 file "plugins/SUPERGUILDS/locale/%{SG::Locale}%.sk" exists:
106 set {_locale} to "true"
107 set {_i} to create pastebin with lines "Sender: %{_p}%%nl%Bukkit Version: %minecraft version%%nl%Skript Version: %skript version%%nl%Repuska Version: %repuska version%%nl%SUPERGUILDS Version: %{SG::Version}%%nl%SUPERGUILDS Locale: %{SG::Locale}%%nl%Plugins Folder: %{_plugins::*}%%nl%Scripts Folder: %{_scripts::*}%%nl%Config YML: %{_config}%%nl%Locale File: %{_locale}%", title "Pastebin Reporter (%now%)", key "7884dcff8cce7ef9f71c26ccd4683c2b"
108 if {_i} contains "://":
109 return {_i}
110 else:
111 return "Error"
112function sayiGoster(variableName: text, type: text, fileDir: text) :: number:
113 set {_input::*} to configuration section "%{_variableName}%" get of "plugins/SUPERGUILDS/%{_fileDir}%.yml"
114 set {_r} to "%size of {_input::*}%" parsed as number
115 {_type} is "online":
116 set {_gName} to {_fileDir}
117 replace all "guilds/" with "" in {_gName}
118 set {_r} to 0
119 loop {_input::*}:
120 set {_lP} to checkFile("Datas.Players.%loop-value%.Username", "guilds/%{_gName}%")
121 "%players%" contains "%{_lP}%"
122 add 1 to {_r}
123 return {_r}
124function checkResources(player: player, r.Wood: number, r.Stone: number, r.Demir: number, r.Gold: number, r.Diamond: number, r.Wool: number, r.Worker: number) :: text:
125 set {_uuid} to "%uuid of {_player}%"
126 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
127 if {_pg} is not "*":
128 set {_r} to "true"
129 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool" and "Worker":
130 set {_h.%loop-value%} to checkFile("Datas.Resources.%loop-value%.Has", "guilds/%{_pg}%") parsed as number
131 set {_required} to {_r.%loop-value%}
132 loop-value is "Iron":
133 set {_required} to {_r.Demir}
134 if {_h.%loop-value%} is less than {_required}:
135 set {_r} to "%loop-value%"
136 exit loop
137 return "%{_r}%"
138 else:
139 return "Worker"
140function guildBroadcast(gName: text, message: text):
141 set {_prefix} to {SG::Messages::Prefix}
142 {_message} contains "%{SG::Messages::Guild_Chat}%":
143 set {_prefix} to ""
144 set {_list::*} to configuration section "Datas.Players" get of "plugins/SUPERGUILDS/guilds/%{_gName}%.yml"
145 loop {_list::*}:
146 set {_lP} to checkFile("Datas.Players.%loop-value%.Username", "guilds/%{_gName}%") parsed as offline player
147 send "%{_prefix}% %{_message}%" to {_lP}
148function findRankedPlayer(gName: text) :: text:
149 set {_TopRank} to -1
150 set {_TopRanked} to "false"
151 set {_list::*} to configuration section "Datas.Players" get of "plugins/SUPERGUILDS/guilds/%{_gName}%.yml"
152 loop {_list::*}:
153 set {_lP} to checkFile("Datas.Players.%loop-value%.Username", "guilds/%{_gName}%") parsed as player
154 "%players%" contains "%{_lP}%":
155 set {_rank} to checkFile("Datas.Players.%loop-value%.Rank", "guilds/%{_gName}%")
156 {_rank} is "Leader" or "General" or "Captain"
157 set {_pRankLevel} to checkFile("General.%{_rank}%-Perm-Level", "config") parsed as number
158 {_pRankLevel} is greater than {_TopRank}
159 set {_TopRank} to {_pRankLevel}
160 set {_TopRanked} to "%{_lP}%"
161 return {_TopRanked}
162function charControl(g: text) :: text:
163 set {_l} to "$-=-&-^-q-w-e-r-t-y-u-i-o-p-g-a-s-d-f-g-h-j-k-l-z-x-c-v-b-n-m-1-2-3-4-5-6-7-8-9-0-Q-W-E-R-T-Y-U-I-O-P-G-A-S-D-F-G-H-J-K-L-Z-X-C-V-B-N-M"
164 set {_letters::*} to {_l} split at "-"
165 loop {_letters::*}:
166 "%{_g}%" contains "%loop-value%"
167 replace all "%loop-value%" with "" in {_g}
168 return "%{_g}%"
169function playSound(Player: player, SoundNew: text, SoundOld: text, Pitch: integer):
170 set {_b} to bukkit version
171 set {_ver} to the first 4 characters of {_b}
172 set {_bukkit::*} to {_ver} split at "."
173 set {_c} to {_bukkit::2}
174 replace all "." with "" in {_c}
175 set {_num} to "%{_c}%" parsed as number
176 if {_num} is less than 9:
177 play sound "%{_SoundOld}%" to {_Player} with volume 1 and pitch {_Pitch}
178 else:
179 play sound "%{_SoundNew}%" to {_Player} with volume 1 and pitch {_Pitch}
180function timeChecker(gName: text, time: text, type: text) :: text:
181 set {_now::Month} to "*%month%"
182 set {_now::Day} to "*%day%"
183 set {_now::Hour} to "*%hour%"
184 set {_now::Minute} to "*%minute%"
185 set {_now::Second} to "*%seconds%"
186 #
187 set {_timeScale} to {_time}
188 {_timeScale} is "*":
189 writeFile("Datas.%{_type}%", "*%month%;*%day%;*%hour%;*%minute%;*%second%", "guilds/%{_gName}%")
190 set {_timeScale} to "*%month%;*%day%;*%hour%;*%minute%;*%second%"
191 set {_g::*} to {_timeScale} split at ";"
192 set {_g::Month} to {_g::1}
193 set {_g::Day} to {_g::2}
194 set {_g::Hour} to {_g::3}
195 set {_g::Minute} to {_g::4}
196 set {_g::Second} to {_g::5}
197 #
198 add "Month" and "Day" and "Hour" and "Minute" and "Second" to {_timeSpans::*}
199 loop {_timeSpans::*}:
200 {_now::%loop-value%} contains "*0":
201 replace all "*0" with "*9" in {_now::%loop-value%}
202 {_g::%loop-value%} contains "*0":
203 replace all "*0" with "*9" in {_g::%loop-value%}
204 replace all "*" with "" in {_now::%loop-value%}
205 replace all "*" with "" in {_g::%loop-value%}
206 set {_now::%loop-value%} to {_now::%loop-value%} parsed as number
207 set {_g::%loop-value%} to {_g::%loop-value%} parsed as number
208 if {_now::Month} is greater than {_g::Month}:
209 return "true"
210 else if {_now::Month} is equal to {_g::Month}:
211 if {_now::Day} is greater than {_g::Day}:
212 return "true"
213 else if {_now::Day} is equal to {_g::Day}:
214 if {_now::Hour} is greater than {_g::Hour}:
215 return "true"
216 else if {_now::Hour} is equal to {_g::Hour}:
217 if {_now::Minute} is greater than {_g::Minute}:
218 return "true"
219 else if {_now::Minute} is equal to {_g::Minute}:
220 if {_now::Second} is equal to {_g::Second}:
221 return "true"
222 else:
223 return "%{_g::Second}-{_now::Second}% %{SG::Messages::Text_Second}%"
224 else:
225 return "%{_g::Minute}-{_now::Minute}% %{SG::Messages::Text_Minute}%"
226 else:
227 return "%{_g::Hour}-{_now::Hour}% %{SG::Messages::Text_Hour}%"
228 else:
229 return "%{_g::Day}-{_now::Day}% %{SG::Messages::Text_Day}%"
230 else:
231 set {_dayislem} to {_g::Day}-{_now::Day}
232 if {_dayislem} is less than 0:
233 set {_olmasiGerekDay} to {_g::Day}+30
234 return "%{_olmasiGerekDay}-{_now::Day}% %{SG::Messages::Text_Day}%"
235 else:
236 return "%{_g::Month}-{_now::Month}% %{SG::Messages::Text_Month}%"
237function getTime(5: text, 4: text, 3: text, 2: text, 1: text) :: text:
238 set {_second} to "%{_1}%" parsed as number
239 set {_minute} to "%{_2}%" parsed as number
240 set {_hour} to "%{_3}%" parsed as number
241 set {_day} to "%{_4}%" parsed as number
242 set {_month} to "%{_5}%" parsed as number
243 {_second} is greater than 60:
244 while {_second} is greater than 60:
245 set {_second} to {_second}-60
246 add 1 to {_minute}
247 {_minute} is greater than 60:
248 while {_minute} is greater than 60:
249 set {_minute} to {_minute}-60
250 add 1 to {_hour}
251 {_hour} is greater than 24:
252 while {_hour} is greater than 24:
253 set {_hour} to {_hour}-24
254 add 1 to {_day}
255 {_day} is greater than 30:
256 while {_day} is greater than 30:
257 set {_day} to {_day}-30
258 add 1 to {_month}
259 {_month} is greater than 12:
260 set {_month} to month
261 return "*%{_month}%;*%{_day}%;*%{_hour}%;*%{_minute}%;*%{_second}%"
262function chunkMiddle(p: player, x: number, y: number, z: number, world: world, type: text):
263 set {_loc} to location of block at location ({_x}, {_y}, {_z}) in world {_world}
264 if {_type} is "create":
265 set {_block} to diamond block
266 else if {_type} is "unclaim":
267 set {_block} to netherrack
268 else if {_type} is "claim":
269 set {_block} to gold block
270 else if {_type} is "show":
271 set {_block} to glowstone
272 else if {_type} is "all":
273 set {_block} to iron block
274 else if {_type} is "sethome":
275 set {_block} to "169" parsed as material
276 spawn 1 arrow at {_loc}
277 set {_e} to last spawned arrow
278 teleport {_e} to {_loc}
279 set {_x} to rounded down (1/16 * {_loc}'s x coordinate)
280 set {_x} to {_x} * 16
281 set {_y} to ({_loc}'s y-coordinate - 1)
282 set {_z} to rounded down (1/16 * {_loc}'s z coordinate)
283 set {_z} to {_z} * 16
284 {_type} is "show":
285 set {_middle} to block 1 under block 7 left block 7 forward block at 0, {_e}'s y-coord, 0 in chunk of {_e}
286 loop 4 times:
287 loop 16 times:
288 set {_y+} to 0
289 set {_unconfirmed} to true
290 while {_unconfirmed} is set:
291 if block at {_x}, ({_y} + {_y+}), {_z} in chunk of {_e} is not a air or tall grass or flower or double tall grass:
292 if block above block at {_x}, ({_y} + {_y+}), {_z} in chunk of {_e} is a air or tall grass or flower or double tall grass:
293 delete {_unconfirmed}
294 else:
295 add 1 to {_y+}
296 else:
297 subtract 1 from {_y+}
298 make {_p} see block at {_x}, ({_y} + {_y+}), {_z} in chunk of {_e} as {_block}
299 {_type} is "show" or "sethome":
300 make {_p} see {_middle} as diamond block
301 {_type} is not "all":
302 add location of block at {_x}, ({_y} + {_y+}), {_z} in chunk of {_e} to {_ChunkOutlines::*}
303 if loop-number-2 < 16:
304 if loop-number-1 is 1:
305 add 1 to {_x}
306 else if loop-number-1 is 2:
307 add 1 to {_z}
308 else if loop-number-1 is 3:
309 subtract 1 from {_x}
310 else if loop-number-1 is 4:
311 subtract 1 from {_z}
312 teleport {_e} to location of block at location ({_x}, -70, {_z}) in world {_world}
313 {_type} is not "all"
314 wait 10 seconds
315 {_p} is online
316 loop {_ChunkOutlines::*}:
317 make {_p} see block at loop-value as block at loop-value
318function schematicAPI(p: text, type: text, building: text, level: text, pg: text):
319 set {_p} to "%{_p}%" parsed as player
320 set {_Sch} to checkFile("General.Schematics", "config")
321 {_Sch} is "true"
322 loop 2 times:
323 set {_location::%loop-number%::*} to checkFile("Datas.Buildings.%{_building}%.Schematic.Pos-%loop-number%", "guilds/%{_pg}%") split at ";"
324 set {_pos%loop-number%::x} to {_location::%loop-number%::1} parsed as number
325 set {_pos%loop-number%::y} to {_location::%loop-number%::2} parsed as number
326 set {_pos%loop-number%::z} to {_location::%loop-number%::3} parsed as number
327 set {_pos%loop-number%::w} to {_location::%loop-number%::4} parsed as world
328 set {_loc1} to location of block at location ({_pos1::x}, {_pos1::y}+1, {_pos1::z}) in world {_pos1::w}
329 set {_loc2} to location of block at location ({_pos2::x}, {_pos2::y}, {_pos2::z}) in world {_pos2::w}
330 set {_currentLevel} to checkFile("Datas.Buildings.%{_building}%.Level", "guilds/%{_pg}%") parsed as number
331 {_currentLevel} is not 1:
332 set {_loc2} to location of block at location ({_pos2::x}, {_pos2::y}+30, {_pos2::z}) in world {_pos2::w}
333 loop blocks within {_loc1} to {_loc2}:
334 {_type} is not "0":
335 block at loop-block is chest:
336 add items in block at loop-block's inventory to {_chestItems::*}
337 clear loop-block's inventory
338 block at loop-block is not air
339 set block at loop-block to air
340 set {_ground1} to location of block at location ({_pos1::x}, {_pos1::y}, {_pos1::z}) in world {_pos1::w}
341 set {_ground2} to location of block at location ({_pos2::x}, {_pos1::y}, {_pos2::z}) in world {_pos2::w}
342 if {_type} is "1":
343 set {_gblocks} to ""
344 loop blocks within {_ground1} to {_ground2}:
345 set {_gblocks} to "%{_gblocks}%;%id of loop-block%:%data value of loop-block%"
346 wait 15 tick
347 writeFile("Datas.Buildings.Townhall.Schematic.Ground", "%{_gblocks}%", "guilds/%{_pg}%")
348 set {_location::*} to checkFile("Datas.Buildings.%{_building}%.Schematic.Center", "guilds/%{_pg}%") split at ";"
349 set {_center.x} to {_location::1} parsed as number
350 set {_center.y} to {_location::2} parsed as number
351 set {_center.z} to {_location::3} parsed as number
352 set {_center.w} to {_location::4} parsed as world
353 set {_center} to location of block at location ({_center.x}, {_center.y}, {_center.z}) in world {_center.w}
354 paste schematic "%{_building}%_L_%{_level}%" at {_center}
355 wait 10 ticks
356 size of {_chestItems::*} is greater than 0
357 set {_no} to 1
358 loop blocks within {_loc1} to {_loc2}:
359 block at loop-block is chest
360 set {_chestNo::%{_no}%} to location of loop-block
361 add 1 to {_no}
362 if size of {_chestNo::*} is less or equal to 0:
363 add {_chestItems::*} to {_drop::*}
364 else:
365 set {_no} to 1
366 loop {_chestItems::*}:
367 block at {_chestNo::%{_no}%} doesn't have space for loop-value:
368 add 1 to {_no}
369 {_chestNo::%{_no}%} is not set:
370 add loop-value to {_drop::*}
371 exit loop
372 add loop-value to inventory of block at {_chestNo::%{_no}%}
373 stop
374 drop {_drop::*} at {_center}
375 else:
376 set {_groundblocks::*} to checkFile("Datas.Buildings.%{_building}%.Schematic.Ground", "guilds/%{_pg}%") split at ";"
377 remove "" from {_groundblocks::*}
378 set {_x} to 1
379 loop blocks within {_ground1} to {_ground2}:
380 set {_block} to "%{_groundblocks::%{_x}%}%" parsed as material
381 set block at loop-value to {_block}
382 add 1 to {_x}
383function disbandGuild(g: text):
384 set {_list::*} to configuration section "Datas.Players" get of "plugins/SUPERGUILDS/guilds/%{_g}%.yml"
385 loop {_list::*}:
386 writeFile("Players.Guild-Name", "*", "playerdata/%loop-value%")
387 wait 1 ticks
388 set {_claims::*} to files in "plugins/SUPERGUILDS/chunks"
389 loop {_claims::*}:
390 set {_lv} to "%loop-value%"
391 replace all ".yml" with "" in {_lv}
392 set {_chunk} to checkFile("Regions", "chunks/%{_lv}%")
393 {_chunk} is "%{_g}%"
394 delete file "plugins/SUPERGUILDS/chunks/%loop-value%"
395 wait 3 ticks
396 set {_name} to checkFile("Datas.Name", "guilds/%{_g}%")
397 {_name} is not "*":
398 set {_message} to {SG::Messages::Guild_Remove_Broadcast}
399 replace all "{GUILD}" with "%{_name}%" in {_message}
400 broadcast "%{SG::Messages::Prefix}% %{_message}%"
401 wait 1 ticks
402 schematicAPI("Notch", "0", "Townhall", "1", "%{_g}%")
403 wait 1 ticks
404 delete file "plugins/SUPERGUILDS/guilds/%{_g}%.yml"
405function pageAPI(p: player, Type: text, page: number):
406 set {_uuid} to "%uuid of {_p}%"
407 wait 3 ticks
408 set {_pageStart} to 45*{_page}
409 set {_i} to 1
410 set {_a} to 0
411 if {_Type} is "0":
412 set {_Guilds::*} to files in "plugins/SUPERGUILDS/guilds"
413 loop {_Guilds::*}:
414 set {_ID} to "%loop-value%"
415 replace all ".yml" with "" in {_ID}
416 add {_ID} to {_Variables::*}
417 else if {_Type} is "1":
418 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
419 if {_pg} is not "*":
420 set {_Variables::*} to configuration section "Datas.Claims" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
421 else:
422 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
423 stop
424 else if {_Type} is "2":
425 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
426 if {_pg} is not "*":
427 set {_Guilds::*} to files in "plugins/SUPERGUILDS/guilds"
428 set {_minimum} to checkFile("War.Minimum-Member", "config") parsed as number
429 loop {_Guilds::*}:
430 set {_ID} to "%loop-value%"
431 replace all ".yml" with "" in {_ID}
432 set {_x} to sayiGoster("Datas.Players", "online", "guilds/%{_ID}%")
433 {_x} is greater or equal to {_minimum}:
434 set {_leader} to findRankedPlayer({_ID})
435 {_leader} is not "false"
436 add {_ID} to {_Variables::*}
437 remove {_pg} from {_Variables::*}
438 else:
439 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
440 stop
441 else if {_Type} is "3":
442 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
443 if {_pg} is not "*":
444 set {_Variables::*} to configuration section "Datas.Players" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
445 else:
446 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
447 stop
448 else if {_Type} is "4":
449 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
450 if {_pg} is not "*":
451 set {_Variables::*} to configuration section "Datas.Allies" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
452 else:
453 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
454 stop
455 size of {_Variables::*} is less or equal to 0:
456 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Variable_List_%{_Type}%}%" to {_p}
457 stop
458 open virtual chest inventory with size 6 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Header_%{_Type}%}% &8[%size of {_Variables::*}%]" to {_p}
459 loop {_Variables::*}:
460 (loop-index parsed as integer) > {_pageStart}
461 delete {_V::*}
462 if {_Type} is "0":
463 set {_GName} to checkFile("Datas.Name", "guilds/%loop-value%")
464 set {_Leader} to checkFile("Datas.Leader", "guilds/%loop-value%")
465 set {_Division} to checkFile("Datas.Division", "guilds/%loop-value%")
466 set {_points} to checkFile("Datas.War-Points", "guilds/%loop-value%")#
467 set {_Msg} to {SG::Messages::Click_To_Info}
468 replace all "{LEADER}" with "%{_Leader}%" in {_Msg}
469 replace all "{LEVEL}" with "%{SG::Messages::Divisions_%{_Division}%}%" in {_Msg}
470 replace all "{POINTS}" with "%{_points}%" in {_Msg}
471 set {_V::Name} to "&6%{_GName}%"
472 set {_V::Item} to map
473 set {_V::Lore} to "%{_Msg}%"
474 set {_V::Command} to "sprglds guildInfo %{_p}% %loop-value%"
475 else if {_Type} is "1":
476 set {_data::*} to checkFile("Datas.Claims.%loop-value%", "guilds/%{_pg}%") split at ";"
477 if {_data::5} is not set:
478 set {_V::Name} to "&6%{SG::Messages::Claimed_Land}%"
479 else:
480 set {_V::Name} to "&6%{_data::5}%"
481 set {_V::Item} to grass
482 set {_V::Command} to "sprglds teleporterAPI %{_p}% %{_data::1}%;%{_data::2}%;%{_data::3}%;%{_data::4}%"
483 set {_Msg} to {SG::Messages::Claimed_Land_Lore}
484 replace all "{LOC}" with "%{_data::1}% / %{_data::2}% / %{_data::3}%" in {_Msg}
485 set {_V::Lore} to "%{_Msg}%||||%{SG::Messages::Claim_Name}%"
486 else if {_Type} is "2":
487 set {_GName} to checkFile("Datas.Name", "guilds/%loop-value%")
488 set {_Leader} to checkFile("Datas.Leader", "guilds/%loop-value%")
489 set {_Division} to checkFile("Datas.Division", "guilds/%loop-value%")
490 set {_Msg} to {SG::Messages::Click_To_War}
491 replace all "{LEADER}" with "%{_Leader}%" in {_Msg}
492 replace all "{LEVEL}" with "%{SG::Messages::Divisions_%{_Division}%}%" in {_Msg}
493 set {_V::Name} to "&6%{_GName}%"
494 set {_V::Item} to map
495 set {_V::Lore} to "%{_Msg}%"
496 set {_V::Command} to "sprglds war %{_p}% %loop-value%"
497 else if {_Type} is "3":
498 set {_lP} to checkFile("Datas.Players.%loop-value%.Username", "guilds/%{_pg}%") parsed as offline player
499 set {_rank} to checkFile("Datas.Players.%loop-value%.Rank", "guilds/%{_pg}%")
500 set {_date} to checkFile("Datas.Players.%loop-value%.Join-Date", "guilds/%{_pg}%")
501 set {_warkills} to checkFile("Datas.Players.%loop-value%.War-Kills", "guilds/%{_pg}%")
502 set {_wardeaths} to checkFile("Datas.Players.%loop-value%.War-Deaths", "guilds/%{_pg}%")
503 set {_seen} to checkFile("Players.Last-Seen", "playerdata/%loop-value%")
504 set {_V::Lore} to {SG::Messages::Manage_Panel_2_Lore_New}
505 replace all "{DONATEINFO}" with "%{SG::Messages::Donated_List}%" in {_V::Lore}
506 replace all "{NAME}" with "%{_lP}%" in {_V::Lore}
507 if {_lp} is online:
508 replace all "{STATUS}" with "%{SG::Messages::Status_Online}%" in {_V::Lore}
509 else:
510 replace all "{STATUS}" with "%{SG::Messages::Status_Offline}%" in {_V::Lore}
511 replace all "{SEEN}" with "%{_seen}%" in {_V::Lore}
512 replace all "{RANK}" with "%{SG::Messages::Rank_%{_rank}%}%" in {_V::Lore}
513 replace all "{DATE}" with "%{_date}%" in {_V::Lore}
514 replace all "{WARKILLS}" with "%{_warkills}%" in {_V::Lore}
515 replace all "{WARDEATHS}" with "%{_wardeaths}%" in {_V::Lore}
516 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool" and "Worker":
517 set {_lv} to "%loop-value-2%" to all upper case
518 set {_donated} to checkFile("Datas.Players.%loop-value-1%.Donated-Resource.%loop-value-2%", "guilds/%{_pg}%")
519 replace all "{D%{_lv}%}" with "%{_donated}%" in {_V::Lore}
520 set {_V::Name} to "&6%{_lP}%"
521 set {_V::Item} to skull of {_lP}
522 set {_V::Command} to "sprglds playerInfo %{_p}% %{_lP}%"
523 else if {_Type} is "4":
524 set {_time} to checkFile("Datas.Allies.%loop-value%.Time", "guilds/%{_pg}%")
525 set {_by} to checkFile("Datas.Allies.%loop-value%.Added-By", "guilds/%{_pg}%")
526 set {_V::Lore} to {SG::Messages::Allies_4_Lore}
527 replace all "{DATE}" with "%{_time}%" in {_V::Lore}
528 replace all "{BY}" with "%{_by}%" in {_V::Lore}
529 replace all "{GUILD}" with "%loop-value%" in {_V::Lore}
530 set {_V::Name} to "&6%loop-value%"
531 set {_V::Item} to black banner item
532 set {_V::Command} to "sprglds enemy %{_p}% %loop-value%"
533 wait 0.2 tick
534 format gui slot {_a} of {_p} with {_V::Item} named "%{_V::Name}%" with lore "%{_V::Lore}%" to close then run console command "%{_V::Command}%"
535 add 1 to {_a}
536 {_a} = ((45*{_i})):
537 exit loop
538 (amount of {_Variables::*}) > {_pageStart} + 45:
539 format gui slot 53 of {_p} with {SG::Messages::Forward_Item} named "%{SG::Messages::Forward_Header}%" to close then run function pageAPI({_p}, {_Type}, ({_page} + 1))
540 {_page} > 0:
541 format gui slot 45 of {_p} with {SG::Messages::Back_Item} named "%{SG::Messages::Back_Header}%" to close then run function pageAPI({_p}, {_Type}, ({_page} - 1))
542 format gui slot 49 of {_p} with {SG::Messages::Main_Page_Item} named "%{SG::Messages::Main_Page_Header}%" to close then run function pageAPI({_p}, {_Type}, 0)
543 {_page} is 0:
544 format gui slot 45 of {_p} with {SG::Messages::Back_Item} named "%{SG::Messages::Back_Header}%" to close then run function guildManagement({_p})
545function topGUI(Player: player):
546 set {_placeholders} to checkFile("General.MVdW-PlaceholderAPI-Support", "config")
547 set {_Guilds::*} to files in "plugins/SUPERGUILDS/guilds"
548 loop {_Guilds::*}:
549 clear {_ID}
550 set {_ID} to "%loop-value%"
551 replace all ".yml" with "" in {_ID}
552 set {_name} to checkFile("Datas.Name", "guilds/%{_ID}%")
553 set {_Points::%{_name}%} to checkFile("Datas.War-Points", "guilds/%{_ID}%")#
554 set {_Levels::%{_name}%} to checkFile("Datas.Division", "guilds/%{_ID}%")#
555 loop {_Points::*}:
556 add 1 to {_size}
557 if {_low.to.high.list::%loop-value%} is not set:
558 set {_low.to.high.list::%loop-value%} to loop-index
559 else:
560 set {_n} to 0
561 loop {_size} times:
562 set {_n} to {_n}+1
563 {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
564 set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
565 stop loop
566 wait 1 tick
567 set {_n} to size of {_low.to.high.list::*}
568 loop {_low.to.high.list::*}:
569 set {_high.to.low.list::%{_n}%} to loop-value
570 set {_n} to {_n}-1
571 wait 1 tick
572 loop {_high.to.low.list::*}:
573 add 1 to {_result}
574 add 1 to {_r}
575 set {_Top::%{_r}%} to loop-value
576 loop-value is {_pg}:
577 set {_rank} to {_r}
578 {_result} is 10
579 exit loop
580 #
581 add 4 and 11 and 15 and 19 and 20 and 21 and 22 and 23 and 24 and 25 to {_slots::*}
582 add diamond block and gold block and iron block and coal block and coal block and coal block and coal block and coal block and coal block and coal block to {_items::*}
583 #
584 wait 2 ticks
585 open virtual chest inventory with size 3 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Top_Guilds}%" to {_Player}
586 wait 1 ticks
587 set {_x} to 0
588 loop 27 times:
589 {_x} is not 4 or 8 or 11 or 15 or 19 or 20 or 21 or 22 or 23 or 24 or 25:
590 format gui slot {_x} of {_Player} with {SG::Messages::Menu_Item} named " "
591 add 1 to {_x}
592 format gui slot 8 of {_Player} with {SG::Messages::Back_Item} named "%{SG::Messages::Back_Header}%" to close then run function guildManagement({_Player})
593 loop 10 times:
594 clear {_n}
595 set {_n} to {_Top::%loop-number%}
596 if {_n} is not set:
597 format gui slot {_slots::%loop-number%} of {_Player} with loop-number of {_items::%loop-number%} named "&a?"
598 set {superguilds::war_top_%{_n}%} to "?"
599 else:
600 set {_aName} to "%{_n}%" to all lower case
601 set {_nane} to checkFile("Datas.Name", "guilds/%{_aName}%")
602 set {_Leader} to checkFile("Datas.Leader", "guilds/%{_aName}%")
603 set {_Division} to checkFile("Datas.Division", "guilds/%{_aName}%")
604 set {_points} to checkFile("Datas.War-Points", "guilds/%{_aName}%")#
605 set {_Msg} to {SG::Messages::Click_To_Info}
606 replace all "{LEADER}" with "%{_Leader}%" in {_Msg}
607 replace all "{LEVEL}" with "%{SG::Messages::Divisions_%{_Division}%}%" in {_Msg}
608 replace all "{POINTS}" with "%{_points}%" in {_Msg}
609 {_placeholders} is "true":
610 set {superguilds::war_top_%{_n}%} to "%{_name}%"
611 format gui slot {_slots::%loop-number%} of {_Player} with loop-number of player head with custom nbt "%{SG::Messages::Divisions_NBT_%{_Division}%}%" named "&a%{_nane}%" with lore "%{_Msg}%" to close then run function guildInfo({_Player}, "%{_aName}%")
612function localeGUI(Player: player):
613 wait 2 ticks
614 open virtual chest inventory with size 3 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Locale_GUI_Name}%" to {_Player}
615 wait 1 ticks
616 set {_x} to 0
617 loop 27 times:
618 {_x} is not between 9 and 17:
619 format gui slot {_x} of {_Player} with {SG::Messages::Menu_Item} named " "
620 add 1 to {_x}
621 set {_no} to 9
622 add "en_US" and "es_ES" and "de_DE" and "it_IT" and "ru_RU" and "tr_TR" and "zh_CN" and "vn_VN" and "fr_FR" to {_locales::*}
623 set {_i::en_US} to "{display:{Name:""United States of America""},SkullOwner:{Id:""3c30484a-76d3-4cfe-88e5-e7599bc9ac4d"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGNhYzk3NzRkYTEyMTcyNDg1MzJjZTE0N2Y3ODMxZjY3YTEyZmRjY2ExY2YwY2I0YjM4NDhkZTZiYzk0YjQifX19""}]}}}"
624 set {_i::es_ES} to "{display:{Name:""Spain""},SkullOwner:{Id:""c6dc9a7e-8b56-4444-958b-4236827e1d8f"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTlmNTc5OWRmYjdkZTY1MzUwMzM3ZTczNTY1MWQ0YzgzMWYxYzJhODI3ZDU4NGIwMmQ4ZTg3NWZmOGVhYTIifX19""}]}}}"
625 set {_i::de_DE} to "{display:{Name:""Germany""},SkullOwner:{Id:""be211c23-d8aa-4119-bd0d-7f50fd115d9f"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWU3ODk5YjQ4MDY4NTg2OTdlMjgzZjA4NGQ5MTczZmU0ODc4ODY0NTM3NzQ2MjZiMjRiZDhjZmVjYzc3YjNmIn19fQ==""}]}}}"
626 set {_i::it_IT} to "{display:{Name:""Italy""},SkullOwner:{Id:""70deaeb6-fedc-431c-ac5f-a4d74b1ff42e"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI3NGNkNzQzMjdkMzkxZjY0YmYzYjQxMjQxZDIyYjEyM2ViNDcyOTRkMWIzNzU3ZjRmMzdkYjYzOTk5ZjJiIn19fQ==""}]}}}"
627 set {_i::ru_RU} to "{display:{Name:""Russia""},SkullOwner:{Id:""849c610b-a1fe-48eb-840b-3fe775f6af6f"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTZlYWZlZjk4MGQ2MTE3ZGFiZTg5ODJhYzRiNDUwOTg4N2UyYzQ2MjFmNmE4ZmU1YzliNzM1YTgzZDc3NWFkIn19fQ==""}]}}}"
628 set {_i::tr_TR} to "{display:{Name:""Turkey""},SkullOwner:{Id:""e831f1af-c758-4edc-b0fd-fb52dfb5d2d4"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmJiZWFmNTJlMWM0YmZjZDhhMWY0YzY5MTMyMzRiODQwMjQxYWE0ODgyOWMxNWFiYzZmZjhmZGY5MmNkODllIn19fQ==""}]}}}"
629 set {_i::zh_CN} to "{display:{Name:""China""},SkullOwner:{Id:""92bacb98-758f-472f-a8bc-7964354dba55"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTdkOWUxNzRjYmJkNGE3ODlmZjBmODFiNzcxZWNmMmJiMDkxODQ3MTg4NjVmZWMzNGQ1OGJlMWJjOGVlNjJkIn19fQ==""}]}}}"
630 set {_i::vn_VN} to "{display:{Name:""Vietnamese""},SkullOwner:{Id:""978b0872-64cc-43fa-85e9-7d162504f540"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjI1YjMwNTg5ZmE2ZjcyOGFkZDUyNzE5MDYyZGE4NGU4ZjJmNjNmN2U0ODg5OTE1YTI5ZWNkNzE1MDIxNGYifX19""}]}}}"
631 set {_i::fr_FR} to "{display:{Name:""France""},SkullOwner:{Id:""699b59a0-e90b-4c78-a3e4-08ac80723a5f"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWIzNDk1ZTlkYmQ1YTQyNmUxNDQ2ZTY2MjdiZjhkZDU1ZDk2MTJjZTNiNTVhODU5NmUxMTJiMjhkYjllYTNhIn19fQ==""}]}}}"
632 loop {_locales::*}:
633 format gui slot {_no} of {_Player} with player head with custom nbt "%{_i::%loop-value%}%" named "%{SG::Messages::Locale_%loop-value%}%" with lore "%{SG::Messages::Click_Select_Locale}%" to close then run {_Player} command "g locale %loop-value%"
634 add 1 to {_no}
635function buyAlchemy(p: player, type: number):
636 set {_uuid} to "%uuid of {_p}%"
637 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
638 if {_pg} is not "*":
639 set {_r} to checkFile("Datas.Players.%{_uuid}%.Rank", "guilds/%{_pg}%")
640 if {_r} is "Leader" or "General":
641 set {_alchemyLevel} to checkFile("Datas.Buildings.Alchemy.Level", "guilds/%{_pg}%") parsed as number
642 set {_price} to checkFile("Guild-Management.Buildings.Alchemy-Costs.Effect-%{_type}%.Level-%{_alchemyLevel}%", "config") parsed as number
643 set {_dia} to checkFile("Datas.Resources.Diamond.Has", "guilds/%{_pg}%") parsed as number
644 if {_dia} is greater or equal to {_price}:
645 degerCikar("Datas.Resources.Diamond.Has", {_price}, "guilds/%{_pg}%")
646 set {_name} to checkFile("Datas.Name", "guilds/%{_pg}%")
647 set {_msg} to {SG::Messages::Bought_Alchemy_Guild}
648 replace all "{GUILD}" with "%{_name}%" in {_msg}
649 replace all "{TYPE}" with "%{SG::Messages::Alchemy_Type_%{_Type}%_Name_%{_alchemyLevel}%}%" in {_msg}
650 broadcast "%{SG::Messages::Prefix}% %{_msg}%"
651 set {_msg} to {SG::Messages::Bought_Alchemy_Own}
652 replace all "{RANK}" with "%{SG::Messages::Rank_%{_r}%}%" in {_msg}
653 replace all "{PLAYER}" with "%{_p}%" in {_msg}
654 replace all "{TYPE}" with "%{SG::Messages::Alchemy_Type_%{_Type}%_Name_%{_alchemyLevel}%}%" in {_msg}
655 guildBroadcast({_pg},"%{_msg}%")
656 set {_list::*} to configuration section "Datas.Players" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
657 loop {_list::*}:
658 set {_lP} to checkFile("Datas.Players.%loop-value%.Username", "guilds/%{_pg}%") parsed as player
659 if {_type} is 1:
660 remove strength from {_lP}
661 apply potion of strength of tier {_alchemyLevel} to {_lP} for 3 minutes
662 else if {_type} is 2:
663 loop all horses:
664 name of loop-horse contains "%{_lP}%"
665 damage loop-horse by 50 hearts
666 spawn 1 adult horse at {_lP}'s location
667 make {_lP} ride last spawned horse
668 set display name of spawned horse to "&9[%{_lP}%]"
669 make the last spawned horse wear a saddle
670 if {_alchemyLevel} is 2:
671 equip the spawned horse with iron horse armor
672 else if {_alchemyLevel} is 3:
673 equip the spawned horse with diamond horse armor
674 else if {_type} is 3:
675 remove speed from {_lP}
676 apply potion of speed of tier {_alchemyLevel} to {_lP} for 15 minutes
677 else if {_type} is 4:
678 remove resistance from {_lP}
679 apply potion of resistance of tier {_alchemyLevel} to {_lP} for 15 minutes
680 else:
681 set {_msg} to {SG::Messages::You_Need_More_Resource}
682 replace all "{RESOURCE}" with "%{SG::Messages::Resource_Diamond}%" in {_msg}
683 replace all "{AMOUNT}" with "%{_price} - {_dia}%" in {_msg}
684 send "%{SG::Messages::Prefix}% %{_msg}%" to {_p}
685 else:
686 send "%{SG::Messages::Prefix}% %{SG::Messages::Rank_Not_Enough}%" to {_p}
687 else:
688 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
689function teleporterAPI(p: player, x: number, y: number, z: number, w: world):
690 set {_uuid} to "%uuid of {_p}%"
691 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
692 if {_pg} is not "*":
693 set {_tp} to checkFile("Players.Teleport-Status", "playerdata/%{_uuid}%")
694 send "%{SG::Messages::Prefix}% %{SG::Messages::Teleport_Starting}%" to {_p}
695 if {_tp} is "*":
696 writeFile("Players.Teleport-Status", "true", "playerdata/%{_uuid}%")
697 set {_time} to checkFile("General.Teleport-Time", "config") parsed as integer
698 set {_locControl} to {_p}'s x-coord
699 while {_time} is not 1:
700 if {_p} is online:
701 set {_tp} to checkFile("Players.Teleport-Status", "playerdata/%{_uuid}%")
702 if {_tp} is "true":
703 set {_CurrentX} to {_p}'s x-coord
704 if {_locControl} is not {_CurrentX}:
705 writeFile("Players.Teleport-Status", "*", "playerdata/%{_uuid}%")
706 remove 1 from {_time}
707 set {_message} to {SG::Messages::Teleporting_Message}
708 replace all "{TIME}" with "%{_time}%" in {_message}
709 send title "&b&l%uncolored {SG::Messages::Prefix}%" with subtitle "%{_message}%" for 1 seconds to {_p}
710 #send action bar message "%{_message}%" to {_p}
711 playSound({_p}, "BLOCK_NOTE_HAT", "CHICKEN_EGG_POP", 1)
712 wait 21 ticks
713 else:
714 send "%{SG::Messages::Prefix}% %{SG::Messages::Teleport_Cancel}%" to {_p}
715 writeFile("Players.Teleport-Status", "*", "playerdata/%{_uuid}%")
716 stop
717 else:
718 stop
719 writeFile("Players.Teleport-Status", "*", "playerdata/%{_uuid}%")
720 set {_loc} to location of block at location ({_x}, {_y}, {_z}) in world {_w}
721 teleport {_p} to {_loc}
722 send title "%{SG::Messages::Prefix}%" with subtitle "%{SG::Messages::Teleport_Done}%" for 3 seconds to {_p}
723 playSound({_p}, "BLOCK_PISTON_EXTEND ", "PISTON_EXTEND", 1)
724 stop
725 else:
726 send "%{SG::Messages::Prefix}% %{SG::Messages::Already_Teleport}%" to {_p}
727 stop
728 else:
729 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
730function guildKick(p: player, kicked: offline player):
731 set {_uuid} to "%uuid of {_p}%"
732 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
733 if {_pg} is not "*":
734 set {_uuidKicked} to "%uuid of {_kicked}%"
735 set {_gKicked} to checkFile("Players.Guild-Name", "playerdata/%{_uuidKicked}%")
736 if "%{_gKicked}%" is "%{_pg}%":
737 set {_rankP} to checkFile("Datas.Players.%{_uuid}%.Rank", "guilds/%{_pg}%")
738 set {_rankKicked} to checkFile("Datas.Players.%{_uuidKicked}%.Rank", "guilds/%{_pg}%")
739 set {_pRankLevel} to checkFile("General.%{_rankP}%-Perm-Level", "config") parsed as number
740 set {_kickedRankLevel} to checkFile("General.%{_rankKicked}%-Perm-Level", "config") parsed as number
741 if {_p} is not {_kicked}:
742 if {_pRankLevel} is greater than {_kickedRankLevel}:
743 writeFile("Players.Guild-Name", "*", "playerdata/%{_uuidKicked}%")
744 veriCikar("Datas.Players", "%{_uuidKicked}%", "guilds/%{_pg}%")
745 set {_message} to {SG::Messages::Kicked_Player}
746 replace all "{KICKED}" with "%{_kicked}%" in {_message}
747 replace all "{PLAYER}" with "%{_p}%" in {_message}
748 guildBroadcast({_pg},"%{_message}%")
749 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Kicked}%" to {_kicked}
750 else:
751 send "%{SG::Messages::Prefix}% %{SG::Messages::Kick_Error_No_Rank}%" to {_p}
752 else:
753 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Kick_Yourself}%" to {_p}
754 else:
755 send "%{SG::Messages::Prefix}% %{SG::Messages::Kick_Error_No_Guild}%" to {_p}
756 else:
757 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
758function guildRank(p: player, target: offline player, targetRank: text):
759 set {_uuid} to "%uuid of {_p}%"
760 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
761 if {_pg} is not "*":
762 set {_uuidTarget} to "%uuid of {_target}%"
763 set {_gTarget} to checkFile("Players.Guild-Name", "playerdata/%{_uuidTarget}%")
764 if "%{_gTarget}%" is "%{_pg}%":
765 set {_rankP} to checkFile("Datas.Players.%{_uuid}%.Rank", "guilds/%{_pg}%")
766 set {_rankTarget} to checkFile("Datas.Players.%{_uuidTarget}%.Rank", "guilds/%{_pg}%")
767 set {_pRankLevel} to checkFile("General.%{_rankP}%-Perm-Level", "config") parsed as number
768 set {_TargetRankLevel} to checkFile("General.%{_rankTarget}%-Perm-Level", "config") parsed as number
769 set {_ranklevelnext} to checkFile("General.%{_targetRank}%-Perm-Level", "config") parsed as number
770 if {_p} is not {_target}:
771 if {_pRankLevel} is greater than {_TargetRankLevel}:
772 if {_pRankLevel} is greater than {_ranklevelnext}:
773 writeFile("Datas.Players.%{_uuidTarget}%.Rank", "%{_targetRank}%", "guilds/%{_pg}%")
774 set {_message} to {SG::Messages::Ranked_Player}
775 replace all "{NEWRANKCHANGEP}" with "%{SG::Messages::Rank_%{_targetRank}%}%" in {_message}
776 replace all "{RANKPLAYER}" with "%{SG::Messages::Rank_%{_rankP}%}%" in {_message}
777 replace all "{OLDRANKCHANGEP}" with "%{SG::Messages::Rank_%{_rankTarget}%}%" in {_message}
778 replace all "{CHANGEP}" with "%{_target}%" in {_message}
779 replace all "{PLAYER}" with "%{_p}%" in {_message}
780 guildBroadcast({_pg},"%{_message}%")
781 set {_msg} to {SG::Messages::Rank_Changed}
782 replace all "{RANK}" with "%{SG::Messages::Rank_%{_targetRank}%}%" in {_msg}
783 send "%{SG::Messages::Prefix}% %{_msg}%" to {_target}
784 else:
785 send "%{SG::Messages::Prefix}% %{SG::Messages::Rank_Wrong}%" to {_p}
786 else:
787 send "%{SG::Messages::Prefix}% %{SG::Messages::Rank_Not_Enough}%" to {_p}
788 else:
789 send "%{SG::Messages::Prefix}% %{SG::Messages::Rank_Yourself}%" to {_p}
790 else:
791 send "%{SG::Messages::Prefix}% %{SG::Messages::Player_No_Guild}%" to {_p}
792 else:
793 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
794function alchemyGUI(p: player):
795 set {_uuid} to "%uuid of {_p}%"
796 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
797 if {_pg} is not "*":
798 wait 2 ticks
799 open virtual chest inventory with size 3 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Menu_Alchemy_GUI}%" to {_p}
800 wait 1 ticks
801 set {_x} to 0
802 loop 27 times:
803 {_x} is not 8 or 10 or 12 or 14 or 16:
804 format gui slot {_x} of {_p} with {SG::Messages::Menu_Item} named " "
805 add 1 to {_x}
806 format gui slot 8 of {_p} with {SG::Messages::Back_Item} named "%{SG::Messages::Back_Header}%" to close then run function guildManagement({_p})
807 set {_alchemyLevel} to checkFile("Datas.Buildings.Alchemy.Level", "guilds/%{_pg}%") parsed as number
808 set {_s} to 10
809 loop 3 times:
810 set {_c.%loop-number%} to "&f"
811 set {_c.%{_alchemyLevel}%} to "&f&n"
812 loop 4 times:
813 loop 3 times:
814 set {_c.%loop-number-2%} to "&f"
815 set {_c.%{_alchemyLevel}%} to "&f&n"
816 set {_price1} to checkFile("Guild-Management.Buildings.Alchemy-Costs.Effect-%loop-number%.Level-1", "config") parsed as number
817 set {_price2} to checkFile("Guild-Management.Buildings.Alchemy-Costs.Effect-%loop-number%.Level-2", "config") parsed as number
818 set {_price3} to checkFile("Guild-Management.Buildings.Alchemy-Costs.Effect-%loop-number%.Level-3", "config") parsed as number
819 set {_priceLore} to {SG::Messages::Alchemy_Menu_Price_%loop-number%}
820 replace all "{AMOUNT1}" with "%{_price1}% %coloured {SG::Messages::Resource_Color_Diamond}%%{SG::Messages::Resource_Diamond}%" in {_priceLore}
821 replace all "{AMOUNT2}" with "%{_price2}% %coloured {SG::Messages::Resource_Color_Diamond}%%{SG::Messages::Resource_Diamond}%" in {_priceLore}
822 replace all "{AMOUNT3}" with "%{_price3}% %coloured {SG::Messages::Resource_Color_Diamond}%%{SG::Messages::Resource_Diamond}%" in {_priceLore}
823 format gui slot {_s} of {_p} with {SG::Messages::Alchemy_Type_%loop-number%_Item_%{_alchemyLevel}%} named "%{SG::Messages::Alchemy_Type_%loop-number%_Name_%{_alchemyLevel}%}%" with lore "||%{SG::Messages::Text_Feature}%|| %{SG::Messages::Alchemy_Menu_Lore_%loop-number%}%||||%{SG::Messages::Text_Price}%||%{_priceLore}%||||%{SG::Messages::Text_Buy}%" to close then run function buyAlchemy({_p}, loop-number)
824 add 2 to {_s}
825 else:
826 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
827function donateAPI(Player: player, pg: string, donatedResource: string, num: number):
828 set {_UUID} to "%uuid of {_Player}%"
829 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_UUID}%")
830 {_pg} is not "*"
831 {_donatedResource} is "GUI":
832 set {_GUI} to checkFile("General.Donate-With-GUI", "config")
833 {_GUI} is "false":
834 execute {_Player} command "/g donate"
835 stop
836 wait 2 ticks
837 create new gui with virtual chest named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Menu_Donate_GUI}%":
838 run when close the gui:
839 set {_typeItem.Wood} to {SG::Messages::Resource_DonateItemType_Wood}
840 set {_typeItem.Stone} to {SG::Messages::Resource_DonateItemType_Stone}
841 set {_typeItem.Iron} to {SG::Messages::Resource_DonateItemType_Iron}
842 set {_typeItem.Gold} to {SG::Messages::Resource_DonateItemType_Gold}
843 set {_typeItem.Diamond} to {SG::Messages::Resource_DonateItemType_Diamond}
844 set {_typeItem.Wool} to {SG::Messages::Resource_DonateItemType_Wool}
845 set {_typeItem.Worker} to player head with custom nbt "%{SG::Messages::NBT_Storage_Items_Worker}%"
846 add amount of {_typeItem.Wood} in gui-inventory to {_donated.Wood}
847 add amount of {_typeItem.Stone} in gui-inventory to {_donated.Stone}
848 add amount of {_typeItem.Iron} in gui-inventory to {_donated.Demir}
849 add amount of {_typeItem.Gold} in gui-inventory to {_donated.Gold}
850 add amount of {_typeItem.Diamond} in gui-inventory to {_donated.Diamond}
851 add amount of {_typeItem.Wool} in gui-inventory to {_donated.Wool}
852 add amount of {_typeItem.Worker} in gui-inventory to {_donated.Worker}
853 loop all items of gui-inventory:
854 loop-item is not {_typeItem.Wood} or {_typeItem.Stone} or {_typeItem.Iron} or {_typeItem.Gold} or {_typeItem.Diamond} or {_typeItem.Wool} or {_typeItem.Worker}
855 give loop-item to {_Player}
856 wait 1 ticks
857 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool" and "Worker":
858 clear {_donatedAll}
859 set {_donatedAll} to {_donated.%loop-value%}
860 loop-value is "Iron":
861 set {_donatedAll} to {_donated.Demir}
862 {_donatedAll} is set
863 set {_currentR} to checkFile("Datas.Resources.%loop-value%.Has", "guilds/%{_pg}%") parsed as integer
864 set {_maxR} to checkFile("Datas.Resources.%loop-value%.Max", "guilds/%{_pg}%") parsed as integer
865 set {_newR} to {_currentR}+{_donatedAll}
866 if {_newR} is less or equal to {_maxR}:
867 donateAPI({_Player}, {_pg}, "%loop-value%", {_donatedAll})
868 else:
869 set {_olm.%loop-value%} to {_maxR}-{_currentR}
870 set {_back.%loop-value%} to {_donatedAll}-{_olm.%loop-value%}
871 if {_olm.%loop-value%} is greater than 0:
872 donateAPI({_Player}, {_pg}, "%loop-value%", {_olm.%loop-value%})
873 add {_back.%loop-value%} of {_typeItem.%loop-value%} to {_Player}
874 else:
875 set {_msg} to {SG::Messages::No_Storage}
876 replace all "{NUMBER}" with "%{_donatedAll}%" in {_msg}
877 replace all "{RESOURCE}" with "%{SG::Messages::Resource_%loop-value%}%" in {_msg}
878 send "%{SG::Messages::Prefix}% %{_msg}%" to {_Player}
879 add {_back.%loop-value%} of {_typeItem.%loop-value%} to {_Player}
880 open last gui to {_Player}
881 stop
882 {_num} is greater than 0
883 set {_r} to checkFile("Datas.Players.%{_UUID}%.Rank", "guilds/%{_pg}%")
884 degerEkle("Datas.Resources.%{_donatedResource}%.Has", {_num}, "guilds/%{_pg}%")
885 degerEkle("Datas.Players.%{_UUID}%.Donated-Resource.%{_donatedResource}%", {_num}, "guilds/%{_pg}%")
886 degerEkle("Players.Donated-Resource.%{_donatedResource}%", {_num}, "playerdata/%{_UUID}%")
887 set {_msg} to {SG::Messages::Player_Donated}
888 replace all "{RANK}" with "%{SG::Messages::Rank_%{_r}%}%" in {_msg}
889 replace all "{PLAYER}" with "%{_Player}%" in {_msg}
890 replace all "{NUMBER}" with "%{_num}%" in {_msg}
891 replace all "{RESOURCE}" with "%{SG::Messages::Resource_%{_donatedResource}%}%" in {_msg}
892 guildBroadcast({_pg},"%{_msg}%")
893function storeGUI(p: player):
894 set {_uuid} to "%uuid of {_p}%"
895 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
896 if {_pg} is not "*":
897 create a gui with virtual chest with 3 rows named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Store_GUI}%":
898 set {_x} to 0
899 loop 27 times:
900 {_x} is not 8 or 10 or 11 or 12 or 13 or 14 or 15 or 16:
901 make gui {_x} with {SG::Messages::Menu_Item} named " "
902 add 1 to {_x}
903 make gui 8 with {SG::Messages::Back_Item} named "%{SG::Messages::Back_Header}%":
904 guildManagement({_p})
905 set {_x} to 10
906 add "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool" and "Worker" to {_resources::*}
907 loop {_resources::*}:
908 clear {_co}
909 clear {_max}
910 set {_co} to checkFile("Datas.Resources.%loop-value%.Has", "guilds/%{_pg}%") parsed as number
911 set {_max} to checkFile("Datas.Resources.%loop-value%.Max", "guilds/%{_pg}%") parsed as number
912 set {_s} to {_co}*100
913 set {_r} to rounded {_s}/{_max}
914 set {_l} to {_r}/10
915 set {_lore} to ""
916 loop {_l} times:
917 set {_lore} to "%{_lore}%%colored {SG::Messages::Resource_Color_%loop-value-1%}%⬛"
918 set {_k} to 10-{_l}
919 loop {_k} times:
920 set {_lore} to "%{_lore}%%colored {SG::Messages::Resource_Color_%loop-value-1%}%⬜"
921 {_r} is greater than 100:
922 set {_r} to 100
923 set {_lore} to ""
924 loop 10 times:
925 set {_lore} to "%{_lore}%%colored {SG::Messages::Resource_Color_%loop-value-1%}%⬛"
926 set {_test} to {SG::Messages::Store_Status}
927 replace all "{NUMBER}" with "%{_co}%/%{_max}% (%%%{_r}%)" in {_test}
928 set {_donate} to "||||%{SG::Messages::Resource_Donate_Lore}%"
929 loop-value is "Worker":
930 set {_donate} to "||%{SG::Messages::Resource_Worker_Get}%||||%{SG::Messages::Resource_Donate_Lore}%"
931 make gui {_x} with player head with custom nbt "%{SG::Messages::NBT_Storage_Items_%loop-value%}%" named "%{SG::Messages::Resource_%loop-value%}%&r &8[%coloured {SG::Messages::Resource_Color_%loop-value%}%%{SG::Messages::Resource_Unicode_%loop-value%}%&8]" with lore "||%{_test}%||&7 → %{_lore}%%{_donate}%":
932 donateAPI({_p}, {_pg}, "GUI", 0)
933 add 1 to {_x}
934 open last gui to {_p}
935 else:
936 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
937function buildInfo(player: player, type: text):
938 set {_uuid} to "%uuid of {_player}%"
939 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
940 set {_maxLevel::Townhall} to 6
941 set {_maxLevel::Barrack} to 5
942 set {_maxLevel::Storage} to 8
943 set {_maxLevel::Alchemy} to 3
944 set {_book} to a new book
945 set {_level} to checkFile("Datas.Buildings.%{_type}%.Level", "guilds/%{_pg}%") parsed as number
946 add text component coloured "%{SG::Messages::Header_Build_Book}%" to {_components::*}
947 add text component coloured "%nl%%nl%" to {_components::*}
948 add text component coloured "%{SG::Messages::Book_Build_Name}%&0%uncolored {SG::Messages::Buildings_Name_%{_type}%}%" to {_components::*}
949 add text component coloured "%nl%" to {_components::*}
950 add text component coloured "%{SG::Messages::Book_Build_Level}%%{SG::Messages::Romen_Num_%{_level}%}%" to {_components::*}
951 add text component coloured "%nl%" to {_components::*}
952 add text component coloured "%{SG::Messages::Book_Build_Requires}%" to {_components::*}
953 add text component coloured "%nl%" to {_components::*}
954 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool":
955 set {_text} to ""
956 loop-value is "Wood":
957 set {_text} to " "
958 set {_has} to checkFile("Datas.Resources.%loop-value%.Has", "guilds/%{_pg}%") parsed as number
959 set {_required} to checkFile("Guild-Management.Buildings.%{_type}%-Upgrade.%loop-value%", "config") parsed as number
960 set {_required} to {_required}*{_level}
961 set {_cl} to "&4"
962 {_has} is greater or equal to {_required}:
963 set {_cl} to "&2"
964 set {_res} to a new text component with "%coloured {_cl}%%{_text}%%{SG::Messages::Resource_Unicode_%loop-value%}%"
965 add hover event with action SHOW_TEXT with text "%{SG::Messages::Resource_Color_%loop-value%}%%{SG::Messages::Resource_%loop-value%}%%nl%%{SG::Messages::Book_Required_Text}%%{_required}%%nl%%{SG::Messages::Book_Have_Text}%%{_has}%" to text component {_res}
966 add {_res} to {_components::*}
967 clear {_res}
968 loop-value is not "Wool":
969 add text component coloured " &8&m-&r " to {_components::*}
970 add text component coloured "%nl%%nl%" to {_components::*}
971 add text component coloured " %{SG::Messages::Building_Desc_%{_type}%}% %nl%" to {_components::*}
972 add text component coloured "%nl%" to {_components::*}
973 set {_lore.Upgrade} to "%{SG::Messages::Upgrade_Emblem_Lore}%"
974 set {_lore.Quit} to "%{SG::Messages::Quit_Emblem_Lore}%"
975 set {_lore.Max} to "%uncolored {SG::Messages::Build_Max}%"
976 set {_status} to checkFile("Datas.Buildings.%{_type}%.Status", "guilds/%{_pg}%") parsed as number
977 if {_status} is 0:
978 set {_button} to "Upgrade"
979 {_level} is {_maxLevel::%{_type}%}
980 set {_button} to "Max"
981 else:
982 set {_getGuildTimer} to checkFile("Datas.Buildings.%{_type}%.Time", "guilds/%{_pg}%")
983 set {_buildCheck} to timeChecker("%{_pg}%", "%{_getGuildTimer}%", "Buildings.%{_type}%.Time")
984 set {_button} to "Timer"
985 set {_lore.Timer} to "%uncolored {SG::Messages::Build_Wait}%"
986 replace all "{TIME}" with "%{_buildCheck}%" in {_lore.Timer}
987 if {_buildCheck} is "true":
988 set {_button} to "Done"
989 set {_lore.Done} to "%{SG::Messages::Done_Emblem_Lore}%"
990 add "%{_button}%" and "Quit" to {_Buttons::*}
991 loop {_Buttons::*}:
992 set {_b} to a new text component with coloured " %{SG::Messages::%loop-value%_Emblem_Button}%"
993 if loop-value is "Quit":
994 add click event with action RUN_COMMAND with execute "/g buildings" to text component {_b}
995 else:
996 add click event with action RUN_COMMAND with execute "/g buildings upgrade %{_type}%" to text component {_b}
997 add hover event with action SHOW_TEXT with text "%{_lore.%loop-value%}%" to text component {_b}
998 add {_b} to {_components::*}
999 add text component {_components::*} to book {_book}
1000 open book {_book} to {_player}
1001function buildingsGUI(p: player):
1002 set {_uuid} to "%uuid of {_p}%"
1003 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
1004 if {_pg} is not "*":
1005 wait 2 ticks
1006 open virtual chest inventory with size 3 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Buildings_GUI}%" to {_p}
1007 wait 1 ticks
1008 set {_count} to 10
1009 set {_x} to 0
1010 format gui slot 8 of {_p} with {SG::Messages::Back_Item} named "%{SG::Messages::Back_Header}%" to close then run function guildManagement({_p})
1011 loop 27 times:
1012 {_x} is not 8 or 10 or 12 or 14 or 16:
1013 format gui slot {_x} of {_p} with {SG::Messages::Menu_Item} named " "
1014 add 1 to {_x}
1015 loop "Townhall" and "Barrack" and "Storage" and "Alchemy":
1016 set {_lore} to {SG::Messages::Buildings_Lore}
1017 set {_status} to checkFile("Datas.Buildings.%loop-value%.Status", "guilds/%{_pg}%") parsed as number
1018 set {_level} to checkFile("Datas.Buildings.%loop-value%.Level", "guilds/%{_pg}%")
1019 replace all "{LEVEL}" with "%{SG::Messages::Romen_Num_%{_level}%}%" in {_lore}
1020 if {_status} is 0:
1021 replace all "{TIMESHOW}" with "" in {_lore}
1022 else:
1023 set {_getGuildTimer} to checkFile("Datas.Buildings.%loop-value%.Time", "guilds/%{_pg}%")
1024 set {_buildCheck} to timeChecker("%{_pg}%", "%{_getGuildTimer}%", "Buildings.%loop-value%.Time")
1025 if {_buildCheck} is "true":
1026 replace all "{STATUS}" with "%{SG::Messages::Building_Status_2}%" in {_lore}
1027 replace all "{TIMESHOW}" with "" in {_lore}
1028 else:
1029 replace all "{TIMESHOW}" with "%{SG::Messages::Buildings_Time_Remaining}%" in {_lore}
1030 replace all "{TIME}" with "%{_buildCheck}%" in {_lore}
1031 replace all "{STATUS}" with "%{SG::Messages::Building_Status_%{_status}%}%" in {_lore}
1032 format gui slot {_count} of {_p} with player head with custom nbt "%{SG::Messages::Buildings_ItemNBT_%loop-value%}%" named "&2%{SG::Messages::Buildings_Name_%loop-value%}%" with lore "%{_lore}%" to close then run function buildInfo({_p}, "%loop-value%")
1033 add 2 to {_count}
1034 else:
1035 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
1036function selectType(p: player, target: offline player):
1037 set {_uuid} to "%uuid of {_p}%"
1038 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
1039 if {_pg} is not "*":
1040 wait 2 ticks
1041 open virtual chest inventory with size 3 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Select_GUI}%" to {_p}
1042 wait 1 ticks
1043 set {_count} to 0
1044 set {_x} to 0
1045 loop 27 times:
1046 {_x} is not 8 or 11 or 13 or 15:
1047 format gui slot {_x} of {_p} with {SG::Messages::Menu_Item} named " "
1048 add 1 to {_x}
1049 format gui slot 8 of {_p} with {SG::Messages::Back_Item} named "%{SG::Messages::Back_Header}%" to close then run function pageAPI({_p}, "3", 0)
1050 format gui slot 11 of {_p} with flint and steel named "&6%{SG::Messages::SelectType_Kick}%" to close then run function guildKick({_p}, {_target})
1051 format gui slot 13 of {_p} with enchanted book named "%{SG::Messages::SelectType_Check_Stats}%" to close then run function playerInfo({_p}, {_target})
1052 format gui slot 15 of {_p} with name tag named "%{SG::Messages::SelectType_Change_Rank}%" to close then run function rankGUI({_p}, {_target})
1053 else:
1054 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
1055function rankGUI(p: player, selectedPlayer: offline player):
1056 set {_uuid} to "%uuid of {_p}%"
1057 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
1058 if {_pg} is not "*":
1059 set {_uuidSelected} to "%uuid of {_selectedPlayer}%"
1060 set {_gSelected} to checkFile("Players.Guild-Name", "playerdata/%{_uuidSelected}%")
1061 set {_rankP} to checkFile("Datas.Players.%{_uuid}%.Rank", "guilds/%{_pg}%")
1062 set {_rankSelected} to checkFile("Datas.Players.%{_uuidSelected}%.Rank", "guilds/%{_pg}%")
1063 "%{_gSelected}%" is "%{_pg}%"
1064 set {_pRankLevel} to checkFile("General.%{_rankP}%-Perm-Level", "config") parsed as number
1065 set {_selectedRankLevel} to checkFile("General.%{_rankSelected}%-Perm-Level", "config") parsed as number
1066 if {_p} is not {_selectedPlayer}:
1067 if {_pRankLevel} is greater than {_selectedRankLevel}:
1068 wait 2 ticks
1069 open virtual chest inventory with size 3 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Guild_Header_Rank}%" to {_p}
1070 wait 1 ticks
1071 set {_x} to 0
1072 loop 27 times:
1073 {_x} is not 8 or 10 or 13 or 14 or 15 or 16:
1074 format gui slot {_x} of {_p} with {SG::Messages::Menu_Item} named " "
1075 add 1 to {_x}
1076 format gui slot 8 of {_p} with {SG::Messages::Back_Item} named "%{SG::Messages::Back_Header}%" to close then run function pageAPI({_p}, "3", 0)
1077 set {_rank} to checkFile("Datas.Players.%{_uuidSelected}%.Rank", "guilds/%{_pg}%")
1078 set {_lore} to {SG::Messages::Guild_Rank_Lore}
1079 replace all "{RANK}" with "%{SG::Messages::Rank_%{_rank}%}%" in {_lore}
1080 format gui slot 10 of {_p} with skull of {_selectedPlayer} named "&6%{_selectedPlayer}%" with lore "%{_lore}%"
1081 format gui slot 13 of {_p} with nether star named "%{SG::Messages::Rank_Leader}%" with lore "%{SG::Messages::Change_Rank}%" to close then run function guildRank({_p}, {_selectedPlayer}, "Leader")
1082 format gui slot 14 of {_p} with diamond named "%{SG::Messages::Rank_General}%" with lore "%{SG::Messages::Change_Rank}%" to close then run function guildRank({_p}, {_selectedPlayer}, "General")
1083 format gui slot 15 of {_p} with gold ingot named "%{SG::Messages::Rank_Captain}%" with lore "%{SG::Messages::Change_Rank}%" to close then run function guildRank({_p}, {_selectedPlayer}, "Captain")
1084 format gui slot 16 of {_p} with iron ingot named "%{SG::Messages::Rank_Member}%" with lore "%{SG::Messages::Change_Rank}%" to close then run function guildRank({_p}, {_selectedPlayer}, "Member")
1085 else:
1086 send "%{SG::Messages::Prefix}% %{SG::Messages::Rank_Not_Enough}%" to {_p}
1087 else:
1088 send "%{SG::Messages::Prefix}% %{SG::Messages::Rank_Yourself}%" to {_p}
1089 else:
1090 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
1091function guildInfo(p: player, pg: text):
1092 set {_uuid} to "%uuid of {_target}%"
1093 file "plugins/SUPERGUILDS/guilds/%{_pg}%.yml" exists
1094 set {_name} to checkFile("Datas.Name", "guilds/%{_pg}%")
1095 set {_design} to checkFile("Datas.Emblem", "guilds/%{_pg}%")#
1096 set {_points} to checkFile("Datas.War-Points", "guilds/%{_pg}%")#
1097 set {_creator} to checkFile("Datas.Creator", "guilds/%{_pg}%")#
1098 set {_time} to checkFile("Datas.Create-Time", "guilds/%{_pg}%")#
1099 set {_leader} to checkFile("Datas.Leader", "guilds/%{_pg}%")#
1100 set {_level} to checkFile("Datas.Division", "guilds/%{_pg}%")#
1101 set {_claimed} to checkFile("Datas.Claimed-Land", "guilds/%{_pg}%")
1102 set {_maxslot} to checkFile("Datas.Max-Slot", "guilds/%{_pg}%")
1103 set {_slot} to sayiGoster("Datas.Players", "0", "guilds/%{_pg}%")
1104 set {_kills} to checkFile("Datas.War-Kills", "guilds/%{_pg}%")
1105 set {_deaths} to checkFile("Datas.War-Deaths", "guilds/%{_pg}%")
1106 set {_deaths} to checkFile("Datas.War-Deaths", "guilds/%{_pg}%")
1107 set {_m} to checkFile("Datas.Market-Location", "guilds/%{_pg}%")
1108 set {_market} to "%{SG::Messages::Text_Off}%"
1109 {_m} is not "*":
1110 set {_market} to "%{SG::Messages::Text_On}%||||%{SG::Messages::Click_To_Teleport}%"
1111 wait 3 ticks
1112 open virtual chest inventory with size 3 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Guild_Info_Header}%" to {_p}
1113 wait 1 ticks
1114 set {_lore1} to {SG::Messages::Guild_Info_1_Lore}
1115 set {_lore2} to {SG::Messages::Guild_Info_2_Lore}
1116 set {_lore3} to {SG::Messages::Guild_Info_3_Lore}
1117 {_design} is "*":
1118 set {_design} to "f"
1119 loop 64 times:
1120 set {_design} to "%{_design}%;f"
1121 set {_unicodes::*} to {_design} split at ";"
1122 set {_no} to 0
1123 loop 8 times:
1124 set {_anamsg} to ""
1125 loop 8 times:
1126 add 1 to {_no}
1127 clear {_msg}
1128 set {_msg} to coloured "&%{_unicodes::%{_no}%}%â–ˆ"
1129 set {_anamsg} to "%{_anamsg}%%{_msg}%"
1130 set {_dlore%loop-number%} to "%{_anamsg}%"
1131 set {_design} to "%{_dlore1}%||%{_dlore2}%||%{_dlore3}%||%{_dlore4}%||%{_dlore5}%||%{_dlore6}%||%{_dlore7}%||%{_dlore8}%"
1132 replace all "{NAME}" with "%{_name}%" in {_lore1}
1133 replace all "{EMBLEM}" with "%{_design}%" in {_lore1}
1134 replace all "{TIME}" with "%{_time}%" in {_lore2}
1135 replace all "{CREATOR}" with "%{_creator}%" in {_lore2}
1136 replace all "{LEADER}" with "%{_leader}%" in {_lore1}
1137 replace all "{KILLS}" with "%{_kills}%" in {_lore3}
1138 replace all "{DEATHS}" with "%{_deaths}%" in {_lore3}
1139 replace all "{POINTS}" with "%{_points}%" in {_lore3}
1140 replace all "{LEVEL}" with "%{SG::Messages::Divisions_%{_level}%}%" in {_lore3}
1141 replace all "{CLAIMED}" with "%{_claimed}%" in {_lore3}
1142 set {_online} to {SG::Messages::Number_Online}
1143 set {_x} to sayiGoster("Datas.Players", "online", "guilds/%{_pg}%")
1144 replace all "{PLAYER}" with "%{_x}%" in {_online}
1145 replace all "{PLAYERS}" with "%{_slot}%" in {_lore3}
1146 replace all "{MAX}" with "%{_maxslot}% %{_online}%" in {_lore3}
1147 set {_x} to 0
1148 loop 27 times:
1149 {_x} is not 8 or 10 or 12 or 14 or 16:
1150 format gui slot {_x} of {_p} with {SG::Messages::Menu_Item} named " "
1151 add 1 to {_x}
1152 format gui slot 8 of {_p} with {SG::Messages::Back_Item} named "%{SG::Messages::Back_Header}%" to close then run function guildManagement({_p})
1153 format gui slot 10 of {_p} with paper named "%{SG::Messages::Guild_Info_1}%" with lore "%{_lore1}%"
1154 format gui slot 12 of {_p} with gold helmet named "%{SG::Messages::Guild_Info_3}%" with lore "%{_lore3}%"
1155 format gui slot 14 of {_p} with clock named "%{SG::Messages::Guild_Info_2}%" with lore "%{_lore2}%"
1156 format gui slot 16 of {_p} with trapped chest named "%{SG::Messages::Guild_Info_4}%" with lore "||&e%uncolored {SG::Messages::Text_Status}%||%{_market}%" to run {_p} command "/g market %{_pg}%"
1157function guildManagement(p: player):
1158 set {_uuid} to "%uuid of {_p}%"
1159 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
1160 if {_pg} is not "*":
1161 #data
1162 set {_s} to sayiGoster("Datas.Players", "0", "guilds/%{_pg}%")
1163 set {_rank} to checkFile("Datas.Players.%{_uuid}%.Rank", "guilds/%{_pg}%")
1164 set {_date} to checkFile("Datas.Players.%{_uuid}%.Join-Date", "guilds/%{_pg}%")
1165 set {_warkills} to checkFile("Datas.Players.%{_uuid}%.War-Kills", "guilds/%{_pg}%")
1166 set {_wardeaths} to checkFile("Datas.Players.%{_uuid}%.War-Deaths", "guilds/%{_pg}%")
1167 set {_seen} to checkFile("Players.Last-Seen", "playerdata/%{_uuid}%")
1168 set {_lore1} to {SG::Messages::Manage_Panel_2_Lore_New}
1169 replace all "{DONATEINFO}" with "%{SG::Messages::Donated_List}%" in {_lore1}
1170 replace all "{NAME}" with "%{_p}%" in {_lore1}
1171 replace all "{STATUS}" with "%{SG::Messages::Status_Online}%" in {_lore1}
1172 replace all "{SEEN}" with "%{_seen}%" in {_lore1}
1173 replace all "{RANK}" with "%{SG::Messages::Rank_%{_rank}%}%" in {_lore1}
1174 replace all "{DATE}" with "%{_date}%" in {_lore1}
1175 replace all "{WARKILLS}" with "%{_warkills}%" in {_lore1}
1176 replace all "{WARDEATHS}" with "%{_wardeaths}%" in {_lore1}
1177 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool" and "Worker":
1178 set {_lv} to "%loop-value%" to all upper case
1179 set {_donated} to checkFile("Datas.Players.%{_uuid}%.Donated-Resource.%loop-value%", "guilds/%{_pg}%")
1180 replace all "{D%{_lv}%}" with "%{_donated}%" in {_lore1}
1181 set {_division} to checkFile("Datas.Division", "guilds/%{_pg}%")#
1182 set {_barracksLevel} to checkFile("Datas.Buildings.Barrack.Level", "guilds/%{_pg}%") parsed as number
1183 set {_points} to checkFile("Datas.War-Points", "guilds/%{_pg}%")#
1184 set {_kills} to checkFile("Datas.War-Kills", "guilds/%{_pg}%")
1185 set {_deaths} to checkFile("Datas.War-Deaths", "guilds/%{_pg}%")
1186 set {_lore} to {SG::Messages::Menu_War_Lore_New}
1187 replace all "{KILLS}" with "%{_kills}%" in {_lore}
1188 replace all "{DEATHS}" with "%{_deaths}%" in {_lore}
1189 replace all "{LEVEL}" with "%{SG::Messages::Divisions_%{_division}%}%" in {_lore}
1190 replace all "{POINTS}" with "%{_points}%" in {_lore}
1191 replace all "{ITEMS}" with "%{SG::Messages::Barrack_Upgrade_Item_%{_barracksLevel}%}%" in {_lore}
1192 replace all "{TOP}" with "%{_TopKiller}%" in {_lore}
1193 set {_tItem} to player head with custom nbt "%{SG::Messages::Tournaments_Enabled_ItemNBT}%"
1194 checkFile("Tournaments.Status", "tournaments") is "false" or "*":
1195 set {_tItem} to player head with custom nbt "%{SG::Messages::Tournaments_Disabled_ItemNBT}%"
1196 #
1197 wait 2 ticks
1198 open virtual chest inventory with size 6 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Guild_Management}%" to {_p}
1199 wait 1 ticks
1200 format gui slot 2 of {_p} with {_tItem} named "%{SG::Messages::Manage_Panel_Tournament}%" with lore "%{SG::Messages::Menu_Tournament_Lore}%" to close then run function tournamentGUI({_p})
1201 format gui slot 3 of {_p} with player head with custom nbt "%{SG::Messages::Divisions_NBT_%{_division}%}%" named "%{SG::Messages::Menu_War_Name_2}%" with lore "||&7%{_lore}%"
1202 format gui slot 4 of {_p} with skull of {_p} named "%{SG::Messages::Manage_Panel_2}%" with lore "%{_lore1}%"
1203 format gui slot 5 of {_p} with player head with custom nbt "%{SG::Messages::Top_10_ItemNBT}%" named "%{SG::Messages::Menu_War_Name_3}%" with lore "||&7%{SG::Messages::War_Top_GUI}%" to close then run function topGUI({_p})
1204 format gui slot 6 of {_p} with player head with custom nbt "%{SG::Messages::Find_War_ItemNBT}%" named "%{SG::Messages::Menu_War_Name_1}%" with lore "||&7%{SG::Messages::Menu_War_Lore_1}%" to run function pageAPI({_p}, "2", 0)
1205 loop integers from 9 to 17:
1206 format gui slot loop-number of {_p} with {SG::Messages::Menu_Item} named " "
1207 format gui slot 22 of {_p} with enchanted book named "%{SG::Messages::Guild_Info}%" with lore "%{SG::Messages::Guild_Info_Lore}%" to close then run function guildInfo({_p}, "%{_pg}%")
1208 format gui slot 29 of {_p} with player head with custom nbt "%{SG::Messages::Claimed_ItemNBT}%" named "%{SG::Messages::Claimed_Lands}%" with lore "%{SG::Messages::Claimed_Lands_Lore}%" to close then run function pageAPI({_p}, "1", 0)
1209 format gui slot 30 of {_p} with player head with custom nbt "%{SG::Messages::Allies_ItemNBT}%" named "%{SG::Messages::Menu_Allies_Name}%" with lore "%{SG::Messages::Menu_Allies_Lore}%" to run function pageAPI({_p}, "4", 0)
1210 format gui slot 31 of {_p} with player head with custom nbt "%{SG::Messages::Alchemy_ItemNBT}%" named "%{SG::Messages::Guild_Alchemy}%" with lore "%{SG::Messages::Guild_Alchemy_Lore}%" to close then run function alchemyGUI({_p})
1211 format gui slot 32 of {_p} with player head with custom nbt "%{SG::Messages::Buildings_ItemNBT}%" named "%{SG::Messages::Guild_Buildings}%" with lore "%{SG::Messages::Guild_Buildings_Lore}%" to close then run function buildingsGUI({_p})
1212 format gui slot 33 of {_p} with player head with custom nbt "%{SG::Messages::Home_ItemNBT}%" named "%{SG::Messages::Guild_Home_Menu_Name}%" with lore "%{SG::Messages::Guild_Home_Menu_Lore}%" to run {_p} command "/g home"
1213 format gui slot 39 of {_p} with player head with custom nbt "%{SG::Messages::Emblem_ItemNBT}%" named "%{SG::Messages::Guild_Emblem_GUI}%" with lore "%{SG::Messages::Guild_Emblem_Lore}%" to run {_p} command "/g emblem"
1214 format gui slot 40 of {_p} with {_s} of player head with custom nbt "%{SG::Messages::Players_ItemNBT}%" named "%{SG::Messages::Check_Players}%" with lore "%{SG::Messages::Check_Players_Lore}%" to close then run function pageAPI({_p}, "3", 0)
1215 format gui slot 41 of {_p} with player head with custom nbt "%{SG::Messages::Storage_ItemNBT}%" named "%{SG::Messages::Guild_Store}%" with lore "%{SG::Messages::Guild_Store_Lore}%" to close then run function storeGUI({_p})
1216 else:
1217 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to {_p}
1218function inviteGUI(p: player, gName: text, type: text):
1219 set {_uuid} to "%uuid of {_p}%"
1220 if {_type} is "gui":
1221 wait 2 ticks
1222 open virtual chest inventory with size 3 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Invite_GUI}%" to {_p}
1223 wait 1 ticks
1224 set {_msg} to {SG::Messages::InviteC_Accept}
1225 set {_guildlongname} to checkFile("Datas.Name", "guilds/%{_gName}%")
1226 replace all "{GUILD}" with "%{_guildlongname}%" in {_msg}
1227 set {_x} to 0
1228 loop 27 times:
1229 {_x} is not 11 or 15:
1230 format gui slot {_x} of {_p} with {SG::Messages::Menu_Item} named " "
1231 add 1 to {_x}
1232 format gui slot 11 of {_p} with player head with custom nbt "%{SG::Messages::Tournaments_Enabled_ItemNBT}%" named "%{_msg}%" to close then run function inviteGUI({_p}, {_gName}, "accept")
1233 format gui slot 15 of {_p} with player head with custom nbt "%{SG::Messages::Tournaments_Disabled_ItemNBT}%" named "%{SG::Messages::InviteC_Reject}%" to close then run function inviteGUI({_p}, {_gName}, "reject")
1234 playSound({_p}, "BLOCK_NOTE_PLING", "NOTE_PLING", 1)
1235 else if {_type} is "reject":
1236 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Reject}%" to {_p}
1237 else if {_type} is "accept":
1238 set {_invitedGuild} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
1239 if {_invitedGuild} is "*":
1240 set {_maxslot} to checkFile("Datas.Max-Slot", "guilds/%{_gName}%") parsed as integer
1241 set {_s} to sayiGoster("Datas.Players", "0", "guilds/%{_gName}%")
1242 if {_s} is less than {_maxslot}:
1243 writeFile("Datas.Players.%{_uuid}%.Username", "%{_p}%", "guilds/%{_gName}%")
1244 writeFile("Datas.Players.%{_uuid}%.Rank", "Member", "guilds/%{_gName}%")
1245 writeFile("Datas.Players.%{_uuid}%.Join-Date", "%now%", "guilds/%{_gName}%")
1246 writeFile("Datas.Players.%{_uuid}%.War-Kills", "0", "guilds/%{_gName}%")
1247 writeFile("Datas.Players.%{_uuid}%.War-Deaths", "0", "guilds/%{_gName}%")
1248 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool" and "Worker":
1249 writeFile("Datas.Players.%{_uuid}%.Donated-Resource.%loop-value%", "0", "guilds/%{_gName}%")
1250 writeFile("Players.Guild-Name", "%{_gName}%", "playerdata/%{_uuid}%")
1251 set {_guildlongname} to checkFile("Datas.Name", "guilds/%{_gName}%")
1252 set {_msg1} to {SG::Messages::You_Joined_Guild}
1253 replace all "{GUILD}" with "%{_guildlongname}%" in {_msg1}
1254 send "%{SG::Messages::Prefix}% %{_msg1}%" to {_p}
1255 set {_msg2} to {SG::Messages::Player_Joined_Guild}
1256 replace all "{PLAYER}" with "%{_p}%" in {_msg2}
1257 replace all "{GUILD}" with "%{_guildlongname}%" in {_msg2}
1258 broadcast "%{SG::Messages::Prefix}% %{_msg2}%" to all worlds
1259 else:
1260 send "%{SG::Messages::Prefix}% %{SG::Messages::This_Guild_Is_Full}%" to {_P}
1261 else:
1262 send "%{SG::Messages::Prefix}% %{SG::Messages::Player_Has_Guild}%" to {_P}
1263function upgradeBuild(p: player, gName: text, type: text):
1264 set {_uuid} to "%uuid of {_p}%"
1265 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
1266 if {_pg} is "%{_gName}%":
1267 set {_r} to checkFile("Datas.Players.%{_uuid}%.Rank", "guilds/%{_gName}%")
1268 if {_r} is "Leader" or "General":
1269 set {_maxLevel::Townhall} to 6
1270 set {_maxLevel::Barrack} to 5
1271 set {_maxLevel::Storage} to 8
1272 set {_maxLevel::Alchemy} to 3
1273 set {_currentLevel} to checkFile("Datas.Buildings.%{_type}%.Level", "guilds/%{_gName}%") parsed as number
1274 if {_currentLevel} is less than {_maxLevel::%{_type}%}:
1275 if checkFile("Datas.Buildings.%{_type}%.Status", "guilds/%{_gName}%") is not "0":
1276 set {_getGuildTimer} to checkFile("Datas.Buildings.%{_type}%.Time", "guilds/%{_gName}%")
1277 set {_buildCheck} to timeChecker("%{_gName}%", "%{_getGuildTimer}%", "Buildings.%{_type}%.Time")
1278 if {_buildCheck} is "true":
1279 add 1 to {_currentLevel}
1280 degerEkle("Datas.Buildings.%{_type}%.Level", 1, "guilds/%{_gName}%")
1281 writeFile("Datas.Buildings.%{_type}%.Status", "0", "guilds/%{_gName}%")
1282 set {_m} to {SG::Messages::Building_Upgrade}
1283 replace all "{RANK}" with "%{SG::Messages::Rank_%{_r}%}%" in {_m}
1284 replace all "{PLAYER}" with "%{_p}%" in {_m}
1285 replace all "{BUILD}" with "%{SG::Messages::Buildings_Name_%{_type}%}%" in {_m}
1286 replace all "{NUMBER}" with "%{_currentLevel}%" in {_m}
1287 guildBroadcast({_gName}, {_m})
1288 set {_m} to {SG::Messages::Building_Upgrade_Guild}
1289 replace all "{GUILD}" with "%{_gName}%" in {_m}
1290 replace all "{BUILD}" with "%{SG::Messages::Buildings_Name_%{_type}%}%" in {_m}
1291 replace all "{NUMBER}" with "%{_currentLevel}%" in {_m}
1292 broadcast "%{SG::Messages::Prefix}% %{_m}%"
1293 if {_type} is "Townhall":
1294 set {_each} to checkFile("Guild-Management.Guild-Member-Add-Each-Upgrade", "config") parsed as number
1295 degerEkle("Datas.Max-Slot", {_each}, "guilds/%{_gName}%")
1296 schematicAPI("%{_p}%", "1", "Townhall", "%{_currentLevel}%", "%{_gName}%")
1297 set {_msg} to {SG::Messages::Buildings_Broadcast_1}
1298 replace all "{NUM}" with "%{_each}%" in {_msg}
1299 guildBroadcast({_gName}, "%{_msg}%")
1300 set {_currentLevel} to checkFile("Datas.Buildings.%{_type}%.Level", "guilds/%{_gName}%") parsed as number
1301 {_currentLevel} is 2
1302 guildBroadcast({_gName}, "%{SG::Messages::Buildings_Broadcast_TNT}%")
1303 else if {_type} is "Barrack":
1304 set {_msg} to {SG::Messages::Buildings_Broadcast_2}
1305 replace all "{ITEM}" with "%{SG::Messages::Barrack_Upgrade_Item_%{_currentLevel}%}%" in {_msg}
1306 guildBroadcast({_gName}, "%{_msg}%")
1307 else if {_type} is "Storage":
1308 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool":
1309 degerEkle("Datas.Resources.%loop-value%.Max", 500, "guilds/%{_gName}%")
1310 degerEkle("Datas.Resources.Worker.Max", 1, "guilds/%{_gName}%")
1311 guildBroadcast({_gName}, "%{SG::Messages::Buildings_Broadcast_3}%")
1312 else if {_type} is "Alchemy":
1313 guildBroadcast({_gName}, "%{SG::Messages::Buildings_Broadcast_4}%")
1314 else:
1315 set {_msg} to {SG::Messages::Build_Wait}
1316 replace all "{TIME}" with "%{_buildCheck}%" in {_msg}
1317 send "%{SG::Messages::Prefix}% %{_msg}%" to {_p}
1318 else:
1319 set {_required.Worker} to 1*{_currentLevel}
1320 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool":
1321 set {_required.%loop-value%} to checkFile("Guild-Management.Buildings.%{_type}%-Upgrade.%loop-value%", "config") parsed as number
1322 set {_required.%loop-value%} to {_required.%loop-value%}*{_currentLevel}
1323 wait 1 tick
1324 set {_resourceCheck} to checkResources({_p}, {_required.Wood}, {_required.Stone}, {_required.Iron}, {_required.Gold}, {_required.Diamond}, {_required.Wool}, {_required.Worker})
1325 if {_resourceCheck} is "true":
1326 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool":
1327 degerCikar("Datas.Resources.%loop-value%.Has", {_required.%loop-value%}, "guilds/%{_gName}%")
1328 degerCikar("Datas.Resources.Worker.Has", 1, "guilds/%{_gName}%")
1329 writeFile("Datas.Buildings.%{_type}%.Status", "1", "guilds/%{_gName}%")
1330 set {_saatYaz} to getTime("%month%", "%day+1%", "%hour%", "%minute%", "%second%")
1331 writeFile("Datas.Buildings.%{_type}%.Time", "%{_saatYaz}%", "guilds/%{_pg}%")
1332 set {_msg} to {SG::Messages::Build_Started}
1333 replace all "{RANK}" with "%{SG::Messages::Rank_%{_r}%}%" in {_msg}
1334 replace all "{PLAYER}" with "%{_p}%" in {_msg}
1335 replace all "{BUILD}" with "%{SG::Messages::Buildings_Name_%{_type}%}%" in {_msg}
1336 replace all "{LEVEL}" with "%{SG::Messages::Romen_Num_%{_currentLevel}%}%" in {_msg}
1337 replace all "{TIME}" with "%day+1%/%month%/%year% %hour%:%minute%" in {_msg}
1338 guildBroadcast({_gName}, "%{_msg}%")
1339 else:
1340 set {_co} to checkFile("Datas.Resources.%{_resourceCheck}%.Has", "guilds/%{_gName}%") parsed as number
1341 set {_msg} to {SG::Messages::You_Need_More_Resource}
1342 replace all "{RESOURCE}" with "%{SG::Messages::Resource_%{_resourceCheck}%}%" in {_msg}
1343 replace all "{AMOUNT}" with "%{_required.%{_resourceCheck}%} - {_co}%" in {_msg}
1344 send "%{SG::Messages::Prefix}% %{_msg}%" to {_p}
1345 else:
1346 send "%{SG::Messages::Prefix}% %{SG::Messages::Limit_Buildings}%" to {_p}
1347 else:
1348 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to {_p}
1349 else:
1350 send "%{SG::Messages::Prefix}% %{SG::Messages::Guild_Error_Upgrade}%" to {_p}
1351function playerInfo(p: player, target: offline player):
1352 set {_uuid} to "%uuid of {_target}%"
1353 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
1354 if {_pg} is "*":
1355 set {_Lore.1} to "%{SG::Messages::Player_Info_No_Guild}%"
1356 else:
1357 set {_rank} to checkFile("Datas.Players.%{_uuid}%.Rank", "guilds/%{_pg}%")
1358 set {_date} to checkFile("Datas.Players.%{_uuid}%.Join-Date", "guilds/%{_pg}%")
1359 set {_warkills} to checkFile("Datas.Players.%{_uuid}%.War-Kills", "guilds/%{_pg}%")
1360 set {_wardeaths} to checkFile("Datas.Players.%{_uuid}%.War-Deaths", "guilds/%{_pg}%")
1361 set {_name} to checkFile("Datas.Name", "guilds/%{_pg}%")
1362 set {_Lore.1} to "%{SG::Messages::Player_Info_1_New}%||%{SG::Messages::Guild_Info_Lore}%"
1363 replace all "{DONATEINFO}" with "%{SG::Messages::Donated_List}%" in {_Lore.1}
1364 replace all "{GUILD}" with "%{_name}%" in {_Lore.1}
1365 replace all "{RANK}" with "%{SG::Messages::Rank_%{_rank}%}%" in {_Lore.1}
1366 replace all "{DATE}" with "%{_date}%" in {_Lore.1}
1367 replace all "{KILLS}" with "%{_warkills}%" in {_Lore.1}
1368 replace all "{DEATHS}" with "%{_wardeaths}%" in {_Lore.1}
1369 #
1370 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool" and "Worker":
1371 set {_lv} to "%loop-value%" to all upper case
1372 set {_donated} to checkFile("Datas.Players.%{_uuid}%.Donated-Resource.%loop-value%", "guilds/%{_pg}%")
1373 replace all "{D%{_lv}%}" with "%{_donated}%" in {_Lore.1}
1374 set {_Lore.2} to {SG::Messages::Player_Info_2_New}
1375 replace all "{DONATEINFO}" with "%{SG::Messages::Donated_List}%" in {_Lore.2}
1376 set {_kills} to checkFile("Players.Kills", "playerdata/%{_uuid}%")
1377 set {_deaths} to checkFile("Players.Deaths", "playerdata/%{_uuid}%")
1378 set {_kda} to {_kills}/{_deaths}
1379 set {_seen} to checkFile("Players.Last-Seen", "playerdata/%{_uuid}%")
1380 set {_c} to checkFile("Guild-Management.Player-Stats-Show-Location", "config")
1381 if {_c} is "true":
1382 set {_location} to "%location of {_target}%"
1383 else:
1384 set {_location} to "?"
1385 replace all "{PLAYER}" with "%{_target}%" in {_Lore.2}
1386 replace all "{KILLS}" with "%{_kills}%" in {_Lore.2}
1387 replace all "{DEATHS}" with "%{_deaths}%" in {_Lore.2}
1388 replace all "{KDA}" with "%{_kda}%" in {_Lore.2}
1389 if {_target} is online:
1390 set {_Lore.3} to {SG::Messages::Player_Info_3}
1391 replace all "{HEALTH}" with "%{_target}'s health%" in {_Lore.3}
1392 replace all "{HUNGER}" with "%{_target}'s hunger%" in {_Lore.3}
1393 replace all "{LOCATION}" with "%{_location}%" in {_Lore.3}
1394 else:
1395 set {_Lore.3} to {SG::Messages::Player_Info_4}
1396 replace all "{SEEN}" with "%{_seen}%" in {_Lore.3}
1397 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool" and "Worker":
1398 set {_lv} to "%loop-value%" to all upper case
1399 set {_donated} to checkFile("Players.Donated-Resource.%loop-value%", "playerdata/%{_uuid}%")
1400 replace all "{D%{_lv}%}" with "%{_donated}%" in {_Lore.2}
1401 wait 3 ticks
1402 open virtual chest inventory with size 3 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Player_Stats}%" to {_p}
1403 wait 1 ticks
1404 set {_x} to 0
1405 loop 27 times:
1406 {_x} is not 8 or 11 or 13 or 15:
1407 format gui slot {_x} of {_p} with {SG::Messages::Menu_Item} named " "
1408 add 1 to {_x}
1409 format gui slot 8 of {_p} with {SG::Messages::Back_Item} named "%{SG::Messages::Back_Header}%" to close then run function pageAPI({_p}, "3", 0)
1410 format gui slot 11 of {_p} with item frame named "%{SG::Messages::Player_Info_Name_1}%" with lore "%{_Lore.1}%" to close then run function guildInfo({_p}, "%{_pg}%")
1411 format gui slot 13 of {_p} with skull of {_target} named "%{SG::Messages::Player_Info_Name_2}%" with lore "%{_Lore.2}%"
1412 format gui slot 15 of {_p} with paper named "%{SG::Messages::Player_Info_Name_3}%" with lore "%{_Lore.3}%"
1413function guildEmblemGUI(Player: player):
1414 set {_UUID} to "%uuid of {_Player}%"
1415 set {_design} to checkFile("Players.Emblem-Design", "playerdata/%{_UUID}%")
1416 set {_playercolor} to checkFile("Players.Selected-Color", "playerdata/%{_UUID}%")
1417 {_design} is "*":
1418 set {_design} to "7"
1419 loop 64 times:
1420 set {_design} to "%{_design}%;7"
1421 {_playercolor} is "*":
1422 set {_playercolor} to "0"
1423 set {_unicodes::*} to {_design} split at ";"
1424 set {_no} to 0
1425 wait 3 ticks
1426 set {_book} to a new written book
1427 add text component coloured "%{SG::Messages::Emblem_Menu}%" to {_components::*}
1428 add text component "%nl%" to {_components::*}
1429 set {_no} to 0
1430 loop 8 times:
1431 loop 8 times:
1432 add 1 to {_no}
1433 clear {_jsonText}
1434 set {_msg} to coloured "&%{_unicodes::%{_no}%}%â–ˆ"
1435 {_no} is 9 or 17 or 25 or 33 or 41 or 49 or 57 or 65:
1436 set {_component} to a new text component with "%nl%"
1437 add {_component} to {_components::*}
1438 {_no} is 1 or 9 or 17 or 25 or 33 or 41 or 49 or 57:
1439 set {_msg} to coloured " &%{_unicodes::%{_no}%}%â–ˆ"
1440 set {_component} to a new text component with coloured "%{_msg}%"
1441 add click event with action RUN_COMMAND with execute "/g emblem Select %{_no}%" to text component {_component}
1442 add hover event with action SHOW_TEXT with text coloured "&%{_playercolor}%%{SG::Messages::Click_To_Dye_Here}% &f[##%{_no}%]" to text component {_component}
1443 add {_component} to {_components::*}
1444 add new text component with "%nl%%nl%" to {_components::*}
1445 set {_no} to 0
1446 set {_colors::*} to "&0", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9", "&a", "&b", "&c", "&d", "&e" and "&f"
1447 loop {_colors::*}:
1448 set {_msg} to coloured "%loop-value%â–ˆ"
1449 {_no} is 0 or 8:
1450 set {_msg} to coloured " %loop-value%â–ˆ"
1451 {_no} is 8 or 16:
1452 set {_component} to a new text component with "%nl%"
1453 add {_component} to {_components::*}
1454 set {_component} to a new text component with coloured "%{_msg}%"
1455 add click event with action RUN_COMMAND with execute "/g emblem Color %{_no}%" to text component {_component}
1456 add hover event with action SHOW_TEXT with text "&f%loop-value%%{SG::Messages::Click_To_Select_Color}%" to text component {_component}
1457 add 1 to {_no}
1458 add {_component} to {_components::*}
1459 add new text component with "%nl%%nl%" to {_components::*}
1460 set {_types::*} to "Save", "Reset" and "Use"
1461 loop {_types::*}:
1462 set {_component} to a new text component with coloured " %{SG::Messages::%loop-value%_Emblem_Button}%"
1463 add click event with action RUN_COMMAND with execute "/g emblem %loop-value%" to text component {_component}
1464 add hover event with action SHOW_TEXT with text "%{SG::Messages::%loop-value%_Emblem_Lore}%" to text component {_component}
1465 add {_component} to {_components::*}
1466 add text component {_components::*} to book {_book}
1467 open book {_book} to {_Player}
1468function allyGUI(p: player, ally: player, type: text):
1469 set {_uuid} to "%uuid of {_p}%"
1470 set {_auuid} to "%uuid of {_ally}%"
1471 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
1472 set {_their} to checkFile("Players.Guild-Name", "playerdata/%{_auuid}%")
1473 wait 1 ticks
1474 if {_type} is "gui":
1475 wait 2 ticks
1476 open virtual chest inventory with size 3 named "%{SG::Messages::GUIPrefix}%%{SG::Messages::Ally_GUI}%" to {_ally}
1477 wait 1 ticks
1478 set {_msg} to {SG::Messages::Ally_InviteC_Accept}
1479 set {_guildlongname} to checkFile("Datas.Name", "guilds/%{_their}%")
1480 replace all "{GUILD}" with "%{_guildlongname}%" in {_msg}
1481 set {_x} to 0
1482 loop 27 times:
1483 {_x} is not 11 or 15:
1484 format gui slot {_x} of {_ally} with {SG::Messages::Menu_Item} named " "
1485 add 1 to {_x}
1486 format gui slot 11 of {_ally} with green clay named "%{_msg}%" with lore "%{SG::Messages::Ally_InviteC_Lore}%" to close then run function allyGUI({_p}, {_ally}, "accept")
1487 format gui slot 15 of {_ally} with red clay named "%{SG::Messages::InviteC_Reject}%" to close then run function allyGUI({_p}, {_ally}, "reject")
1488 else if {_type} is "reject":
1489 set {_guildlongname} to checkFile("Datas.Name", "guilds/%{_their}%")
1490 set {_msg} to {SG::Messages::Ally_Other_Reject}
1491 replace all "{GUILD}" with "%{_guildlongname}%" in {_msg}
1492 guildBroadcast("%{_pg}%", "%{_msg}%")
1493 set {_guildlongname} to checkFile("Datas.Name", "guilds/%{_pg}%")
1494 set {_msg} to {SG::Messages::Ally_You_Reject}
1495 replace all "{GUILD}" with "%{_guildlongname}%" in {_msg}
1496 send "%{SG::Messages::Prefix}% %{_msg}%" to {_ally}
1497 else if {_type} is "accept":
1498 writeFile("Datas.Allies.%{_their}%.Time", "%now%", "guilds/%{_pg}%")
1499 writeFile("Datas.Allies.%{_their}%.Added-By", "%{_p}%", "guilds/%{_pg}%")
1500 writeFile("Datas.Allies.%{_pg}%.Time", "%now%", "guilds/%{_their}%")
1501 writeFile("Datas.Allies.%{_pg}%.Added-By", "%{_ally}%", "guilds/%{_their}%")
1502 set {_msg} to {SG::Messages::Added_Ally}
1503 replace all "{GUILD}" with "%{_pg}%" in {_msg}
1504 replace all "{ALLY}" with "%{_their}%" in {_msg}
1505 broadcast "%{SG::Messages::Prefix}% %{_msg}%"
1506command /sprglds [<text>] [<text>] [<text>] [<text>]:
1507 executable by: console
1508 trigger:
1509 if arg 1 is "playerInfo":
1510 set {_arg2} to "%arg 2%" parsed as player
1511 set {_arg3} to "%arg 3%" parsed as offline player
1512 selectType({_arg2}, {_arg3})
1513 else if arg 1 is "teleporterAPI":
1514 set {_arg2} to "%arg 2%" parsed as player
1515 set {_arg3::*} to arg 3 split at ";"
1516 set {_x} to {_arg3::1} parsed as number
1517 set {_y} to {_arg3::2} parsed as number
1518 set {_z} to {_arg3::3} parsed as number
1519 set {_w} to {_arg3::4} parsed as world
1520 teleporterAPI({_arg2}, {_x}, {_y}, {_z}, {_w})
1521 else if arg 1 is "guildInfo":
1522 set {_arg2} to "%arg 2%" parsed as player
1523 guildInfo({_arg2}, "%arg 3%")
1524 else if arg 1 is "war":
1525 set {_arg2} to "%arg 2%" parsed as player
1526 execute {_arg2} command "/g war %arg 3%"
1527on load:
1528 set {_list::*} to files in "plugins/SUPERGUILDS/playerdata"
1529 loop {_list::*}:
1530 set {_nname} to "%loop-value%"
1531 replace all ".yml" with "" in {_nname}
1532 set {_guildName} to checkFile("Players.Guild-Name", "playerdata/%{_nname}%")
1533 {_guildName} is not "*"
1534 if file "plugins/SUPERGUILDS/guilds/%{_guildName}%.yml" doesn't exists:
1535 writeFile("Players.Guild-Name", "*", "playerdata/%{_nname}%")
1536 add {_guildName} to {_wRemoveGuild::*}
1537 else:
1538 set {_test} to checkFile("Datas.Name", "guilds/%{_guildName}%")
1539 {_test} is "*"
1540 writeFile("Players.Guild-Name", "*", "playerdata/%{_nname}%")
1541 add {_guildName} to {_wRemoveGuild::*}
1542 set {_list::*} to files in "plugins/SUPERGUILDS/guilds"
1543 loop {_list::*}:
1544 set {_nname} to "%loop-value%"
1545 replace all ".yml" with "" in {_nname}
1546 checkFile("Datas.Name", "guilds/%{_nname}%") is "*"
1547 add {_nname} to {_wRemoveGuild::*}
1548 wait 5 ticks
1549 loop {_wRemoveGuild::*}:
1550 disbandGuild("%loop-value%")
1551 wait 2 ticks
1552command /sgadmin [<text>] [<text>] [<text>]:
1553 trigger:
1554 player doesn't have permission "guilds.admin":
1555 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
1556 stop
1557 if arg 1 is "region":
1558 if arg 2 is "allow" or "disallow":
1559 if arg 3 is set:
1560 set {_region} to "%arg 3%" parsed as region
1561 if {_region} is set:
1562 if arg 2 is "allow":
1563 writeFile("WGRegions.%{_region}%", "true", "regions")
1564 set {_msg} to {SG::Messages::Region_Allowed}
1565 replace all "{REGION}" with "%arg 3%" in {_msg}
1566 send "%{SG::Messages::Prefix}% %{_msg}%" to player
1567 else if arg 2 is "disallow":
1568 veriCikar("WGRegions", "%{_region}%", "regions")
1569 set {_msg} to {SG::Messages::Region_Disallowed}
1570 replace all "{REGION}" with "%arg 3%" in {_msg}
1571 send "%{SG::Messages::Prefix}% %{_msg}%" to player
1572 else:
1573 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Region}%" to player
1574 else:
1575 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_Region_Name}%" to player
1576 else if arg 2 is "list":
1577 set {_region::*} to configuration section "WGRegions" get of "plugins/SUPERGUILDS/regions.yml"
1578 if size of {_region::*} is greater than 0:
1579 send "%{SG::Messages::Prefix}% %{SG::Messages::Region_List}%" to player
1580 send ""
1581 loop {_region::*}:
1582 send "&fâ— %loop-value%" to player
1583 else:
1584 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Region_Found}%" to player
1585 else:
1586 send "%{SG::Messages::Prefix}% %{SG::Messages::Allow_Or_Disallow}%" to player
1587 else if arg 1 is "create":
1588 if arg 2 is set:
1589 set {_yazi} to charControl("%arg-2%")
1590 length of {_yazi} is not 0:
1591 send "%{SG::Messages::Prefix}% %{SG::Messages::Char_Error}% &8[%{_yazi}%]"
1592 stop
1593 set {_Status} to checkFile("Datas.%arg 2%.Status", "arenas")
1594 if {_Status} is "*":
1595 writeFile("Datas.%arg 2%.Name", "%arg 2%", "arenas")
1596 writeFile("Datas.%arg 2%.Status", "2", "arenas") #0: waiting, 1: ingame, 2: closed, 3: debug
1597 writeFile("Datas.%arg 2%.Current-Time", "*", "arenas")
1598 writeFile("Datas.%arg 2%.Team.1.Name", "*", "arenas")
1599 writeFile("Datas.%arg 2%.Team.2.Name", "*", "arenas")
1600 writeFile("Datas.%arg 2%.Spawnpoint.1", "*", "arenas")
1601 writeFile("Datas.%arg 2%.Spawnpoint.2", "*", "arenas")
1602 set {_msg} to {SG::Messages::Arena_Created}
1603 replace all "{ARENA}" with "%arg 2%" in {_msg}
1604 send "%{SG::Messages::Prefix}% %{_msg}%" to player
1605 else:
1606 send "%{SG::Messages::Prefix}% %{SG::Messages::Arena_Exists}%" to player
1607 else:
1608 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_Arena_Name}%" to player
1609 else if arg 1 is "remove":
1610 if arg 2 is set:
1611 set {_Check} to checkFile("Datas.%arg 2%.Name", "arenas")
1612 if {_Check} is not "*":
1613 debugArena("%arg 2%", "restart")
1614 set {_msg} to {SG::Messages::Arena_Removed}
1615 replace all "{ARENA}" with "%{_Check}%" in {_msg}
1616 send "%{SG::Messages::Prefix}% %{_msg}%" to player
1617 wait 1 seconds
1618 veriCikar("Datas", "%arg 2%", "arenas")
1619 else:
1620 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Arena}% (%arg 2%)" to player
1621 else:
1622 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_Arena_Name}%" to player
1623 else if arg 1 is "setspawn":
1624 if arg 2 is set:
1625 if arg 3 is "1" or "2":
1626 set {_Check} to checkFile("Datas.%arg 2%.Name", "arenas")
1627 if {_Check} is not "*":
1628 set {_msg} to {SG::Messages::Setspawn_Done}
1629 replace all "{ARENA}" with "%{_Check}%" in {_msg}
1630 replace all "{TYPE}" with "%arg 3%" in {_msg}
1631 send "%{SG::Messages::Prefix}% %{_msg}%" to player
1632 writeFile("Datas.%arg 2%.Spawnpoint.%arg 3%", "%player's x coordinate%;%player's y coordinate%;%player's z coordinate%;%world of player%", "arenas")
1633 set {_r::1} to "2"
1634 set {_r::2} to "1"
1635 set {_test} to checkFile("Datas.%arg 2%.Spawnpoint.%{_r::%arg 3%}%", "arenas")
1636 {_test} is not "*"
1637 writeFile("Datas.%arg 2%.Status", "0", "arenas")
1638 else:
1639 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Arena}% (%arg 2%)" to player
1640 else:
1641 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_Setspawn_Type}%" to player
1642 else:
1643 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_Arena_Name}%" to player
1644 else if arg 1 is "setlobby":
1645 send "%{SG::Messages::Prefix}% %{SG::Messages::Lobby_Done}%" to player
1646 writeFile("Lobby", "%player's x coordinate%;%player's y coordinate%;%player's z coordinate%;%world of player%", "arenas")
1647 else if arg 1 is "debug":
1648 if arg 2 is set:
1649 set {_Check} to checkFile("Datas.%arg 2%.Name", "arenas")
1650 if {_Check} is not "*":
1651 set {_msg} to {SG::Messages::Arena_Debug}
1652 replace all "{ARENA}" with "%{_Check}%" in {_msg}
1653 send "%{SG::Messages::Prefix}% %{_msg}%" to player
1654 debugArena("%arg 2%", "restart")
1655 else:
1656 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Arena}% (%arg 2%)" to player
1657 else:
1658 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_Arena_Name}%" to player
1659 else if arg 1 is "list":
1660 set {_arenas::*} to configuration section "Datas" get of "plugins/SUPERGUILDS/arenas.yml"
1661 if size of {_arenas::*} is greater than 0:
1662 loop {_arenas::*}:
1663 set {_Status} to checkFile("Datas.%loop-value%.Status", "arenas")
1664 set {_StatusText} to "%{SG::Messages::Status_Text_%{_Status}%}%"
1665 {_Status} is "1":
1666 set {_Time} to checkFile("Datas.%loop-value%.Current-Time", "arenas")
1667 set {_Team1} to checkFile("Datas.%loop-value%.Team.1.Name", "arenas")
1668 set {_Team2} to checkFile("Datas.%loop-value%.Team.2.Name", "arenas")
1669 set {_Max1} to checkFile("Datas.%loop-value%.Team.1.Max", "arenas")
1670 set {_Max2} to checkFile("Datas.%loop-value%.Team.2.Max", "arenas")
1671 set {_Team.1.Players::*} to skutil yaml list "Datas.%loop-value%.Team.1.Players" from file "plugins/SUPERGUILDS/arenas.yml"
1672 set {_Team.2.Players::*} to skutil yaml list "Datas.%loop-value%.Team.2.Players" from file "plugins/SUPERGUILDS/arenas.yml"
1673 set {_Team1P} to size of {_Team.1.Players::*}
1674 set {_Team2P} to size of {_Team.2.Players::*}
1675 set {_StatusText} to "%{SG::Messages::Status_Text_%{_Status}%}% &8- &7%{SG::Messages::Arena_Guilds}%&9%{_Team1}% (%{_Team1P}%/%{_Max1}%) &7vs. &c%{_Team2}% (%{_Team2P}%/%{_Max2}%) &8- %{SG::Messages::Arena_TimeLeft}%%{_Time}% %{SG::Messages::Text_Minute}%"
1676 send "&6&l> &b%loop-value% &8- %{_StatusText}%" to player
1677 else:
1678 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Arena_Found}%" to player
1679 else if arg 1 is "starttournament":
1680 startTournament(player)
1681 else:
1682 send "%{SG::Messages::Prefix}% &e/sgadmin [create, remove, setspawn, setlobby, debug, list, region, starttournament]"
1683command /SuperGuilds [<text>] [<text>] [<text>] [<text>] [<integer>]:
1684 aliases: g, sg, guilds, f, faction, clan, /klan, /lonca
1685 executable by: players
1686 trigger:
1687 if arg 1 is not set:
1688 if player has permission "guilds.*" or "guilds.player":
1689 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
1690 if {_pg} is not "*":
1691 guildManagement(player)
1692 else:
1693 make player execute command "/g help 1"
1694 else:
1695 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
1696 else if arg 1 is "help" or "yardım":
1697 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.help":
1698 if arg 2 is not set:
1699 execute player command "/guilds help 1"
1700 stop
1701 else:
1702 if arg 2 is "1" or "2" or "3" or "4" or "5":
1703 set {_page} to "%arg 2%" parsed as integer
1704 else:
1705 execute player command "/guilds help 1"
1706 stop
1707 send "&8&m--------------(&r &6&lSUPERGUILDS &8&m)--------------" to player
1708 loop 8 times:
1709 if {SG::Messages::Help_Pages_%{_page}%::Line_%loop-number%} is set:
1710 send " %{SG::Messages::Help_Pages_%{_page}%::Line_%loop-number%}%" to player
1711 if {_page} is less than 4:
1712 set {_msg} to {SG::Messages::Next_Page}
1713 replace all "{NEXT}" with "%{_page}+1%" in {_msg}
1714 send "%{_msg}%" to player
1715 else:
1716 send "&8&m--------------------------------------------" to player
1717 else:
1718 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
1719 else if arg 1 is "create" or "kur":
1720 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.create":
1721 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
1722 if {_pg} is "*":
1723 if arg 2 is set:
1724 set {_yazi} to charControl("%arg-2%")
1725 wait 1 ticks
1726 {_debug} is "true":
1727 send "[SUPERGUILDS] Guild name: %arg 2%, {_yazi}: %{_yazi}% (%player%)" to console
1728 if length of {_yazi} is not 0:
1729 send "%{SG::Messages::Prefix}% %{SG::Messages::Char_Error}% &7[%{_yazi}%]"
1730 stop
1731 set {_downText} to "%arg-2%" to all lower case
1732 if file "plugins/SUPERGUILDS/guilds/%{_downText}%.yml" doesn't exists:
1733 set {_min} to checkFile("Guild-Management.Min-Name-Length", "config") parsed as number
1734 set {_max} to checkFile("Guild-Management.Max-Name-Length", "config") parsed as number
1735 if length of {_downText} is between {_min} and {_max}:
1736 if block under player isn't lava source, air or water source:
1737 set {_disabled::*} to checkFile("General.Guild-Create-Disabled-Worlds", "config") split at ","
1738 size of {_disabled::*} > 0:
1739 loop size of {_disabled::*} times:
1740 "%{_disabled::%loop-number%}%" is "%world of player%"
1741 send "%{SG::Messages::Prefix}% %{SG::Messages::Create_Guild_Disabled_World}%" to player
1742 stop
1743 set {_wg} to checkFile("General.WorldGuard-Support", "config")
1744 {_wg} is "true":
1745 region at player is set:
1746 set {_regions::*} to region at player
1747 loop {_regions::*}:
1748 set {_regioncheck} to checkFile("WGRegions.%loop-value%", "regions")
1749 if {_regioncheck} is "true":
1750 set {_repu} to true
1751 else:
1752 send "%{SG::Messages::Prefix}% %{SG::Messages::WorldGuard_Error}%" to player
1753 stop
1754 set {_Sch} to checkFile("General.Schematics", "config")
1755 set {_Claims} to checkFile("General.Claims", "config")
1756 set {_StartW} to checkFile("Guild-Management.Start-With-Claim", "config")
1757 set {_startWTownhallLevel} to checkFile("Guild-Management.Start-With-Last-Level-Townhall", "config")
1758 {_Claims} is "true":
1759 set {_chunk} to checkFile("Regions", "chunks/%chunk at location of player%")
1760 {_chunk} is not "*":
1761 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Error}%" to player
1762 stop
1763 {_Sch} is "true":
1764 set {_c} to chunk at player
1765 set {_x} to x coordinate of player
1766 set {_y} to y coordinate of player
1767 set {_z} to z coordinate of player
1768 set {_world} to world of player
1769 if chunk at block under block 7 north is not {_c}:
1770 chunkMiddle(player, {_x}, {_y}, {_z}, {_world}, "show")
1771 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Middle}%"
1772 stop
1773 if chunk at block under block 7 south is not {_c}:
1774 chunkMiddle(player, {_x}, {_y}, {_z}, {_world}, "show")
1775 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Middle}%"
1776 stop
1777 if chunk at block under block 7 west is not {_c}:
1778 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Middle}%"
1779 chunkMiddle(player, {_x}, {_y}, {_z}, {_world}, "show")
1780 stop
1781 if chunk at block under block 7 east is not {_c}:
1782 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Middle}%"
1783 chunkMiddle(player, {_x}, {_y}, {_z}, {_world}, "show")
1784 stop
1785 #
1786 set {_ph} to "%number of gold ingot in player's inventory%" parsed as number
1787 set {_cn} to checkFile("Guild-Management.Required-Gold-To-Create", "config") parsed as number
1788 if {_ph} is greater or equal to {_cn}:
1789 remove {_cn} of gold ingot from player's inventory
1790 else:
1791 set {_msg} to {SG::Messages::Dont_Have_Gold_To_Create}
1792 replace all "{NUMBER}" with "%{_cn}%" in {_msg}
1793 send "%{SG::Messages::Prefix}% %{_msg}%" to player
1794 stop
1795 writeFile("Players.Guild-Name", "%{_downText}%", "playerdata/%uuid of player%")
1796 set {_startSlot} to checkFile("Guild-Management.Start-MaxSlot", "config") parsed as number
1797 #
1798 set {_ploc} to location of player
1799 set {_pchunk} to chunk at player
1800 create file "plugins/SUPERGUILDS/guilds/%{_downText}%.yml"
1801 wait 1 tick
1802 writeFile("Datas.Name", "%arg 2%", "guilds/%{_downText}%")
1803 writeFile("Datas.Creator", "%player%", "guilds/%{_downText}%")
1804 writeFile("Datas.Create-Time", "%now%", "guilds/%{_downText}%")
1805 writeFile("Datas.Leader", "%player%", "guilds/%{_downText}%")
1806 writeFile("Datas.Emblem", "8;8;7;7;7;7;8;8;8;7;7;7;7;7;7;8;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;7;8;7;7;7;7;7;7;8;8;8;7;7;7;7;8;8;f", "guilds/%{_downText}%")
1807 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool" and "Worker":
1808 clear {_max}
1809 clear {_start}
1810 set {_max} to checkFile("Guild-Management.Resources.%loop-value%.Start-Max", "config") parsed as number
1811 set {_start} to checkFile("Guild-Management.Resources.%loop-value%.Start-Amount", "config") parsed as number
1812 writeFile("Datas.Resources.%loop-value%.Has", "%{_start}%", "guilds/%{_downText}%")
1813 writeFile("Datas.Resources.%loop-value%.Max", "%{_max}%", "guilds/%{_downText}%")
1814 writeFile("Datas.Division", "0", "guilds/%{_downText}%")
1815 writeFile("Datas.War-Points", "1", "guilds/%{_downText}%")
1816 writeFile("Datas.Max-Slot", "%{_startSlot}%", "guilds/%{_downText}%")
1817 writeFile("Datas.Buildings.Townhall.Level", "1", "guilds/%{_downText}%")
1818 {_startWTownhallLevel} is "true":
1819 wait 1 tick
1820 writeFile("Datas.Max-Slot", "%{_startSlot}*6%", "guilds/%{_downText}%")
1821 writeFile("Datas.Buildings.Townhall.Level", "6", "guilds/%{_downText}%")
1822 writeFile("Datas.Buildings.Barrack.Level", "1", "guilds/%{_downText}%")
1823 writeFile("Datas.Buildings.Storage.Level", "1", "guilds/%{_downText}%")
1824 writeFile("Datas.Buildings.Alchemy.Level", "1", "guilds/%{_downText}%")
1825 writeFile("Datas.Buildings.Townhall.Status", "0", "guilds/%{_downText}%")
1826 writeFile("Datas.Buildings.Barrack.Status", "0", "guilds/%{_downText}%")
1827 writeFile("Datas.Buildings.Storage.Status", "0", "guilds/%{_downText}%")
1828 writeFile("Datas.Buildings.Alchemy.Status", "0", "guilds/%{_downText}%")
1829 writeFile("Datas.War-Kills", "0", "guilds/%{_downText}%")
1830 writeFile("Datas.War-Deaths", "0", "guilds/%{_downText}%")
1831 writeFile("Datas.War-Wins", "0", "guilds/%{_downText}%")
1832 writeFile("Datas.War-Loses", "0", "guilds/%{_downText}%")
1833 writeFile("Datas.War-Status", "*", "guilds/%{_downText}%")
1834 writeFile("Datas.Claimed-Land", "0", "guilds/%{_downText}%")
1835 writeFile("Datas.Invite-Time", "*%month%;*%day%;*%hour%;*%minute%;*%second%", "guilds/%{_downText}%")
1836 writeFile("Datas.Show-Claims-Time", "*%month%;*%day%;*%hour%;*%minute%;*%second%", "guilds/%{_downText}%")
1837 writeFile("Datas.War-Invite", "*%month%;*%day%;*%hour%;*%minute%;*%second%", "guilds/%{_downText}%")
1838 writeFile("Datas.Players.%uuid of player%.Username", "%player%", "guilds/%{_downText}%")
1839 writeFile("Datas.Players.%uuid of player%.Rank", "Leader", "guilds/%{_downText}%")
1840 writeFile("Datas.Players.%uuid of player%.Join-Date", "%now%", "guilds/%{_downText}%")
1841 writeFile("Datas.Players.%uuid of player%.War-Kills", "0", "guilds/%{_downText}%")
1842 writeFile("Datas.Players.%uuid of player%.War-Deaths", "0", "guilds/%{_downText}%")
1843 loop "Wood" and "Stone" and "Iron" and "Gold" and "Diamond" and "Wool" and "Worker":
1844 writeFile("Datas.Players.%uuid of player%.Donated-Resource.%loop-value%", "0", "guilds/%{_downText}%")
1845 writeFile("Datas.Home-Location", "%player's x coordinate%;%player's y coordinate%;%player's z coordinate%;%world of player%", "guilds/%{_downText}%")
1846 writeFile("Datas.Center-Location", "%player's x coordinate%;%player's y coordinate%;%player's z coordinate%;%world of player%", "guilds/%{_downText}%")
1847 {_Claims} is "true":
1848 {_StartW} is "true":
1849 writeFile("Regions", "%{_downText}%", "chunks/%chunk at location of player%")
1850 writeFile("Datas.Claimed-Land", "1", "guilds/%{_downText}%")
1851 set {_x} to x coordinate of player
1852 set {_y} to y coordinate of player
1853 set {_z} to z coordinate of player
1854 set {_world} to world of player
1855 #
1856 set {_townhall} to "%uncolored {SG::Messages::Buildings_Name_Townhall}%"
1857 writeFile("Datas.Claims.%chunk at player%", "%player's x coordinate%;%player's y coordinate%;%player's z coordinate%;%world of player%;%{_townhall}%", "guilds/%{_downText}%")
1858 #
1859 {_Sch} is "true":
1860 set {_pos1} to location of block at block 7 behind block 8 east block under {_ploc}
1861 set {_pos2} to location of block at block 8 forward block 7 west block 8 above {_ploc}
1862 writeFile("Datas.Buildings.Townhall.Schematic.Main-Chunk", "%{_pchunk}%", "guilds/%{_downText}%")
1863 writeFile("Datas.Buildings.Townhall.Schematic.Pos-1", "%{_pos1}'s x coordinate%;%{_pos1}'s y coordinate%;%{_pos1}'s z coordinate%;%world of player%", "guilds/%{_downText}%")
1864 writeFile("Datas.Buildings.Townhall.Schematic.Pos-2", "%{_pos2}'s x coordinate%;%{_pos2}'s y coordinate%;%{_pos2}'s z coordinate%;%world of player%", "guilds/%{_downText}%")
1865 writeFile("Datas.Buildings.Townhall.Schematic.Center", "%{_ploc}'s x coordinate%;%{_ploc}'s y coordinate%;%{_ploc}'s z coordinate%;%world of player%", "guilds/%{_downText}%")
1866 #
1867 if {_startWTownhallLevel} is "true":
1868 schematicAPI("%player%", "1", "Townhall", "6", "%{_downText}%")
1869 else:
1870 schematicAPI("%player%", "1", "Townhall", "1", "%{_downText}%")
1871 wait 3 ticks
1872 chunkMiddle(player, {_x}, {_y}, {_z}, {_world}, "create")
1873 set {_message} to "%{SG::Messages::Created_Guild}%"
1874 replace all "{GUILD}" with "%arg 2%" in {_message}
1875 replace all "{PLAYER}" with "%name of player%" in {_message}
1876 broadcast "%{SG::Messages::Prefix}% %{_message}%"
1877 guildManagement(player)
1878 else:
1879 send "%{SG::Messages::Prefix}% %{SG::Messages::Land_Error}%" to player
1880 send "%{SG::Messages::Prefix}% %{SG::Messages::House_Protection}%" to player
1881 else:
1882 send "%{SG::Messages::Prefix}% %{SG::Messages::Guild_Name_Length}%" to player
1883 else:
1884 send "%{SG::Messages::Prefix}% %{SG::Messages::That_Guild_Exists}%" to player
1885 else:
1886 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_Guild_Name}%" to player
1887 else:
1888 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Have_Guild}%" to player
1889 else:
1890 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
1891 else if arg 1 is "remove" or "disband" or "kapat" or "yık":
1892 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.remove" or "guilds.disband":
1893 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
1894 if {_pg} is not "*":
1895 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
1896 if {_r} is "Leader":
1897 set {_remove} to checkFile("Players.Remove-Command-Confirm", "playerdata/%uuid of player%")
1898 if {_remove} is "*":
1899 send "%{SG::Messages::Prefix}% %{SG::Messages::Remove_Confirm}%" to player
1900 writeFile("Players.Remove-Command-Confirm", "true", "playerdata/%uuid of player%")
1901 else:
1902 send "%{SG::Messages::Prefix}% %{SG::Messages::Guild_Removed}%" to player
1903 disbandGuild("%{_pg}%")
1904 writeFile("Players.Remove-Command-Confirm", "*", "playerdata/%uuid of player%")
1905 else:
1906 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Arent_Leader}%" to player
1907 else:
1908 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
1909 else:
1910 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
1911 else if arg 1 is "home" or "ev":
1912 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.home":
1913 set {_h} to checkFile("Guild-Management.Homes", "config")
1914 if {_h} is "true":
1915 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
1916 if {_pg} is not "*":
1917 set {_location::*} to checkFile("Datas.Home-Location", "guilds/%{_pg}%") split at ";"
1918 set {_x} to {_location::1} parsed as number
1919 set {_y} to {_location::2} parsed as number
1920 set {_z} to {_location::3} parsed as number
1921 set {_w} to {_location::4} parsed as world
1922 teleporterAPI(player, {_x}, {_y}, {_z}, {_w})
1923 else:
1924 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
1925 else:
1926 send "%{SG::Messages::Prefix}% %{SG::Messages::Option_Disabled}%" to player
1927 else:
1928 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
1929 else if arg 1 is "market" or "pazar":
1930 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.home":
1931 set {_h} to checkFile("Guild-Management.Markets", "config")
1932 if {_h} is "true":
1933 if arg 2 is set:
1934 set {_downText} to "%arg-2%" to all lower case
1935 if file "plugins/SUPERGUILDS/guilds/%{_downText}%.yml" exists:
1936 set {_m} to checkFile("Datas.Market-Location", "guilds/%arg 2%")
1937 if {_m} is not "*":
1938 set {_location::*} to checkFile("Datas.Market-Location", "guilds/%arg 2%") split at ";"
1939 set {_x} to {_location::1} parsed as number
1940 set {_y} to {_location::2} parsed as number
1941 set {_z} to {_location::3} parsed as number
1942 set {_w} to {_location::4} parsed as world
1943 teleporterAPI(player, {_x}, {_y}, {_z}, {_w})
1944 #set {_msg} to {SG::Messages::Visit_Market}
1945 #replace all "{PLAYER}" with "%player%" in {_msg}
1946 #guildBroadcast("%arg 2%","%{_msg}%")
1947 #set {_msg} to {SG::Messages::Teleport_Market}
1948 #set {_aname} to checkFile("Datas.Name", "guilds/%arg 2%")
1949 #replace all "{GUILD}" with "%{_aname}%" in {_msg}
1950 #send "%{SG::Messages::Prefix}% %{_msg}%" to player
1951 #playSound(player, "BLOCK_PORTAL_TRAVEL", "ENDERMAN_TELEPORT", 1)
1952 else:
1953 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Market_Guild}%" to player
1954 else:
1955 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Guild_Like_This}%" to player
1956 else:
1957 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_Guild_Name}%" to player
1958 else:
1959 send "%{SG::Messages::Prefix}% %{SG::Messages::Option_Disabled}%" to player
1960 else:
1961 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
1962 else if arg 1 is "setmarket" or "pazarbelirle":
1963 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.sethome":
1964 set {_h} to checkFile("Guild-Management.Markets", "config")
1965 if {_h} is "true":
1966 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
1967 if {_pg} is not "*":
1968 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
1969 if {_r} is "Leader" or "General" or "Captain":
1970 set {_chunk} to checkFile("Regions", "chunks/%chunk at location of player%")
1971 if {_chunk} is "%{_pg}%":
1972 if block under player isn't lava source or water source or air:
1973 writeFile("Datas.Market-Location", "%player's x coordinate%;%player's y coordinate%;%player's z coordinate%;%world of player%", "guilds/%{_pg}%")
1974 send "%{SG::Messages::Prefix}% %{SG::Messages::Done_Set_Market}%" to player
1975 else:
1976 send "%{SG::Messages::Prefix}% %{SG::Messages::Land_Error}%" to player
1977 else:
1978 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_This_Chunk}%" to player
1979 else:
1980 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
1981 else:
1982 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
1983 else:
1984 send "%{SG::Messages::Prefix}% %{SG::Messages::Option_Disabled}%" to player
1985 else:
1986 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
1987 else if arg 1 is "delmarket" or "pazarkaldır":
1988 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.sethome":
1989 set {_h} to checkFile("Guild-Management.Markets", "config")
1990 if {_h} is "true":
1991 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
1992 if {_pg} is not "*":
1993 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
1994 if {_r} is "Leader" or "General" or "Captain":
1995 set {_chunk} to checkFile("Regions", "chunks/%chunk at location of player%")
1996 if {_chunk} is "%{_pg}%":
1997 if checkFile("Datas.Market-Location", "guilds/%{_pg}%") is not "*":
1998 writeFile("Datas.Market-Location", "*", "guilds/%{_pg}%")
1999 send "%{SG::Messages::Prefix}% %{SG::Messages::Done_Remove_Market}%" to player
2000 else:
2001 send "%{SG::Messages::Prefix}% %{SG::Messages::Already_Have_Market}%" to player
2002 else:
2003 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_This_Chunk}%" to player
2004 else:
2005 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2006 else:
2007 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2008 else:
2009 send "%{SG::Messages::Prefix}% %{SG::Messages::Option_Disabled}%" to player
2010 else:
2011 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2012 else if arg 1 is "sethome" or "evbelirle":
2013 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.sethome":
2014 set {_h} to checkFile("Guild-Management.Homes", "config")
2015 if {_h} is "true":
2016 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2017 if {_pg} is not "*":
2018 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2019 if {_r} is "Leader" or "General" or "Captain":
2020 set {_chunk} to checkFile("Regions", "chunks/%chunk at location of player%")
2021 if {_chunk} is "%{_pg}%":
2022 if block under player isn't lava source or water source or air:
2023 if checkFile("Regions", "chunks/%chunk at location of player%") is "%{_pg}%":
2024 set {_Sch} to checkFile("General.Schematics", "config")
2025 {_Sch} is "true":
2026 set {_c} to chunk at player
2027 set {_x} to x coordinate of player
2028 set {_y} to y coordinate of player
2029 set {_z} to z coordinate of player
2030 set {_world} to world of player
2031 if chunk at block under block 7 north is not {_c}:
2032 chunkMiddle(player, {_x}, {_y}, {_z}, {_world}, "sethome")
2033 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Middle}%"
2034 stop
2035 if chunk at block under block 7 south is not {_c}:
2036 chunkMiddle(player, {_x}, {_y}, {_z}, {_world}, "sethome")
2037 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Middle}%"
2038 stop
2039 if chunk at block under block 7 west is not {_c}:
2040 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Middle}%"
2041 chunkMiddle(player, {_x}, {_y}, {_z}, {_world}, "sethome")
2042 stop
2043 if chunk at block under block 7 east is not {_c}:
2044 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Middle}%"
2045 chunkMiddle(player, {_x}, {_y}, {_z}, {_world}, "sethome")
2046 stop
2047 writeFile("Datas.Home-Location", "%player's x coordinate%;%player's y coordinate%;%player's z coordinate%;%world of player%", "guilds/%{_pg}%")
2048 send "%{SG::Messages::Prefix}% %{SG::Messages::Done_Set_Home}%" to player
2049 set {_pos1} to location of block at block 7 behind block 8 east block under player
2050 set {_pos2} to location of block at block 8 forward block 7 west block 8 above player
2051 writeFile("Datas.Buildings.Townhall.Schematic.Main-Chunk", "%chunk at player%", "guilds/%{_pg}%")
2052 writeFile("Datas.Buildings.Townhall.Schematic.Pos-1", "%{_pos1}'s x coordinate%;%{_pos1}'s y coordinate%;%{_pos1}'s z coordinate%;%world of player%", "guilds/%{_pg}%")
2053 writeFile("Datas.Buildings.Townhall.Schematic.Pos-2", "%{_pos2}'s x coordinate%;%{_pos2}'s y coordinate%;%{_pos2}'s z coordinate%;%world of player%", "guilds/%{_pg}%")
2054 writeFile("Datas.Buildings.Townhall.Schematic.Center", "%player's x coordinate%;%player's y coordinate%;%player's z coordinate%;%world of player%", "guilds/%{_pg}%")
2055 else:
2056 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Error_You}%" to player
2057 else:
2058 send "%{SG::Messages::Prefix}% %{SG::Messages::Land_Error}%" to player
2059 else:
2060 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_This_Chunk}%" to player
2061 else:
2062 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2063 else:
2064 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2065 else:
2066 send "%{SG::Messages::Prefix}% %{SG::Messages::Option_Disabled}%" to player
2067 else:
2068 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2069 else if arg 1 is "claim" or "koruma":
2070 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.claim":
2071 set {_c} to checkFile("General.Claims", "config")
2072 if {_c} is "true":
2073 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2074 if {_pg} is not "*":
2075 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2076 if {_r} is "Leader" or "General" or "Captain":
2077 set {_gold} to checkFile("Datas.Resources.Gold.Has", "guilds/%{_pg}%") parsed as number
2078 set {_required} to checkFile("Guild-Management.Claim-Gold-Cost", "config") parsed as number
2079 set {_claimed} to checkFile("Datas.Claimed-Land", "guilds/%{_pg}%") parsed as number
2080 set {_limit} to checkFile("Guild-Management.Max-Claim-Limit", "config") parsed as number
2081 {_limit} is not set:
2082 set {_limit} to 50
2083 if {_claimed} is greater or equal to {_limit}:
2084 send "%{SG::Messages::Prefix}% %{SG::Messages::Claim_Limit}%" to player
2085 stop
2086 if {_gold} is greater or equal to {_required}:
2087 set {_wg} to checkFile("General.WorldGuard-Support", "config")
2088 {_wg} is "true":
2089 player cannot build at player's location
2090 send "%{SG::Messages::Prefix}% %{SG::Messages::WorldGuard_Error}%" to player
2091 stop
2092 set {_disabled::*} to checkFile("General.Claim-Disabled-Worlds", "config") split at ","
2093 size of {_disabled::*} > 0:
2094 loop size of {_disabled::*} times:
2095 "%{_disabled::%loop-number%}%" is "%world of player%"
2096 send "%{SG::Messages::Prefix}% %{SG::Messages::Option_Disabled}%" to player
2097 stop
2098 set {_chunk} to checkFile("Regions", "chunks/%chunk at location of player%")
2099 if {_chunk} is "%{_pg}%":
2100 send "%{SG::Messages::Prefix}% %{SG::Messages::Claim_Error}%" to player
2101 stop
2102 else if {_chunk} is not "*":
2103 if checkFile("Guild-Management.Capture-Land-From-Guilds", "config") is "true" or "*":
2104 set {_levelBy} to checkFile("Datas.Division", "guilds/%{_pg}%") parsed as number
2105 {_levelBy} is not set:
2106 set {_levelBy} to 0
2107 writeFile("Datas.Division", "0", "guilds/%{_pg}%")
2108 set {_levelOwn} to checkFile("Datas.Division", "guilds/%{_chunk}%") parsed as number
2109 {_levelOwn} is not set:
2110 set {_levelOwn} to 0
2111 writeFile("Datas.Division", "0", "guilds/%{_chunk}%")
2112 {_levelBy} is less or equal to {_levelOwn}:
2113 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Claim_Level}%" to player
2114 stop
2115 configuration section "Datas.Allies" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml" contains "%{_chunk}%":
2116 send "%{SG::Messages::Prefix}% %{SG::Messages::Cannot_Claim_Allies}%" to player
2117 stop
2118 set {_message} to {SG::Messages::Attacking_You}
2119 replace all "{ATTACKER}" with "%{_pg}%" in {_message}
2120 replace all "{LAND}" with "%location of player%" in {_message}
2121 guildBroadcast({_chunk},"%{_message}%")
2122 set {_message} to {SG::Messages::Attacked_Chunk}
2123 replace all "{OWN}" with "%{_chunk}%" in {_message}
2124 replace all "{LAND}" with "%location of player%" in {_message}
2125 guildBroadcast({_pg},"%{_message}%")
2126 degerCikar("Datas.Claimed-Land", 1, "guilds/%{_chunk}%")
2127 else:
2128 set {_msg} to {SG::Messages::You_Cant_Action}
2129 replace "{BUILD}" with "%{_chunk}%" in {_msg}
2130 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2131 stop
2132 writeFile("Regions", "%{_pg}%", "chunks/%chunk at location of player%")
2133 writeFile("Datas.Claims.%chunk at player%", "%player's x coordinate%;%player's y coordinate%;%player's z coordinate%;%world of player%", "guilds/%{_pg}%")
2134 degerCikar("Datas.Resources.Gold.Has", {_required}, "guilds/%{_pg}%")
2135 degerEkle("Datas.Claimed-Land", 1, "guilds/%{_pg}%")
2136 set {_message} to {SG::Messages::Chunk_Claimed}
2137 replace all "{LAND}" with "%location of player%" in {_message}
2138 guildBroadcast({_pg},"%{_message}%")
2139 set {_x} to x coordinate of player
2140 set {_y} to y coordinate of player
2141 set {_z} to z coordinate of player
2142 set {_world} to world of player
2143 chunkMiddle(player, {_x}, {_y}, {_z}, {_world}, "claim")
2144 else:
2145 set {_msg} to {SG::Messages::You_Need_More_Resource}
2146 replace all "{RESOURCE}" with "%{SG::Messages::Resource_Gold}%" in {_msg}
2147 replace all "{AMOUNT}" with "%{_required} - {_gold}%" in {_msg}
2148 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2149 else:
2150 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2151 else:
2152 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2153 else:
2154 send "%{SG::Messages::Prefix}% %{SG::Messages::Option_Disabled}%" to player
2155 else:
2156 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2157 else if arg 1 is "unclaim" or "korumasil":
2158 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.unclaim":
2159 set {_c} to checkFile("General.Claims", "config")
2160 if {_c} is "true":
2161 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2162 if {_pg} is not "*":
2163 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2164 if {_r} is "Leader" or "General" or "Captain":
2165 set {_chunk} to checkFile("Regions", "chunks/%chunk at location of player%")
2166 if {_chunk} is "%{_pg}%":
2167 add "Townhall" and "Barrack" and "Storage" and "Alchemy" to {_builds::*}
2168 loop {_builds::*}:
2169 clear {_buildMainChunk}
2170 set {_buildMainChunk} to checkFile("Datas.%loop-value%.Schematic.Main-Chunk", "guilds/%{_pg}%")
2171 {_buildMainChunk} is "%chunk of player%"
2172 set {_msg} to {SG::Messages::You_Cant_Unclaim}
2173 replace all "{BUILD}" with "%uncolored {SG::Messages::Buildings_Name_%loop-value%}%" in {_msg}
2174 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2175 stop
2176 set {_message} to {SG::Messages::Chunk_Unclaimed}
2177 replace all "{PLAYER}" with "%player%" in {_message}
2178 replace all "{LAND}" with "%location of player%" in {_message}
2179 guildBroadcast({_pg},"%{_message}%")
2180 set {_required} to checkFile("Guild-Management.Claim-Gold-Cost", "config") parsed as number
2181 set {_gived} to {_required}/2
2182 degerEkle("Datas.Resources.Gold.Has", {_gived}, "guilds/%{_pg}%")
2183 degerCikar("Datas.Claimed-Land", 1, "guilds/%{_pg}%")
2184 delete file "plugins/SUPERGUILDS/chunks/%chunk at location of player%.yml"
2185 #
2186 veriCikar("Datas.Claims", "%chunk at player%", "guilds/%{_pg}%")
2187 #
2188 set {_x} to x coordinate of player
2189 set {_y} to y coordinate of player
2190 set {_z} to z coordinate of player
2191 set {_world} to world of player
2192 chunkMiddle(player, {_x}, {_y}, {_z}, {_world}, "unclaim")
2193 else:
2194 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Error_You}%" to player
2195 else:
2196 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2197 else:
2198 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2199 else:
2200 send "%{SG::Messages::Prefix}% %{SG::Messages::Option_Disabled}%" to player
2201 else:
2202 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2203 else if arg 1 is "kick" or "at":
2204 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.kick":
2205 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2206 if {_pg} is not "*":
2207 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2208 if {_r} is "Leader" or "General" or "Captain":
2209 pageAPI(player, "3", 0)
2210 else:
2211 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2212 else:
2213 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2214 else:
2215 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2216 else if arg 1 is "emblem" or "desc" or "amblem":
2217 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.desc" or "guilds.emblem":
2218 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2219 if {_pg} is not "*":
2220 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2221 if {_r} is "Leader" or "General":
2222 if arg 2 is not set:
2223 guildEmblemGUI(player)
2224 else if arg 2 is "Save":
2225 set {_design} to checkFile("Players.Emblem-Design", "playerdata/%uuid of player%")
2226 writeFile("Datas.Emblem", "%{_design}%", "guilds/%{_pg}%")
2227 send "%{SG::Messages::Prefix}% %{SG::Messages::Emblem_Saved}%" to player
2228 set {_message} to {SG::Messages::Guild_Emblem_Changed}
2229 replace all "{PLAYER}" with "%player%" in {_message}
2230 guildBroadcast({_pg},"%{_message}%")
2231 playSound(player, "ENTITY_ARROW_HIT_PLAYER", "SUCCESSFUL_HIT", 1)
2232 else if arg 2 is "Reset":
2233 set {_design} to "7"
2234 loop 64 times:
2235 set {_design} to "%{_design}%;7"
2236 writeFile("Players.Emblem-Design", "%{_design}%", "playerdata/%uuid of player%")
2237 guildEmblemGUI(player)
2238 playSound(player, "ENTITY_CAT_PURREOW", "CAT_PURREOW", 1)
2239 else if arg 2 is "Color":
2240 set {_num} to "%arg 3%" parsed as number
2241 if {_num} is between 0 and 15:
2242 set {_sw::0} to "0"
2243 set {_sw::1} to "1"
2244 set {_sw::2} to "2"
2245 set {_sw::3} to "3"
2246 set {_sw::4} to "4"
2247 set {_sw::5} to "5"
2248 set {_sw::6} to "6"
2249 set {_sw::7} to "7"
2250 set {_sw::8} to "8"
2251 set {_sw::9} to "9"
2252 set {_sw::10} to "a"
2253 set {_sw::11} to "b"
2254 set {_sw::12} to "c"
2255 set {_sw::13} to "d"
2256 set {_sw::14} to "e"
2257 set {_sw::15} to "f"
2258 writeFile("Players.Selected-Color", "%{_sw::%arg 3%}%", "playerdata/%uuid of player%")
2259 guildEmblemGUI(player)
2260 playSound(player, "ENTITY_CHICKEN_EGG", "CHICKEN_EGG_POP", 1)
2261 else:
2262 send "%{SG::Messages::Prefix}% %{SG::Messages::Select_Color}%" to player
2263 else if arg 2 is "Select":
2264 set {_num} to "%arg 3%" parsed as number
2265 if {_num} is set:
2266 {_num} is between 1 and 64
2267 set {_design} to checkFile("Players.Emblem-Design", "playerdata/%uuid of player%")
2268 {_design} is "*":
2269 set {_design} to "7"
2270 loop 64 times:
2271 set {_design} to "%{_design}%;7"
2272 writeFile("Players.Emblem-Design", "%{_design}%", "playerdata/%uuid of player%")
2273 set {_playercolor} to checkFile("Players.Selected-Color", "playerdata/%uuid of player%")
2274 {_playercolor} is "*":
2275 set {_playercolor} to "7"
2276 set {_unicodes::*} to {_design} split at ";"
2277 set {_unicodes::%{_num}%} to "%{_playercolor}%"
2278 set {_desc} to ""
2279 loop {_unicodes::*}:
2280 if {_desc} is not "":
2281 set {_desc} to "%{_desc}%;%loop-value%"
2282 else:
2283 set {_desc} to "%loop-value%"
2284 writeFile("Players.Emblem-Design", "%{_desc}%", "playerdata/%uuid of player%")
2285 guildEmblemGUI(player)
2286 playSound(player, "BLOCK_WOOD_BUTTON_CLICK_ON", "WOOD_CLICK", 1)
2287 else:
2288 send "%{SG::Messages::Prefix}% %{SG::Messages::Select_Code}%" to player
2289 else if arg 2 is "Use":
2290 set {_design} to checkFile("Datas.Emblem", "guilds/%{_pg}%")
2291 writeFile("Players.Emblem-Design", "%{_design}%", "playerdata/%uuid of player%")
2292 guildEmblemGUI(player)
2293 playSound(player, "BLOCK_TRIPWIRE_CLICK_ON", "CLICK", 1)
2294 else:
2295 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2296 else:
2297 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2298 else:
2299 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2300 else if arg 1 is "motd":
2301 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.motd":
2302 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2303 if {_pg} is not "*":
2304 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2305 if {_r} is "Leader" or "General":
2306 set {_motd} to checkFile("Datas.MOTD", "guilds/%{_pg}%")
2307 if arg 2 is set:
2308 writeFile("Datas.MOTD", "%player%;%now%;%arg 2%", "guilds/%{_pg}%")
2309 set {_msg} to {SG::Messages::MOTD_Changed}
2310 replace all "{BY}" with "%player%" in {_msg}
2311 guildBroadcast({_pg}, "%{_msg}%")
2312 else if {_motd} is "*":
2313 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_MOTD}%" to player
2314 else:
2315 writeFile("Datas.MOTD", "*", "guilds/%{_pg}%")
2316 set {_msg} to {SG::Messages::MOTD_Removed}
2317 replace all "{BY}" with "%player%" in {_msg}
2318 guildBroadcast({_pg}, "%{_msg}%")
2319 else:
2320 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2321 else:
2322 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2323 else:
2324 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2325 else if arg 1 is "chat" or "c" or "sohbet":
2326 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.chat" or "guilds.c":
2327 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2328 if {_pg} is not "*":
2329 set {_chat} to checkFile("Players.Chat-Enabled", "playerdata/%uuid of player%")
2330 if {_chat} is "true":
2331 writeFile("Players.Chat-Enabled", "false", "playerdata/%uuid of player%")
2332 send "%{SG::Messages::Prefix}% %{SG::Messages::Disabled_Chat}%" to player
2333 else:
2334 writeFile("Players.Chat-Enabled", "true", "playerdata/%uuid of player%")
2335 send "%{SG::Messages::Prefix}% %{SG::Messages::Enabled_Chat}%" to player
2336 else:
2337 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2338 else:
2339 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2340 else if arg 1 is "members" or "üyeler":
2341 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.members":
2342 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2343 if {_pg} is not "*":
2344 pageAPI(player, "3", 0)
2345 else:
2346 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2347 else:
2348 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2349 else if arg 1 is "info" or "bilgi":
2350 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.info":
2351 if arg 2 is set:
2352 set {_downText} to "%arg-2%" to all lower case
2353 if file "plugins/SUPERGUILDS/guilds/%{_downText}%.yml" exists:
2354 guildInfo(player, "%{_downText}%")
2355 else:
2356 set {_p} to "%arg 2%" parsed as player
2357 if {_p} is set:
2358 set {_uuid} to "%uuid of {_p}%"
2359 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%{_uuid}%")
2360 if {_pg} is not "*":
2361 guildInfo(player, "%{_pg}%")
2362 else:
2363 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2364 else:
2365 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Guild_Like_This}%" to player
2366 else:
2367 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2368 if {_pg} is not "*":
2369 guildInfo(player, "%{_pg}%")
2370 else:
2371 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2372 else:
2373 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2374 else if arg 1 is "stats" or "istatistik":
2375 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.stats":
2376 if arg 2 is set:
2377 set {_arg} to "%arg 2%" parsed as offline player
2378 set {_uuid} to "%uuid of {_arg}%"
2379 set {_username} to checkFile("Players.Username", "playerdata/%{_uuid}%")
2380 if {_username} is not "*":
2381 playerInfo(player, {_arg})
2382 else:
2383 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Player_Like_This}%" to player
2384 else:
2385 playerInfo(player, player)
2386 else:
2387 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2388 else if arg 1 is "list" or "liste" or "pazarlar" or "markets":
2389 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.list":
2390 pageAPI(player, "0", 0)
2391 else:
2392 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2393 else if arg 1 is "rank" or "rütbe":
2394 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.rank":
2395 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2396 if {_pg} is not "*":
2397 pageAPI(player, "3", 0)
2398 else:
2399 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2400 else:
2401 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2402 else if arg 1 is "buildings" or "binalar":
2403 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.buildings":
2404 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2405 if {_pg} is not "*":
2406 if arg 2 is "upgrade":
2407 if arg 3 is "Townhall" or "Barrack" or "Storage" or "Alchemy":
2408 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2409 if {_r} is "Leader" or "General":
2410 set {_Type} to "%arg-3%" to all lower case
2411 set {_Type} to 1st char in each word of "%arg 3%" to caps
2412 upgradeBuild(player, {_pg}, "%{_Type}%")
2413 else:
2414 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2415 else:
2416 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_Building_Type}%" to player
2417 else:
2418 buildingsGUI(player)
2419 else:
2420 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2421 else:
2422 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2423 else if arg 1 is "alchemy" or "büyücü":
2424 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.alchemy":
2425 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2426 if {_pg} is not "*":
2427 alchemyGUI(player)
2428 else:
2429 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2430 else:
2431 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2432 else if arg 1 is "store" or "depo" or "storage":
2433 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.store" or "guilds.storage":
2434 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2435 if {_pg} is not "*":
2436 storeGUI(player)
2437 else:
2438 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2439 else:
2440 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2441 else if arg 1 is "invite" or "davet":
2442 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.invite":
2443 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2444 if {_pg} is not "*":
2445 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2446 if {_r} is "Leader" or "General" or "Captain":
2447 if arg 2 is set:
2448 if arg 2 is not "%player%":
2449 set {_invitedPlayer} to "%arg 2%" parsed as player
2450 set {_uuidInvited} to "%uuid of {_invitedPlayer}%"
2451 set {_invitedGuild} to checkFile("Players.Guild-Name", "playerdata/%{_uuidInvited}%")
2452 if {_invitedGuild} is "*":
2453 set {_invites} to checkFile("Players.Invites-Enabled", "playerdata/%{_uuidInvited}%")
2454 if {_invites} is "*" or "true":
2455 set {_maxslot} to checkFile("Datas.Max-Slot", "guilds/%{_pg}%") parsed as integer
2456 set {_s} to sayiGoster("Datas.Players", "0", "guilds/%{_pg}%")
2457 if {_s} is less than {_maxslot}:
2458 set {_number} to checkFile("General.Invite-Time", "config") parsed as number
2459 set {_getGuildTimer} to checkFile("Datas.Invite-Time", "guilds/%{_pg}%")
2460 set {_inviteCheck} to timeChecker("%{_pg}%", "%{_getGuildTimer}%", "Invite-Time")
2461 if {_inviteCheck} is "true":
2462 set {_saatYaz} to getTime("%month%", "%day%", "%hour%", "%minute%", "%second+{_number}%")
2463 writeFile("Datas.Show-Claims-Time", "%{_saatYaz}%", "guilds/%{_pg}%")
2464 inviteGUI({_invitedPlayer}, {_pg}, "gui")
2465 send "%{SG::Messages::Prefix}% %{SG::Messages::Invite_Send}%" to player
2466 set {_saatYaz} to getTime("%month%", "%day%", "%hour%", "%minute%", "%second+{_inviteCheck}%")
2467 writeFile("Datas.Invite-Time", "%{_saatYaz}%", "guilds/%{_pg}%")
2468 else:
2469 set {_msg} to {SG::Messages::Invite_Wait}
2470 replace all "{TIME}" with "%{_inviteCheck}%" in {_msg}
2471 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2472 else:
2473 send "%{SG::Messages::Prefix}% %{SG::Messages::Your_Guild_Is_Full}%" to player
2474 else:
2475 send "%{SG::Messages::Prefix}% %{SG::Messages::Player_Closed_Invites}%" to player
2476 else:
2477 send "%{SG::Messages::Prefix}% %{SG::Messages::Player_Has_Guild}%" to player
2478 else:
2479 send "%{SG::Messages::Prefix}% %{SG::Messages::Cant_Invite_Yourself}%" to player
2480 else:
2481 send "%{SG::Messages::Prefix}% %{SG::Messages::Invite_Player_Name}%" to player
2482 else:
2483 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2484 else:
2485 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2486 else:
2487 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2488 else if arg 1 is "invites" or "davetler":
2489 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.invites":
2490 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2491 if {_pg} is "*":
2492 set {_invites} to checkFile("Players.Invites-Enabled", "playerdata/%uuid of player%")
2493 if {_invites} is "*" or "true":
2494 writeFile("Players.Invites-Enabled", "false", "playerdata/%uuid of player%")
2495 send "%{SG::Messages::Prefix}% %{SG::Messages::Disabled_Invites}%" to player
2496 else:
2497 writeFile("Players.Invites-Enabled", "true", "playerdata/%uuid of player%")
2498 send "%{SG::Messages::Prefix}% %{SG::Messages::Enabled_Invites}%" to player
2499 else:
2500 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Have_Guild}%" to player
2501 else:
2502 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2503 else if arg 1 is "claimname" or "alanadı":
2504 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.claimname":
2505 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2506 if {_pg} is not "*":
2507 if arg 2 is set:
2508 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2509 if {_r} is "Leader" or "General" or "Captain":
2510 set {_chunk} to checkFile("Regions", "chunks/%chunk at location of player%")
2511 if {_chunk} is "%{_pg}%":
2512 set {_arg} to "%arg 2%"
2513 replace all "_" with " " in {_arg}
2514 writeFile("Datas.Claims.%chunk at player%", "%player's x coordinate%;%player's y coordinate%;%player's z coordinate%;%world of player%;%{_arg}%", "guilds/%{_pg}%")
2515 set {_msg} to {SG::Messages::ClaimName_Changed}
2516 replace all "{LOC}" with "%player's x coordinate% / %player's y coordinate% /%player's z coordinate%" in {_msg}
2517 replace all "{NAME}" with "%arg 2%" in {_msg}
2518 replace all "{BY}" with "%player%" in {_msg}
2519 guildBroadcast("%{_pg}%", "%{_msg}%")
2520 else:
2521 send "%{SG::Messages::Prefix}% %{SG::Messages::Chunk_Error_You}%" to player
2522 else:
2523 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2524 else:
2525 send "%{SG::Messages::Prefix}% %{SG::Messages::ClaimName_Usage}%" to player
2526 else:
2527 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2528 else:
2529 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2530 else if arg 1 is "donate" or "bağış":
2531 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.donate":
2532 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2533 if {_pg} is not "*":
2534 set {_GUI} to checkFile("General.Donate-With-GUI", "config")
2535 {_GUI} is "true":
2536 donateAPI(player, {_pg}, "GUI", 0)
2537 stop
2538 if arg 2 is set:
2539 if arg 2 is "wood" or "stone" or "iron" or "gold" or "diamond" or "wool" or "worker":
2540 set {_donatedType} to "%arg-2%" to all lower case
2541 set {_donatedType} to 1st char in each word of "%arg 2%" to caps
2542 set {_donatedItem} to {SG::Messages::Resource_DonateItemType_%arg 2%}
2543 set {_num} to "%arg 3%" parsed as integer
2544 if {_num} is set:
2545 if {_num} is greater than 0:
2546 set {_donatedItem} to "%{_num}% %{_donatedItem}%" parsed as material
2547 set {_currentR} to checkFile("Datas.Resources.%{_donatedType}%.Has", "guilds/%{_pg}%") parsed as integer
2548 set {_maxR} to checkFile("Datas.Resources.%{_donatedType}%.Max", "guilds/%{_pg}%") parsed as integer
2549 set {_newR} to {_currentR}+{_num}
2550 if {_newR} is less or equal to {_maxR}:
2551 if number of {_donatedItem} in player's inventory is greater or equal to {_num}:
2552 remove {_donatedItem} from player's inventory
2553 donateAPI(player, {_pg}, "%{_donatedType}%", {_num})
2554 else:
2555 set {_msg} to {SG::Messages::No_Item_Resouce}
2556 replace all "{NUMBER}" with "%{_num}%" in {_msg}
2557 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2558 else:
2559 set {_msg} to {SG::Messages::No_Storage}
2560 replace all "{NUMBER}" with "%{_num}%" in {_msg}
2561 replace all "{RESOURCE}" with "%{SG::Messages::Resource_%arg 2%}%" in {_msg}
2562 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2563 else:
2564 send "%{SG::Messages::Prefix}% %{SG::Messages::Donations_0}%" to player
2565 else:
2566 send ""
2567 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_An_Integer}%" to player
2568 send "%{SG::Messages::Prefix}% %{SG::Messages::Resource_Donate_Usage}%" to player
2569 send ""
2570 else:
2571 send "%{SG::Messages::Prefix}% %{SG::Messages::Resource_Donate_Usage}%" to player
2572 else:
2573 send "%{SG::Messages::Prefix}% %{SG::Messages::Resource_Donate_Usage}%" to player
2574 else:
2575 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2576 else:
2577 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2578 else if arg 1 is "leave" or "ayrıl":
2579 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.leave":
2580 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2581 if {_pg} is not "*":
2582 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2583 if {_r} is not "Leader":
2584 writeFile("Players.Guild-Name", "*", "playerdata/%uuid of player%")
2585 set {_name} to checkFile("Datas.Name", "guilds/%{_pg}%")
2586 veriCikar("Datas.Players", "%uuid of player%", "guilds/%{_pg}%")
2587 set {_msg} to {SG::Messages::You_Leave}
2588 replace all "{GUILD}" with "%{_name}%" in {_msg}
2589 send "%{SG::Messages::Prefix}% %{_msg}%"
2590 set {_msg} to {SG::Messages::Player_Leave}
2591 replace all "{RANK}" with "%{SG::Messages::Rank_%{_r}%}%" in {_msg}
2592 replace all "{PLAYER}" with "%player%" in {_msg}
2593 guildBroadcast({_pg}, "%{_msg}%")
2594 else:
2595 send "%{SG::Messages::Prefix}% %{SG::Messages::Leader_Leave}%" to player
2596 else:
2597 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2598 else:
2599 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2600 else if arg 1 is "pastebin" or "paste":
2601 if player has permission "guilds.*" or "guilds.admin" or "guilds.paste":
2602 set {_i} to pastebinAPI("%player%")
2603 if {_i} is not "Error":
2604 send "%{SG::Messages::Prefix}% &aLink: &f%{_i}%" to player
2605 else:
2606 set {_msg} to {SG::Messages::SYNC_Load_Error}
2607 replace all "{FILE}" with "Pastebin" in {_msg}
2608 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2609 else:
2610 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2611 else if arg 1 is "locale" or "language" or "dil":
2612 if player has permission "guilds.*" or "guilds.admin" or "guilds.locale" or "guilds.language":
2613 if arg 2 is set:
2614 if arg 2 is "en_US" or "tr_TR" or "es_ES" or "de_DE" or "it_IT" or "ru_RU" or "zh_CN" or "vn_VN":
2615 wait 1 ticks
2616 if file "plugins/SUPERGUILDS/locale/%arg 2%.sk" exists:
2617 set {SG::Locale} to "%arg 2%"
2618 Skript.load{"plugins/SUPERGUILDS/locale/%{SG::Locale}%.sk"};
2619 wait 2 ticks
2620 set {_msg} to {SG::Messages::Language_Select}
2621 replace all "{LANG}" with "%{SG::Locale}%" in {_msg}
2622 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2623 else if arg 2 is "en_US":
2624 set {SG::Locale} to "en_US"
2625 execute console command "/sk reload SUPERGUILDS_files"
2626 Skript.load{"plugins/SUPERGUILDS/locale/%{SG::Locale}%.sk"};
2627 wait 2 ticks
2628 set {_msg} to {SG::Messages::Language_Select}
2629 replace all "{LANG}" with "%{SG::Locale}%" in {_msg}
2630 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2631 else:
2632 set {_result} to text from "https://raw.githubusercontent.com/rplcnn/SuperGuilds/master/Locales/%arg-2%.sk"
2633 {_result} is not set:
2634 send "%{SG::Messages::Prefix}% %{SG::Messages::Locale_Error}%" to player
2635 stop
2636 set {SG::Locale} to "%arg 2%"
2637 repuska download file from "https://raw.githubusercontent.com/rplcnn/SuperGuilds/master/Locales/%arg-2%.sk" to file "plugins/SUPERGUILDS/locale/%{SG::Locale}%.sk"
2638 wait 1 seconds
2639 Skript.load{"plugins/SUPERGUILDS/locale/%{SG::Locale}%.sk"};
2640 wait 10 ticks
2641 set {_msg} to {SG::Messages::Language_Select}
2642 replace all "{LANG}" with "%{SG::Locale}%" in {_msg}
2643 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2644 else:
2645 localeGUI(player)
2646 else:
2647 localeGUI(player)
2648 else:
2649 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2650 else if arg 1 is "updatelocale":
2651 if player has permission "guilds.*" or "guilds.admin" or "guilds.updatelocale":
2652 set {_old} to {SG::Locale_Version}
2653 set {_num} to fileWriter(true)
2654 wait 1 ticks
2655 Skript.load{"plugins/SUPERGUILDS/locale/%{SG::Locale}%.sk"};
2656 set {_new} to {SG::Locale_Version}
2657 if {_old} is {_new}:
2658 if {_num} is greater than 0:
2659 set {_msg} to {SG::Messages::Updated_Locale_Replace}
2660 replace all "{NEW}" with "%{_num}%" in {_msg}
2661 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2662 else:
2663 send "%{SG::Messages::Prefix}% %{SG::Messages::Locale_Update_Already}%" to player
2664 else:
2665 set {_msg} to {SG::Messages::Updated_Locale}
2666 replace all "{OLD}" with "%{_old}%" in {_msg}
2667 replace all "{NEW}" with "%{_new}%" in {_msg}
2668 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2669 wait 1 ticks
2670 Skript.load{"plugins/SUPERGUILDS/locale/%{SG::Locale}%.sk"};
2671 else:
2672 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2673 else if arg 1 is "sync" or "eÅŸitle":
2674 if player has permission "guilds.*" or "guilds.admin" or "guilds.sync":
2675 if arg 2 is set:
2676 if arg 2 is "locale" or "config":
2677 if arg 2 is "config":
2678 delete file "plugins/SUPERGUILDS/config.yml"
2679 wait 1 second
2680 configUpdater(true)
2681 else if arg 2 is "locale":
2682 delete file "plugins/SUPERGUILDS/locale/%{SG::Locale}%.sk"
2683 wait 1 seconds
2684 if {SG::Locale} is not "en_US":
2685 repuska download file from "https://raw.githubusercontent.com/RepublicanSensei/SUPERGUILDS/master/Locales/%{SG::Locale}%.sk" to file "plugins/SUPERGUILDS/locale/%{SG::Locale}%.sk"
2686 wait 2 ticks
2687 Skript.load{"plugins/SUPERGUILDS/locale/%{SG::Locale}%.sk"};
2688 else:
2689 repuska dosya olustur "plugins/SUPERGUILDS/locale/en_US.sk"
2690 wait 5 ticks
2691 set {_f} to fileWriter(false)
2692 Skript.load{"plugins/Skript/scripts/SUPERGUILDS_files.sk"};
2693 set {_msg} to {SG::Messages::SYNC_Done}
2694 replace all "{FILE}" with "%arg 2%" in {_msg}
2695 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2696 else:
2697 send "%{SG::Messages::Prefix}% %{SG::Messages::SYNC_Enter_File}%" to player
2698 else:
2699 send "%{SG::Messages::Prefix}% %{SG::Messages::SYNC_Enter_File}%" to player
2700 else:
2701 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2702 else if arg 1 is "reload" or "yenidenyükle":
2703 if player has permission "guilds.*" or "guilds.admin" or "guilds.reload":
2704 send "%{SG::Messages::Prefix}% %{SG::Messages::Reloading_1}%" to player
2705 Skript.load{"plugins/Skript/scripts/SUPERGUILDS_files.sk"};
2706 send "%{SG::Messages::Prefix}% %{SG::Messages::Reloading_2}%" to player
2707 else:
2708 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2709 else if arg 1 is "version" or "versiyon":
2710 if player doesn't have permission "guilds.*" or "guilds.admin":
2711 set {_msg} to {superguilds::Version_Text}
2712 replace all "_" with " " in {_msg}
2713 replace all "{VERSION}" with "%{SG::Version}%" in {_msg}
2714 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2715 else:
2716 set {_scripts::*} to files in "plugins/Skript/scripts"
2717 set {_plugins::*} to files in "plugins"
2718 set {_config} to "true"
2719 set {_locale} to "false"
2720 set {_Controller} to single value "Guild-Management.Min-Name-Length" get of "plugins/SUPERGUILDS/config.yml"
2721 {_Controller} is not set:
2722 set {_config} to "false"
2723 file "plugins/SUPERGUILDS/locale/%{SG::Locale}%.sk" exists:
2724 set {_locale} to "true"
2725 send "&4[ADMIN INFO]%nl%&cBukkit Version: &f%minecraft version%%nl%&cSkript Version: &f%skript version%%nl%&cRepuska Version: &f%repuska version%%nl%&cSUPERGUILDS Version: &f%{SG::Version}%%nl%&cSUPERGUILDS Locale: &f%{SG::Locale}%%nl%&cPlugins Folder: &f%{_plugins::*}%%nl%&cScripts Folder: &f%{_scripts::*}%%nl%&cConfig YML: &f%{_config}%%nl%&cLocale File: &f%{_locale}%"
2726 else if arg 1 is "top":
2727 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.top":
2728 topGUI(player)
2729 else:
2730 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2731 else if arg 1 is "showclaims" or "göster":
2732 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.showclaims":
2733 set {_c} to checkFile("General.Claims", "config")
2734 if {_c} is "true":
2735 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2736 if {_pg} is not "*":
2737 set {_number} to checkFile("General.Show-Claims-Time", "config") parsed as number
2738 set {_getGuildTimer} to checkFile("Datas.Show-Claims-Time", "guilds/%{_pg}%")
2739 set {_check} to timeChecker("%{_pg}%", "%{_getGuildTimer}%", "Show-Claims-Time")
2740 if {_check} is "true":
2741 set {_saatYaz} to getTime("%month%", "%day%", "%hour%", "%minute%", "%second+{_number}%")
2742 writeFile("Datas.Show-Claims-Time", "%{_saatYaz}%", "guilds/%{_pg}%")
2743 set {_claims::*} to configuration section "Datas.Claims" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
2744 if size of {_claims::*} is greater than 0:
2745 loop {_claims::*}:
2746 set {_location::*} to checkFile("Datas.Claims.%loop-value%", "guilds/%{_pg}%") split at ";"
2747 set {_xLoc} to {_location::1} parsed as number
2748 set {_yLoc} to {_location::2} parsed as number
2749 set {_zLoc} to {_location::3} parsed as number
2750 set {_worldLoc} to {_location::4} parsed as world
2751 chunkMiddle(player, {_xLoc}, {_yLoc}, {_zLoc}, {_worldLoc}, "all")
2752 send "%{SG::Messages::Prefix}% %{SG::Messages::Showing_Claims}%" to player
2753 else:
2754 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Claims}%" to player
2755 else:
2756 set {_msg} to {SG::Messages::Show_Claim_Wait}
2757 replace all "{TIME}" with "%{_check}%" in {_msg}
2758 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2759 else:
2760 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2761 else:
2762 send "%{SG::Messages::Prefix}% %{SG::Messages::Option_Disabled}%" to player
2763 else:
2764 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2765 else if arg 1 is "allies" or "dostlar":
2766 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.allies":
2767 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2768 if {_pg} is not "*":
2769 pageAPI(player, "4", 0)
2770 else:
2771 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2772 else:
2773 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2774 else if arg 1 is "ally" or "dost":
2775 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.ally":
2776 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2777 if {_pg} is not "*":
2778 if arg 2 is set:
2779 set {_downText} to "%arg-2%" to all lower case
2780 if file "plugins/SUPERGUILDS/guilds/%{_downText}%.yml" exists:
2781 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2782 if {_r} is "Leader" or "General" or "Captain":
2783 if {_pg} is not "%{_downText}%":
2784 set {_a::*} to configuration section "Datas.Allies" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
2785 if "%{_a::*}%" doesn't contain "%{_downText}%":
2786 set {_number} to checkFile("General.Ally-Cooldown", "config") parsed as number
2787 set {_getGuildTimer} to checkFile("Datas.Ally-Time", "guilds/%{_pg}%")
2788 set {_check} to timeChecker("%{_pg}%", "%{_getGuildTimer}%", "Ally-Time")
2789 if {_check} is "true":
2790 set {_saatYaz} to getTime("%month%", "%day%", "%hour%", "%minute%", "%second+{_number}%")
2791 findRankedPlayer("%{_downText}%") is "false":
2792 send "%{SG::Messages::Prefix}% %{SG::Messages::Enemy_Leader_Not_Online}%" to player
2793 stop
2794 set {_leaderTheir} to findRankedPlayer("%{_downText}%") parsed as player
2795 writeFile("Datas.Ally-Time", "%{_saatYaz}%", "guilds/%{_pg}%")
2796 allyGUI(player, {_leaderTheir}, "gui")
2797 else:
2798 set {_msg} to {SG::Messages::Wait_Ally}
2799 replace all "{TIME}" with "%{_check}%" in {_msg}
2800 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2801 else:
2802 send "%{SG::Messages::Prefix}% %{SG::Messages::Already_Ally}%" to player
2803 else:
2804 send "%{SG::Messages::Prefix}% %{SG::Messages::Ally_Yourself}%" to player
2805 else:
2806 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2807 else:
2808 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Guild_Like_This}%" to player
2809 else:
2810 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_Guild_Name}%" to player
2811 else:
2812 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2813 else:
2814 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2815 else if arg 1 is "enemy" or "düşman":
2816 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.enemy":
2817 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2818 if {_pg} is not "*":
2819 if arg 2 is set:
2820 set {_downText} to "%arg-2%" to all lower case
2821 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
2822 if file "plugins/SUPERGUILDS/guilds/%{_downText}%.yml" exists:
2823 if {_r} is "Leader" or "General" or "Captain":
2824 set {_number} to checkFile("General.Ally-Cooldown", "config") parsed as number
2825 set {_getGuildTimer} to checkFile("Datas.Ally-Time", "guilds/%{_pg}%")
2826 set {_check} to timeChecker("%{_pg}%", "%{_getGuildTimer}%", "Ally-Time")
2827 if {_check} is "true":
2828 set {_saatYaz} to getTime("%month%", "%day%", "%hour%", "%minute%", "%second+{_number}%")
2829 writeFile("Datas.Ally-Time", "%{_saatYaz}%", "guilds/%{_pg}%")
2830 set {_a::*} to configuration section "Datas.Allies" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
2831 if "%{_a::*}%" contains "%arg 2%":
2832 veriCikar("Datas.Allies", "%arg 2%", "guilds/%{_pg}%")
2833 veriCikar("Datas.Allies", "%{_pg}%", "guilds/%arg 2%")
2834 set {_msg} to {SG::Messages::Removed_Ally}
2835 replace all "{GUILD}" with "%{_pg}%" in {_msg}
2836 replace all "{ENEMY}" with "%arg 2%" in {_msg}
2837 broadcast "%{SG::Messages::Prefix}% %{_msg}%"
2838 else:
2839 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Ally}%" to player
2840 else:
2841 set {_msg} to {SG::Messages::Wait_Ally}
2842 replace all "{TIME}" with "%{_check}%" in {_msg}
2843 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2844 else:
2845 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Rank}%" to player
2846 else:
2847 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Guild_Like_This}%" to player
2848 else:
2849 send "%{SG::Messages::Prefix}% %{SG::Messages::Enter_Guild_Name}%" to player
2850 else:
2851 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2852 else:
2853 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2854 else if arg 1 is "war" or "savaÅŸ":
2855 if player has permission "guilds.*" or "guilds.player" or "guilds.admin" or "guilds.war":
2856 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2857 if {_pg} is not "*":
2858 if arg 2 is set:
2859 if checkFile("Tournaments.Status", "tournaments") is "false" or "*":
2860 set {_downText} to "%arg-2%" to all lower case
2861 if file "plugins/SUPERGUILDS/guilds/%{_downText}%.yml" exists:
2862 set {_leader} to checkFile("Datas.Leader", "guilds/%{_pg}%")
2863 if {_leader} is player:
2864 set {_enemy} to "%arg 2%"
2865 if {_enemy} is not {_pg}:
2866 set {_allies::*} to configuration section "Datas.Allies" get of "plugins/SUPERGUILDS/guilds/%{_pg}%.yml"
2867 if "%{_allies::*}%" doesn't contain "%{_enemy}%":
2868 set {_warstatus.pg} to checkFile("Datas.War-Status", "guilds/%{_pg}%")
2869 set {_warstatus.enemy} to checkFile("Datas.War-Status", "guilds/%{_enemy}%")
2870 if {_warstatus.pg} is "*":
2871 if {_warstatus.enemy} is "*":
2872 set {_enemy.leader} to findRankedPlayer({_enemy})
2873 if {_enemy.leader} is not "false":
2874 set {_minimum} to checkFile("War.Minimum-Member", "config") parsed as number
2875 set {_online.pg} to sayiGoster("Datas.Players", "online", "guilds/%{_pg}%")
2876 set {_online.enemy} to sayiGoster("Datas.Players", "online", "guilds/%{_enemy}%")
2877 if {_online.pg} is greater or equal to {_minimum}:
2878 if {_online.enemy} is greater or equal to {_minimum}:
2879 set {_inviteTimer} to checkFile("War.Invite-Time", "config") parsed as number
2880 set {_getGuildTimer} to checkFile("War.Invite-Time", "guilds/%{_pg}%")
2881 set {_inviteCheck} to timeChecker("%{_pg}%", "%{_getGuildTimer}%", "War-Invite")
2882 if {_inviteCheck} is "true":
2883 set {_saatYaz} to getTime("%month%", "%day%", "%hour%", "%minute%", "%second+{_inviteTimer}%")
2884 warInviteGUI({_pg}, {_enemy}, "gui")
2885 set {_msg} to {SG::Messages::War_Invite_Send}
2886 set {_guildlongname} to checkFile("Datas.Name", "guilds/%{_enemy}%")
2887 replace all "{GUILD}" with "%{_guildlongname}%" in {_msg}
2888 guildBroadcast("%{_pg}%", "%{_msg}%")
2889 writeFile("Datas.War-Invite", "%{_saatYaz}%", "guilds/%{_pg}%")
2890 else:
2891 set {_msg} to {SG::Messages::Invite_Wait}
2892 replace all "{TIME}" with "%{_inviteCheck}%" in {_msg}
2893 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2894 else:
2895 set {_msg} to {SG::Messages::Enemy_War_Minimum}
2896 replace all "{ONLINE}" with "%{_online.enemy}%" in {_msg}
2897 replace all "{MINIMUM}" with "%{_minimum}%" in {_msg}
2898 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2899 else:
2900 set {_msg} to {SG::Messages::You_War_Minimum}
2901 replace all "{ONLINE}" with "%{_online.pg}%" in {_msg}
2902 replace all "{MINIMUM}" with "%{_minimum}%" in {_msg}
2903 send "%{SG::Messages::Prefix}% %{_msg}%" to player
2904 else:
2905 send "%{SG::Messages::Prefix}% %{SG::Messages::Enemy_Leader_Not_Online}%" to player
2906 else:
2907 send "%{SG::Messages::Prefix}% %{SG::Messages::Enemy_Guild_In_War}%" to player
2908 else:
2909 send "%{SG::Messages::Prefix}% %{SG::Messages::Your_Guild_In_War}%" to player
2910 else:
2911 send "%{SG::Messages::Prefix}% %{SG::Messages::Cannot_War_Allies}%" to player
2912 else:
2913 send "%{SG::Messages::Prefix}% %{SG::Messages::Cannot_War_Yourself}%" to player
2914 else:
2915 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Arent_Leader}%" to player
2916 else:
2917 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Guild_Like_This}%" to player
2918 else:
2919 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Cant_War_Tournament}%" to player
2920 else:
2921 pageAPI(player, "2", 0)
2922 else:
2923 send "%{SG::Messages::Prefix}% %{SG::Messages::You_Dont_Have_Guild}%" to player
2924 else:
2925 send "%{SG::Messages::Prefix}% %{SG::Messages::No_Permission}%" to player
2926 else:
2927 send "%{SG::Messages::Prefix}% %{SG::Messages::Unknown_Command}%" to player
2928#51991
2929on join:
2930 writeFile("Players.Username", "%player%", "playerdata/%uuid of player%")
2931 writeFile("Players.Last-Seen", "%now%", "playerdata/%uuid of player%")
2932 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
2933 {_pg} is not "*"
2934 set {_motd} to checkFile("Datas.MOTD", "guilds/%{_pg}%")
2935 {_motd} is not "*"
2936 wait 3 second
2937 set {_motds::*} to {_motd} split at ";"
2938 set {_act} to {SG::Messages::MOTD_ActionBar}
2939 replace all "{BY}" with "%{_motds::1}%" in {_act}
2940 replace all "{DATE}" with "%{_motds::2}%" in {_act}
2941 set {_subtitle} to {SG::Messages::MOTD_SubTitle}
2942 replace all "{MESSAGE}" with "%{_motds::3}%" in {_subtitle}
2943 send title "%{SG::Messages::MOTD_Title} %" with subtitle "%{_subtitle}%" for 2 seconds to player
2944 send action bar message "%{_act}%" to player
2945on damage of player:
2946 set {_vg} to checkFile("Players.Guild-Name", "playerdata/%uuid of victim%")
2947 {_vg} is not "*"
2948 attacker is a player:
2949 set {_ag} to checkFile("Players.Guild-Name", "playerdata/%uuid of attacker%")
2950 {_ag} is not "*"
2951 if "%{_ag}%" is "%{_vg}%":
2952 cancel event
2953 send "%{SG::Messages::Prefix}% %{SG::Messages::Cant_Attack_Member}%" to attacker
2954 stop
2955 else:
2956 configuration section "Datas.Allies" get of "plugins/SUPERGUILDS/guilds/%{_ag}%.yml" contains "%{_vg}%":
2957 send "%{SG::Messages::Prefix}% %{SG::Messages::Cannot_War_Allies}%" to attacker
2958 cancel event
2959 stop
2960 checkFile("Regions", "chunks/%chunk at location of victim%") is not "*"
2961 checkFile("General.Claim-Protection.Damage-Protection", "config") is "true" or "*"
2962 cancel event
2963function deathAPI(attacker: player, victim: player):
2964 set {_uuidA} to "%uuid of {_attacker}%"
2965 set {_uuidV} to "%uuid of {_victim}%"
2966 set {_ag} to checkFile("Players.Guild-Name", "playerdata/%{_uuidA}%")
2967 {_ag} is not "*"
2968 set {_vg} to checkFile("Players.Guild-Name", "playerdata/%{_uuidV}%")
2969 {_vg} is not "*"
2970 {_ag} is not {_vg}
2971 set {_price} to checkFile("Guild-Management.Death-Penalty-Gold", "config") parsed as number
2972 set {_vgold} to checkFile("Datas.Resources.Gold.Has", "guilds/%{_vg}%") parsed as number
2973 {_vgold} is greater or equal to {_price}
2974 set {_msg} to {SG::Messages::Death_Broadcast}
2975 set {_vname} to checkFile("Datas.Name", "guilds/%{_vg}%")
2976 set {_aname} to checkFile("Datas.Name", "guilds/%{_ag}%")
2977 replace all "{VGUILD}" with "%{_vname}%" in {_msg}
2978 replace all "{AGUILD}" with "%{_aname}%" in {_msg}
2979 replace all "{ATTACKER}" with "%{_attacker}%" in {_msg}
2980 replace all "{VICTIM}" with "%{_victim}%" in {_msg}
2981 replace all "{GOLD}" with "%{_price}%" in {_msg}
2982 broadcast "%{SG::Messages::Prefix}% %{_msg}%"
2983 degerCikar("Datas.Resources.Gold.Has", {_price}, "guilds/%{_vg}%")
2984 degerEkle("Datas.Resources.Gold.Has", {_price}, "guilds/%{_ag}%")
2985 set {_msg} to {SG::Messages::Death_Gold_Gain}
2986 set {_rankA} to checkFile("Datas.Players.%{_uuidA}%.Rank", "guilds/%{_ag}%")
2987 set {_rankV} to checkFile("Datas.Players.%{_uuidV}%.Rank", "guilds/%{_vg}%")
2988 replace all "{RANK}" with "%{SG::Messages::Rank_%{_rankA}%}%" in {_msg}
2989 replace all "{PLAYER}" with "%{_attacker}%" in {_msg}
2990 replace all "{GOLD}" with "%{_price}%" in {_msg}
2991 guildBroadcast("%{_ag}%", "%{_msg}%")
2992 set {_msg} to {SG::Messages::Death_Gold_Loss}
2993 replace all "{RANK}" with "%{SG::Messages::Rank_%{_rankV}%}%" in {_msg}
2994 replace all "{PLAYER}" with "%{_victim}%" in {_msg}
2995 replace all "{GOLD}" with "%{_price}%" in {_msg}
2996 guildBroadcast("%{_vg}%", "%{_msg}%")
2997 chance of 7%:
2998 give player head with custom nbt "%{SG::Messages::NBT_Storage_Items_Worker}%" to {_attacker}
2999on death of player:
3000 attacker is a player
3001 deathAPI(attacker, victim)
3002on break:
3003 player doesn't have permission "guilds.admin" or "guilds.bypass"
3004 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
3005 set {_chunk} to checkFile("Regions", "chunks/%chunk at location of event-block%")
3006 {_chunk} is not "*"
3007 checkFile("General.Claim-Protection.Block-Break", "config") is "false":
3008 cancel event
3009 stop
3010 if {_pg} is not "*":
3011 if {_chunk} is not "%{_pg}%":
3012 set {_k} to true
3013 else:
3014 loop "Townhall" and "Barrack" and "Storage" and "Alchemy":
3015 checkFile("Datas.%loop-value%.Schematic.Main-Chunk", "guilds/%{_pg}%") is "%chunk of event-block%"
3016 cancel event
3017 set {_msg} to {SG::Messages::You_Cant_Action}
3018 replace all "{BUILD}" with "%uncolored {SG::Messages::Buildings_Name_%loop-value%}%" in {_msg}
3019 send "%{SG::Messages::Prefix}% %{_msg}%" to player
3020 stop
3021 else:
3022 set {_k} to true
3023 {_k} is true
3024 cancel event
3025 set {_msg} to {SG::Messages::Owned_By}
3026 set {_name} to checkFile("Datas.Name", "guilds/%{_chunk}%")
3027 replace all "{GUILD}" with "%{_name}%" in {_msg}
3028 send "%{SG::Messages::Prefix}% %{_msg}%" to player
3029on place:
3030 player doesn't have permission "guilds.admin" or "guilds.bypass"
3031 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
3032 set {_chunk} to checkFile("Regions", "chunks/%chunk at location of event-block%")
3033 {_chunk} is not "*"
3034 checkFile("General.Claim-Protection.Block-Place", "config") is "false":
3035 cancel event
3036 stop
3037 if {_pg} is not "*":
3038 if {_chunk} is not "%{_pg}%":
3039 set {_k} to true
3040 else:
3041 loop "Townhall" and "Barrack" and "Storage" and "Alchemy":
3042 checkFile("Datas.%loop-value%.Schematic.Main-Chunk", "guilds/%{_pg}%") is "%chunk of event-block%"
3043 cancel event
3044 set {_msg} to {SG::Messages::You_Cant_Action}
3045 replace all "{BUILD}" with "%uncolored {SG::Messages::Buildings_Name_%loop-value%}%" in {_msg}
3046 send "%{SG::Messages::Prefix}% %{_msg}%" to player
3047 stop
3048 else:
3049 set {_k} to true
3050 {_k} is true
3051 cancel event
3052 set {_msg} to {SG::Messages::Owned_By}
3053 set {_name} to checkFile("Datas.Name", "guilds/%{_chunk}%")
3054 replace all "{GUILD}" with "%{_name}%" in {_msg}
3055 send "%{SG::Messages::Prefix}% %{_msg}%" to player
3056on right click on chest or furnace or enchantment table or workbench or ender chest or jukebox or bed block or dispenser or dropper or hopper or trapped chest or brewing stand or note block:
3057 player doesn't have permission "guilds.admin" or "guilds.bypass"
3058 checkFile("General.Claim-Protection.Chest-Furnace-EnchTable-Workbench", "config") is "true" or "*"
3059 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
3060 checkFile("Regions", "chunks/%chunk at location of event-block%") is not "%{_pg}%" or "*"
3061 cancel event
3062on rightclick on spruce fence gate or birch fence gate or jungle fence gate or dark oak fence gate or acacia fence gate or levers or stone button or wooden button or spruce door or birch door or jungle door or dark oak door or acacia door or iron door or oak trapdoor:
3063 player doesn't have permission "guilds.admin" or "guilds.bypass"
3064 checkFile("General.Claim-Protection.Door-Lever-Button", "config") is "true" or "*"
3065 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
3066 checkFile("Regions", "chunks/%chunk at location of event-block%") is not "%{_pg}%" or "*"
3067 cancel event
3068on chat:
3069 set {_msg} to message format
3070 set {_pg} to checkFile("Players.Guild-Name", "playerdata/%uuid of player%")
3071 set {_name} to checkFile("Datas.Name", "guilds/%{_pg}%")
3072 set {_r} to checkFile("Datas.Players.%uuid of player%.Rank", "guilds/%{_pg}%")
3073 if {_r} is not "*":
3074 replace all "{RANK}" with "%{SG::Messages::RankStar_%{_r}%}%" in {_msg}
3075 else:
3076 replace all "{RANK}" with "" in {_msg}
3077 {_pg} is "*":
3078 set {_name} to ""
3079 replace all "{GUILDNAME}" with "%{_name}%" in {_msg}
3080 set message format to {_msg}
3081 {_pg} is not "*":
3082 set {_chat} to checkFile("Players.Chat-Enabled", "playerdata/%uuid of player%")
3083 {_chat} is "true"
3084 cancel event
3085 guildBroadcast("%{_pg}%", "%{SG::Messages::Guild_Chat}% %{SG::Messages::RankStar_%{_r}%}% %player% &8&l» &f%message%")
3086on death of horse:
3087 name of victim contains "&9["
3088 clear drops
3089on explode:
3090 loop exploded blocks:
3091 clear {_chunk}
3092 set {_chunk} to checkFile("Regions", "chunks/%chunk at location of loop-block%")
3093 {_chunk} is not "*"
3094 set {_currentLevel} to checkFile("Datas.Buildings.Townhall.Level", "guilds/%{_chunk}%") parsed as number
3095 {_currentLevel} is greater than 1
3096 cancel event
3097 exit loop
3098 stop