Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 107.33 KB | None | 0 0
  1. options:
  2. #World where you can claim lands
  3. W: "world" or "ul_hcf"
  4. I: jungle door block or birch door block or dark oak door block or acacia door block or oak door block or acacia fence gate or birch fence gate or jungle fence gate or dark oak fence gate or oak fence gate or spruce fence gate or enchantment table or furnace or brewing stand or beacon or _lever or spruce door block or oak trapdoor or hopper or stone button or wooden button or dispenser or _anvil or trapped_chest
  5. stash: chest or trapped_chest
  6. #Use chat system: true or false
  7. ChatSystem: true
  8. #Factions prefix, yes double quotes
  9. Prefix: ""&f""
  10. #
  11. #how much must a player waits beofre they get teleport to the factions home
  12. fhome-delay: 10
  13. #
  14. # DTR STUFF
  15. #
  16. #the max amount of dtr a faction may have
  17. max-dtr: 5.5
  18. #the minimun amount of dtr
  19. min-dtr: -5.5
  20. #how much a player increments the max dtr of a faction
  21. player-dtr: 0.51
  22. #max dtr of a faction with 1 player
  23. solo-faction: 1.01
  24. #dtr freeze in seconds:
  25. dtr-freeze: 3600
  26. #you know..
  27. kick-penalty: 0.51
  28. #you know..
  29. death-dtr: 1.0
  30. #How much a faction wins per minute and per player
  31. minute-dtr: 0.01
  32. #
  33. #LAND STUFF
  34. #
  35. faction-land-max: 36
  36. # How much land a faction gets per member
  37. land-per-player: 1
  38. #should players be able to claim on WG regions? false=no / true=yes
  39. wgchek: false
  40. #
  41. #
  42. ally-fire: false
  43. faction-fire: false
  44. truce-fire: false
  45. #
  46. #
  47. max-ally: 1
  48. #Max-truce
  49. max-truce: 1
  50. #can ally place block in your land?
  51. ally-break: "no"
  52. #can ally break block in your land?
  53. ally-place: "no"
  54. #can interact with your stuff? Chests, pistions, restones stuff, etc?
  55. ally-interact: "no"
  56. #Can an ally sethome in your land?
  57. ally-sethome: "no"
  58. #
  59. ally-chest: "no"
  60. #
  61. #Max amount of player per faction
  62. fac-maxplayers: 4
  63. #
  64. # After how many days (default 30 days) of inactivity should a faction be deleted
  65. delete-faction-after: 30
  66.  
  67. function FactionDtr(F: text):
  68. if x_factions_FAC::factions::%{_F}%::dtr} is less than 0:
  69. set {x_factions_FAC::factions::%{_F}%::dtr.raideable} to true
  70. else:
  71. set {x_factions_FAC::factions::%{_F}%::dtr.raideable} to false
  72.  
  73. function FactionTag(t: text):
  74. make all players see all player's prefix as "&2"
  75. loop all players:
  76. set {_F} to {x_factions_FAC::players::%uuid of loop-player%.faction}
  77. #TAG FACTIONS
  78. if {_F} isn't "wilder":
  79. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  80. make player from uuid loop-value-2 see loop-value-1's prefix as "&2"
  81. if {x_factions_FAC::factions::%{_F}%::ally::*} isn't empty:
  82. loop {x_factions_FAC::factions::%{_F}%::ally::*}:
  83. set {_ally} to loop-value-2
  84. loop {x_factions_FAC::factions::%{_ally}%::players::*}:
  85. make player from uuid loop-value-3 see loop-value-1's prefix as "&d"
  86.  
  87. function FactionDisband(F: text):
  88. #break ally
  89. if {x_factions_FAC::factions::%{_F}%::ally::*} isn't empty:
  90. loop {x_factions_FAC::factions::%{_F}%::ally::*}:
  91. #remove permissions
  92. delete {x_factions_FAC::factions::%{_F}%::ally::%loop-value-1%::*}
  93. delete {x_factions_FAC::factions::%loop-value-1%::ally::%{_F}%::*}
  94. #delete relation
  95. delete {x_factions_FAC::factions::%{_F}%::ally::%loop-value-1%}
  96. delete {x_factions_FAC::factions::%loop-value-1%::ally::%{_F}%}
  97. #break truce
  98. if {x_factions_FAC::factions::%{_F}%::truce::*} isn't empty:
  99. loop {x_factions_FAC::factions::%{_F}%::truce::*}:
  100. delete {x_factions_FAC::factions::%{_F}%::truce::%loop-value-1%}
  101. delete {x_factions_FAC::factions::%loop-value-1%::truce::%{_F}%}
  102.  
  103. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  104. set {x_factions_FAC::players::%loop-value%.faction} to "wilder" #Make him a wilder
  105. set {x_factions_FAC::players::%loop-value%.chat} to 1 #Force chat channel
  106.  
  107. loop {x_factions_FAC::factions::%{_F}%::lands::*}:
  108. delete {x_factions_FAC::chunks::%loop-value%.owner}
  109. delete {x_factions_FAC::chunks::%loop-value%}
  110. delete {x_factions_FAC::factions::%{_F}%.owner}
  111. delete {x_factions_FAC::factions::%{_F}%::*}
  112. delete {x_factions_FAC::factions::%{_F}%}
  113.  
  114. function FactionShow(F: text, p: player):
  115. set {_owner} to {x_factions_FAC::factions::%{_F}%::owner}
  116. if {x_factions_FAC::nombre::%{_owner}%} is set:
  117. set {_owner} to {x_factions_FAC::nombre::%{_owner}%}
  118. else:
  119. set {_owner} to player from uuid {x_factions_FAC::factions::%{_F}%::owner}
  120. set {_offline} to 0
  121. set {_online} to 0
  122. set {_lands} to 0
  123. set {_players} to 0
  124. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  125. set {_check} to loop-value
  126. set {_check} to player from uuid {_check}
  127. if {x_factions_FAC::nombre::%loop-value%} is set:
  128. if {_check} is online:
  129. set {_online} to {_online}+1
  130. if {_jugadoresonline} isn't set:
  131. set {_jugadoresonline} to "&2%{x_factions_FAC::nombre::%loop-value%}%"
  132. else:
  133. set {_jugadoresonline} to "%{_jugadoresonline}%&f, &2%{x_factions_FAC::nombre::%loop-value%}%"
  134. else:
  135. if {_jugadoresonline} isn't set:
  136. set {_jugadoresonline} to "&c%{x_factions_FAC::nombre::%loop-value%}%"
  137. else:
  138. set {_jugadoresonline} to "%{_jugadoresonline}%&f, &c%{x_factions_FAC::nombre::%loop-value%}%"
  139. else:
  140. set {_check} to player from uuid {_check}
  141. if {_check} is online:
  142. set {_online} to {_online}+1
  143. if {_jugadoresonline} isn't set:
  144. set {_jugadoresonline} to "&2%player from uuid loop-value%"
  145. else:
  146. set {_jugadoresonline} to "&2%{_jugadoresonline}%&f, &2%player from uuid loop-value%"
  147.  
  148. set {_offline} to {_offline}+1
  149. #amount of players
  150. set {_players} to {_players}+1
  151. #dtr stuff
  152. set {_jugadores} to {_jugadores}+1
  153. if {_jugadores} is more than 1:
  154. set {_maxfactiondtr} to ({_jugadores} - 1) * {@player-dtr} + {@solo-faction}
  155. else:
  156. set {_maxfactiondtr} to {@solo-faction}
  157. if {_jugadoresonline} isn't set:
  158. set {_jugadoresonline} to " &cNo hay jugadores online"
  159. if {x_factions_FAC::factions::%{_F}%::home} is set:
  160. set {_home} to {x_factions_FAC::factions::%{_F}%::home}
  161. else:
  162. set {_home} to "No home"
  163.  
  164. set {_dtr} to {x_factions_FAC::factions::%{_F}%::dtr}
  165.  
  166. if {x_factions_FAC::factions::%{_F}%::dtr.freeze} > now:
  167. set {_freeze} to "Yes"
  168. set {_until} to difference between {x_factions_FAC::factions::%{_F}%::dtr.freeze} and now
  169. set {_icono} to ""
  170. else:
  171. set {_freeze} to "no"
  172. set {_icono} to "&2?"
  173.  
  174. set {_lands} to size of {x_factions_FAC::factions::%{_F}%::lands::*}
  175. set {_maxlands} to {_players}*{@land-per-player}
  176. if {_maxlands} is greater than {@faction-land-max}:
  177. set {_maxlands} to {@faction-land-max}
  178.  
  179. if {x_factions_FAC::factions::%{_F}%::ally::*} isn't empty:
  180. loop {x_factions_FAC::factions::%{_F}%::ally::*}:
  181. if {_ally} isn't set:
  182. set {_ally} to "&2%loop-value-1%"
  183. else:
  184. set {_ally} to "&2%{_ally}%&f, &2%loop-value-1%"
  185. else:
  186. set {_ally} to "None"
  187.  
  188. if {x_factions_FAC::factions::%{_F}%::truce::*} isn't empty:
  189. loop {x_factions_FAC::factions::%{_F}%::truce::*}:
  190. if {_truce} isn't set:
  191. set {_truce} to "&2%loop-value-1%"
  192. else:
  193. set {_truce} to "&2%{_ally}%&f, &2%loop-value-1%"
  194. else:
  195. set {_truce} to "None"
  196.  
  197. send "&6&m " to {_p}
  198. send "&2%{_F}% &7(%{_online}%/%{_offline}%) &6| &eHome: &c%{_home}%" to {_p}
  199. #send "" to {_p}
  200. send "&eLeader: &c%{_owner}% " to {_p}
  201. send "&eCo Leaders: {x_factions_FAC::factions::%{_F}%::officer::%{_p}%}" to {_p}
  202. send "&eCaptains: " to {_p}
  203. send "&eMembers: " to {_p}
  204. send "&eDeaths until Raidable: &a%{_icono}%&a%{_dtr}%/%{_maxfactiondtr}% DTR" to {_p}
  205. send "&6&m " to {_p}
  206.  
  207. command clear-factions:
  208. permission: skript.factionsk.danger
  209. trigger:
  210. delete {x_factions_FAC::*}
  211. delete {FAC.chatsystem}
  212. broadcast "&4&lDeleted all variables from FactionsSk"
  213.  
  214. command f [<text>] [<text>] [<text>] [<text>]:
  215. trigger:
  216. if arg-1 is "create":
  217. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  218. send "%{@Prefix}% &7You are already in a faction"
  219. stop
  220. else:
  221. if arg-2 is set:
  222. set {_l} to length of the arg-2
  223. if {_l} is less than 4:
  224. send "%{@Prefix}% &7The faction name needs at leat 3 characters"
  225. stop
  226. if {_l} is more than 13:
  227. send "%{@Prefix}% &7The faction name can't have more than 13 characters"
  228. stop
  229. else:
  230. if {x_factions_FAC::factions::%arg-2%} is set:
  231. send "%{@Prefix}% &7There is a faction named: &c%arg-2%"
  232. stop
  233. else:
  234. set {x_factions_FAC::factions::%arg-2%} to arg-2 #creo la fction
  235. set {x_factions_FAC::factions::%arg-2%::owner} to uuid of player #due??e la faction
  236. set {x_factions_FAC::factions::%arg-2%::mods::%uuid of player%} to uuid of player #due??e la faction
  237. set {x_factions_FAC::factions::%arg-2%::dtr} to 0 #dtr de la faction
  238. set {x_factions_FAC::factions::%arg-2%::players::%uuid of player%} to uuid of player
  239. set {x_factions_FAC::factions::%arg-2%::dtr.raideable} to false
  240. set {x_factions_FAC::players::%uuid of player%.faction} to arg-2 #faction del jugador
  241. set {x_factions_FAC::factions::%arg-2%::dtr.freeze} to now
  242. subtract 1 second from {x_factions_FAC::factions::%arg-2%::dtr.freeze}
  243. set {x_factions_FAC::factions::%arg-2%::lastactivicty} to now
  244. set {x_factions_FAC::factions::%arg-2%::officer::%uuid of player%} to uuid of player #due??e la faction
  245. add {@delete-faction-after} days to {x_factions_FAC::factions::%arg-2%::lastactivicty}
  246.  
  247. broadcast "&c%arg-2% &ehas been created by &f%player%"
  248. FactionTag("call")
  249. stop
  250. else:
  251. send "%{@Prefix}% &7The faction name can't be empty"
  252. stop
  253. #/f invite {player} [invite a player to join your faction]
  254. if arg-1 is "invite":
  255. if {x_factions_FAC::players::%uuid of player%.faction} is "wilder":
  256. send "%{@Prefix}% &7You need a faction to use this command"
  257. stop
  258. else:
  259. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  260. if size of {x_factions_FAC::factions::%{_F}%::players::*} > {@fac-maxplayers}-1:
  261. send "%{@Prefix}% &7Your faction reached the max amount of player per faction"
  262. stop
  263. if {x_factions_FAC::factions::%{_F}%::mods::%uuid of player%} is set:
  264. if arg-2 is set:
  265. set {_l} to length of the arg-2
  266. if {_l} is more than 16:
  267. send "%{@Prefix}% &7Incorrect player name"
  268. stop
  269. else:
  270. if arg-2 parsed as player is online:
  271. set {_p} to uuid of arg-2 parsed as player
  272. if {x_factions_FAC::players::%{_p}%.faction} isn't "wilder":
  273. send "%{@Prefix}% &c%arg-2% &7is already in a faction"
  274. stop
  275. else:
  276. send "%{@Prefix}% &c%player% &7invites you to join &c%{x_factions_FAC::players::%uuid of player%.faction}%" to player from uuid {_p}
  277. send "%{@Prefix}% &7Use &a/f join &c%player% &7to join " to player from uuid {_p}
  278. set {x_factions_FAC::players::%{_p}%.invitaciones::%{_F}%} to {_F} #guardo listado de que faction fue invitado
  279. send "&2%player% &ehas invited &c%arg-2% &eto the faction"
  280. stop
  281. else:
  282. send "&eThe player must be online"
  283. stop
  284. else:
  285. send "&c/f invite <playername>"
  286. stop
  287. else:
  288. send "&eYou must atleast be faction captain or higher to invite a player!"
  289. stop
  290.  
  291. #/f uninvite {player} [cancel a player request ]
  292. if arg-1 is "uninvite":
  293. if {x_factions_FAC::players::%uuid of player%.faction} isn't set:
  294. send "&eYou must be in a faction to use this command"
  295. stop
  296. else:
  297. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  298. if {x_factions_FAC::factions::%{_F}%::mods::%uuid of player%} is set:
  299. if arg-2 is set:
  300. set {_l} to length of the arg-2
  301. if {_l} is more than 16:
  302. send "&e%arg-2% has never joined the server."
  303. stop
  304. else:
  305. if arg-2 parsed as player is online:
  306. set {_p} to uuid of arg-2 parsed as player
  307. if {x_factions_FAC::players::%{_p}%.invitaciones::%{_F}%} is set:
  308. send "&2%player% &ehas uninvited &c%{_p}%" to player
  309. delete {x_factions_FAC::players::%{_p}%.invitaciones::%{_F}%} #guardo listado de que faction fue invitado
  310. stop
  311. else:
  312. send "%{@Prefix}%&c%{_p}% &7wasn't invited to your faction" to player
  313. stop
  314. else:
  315. send "%{@Prefix}% &7The player must be online"
  316. stop
  317. else:
  318. send "%{@Prefix}% &7You must specify a player"
  319. stop
  320. else:
  321. send "%{@Prefix}% &7Only mods can invite other players to the faction"
  322. stop
  323.  
  324. #/f join {factionname} or {request_sender} [join the player to a faction]
  325. if arg-1 is "join":
  326. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  327. send "%{@Prefix}% &7You are already in a faction"
  328. stop
  329. else:
  330. if arg-2 is set:
  331. set {_l} to length of the arg-2
  332. if {_l} is more than 16:
  333. send "%{@Prefix}% &7The name must contain at least 3 characters"
  334. stop
  335. else:
  336. if arg-2 parsed as player is online:
  337. set {_p} to uuid of arg-2 parsed as player
  338. set {_p} to {x_factions_FAC::players::%{_p}%.faction}
  339. else:
  340. set {_p} to arg-2
  341.  
  342. if {x_factions_FAC::players::%uuid of player%.invitaciones::%{_p}%} isn't set:
  343. send "%{@Prefix}% &c%arg-2% &7didn't invted you to &c%{_p}%"
  344. stop
  345. else:
  346. if size of {x_factions_FAC::factions::%{_p}%::players::*} > {@fac-maxplayers}-1:
  347. send "%{@Prefix}% &7That faction reached the max amount of player per faction :("
  348. stop
  349. set {x_factions_FAC::players::%uuid of player%.faction} to {_p} #agrego el usuario a la faction
  350. set {x_factions_FAC::factions::%{_p}%::players::%uuid of player%} to uuid of player
  351. loop {x_factions_FAC::factions::%{_p}%::players::*}:
  352. send "%{@Prefix}% &c%player% &7joined the faction" to player from uuid loop-value
  353. send "%{@Prefix}% &7You are now part of the faction"
  354. delete {x_factions_FAC::players::%uuid of player%.invitaciones::*} #elimino invitaciones pendientes del usuario
  355. FactionTag("call")
  356. stop
  357. else:
  358. send "%{@Prefix}% &7You must specify a player name or a faction"
  359. stop
  360.  
  361. #/f unclaim {deletes a faction chunk}
  362. if arg-1 is "unclaim":
  363. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  364. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  365. if {x_factions_FAC::factions::%{_F}%::mods::%uuid of player%} is set:
  366. if {x_factions_FAC::factions::%{_F}%::owner} is uuid of player:
  367. set {_chunk} to chunk at player's location
  368. if {x_factions_FAC::chunks::%chunk at player's location%.owner} is {_F}:
  369. delete {x_factions_FAC::chunks::%{_chunk}%.owner}
  370. delete {x_factions_FAC::chunks::%{_chunk}%}
  371. delete {x_factions_FAC::factions::%{_F}%::lands::%{_chunk}%}
  372. send "%{@Prefix}% &7You unclaimed this chunk"
  373. stop
  374. else:
  375. send "%{@Prefix}% &7You can only use this command on your land"
  376. stop
  377. else:
  378. send "%{@Prefix}% &7You must be the owner to unclaim"
  379. stop
  380. else:
  381. send "%{@Prefix}% &7You must be a mod to unclaim"
  382. stop
  383. else:
  384. send "%{@Prefix}% &7You must have a faction to use this command "
  385. stop
  386.  
  387. #/F CLAIM {claim a chunk if there is no enemy land aroud and if the chunk is contiguous to the one already claimed by the faction}
  388. if arg-1 is "claim":
  389. if player's world is {@W}:
  390. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  391. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  392. if {x_factions_FAC::factions::%{_F}%::mods::%uuid of player%} is set:
  393. set {_players} to size of {x_factions_FAC::factions::%{_F}%::players::*}
  394. set {_maxlands} to {_players}*{@land-per-player}
  395. if {_maxlands} is greater than {@faction-land-max}:
  396. set {_maxlands} to {@faction-land-max}
  397. set {_lands} to size of {x_factions_FAC::factions::%{_F}%::lands::*}
  398. if {_lands} is {_maxlands}:
  399. send "%{@Prefix}% &7You can't claim more lands, you may need more players or you reached the max amount of lands per factions"
  400. stop
  401. if {@wgchek} is false:
  402. set {_region} to "%region at player%"
  403. if {_region} isn't "<none>":
  404. send "%{@Prefix}% &7You can't claim on this region!"
  405. stop
  406. #If I found an enemy land to close to the current chunk, I will stop the claim asap.
  407. if {x_factions_FAC::chunks::%chunk at player's location%} isn't set:
  408. #Primero busco enemigos a la redonda
  409. set {_center} to player's location#location you want to loop the chunks around
  410. set {_radius} to 1#radius (in chunks), if it is set to 0 it returns only the chunk at {_center}
  411. set {_pos} to {_center}
  412. loop 2 * {_radius} + 1 times:
  413. set x-coordinate of {_pos} to x-coordinate of {_center} - 16 * {_radius} + (loop-number - 1) * 16
  414. set z-coordinate of {_pos} to z-coordinate of {_center} - 16 * {_radius}
  415. loop 2 * {_radius} + 1 times:
  416. set {_chunks::%{_pos}%} to chunk at {_pos}
  417. add 16 to z-coordinate of {_pos}
  418. #comienzo buscar enemigos
  419. loop {_chunks::*}:
  420. if {x_factions_FAC::chunks::%loop-value-1%.owner} is "&4WarZone":
  421. send "%{@Prefix}% &7This chunk is too close from the &4WarZone"
  422. stop
  423. if {x_factions_FAC::chunks::%loop-value-1%} is set:
  424. if {x_factions_FAC::chunks::%loop-value-1%.owner} isn't {_F}:
  425. send "%{@Prefix}% &7This chunk is too close to an enemy land"
  426. stop
  427.  
  428. #If the faction owns a land already, I need to virify if the current chunk is contiguous to the other lands
  429. if {x_factions_FAC::factions::%{_F}%::lands::*} is set:
  430. set {_center} to player's location#location you want to loop the chunks around
  431. set {_radius} to 1 #radius (in chunks), if it is set to 0 it returns only the chunk at {_center}
  432. set {_pos} to {_center}
  433. loop 2 * {_radius} + 1 times:
  434. set x-coordinate of {_pos} to x-coordinate of {_center} - 16 * {_radius} + (loop-number - 1) * 16
  435. set z-coordinate of {_pos} to z-coordinate of {_center} - 16 * {_radius}
  436. loop 2 * {_radius} + 1 times:
  437. set {_x} to x-coordinate of {_center} - x-coordinate of {_pos}
  438. set {_z} to z-coordinate of {_center} - z-coordinate of {_pos}
  439. if ({_x} ^ 2 + {_z} ^ 2) <= ({_radius} * 16) ^ 2:
  440. set {_chunks2::%{_pos}%} to chunk at {_pos}
  441. add 16 to z-coordinate of {_pos}
  442. #Actually checking if the chunk is contiguous:
  443. set {_contiguo} to false
  444. loop {_chunks2::*}:
  445. if {x_factions_FAC::chunks::%loop-value-1%} is set:
  446. if {x_factions_FAC::chunks::%loop-value-1%.owner} is {_F}:
  447. set {_contiguo} to true
  448. else:
  449. #if they don't own any land, I don't care if the land is contiguous
  450. set {_contiguo} to true
  451.  
  452. if {_contiguo} is true:
  453. add the chunk at the player's location to {x_factions_FAC::chunks::%chunk at player's location%} #chunks calimeados
  454. set {x_factions_FAC::chunks::%chunk at player's location%} to chunk at player's location
  455. set {x_factions_FAC::chunks::%chunk at player's location%.owner} to {_F}
  456. add the chunk at the player's location to {x_factions_FAC::factions::%{_F}%::lands::%chunk at player's location%} #chunks de una factions
  457. set {x_factions_FAC::factions::%{_F}%::lands::%chunk at player's location%} to chunk at player's location
  458. send "%{@Prefix}% &7The land is now claimed by your faction!"
  459. stop
  460. else:
  461. send "%{@Prefix}% &7The land must be contiguous to your lands"
  462. stop
  463. else:
  464. send "%{@Prefix}% &7This is alredy claimed"
  465. stop
  466. else:
  467. send "%{@Prefix}% &7Only mods can claim land"
  468. stop
  469. else:
  470. send "%{@Prefix}% &7You must be in a faction to use this command"
  471. stop
  472. else:
  473. send "%{@Prefix}% &7You can't claim in this world"
  474. stop
  475.  
  476. #/f rename {text} [sets the new faction name]
  477. if arg-1 is "rename":
  478. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  479. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  480. if {x_factions_FAC::factions::%{_F}%::owner} is uuid of player:
  481. if arg-2 is set:
  482. set {_l} to length of the arg-2
  483. if {_l} is less than 4:
  484. send "%{@Prefix}% &cThe name needs at least 3 characters"
  485. stop
  486. if {_l} is more than 13:
  487. send "%{@Prefix}% &7The faction name can't have more than 13 characters"
  488. stop
  489. else:
  490. if {x_factions_FAC::factions::%arg-2%} is set:
  491. send "%{@Prefix}% &c%arg-2% &7is in use"
  492. stop
  493. else:
  494. #Copy/Paste faction
  495. set {x_factions_FAC::factions::%arg-2%} to arg-2
  496. set {x_factions_FAC::factions::%arg-2%::owner} to {x_factions_FAC::factions::%{_F}%::owner}
  497. set {x_factions_FAC::factions::%arg-2%::dtr} to {x_factions_FAC::factions::%{_F}%::dtr}
  498. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  499. set {_p} to loop-value-1
  500. set {x_factions_FAC::factions::%arg-2%::players::%{_p}%} to {_p}
  501. set {x_factions_FAC::players::%{_p}%.faction} to arg-2
  502. loop {x_factions_FAC::factions::%{_F}%::mods::*}:
  503. set {_p} to loop-value-1
  504. set {x_factions_FAC::factions::%arg-2%::mods::%{_p}%} to {_p}
  505. set {x_factions_FAC::factions::%arg-2%::dtr.raideable} to {x_factions_FAC::factions::%{_F}%::dtr.raideable}
  506. set {x_factions_FAC::factions::%arg-2%::lands::*} to {x_factions_FAC::factions::%{_F}%::lands::*}
  507. set {x_factions_FAC::factions::%arg-2%::dtr.freeze} to {x_factions_FAC::factions::%{_F}%::dtr.freeze}
  508. set {x_factions_FAC::factions::%arg-2%::home} to {x_factions_FAC::factions::%{_F}%::home}
  509. # migrate ally
  510. if {x_factions_FAC::factions::%{_F}%::ally::*} isn't empty:
  511. loop {x_factions_FAC::factions::%{_F}%::ally::*}:
  512. set {x_factions_FAC::factions::%arg-2%::ally::%loop-value-1%} to loop-value-1
  513. set {x_factions_FAC::factions::%loop-value-1%::ally::%arg-2%} to arg-2
  514. delete {x_factions_FAC::factions::%loop-value-1%::ally::%{_F}%}
  515. delete {x_factions_FAC::factions::%{_F}%::ally::%loop-value-1%}
  516. # keep truce
  517. if {x_factions_FAC::factions::%{_F}%::truce::*} isn't empty:
  518. loop {x_factions_FAC::factions::%{_F}%::truce::*}:
  519. set {x_factions_FAC::factions::%arg-2%::truce::%loop-value-1%} to loop-value-1
  520. set {x_factions_FAC::factions::%loop-value-1%::truce::%arg-2%} to arg-2
  521. delete {x_factions_FAC::factions::%loop-value-1%::truce::%{_F}%}
  522. delete {x_factions_FAC::factions::%{_F}%::truce::%loop-value-1%}
  523. #Move the players to the new one
  524. loop {x_factions_FAC::factions::%arg-2%::players::*}:
  525. send "%{@Prefix}% &7The name of the faction was changed to: &c%arg-2%" to player from uuid loop-value-1
  526. #Loop value is a chunk
  527. loop {x_factions_FAC::factions::%arg-2%::lands::*}:
  528. if {x_factions_FAC::chunks::%loop-value-1%.owner} is {_F}:
  529. set {x_factions_FAC::chunks::%loop-value-1%.owner} to arg-2
  530. #Delete the old faction
  531. delete {x_factions_FAC::factions::%{_F}%::*}
  532. delete {x_factions_FAC::factions::%{_F}%}
  533. FactionTag("call")
  534. stop
  535. else:
  536. send "%{@Prefix}% &7You need to specify a new name for %{_F}%"
  537. stop
  538. else:
  539. send "%{@Prefix}% &7You must be the owner of %{_F}% to use this command"
  540. stop
  541. else:
  542. send "%{@Prefix}% &7This command is only for faction owners"
  543. stop
  544.  
  545. #/f sethome [set the faction's home ]
  546. if arg-1 is "sethome":
  547. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  548. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  549. if {x_factions_FAC::factions::%{_F}%::mods::%uuid of player%} is set:
  550. set {_chunk} to chunk at player's location
  551. set {_chunkowner} to {x_factions_FAC::chunks::%chunk at player's location%.owner}
  552. if {_chunkowner} is {_F}:
  553. set {x_factions_FAC::factions::%{_F}%::home} to player's location
  554. send "%{@Prefix}% &7The Home was set"
  555. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  556. send "%{@Prefix}% &7Now you can use &a/F home" to player from uuid loop-value-1
  557. stop
  558. else if {x_factions_FAC::factions::%{_chunkowner}%::ally::%{_F}%::perms::sethome} is "yes":
  559. set {x_factions_FAC::factions::%{_F}%::home} to player's location
  560. send "%{@Prefix}% &7The Home was set"
  561. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  562. send "%{@Prefix}% &7Now you can use &a/F home" to player from uuid loop-value-1
  563. stop
  564. else:
  565. send "%{@Prefix}% &7You can use this command only in your faction land"
  566. stop
  567. else:
  568. send "%{@Prefix}% &7Only mods can claim lands"
  569. stop
  570. else:
  571. send "%{@Prefix}% &7You must own a faction to use this command"
  572. stop
  573.  
  574. # /F show [leave the faction //owner can't leave if the faction isn't empty]
  575. if arg-1 is "show" or "who":
  576. if arg-2 is set:
  577. set {_l} to length of the arg-2
  578. if {_l} is less than 4:
  579. send "%{@Prefix}% &cThe name needs at least 3 characters"
  580. stop
  581. else:
  582. #Did the sender mean a faction?
  583. if {x_factions_FAC::factions::%arg-2%} is set:
  584. FactionShow(arg-2,player)
  585. stop
  586. #if there is no faction with that name, I will check if there a player
  587. else:
  588. set {_p} to arg-2 parsed as a player
  589. if {_p} is online:
  590. set {_p} to uuid of {_p}
  591. if {x_factions_FAC::players::%{_p}%.faction} isn't "wilder":
  592. FactionShow({x_factions_FAC::players::%{_p}%.faction},player)
  593. stop
  594. else:
  595. send "&6[&2Wilder&6]"
  596. stop
  597. else:
  598. send "The faction %arg-2% does not exist, or the player %arg-2% is offline"
  599. stop
  600. else:
  601. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  602. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  603. FactionShow({_F},player)
  604. stop
  605. else:
  606. send "&6[&2Wilder&6]"
  607. stop
  608.  
  609. #/f home [teleports you to the faction home]
  610. if arg-1 is "home":
  611. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  612. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  613. if {x_factions_FAC::factions::%{_F}%::home} is set:
  614. set {_text} to "&eTeleporting to your faction home in &d{@fhome-delay}s. &eDo not move or take damage"
  615. set {_location} to the player's location
  616. send "%{_text}%" to the player
  617. set {_delay} to {@fhome-delay}
  618. while {_delay} is greater than 0:
  619. if distance between {_location} and the player's location is less than 0.1:
  620. subtract 1 from {_delay}
  621. wait 1 second
  622. else:
  623. send "&cYou moved a block, therefore cancelling your teleport" to the player
  624. stop
  625. if distance between {_location} and the player's location is less than 0.1:
  626. teleport player to {x_factions_FAC::factions::%{_F}%::home}
  627. stop
  628. else:
  629. send "&cYou moved a block, therefore cancelling your teleport" to the player
  630. stop
  631. else:
  632. send "&eThere is currently no home set."
  633. stop
  634. else:
  635. send "&cYou currently don't own a faction"
  636. stop
  637.  
  638. # /F leave [leave the faction //owner can't leave if the faction isn't empty]
  639. if arg-1 is "leave":
  640. if {x_factions_FAC::players::%uuid of player%.faction} is set:
  641. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  642. if {x_factions_FAC::factions::%{_F}%::owner} is uuid of player:
  643. set {_count} to 0
  644. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  645. set {_count} to {_count}+1
  646. if {_count} is more than 1:
  647. send "%{@Prefix}% &7You can't leave the faction if the faction isn't empty, use &2/f disband or &2/f owner"
  648. stop
  649. else:
  650. #if the faction is empty, the owner can leave
  651. #make him to disband the faction
  652. make player execute "f disband"
  653. stop
  654. else:
  655. set {x_factions_FAC::players::%uuid of player%.faction} to "wilder"
  656. delete {x_factions_FAC::factions::%{_F}%::players::%uuid of player%}
  657. if {x_factions_FAC::factions::%{_F}%::players::mods::%uuid of player%} is set:
  658. delete {x_factions_FAC::factions::%{_F}%::players::mods::%uuid of player%}
  659. set {x_factions_FAC::players::%uuid of player%.chat} to 1
  660. send "%{@Prefix}% &7You have left the &c%{_F}%"
  661. FactionTag("call")
  662. stop
  663. else:
  664. send "%{@Prefix}% &7You must be in a faction to use this command"
  665. stop
  666.  
  667. #/f list [shows the factions list]
  668. if arg-1 is "list":
  669. if {x_factions_FAC::factions::*} is set:
  670. set {_cont} to size of {x_factions_FAC::factions::*}
  671. if {_cont} is more than 8:
  672. set {_maxpag} to {_cont}/8
  673. set {_maxpag} to ceil({_maxpag})
  674. else:
  675. set {_maxpag} to 1
  676. if arg-2 is set:
  677. set {_arg2} to arg-2 parsed as a number
  678. if {_arg2} is more than {_maxpag}:
  679. set {_arg2} to {_maxpag}
  680. set {_cont} to 1
  681. set {_cont} to 1
  682. send "&6&m---------------------------------------"
  683. send "&e&lFaction List &7(Page %{_arg2}%/%{_maxpag}%)"
  684. stop
  685. loop {x_factions_FAC::factions::*}:
  686. if loop-value-1 isn't "&4WarZone":
  687. set {_pag} to {_cont}/8
  688. set {_pag} to ceil({_pag})
  689. if {_pag} is {_arg2}:
  690. set {_F} to loop-value-1
  691. set {_online} to 0
  692. set {_offline} to 0
  693. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  694. set {_check} to loop-value-2
  695. set {_check} to player from uuid {_check}
  696. if {_check} is online:
  697. set {_online} to {_online}+1
  698. set {_offline} to {_offline}+1
  699. send "%{_F}% &a%{_online}%&8 /&c %{_offline}% "
  700. set {_cont} to {_cont}+1
  701. else:
  702. set {_cont} to {_cont}+1
  703. stop
  704. else:
  705. set {_arg2} to 1
  706. if {_arg2} is more than {_maxpag}:
  707. set {_arg2} to {_maxpag}
  708. set {_cont} to 1
  709. set {_cont} to 1
  710. send "&6&m "
  711. send "&e&lFaction List &7(Page %{_arg2}%/%{_maxpag}%)"
  712. loop {x_factions_FAC::factions::*}:
  713. if loop-value-1 isn't "&4WarZone":
  714. set {_pag} to {_cont}/8
  715. set {_pag} to ceil({_pag})
  716. if {_pag} is {_arg2}:
  717. set {_F} to loop-value-1
  718. set {_online} to 0
  719. set {_offline} to 0
  720. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  721. set {_check} to loop-value-2
  722. set {_check} to player from uuid {_check}
  723. if {_check} is online:
  724. set {_online} to {_online}+1
  725. set {_offline} to {_offline}+1
  726. send "&c%{_F}% &7(%{_online}%/%{_offline}%)"
  727. set {_cont} to {_cont}+1
  728. else:
  729. set {_cont} to {_cont}+1
  730. stop
  731. else:
  732. send "There is no factions!"
  733. stop
  734.  
  735. #/f disband [delete a faction]
  736. if arg-1 is "disband" or "delete":
  737. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  738. set {_F} to {x_factions_FAC::players::%uuid of player%.faction} #que faction es
  739. if {x_factions_FAC::factions::%{_F}%::owner} is uuid of player:
  740. if {x_factions_FAC::factions::%{_F}%::dtr.freeze} < now:
  741. FactionDisband("%{_F}%")
  742. FactionTag("call")
  743. broadcast "&eThe faction &9%{_F}% &ehas been &cdisbanded &eby &a%player%"
  744. stop
  745. else:
  746. send "%{@Prefix}% &7You can't disband with dtr freeze"
  747. stop
  748. else:
  749. send "%{@Prefix}% &7You must be the owner of &2%{_F}%"
  750. stop
  751. else:
  752. send "%{@Prefix}% &7You must own a faction to use this command"
  753. stop
  754.  
  755. #/mod {player} [if the player is a mod, the command will remove the permission, else: the player will become a mod. Only the owner can use the command]
  756. if arg-1 is "promote" or "captain":
  757. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  758. set {_F} to {x_factions_FAC::players::%uuid of player%.faction} #que faction es
  759. if {x_factions_FAC::factions::%{_F}%::owner} is uuid of player:
  760. if arg-2 is set:
  761. set {_l} to length of the arg-2
  762. if {_l} is less than 4:
  763. send "%{@Prefix}% &7The name must contain at least 3 characters"
  764. stop
  765. if arg-2 is player:
  766. send "%{@Prefix}% &7You are a captain already!"
  767. stop
  768. set {_p} to uuid of arg-2 parsed as a player
  769. if {x_factions_FAC::factions::%{_F}%::players::%{_p}%} is set:
  770. if {x_factions_FAC::factions::%{_F}%::mods::%{_p}%} is set:
  771. delete {x_factions_FAC::factions::%{_F}%::mods::%{_p}%}
  772. send "%{@Prefix}% &2%arg-2% &7is no longer a MOD"
  773. send "%{@Prefix}% &7You are no longer a CAPTAIN of &2%{_F}%" to player from uuid {_p}
  774. stop
  775. else:
  776. set {x_factions_FAC::factions::%{_F}%::mods::%{_p}%} to {_p}
  777. send "%{@Prefix}% &7You are now a MOD of &2%{_F}%" to player from uuid {_p}
  778. send "%{@Prefix}% &2%arg-2% &7is now a FACTION CAPTAIN"
  779. stop
  780. else:
  781. send "%{@Prefix}% &c%arg-2% &7is not a member of the faction"
  782. stop
  783. else:
  784. send "%{@Prefix}% &7You need to specify a player"
  785. stop
  786. else:
  787. send "%{@Prefix}% &7You must be the owner of &2%{_F}% &7to use this command"
  788. stop
  789. else:
  790. send "%{@Prefix}% &7You must own a faction to use this command"
  791. stop
  792.  
  793. if arg-1 is "officer":
  794. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  795. set {_F} to {x_factions_FAC::players::%uuid of player%.faction} #que faction es
  796. if {x_factions_FAC::factions::%{_F}%::owner} is uuid of player:
  797. if arg-2 is set:
  798. set {_l} to length of the arg-2
  799. if {_l} is less than 3:
  800. send "%{@Prefix}% &7The name must contain at least 3 characters"
  801. stop
  802. set {_p} to uuid of arg-2 parsed as a player
  803. if {x_factions_FAC::factions::%{_F}%::players::%{_p}%} is set:
  804. if {x_factions_FAC::factions::%{_F}%::officer::%{_p}%} is set:
  805. delete {x_factions_FAC::factions::%{_F}%::officer::%{_p}%}
  806. send "%{@Prefix}% &2%arg-2% &7is no longer a OFFICER"
  807. send "%{@Prefix}% &7You are no longer a OFFICER of &2%{_F}%" to player from uuid {_p}
  808. stop
  809. else:
  810. set {x_factions_FAC::factions::%{_F}%::officer::%{_p}%} to {_p}
  811. send "%{@Prefix}% &7You are now a OFFICER of &2%{_F}%" to player from uuid {_p}
  812. send "%{@Prefix}% &2%arg-2% &7is now a OFFICER"
  813. stop
  814. else:
  815. send "%{@Prefix}% &c%arg-2% &7is not a member of the faction"
  816. stop
  817. else:
  818. send "%{@Prefix}% &7You need to specify a player"
  819. stop
  820. else:
  821. send "%{@Prefix}% &7You must be the owner of &2%{_F}% &7to use this command"
  822. stop
  823. else:
  824. send "%{@Prefix}% &7You must own a faction to use this command"
  825. stop
  826.  
  827. # /F kick {FACTION.MEMBER} [KICK A FACTION MEMBER]
  828. if arg-1 is "kick":
  829. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  830. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  831. if {x_factions_FAC::factions::%{_F}%::mods::%uuid of player%} is set:
  832. if arg-2 is set:
  833. if arg-2 is player:
  834. send "%{@Prefix}% &7You can't kick your self from the faction"
  835. send "%{@Prefix}% &7Use &2/f leave &7or &2/f disband"
  836. stop
  837. set {_l} to length of the arg-2
  838. if {_l} is more than 16:
  839. send "%{@Prefix}% &7The name must contain at least 3 characters"
  840. stop
  841. else:
  842. if {x_factions_FAC::uuid::%arg-2%} is set:
  843. set {_p} to {x_factions_FAC::uuid::%arg-2%}
  844. else:
  845. set {_p} to uuid of arg-2 parsed as a player
  846. if {x_factions_FAC::factions::%{_F}%::owner} is {_p}:
  847. send "%{@Prefix}% &7You can't kick the owner!"
  848. stop
  849. if {x_factions_FAC::factions::%{_F}%::players::%{_p}%} is set:
  850. send "%{@Prefix}% %player from uuid {_p}% was Kicked from %{_F}%"
  851. delete {x_factions_FAC::factions::%{_F}%::players::%{_p}%}
  852. if {x_factions_FAC::factions::%{_F}%::players::mods::%player%} is set:
  853. delete {x_factions_FAC::factions::%{_F}%::players::mods::%{_p}%}
  854. if {x_factions_FAC::factions::%{_F}%::officer::%{_p}%} is set:
  855. delete {x_factions_FAC::factions::%{_F}%::officer::%{_p}%}
  856. set {x_factions_FAC::players::%{_p}%.faction} to "wilder"
  857. set {x_factions_FAC::players.%{_p}%.chat} to 1
  858. set {x_factions_FAC::factions::%{_F}%::dtr} to {x_factions_FAC::factions::%{_F}%::dtr}-1
  859. FactionTag("call")
  860. FactionDtr("%{_F}%")
  861. stop
  862. else:
  863. send "%{@Prefix}% %player from uuid {_p}% does not belong to %{_F}%"
  864. stop
  865. else:
  866. send "%{@Prefix}% &7You need to specify a player name"
  867. stop
  868. else:
  869. send "%{@Prefix}% &7Only mods can kick players"
  870. stop
  871. else:
  872. send "%{@Prefix}% &7You don't belong to a faction"
  873. stop
  874.  
  875. # /F OWNER {FACTION.MEMBER} [MAKES A FACTION MEMBER THE NEW OWNER OF THE FACTION]
  876. if arg-1 is "leader":
  877. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  878. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  879. if {x_factions_FAC::factions::%{_F}%::owner} is uuid of player:
  880. if arg-2 is set:
  881. if arg-2 is player:
  882. send "%{@Prefix}% &7You are the owner, silly!"
  883. stop
  884. set {_l} to length of the arg-2
  885. if {_l} is more than 16:
  886. send "%{@Prefix}% &7The name must have at least 3 characters"
  887. stop
  888. else:
  889. if arg-2 parsed as player is online:
  890. set {_P} to uuid of arg-2 parsed as player
  891. if {x_factions_FAC::players::%{_P}%.faction} is {_F}:
  892. set {x_factions_FAC::factions::%{_F}%::owner} to {_P}
  893.  
  894. delete {x_factions_FAC::factions::%{_F}%::mods::%uuid of player%}
  895. set {x_factions_FAC::factions::%{_F}%::mods::%{_P}%} to {_P}
  896.  
  897. delete {x_factions_FAC::factions::%{_F}%::officer::%uuid of player%}
  898. set {x_factions_FAC::factions::%{_F}%::officer::%{_P}%} to {_P}
  899.  
  900. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  901. send "%{@Prefix}% &7The owner of &2%{_F}% &7is now &2%player from uuid {_P}% " to player from uuid loop-value
  902. #remove player from the owner
  903. delete {x_factions_FAC::factions::%{_F}%::owner::%uuid of player%}
  904. send "%{@Prefix}% &7You are no longer a faction captain. You may ask &2%player from uuid {_P}% &7to give you the mod range "
  905. stop
  906. else:
  907. send "%{@Prefix}% &c%player from uuid {_P}% &7doesn't belong to this faction"
  908. stop
  909. else:
  910. send "%{@Prefix}% &7You must specify a player name"
  911. stop
  912. else:
  913. send "%{@Prefix}% &7This command is only for the owner of the faction"
  914. stop
  915. else:
  916. send "%{@Prefix}% &7You must own a faction to use this command"
  917. stop
  918.  
  919. # /F NEUTRAL {FACTION} [Propouse ally to another faction, if the arg ally uses the same command, the ally is made]
  920. if arg-1 is "ally":
  921. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  922. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  923. if {x_factions_FAC::factions::%{_F}%::mods::%uuid of player%} is set:
  924. if arg-2 is {_F}:
  925. send "%{@Prefix}% &7You can't ally your self"
  926. stop
  927. if arg-2 is set:
  928. set {_l} to length of the arg-2
  929. if {_l} is more than 16:
  930. send "%{@Prefix}% &7The name must contain at least 3 characters"
  931. stop
  932. if arg-2 parsed as player is online:
  933. set {_p} to uuid of arg-2 parsed as a player
  934. set {_p} to {x_factions_FAC::players::%{_p}%.faction}
  935. else:
  936. set {_p} to arg-2
  937. #lets check that the faction %{_p}% exist
  938. if {x_factions_FAC::Factions::%{_p}%} is set:
  939. #Lets check max-ally
  940. if size of {x_factions_FAC::factions::%{_F}%::ally::*} >= {@max-ally}:
  941. send "%{@Prefix}% &7You can't have any more allies."
  942. stop
  943. #lets check that this factions does not have any type of relation with arg-2
  944. if {x_factions_FAC::factions::%{_F}%::truce::%{_p}%} is set:
  945. send "%{@Prefix}% &7You already have a relation with %{_p}%"
  946. send "%{@Prefix}% &7You must end the relation with this factions first"
  947. send "%{@Prefix}% &7You can use /f neutral %{_p}%"
  948. stop
  949.  
  950. if {x_factions_FAC::factions::%{_F}%::ally::%{_p}%} is set:
  951. send "%{@Prefix}% &7%{_p}% is your ally already"
  952. stop
  953.  
  954. #Lets check if he want to answer a request :
  955. if {x_factions_FAC::factions::%{_F}%::request_ally::%{_p}%} is set:
  956. #
  957. delete {x_factions_FAC::factions::%{_F}%::request_ally::%{_p}%}
  958. delete {x_factions_FAC::factions::%{_p}%::request_ally::%{_F}%}
  959.  
  960. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%} to {_p}
  961. set {x_factions_FAC::factions::%{_p}%::ally::%{_F}%} to {_F}
  962.  
  963. #
  964. #default perms"
  965. #
  966. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::build} to {@ally-place}
  967. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::sethome} to {@ally-sethome}
  968. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::interact} to {@ally-interact}
  969. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::break} to {@ally-break}
  970. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::chest} to {@ally-chest}
  971.  
  972. set {x_factions_FAC::factions::%{_p}%::ally::%{_F}%::perms::build} to {@ally-place}
  973. set {x_factions_FAC::factions::%{_p}%::ally::%{_F}%::perms::sethome} to {@ally-sethome}
  974. set {x_factions_FAC::factions::%{_p}%::ally::%{_F}%::perms::interact} to {@ally-interact}
  975. set {x_factions_FAC::factions::%{_p}%::ally::%{_F}%::perms::break} to {@ally-break}
  976. set {x_factions_FAC::factions::%{_p}%::ally::%{_F}%::perms::chest} to {@ally-chest}
  977.  
  978.  
  979. Broadcast "%{@Prefix}% &c%{x_factions_FAC::players::%uuid of player%.faction}% &6allied with &c%{_p}%"
  980. FactionTag("call")
  981. stop
  982. else:
  983. #lets send a request
  984. send "%{@Prefix}% &c The ally request was sent."
  985. set {x_factions_FAC::factions::%{_p}%::request_ally::%{_F}%} to {_F}
  986. loop {x_factions_FAC::factions::%{_p}%::players::*}:
  987. send "%{@Prefix}% &c%{x_factions_FAC::players::%uuid of player%.faction}% &7sent an ally request" to player from uuid loop-value-1
  988. stop
  989. else:
  990. send "%{@Prefix}% &7There is no Faction with that name"
  991. stop
  992. else:
  993. send "%{@Prefix}% &7You must specify a faction name"
  994. stop
  995. else:
  996. send "%{@Prefix}% &7Only mods can send ally request!"
  997. stop
  998. else:
  999. send "%{@Prefix}% &7You must belong to a faction"
  1000. stop
  1001.  
  1002. if arg-1 is "truce":
  1003. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  1004. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  1005. if {x_factions_FAC::factions::%{_F}%::mods::%uuid of player%} is set:
  1006. if arg-2 is {_F}:
  1007. send "%{@Prefix}% &7You can't make a truce with your self"
  1008. stop
  1009. if arg-2 is set:
  1010. set {_l} to length of the arg-2
  1011. if {_l} is more than 16:
  1012. send "%{@Prefix}% &7The name must contain at least 3 characters"
  1013. stop
  1014. if arg-2 parsed as player is online:
  1015. set {_p} to uuid of arg-2 parsed as a player
  1016. set {_p} to {x_factions_FAC::players::%{_p}%.faction}
  1017. else:
  1018. set {_p} to arg-2
  1019. #lets check that the faction %{_p}% exist
  1020. if {x_factions_FAC::Factions::%{_p}%} is set:
  1021. #Lets check max-ally
  1022. if size of {x_factions_FAC::factions::%{_F}%::truce::*} >= {@max-truce}:
  1023. send "%{@Prefix}% &7You can't have any more truce."
  1024. stop
  1025. #lets check that this factions does not have any type of relation with arg-2
  1026. if {x_factions_FAC::factions::%{_F}%::ally::%{_p}%} is set:
  1027. send "%{@Prefix}% &7You already have a relation with %{_p}%"
  1028. send "%{@Prefix}% &7You must end the relation with this factions first"
  1029. send "%{@Prefix}% &7You can use /f neutral %{_p}%"
  1030. stop
  1031.  
  1032. if {x_factions_FAC::factions::%{_F}%::truce::%{_p}%} is set:
  1033. send "%{@Prefix}% &7%{_p}% is your truce already"
  1034. stop
  1035.  
  1036. #Lets check if he want to answer a request :
  1037. if {x_factions_FAC::factions::%{_F}%::request_truce::%{_p}%} is set:
  1038. #delete the request
  1039. delete {x_factions_FAC::factions::%{_F}%::request_truce::%{_p}%}
  1040. delete {x_factions_FAC::factions::%{_p}%::request_truce::%{_F}%}
  1041. #make the truce
  1042. set {x_factions_FAC::factions::%{_F}%::truce::%{_p}%} to {_p}
  1043. set {x_factions_FAC::factions::%{_p}%::truce::%{_F}%} to {_F}
  1044. Broadcast "%{@Prefix}% &c%{x_factions_FAC::players::%uuid of player%.faction}% &6pacted a truce &c%{_p}%"
  1045. FactionTag("call")
  1046. stop
  1047. else:
  1048. #lets send a request
  1049. send "%{@Prefix}% &c The truce request was sent."
  1050. set {x_factions_FAC::factions::%{_p}%::request_truce::%{_F}%} to {_F}
  1051. loop {x_factions_FAC::factions::%{_p}%::players::*}:
  1052. send "%{@Prefix}% &c%{x_factions_FAC::players::%uuid of player%.faction}% &7sent an truce request" to player from uuid loop-value-1
  1053. stop
  1054. else:
  1055. send "%{@Prefix}% &7There is no Faction with that name"
  1056. stop
  1057. else:
  1058. send "%{@Prefix}% &7You must specify a faction name"
  1059. stop
  1060. else:
  1061. send "%{@Prefix}% &7Only mods can send truce request!"
  1062. stop
  1063. else:
  1064. send "%{@Prefix}% &7You must belong to a faction"
  1065. stop
  1066.  
  1067. if arg-1 is "perms":
  1068. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  1069. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  1070. if {x_factions_FAC::factions::%{_F}%::owner::%uuid of player%} is set:
  1071. if arg-2 is {_F}:
  1072. send "%{@Prefix}% &7You must specify an ally"
  1073. stop
  1074. if arg-2 is set:
  1075. set {_l} to length of the arg-2
  1076. if {_l} is more than 16:
  1077. send "%{@Prefix}% &7The name must contain at least 3 characters"
  1078. stop
  1079. if arg-2 parsed as player is online:
  1080. set {_p} to uuid of arg-2 parsed as a player
  1081. set {_p} to {x_factions_FAC::players::%{_p}%.faction}
  1082. else:
  1083. set {_p} to arg-2
  1084. #lets check that the faction %{_p}% exist
  1085. if {x_factions_FAC::Factions::%{_p}%} is set:
  1086. if {x_factions_FAC::factions::%{_F}%::ally%{_p}%} is set:
  1087. if arg-3 isn't "build" or "sethome" or "interact" or "chest" or "break" or "build":
  1088. send "Usage: /f perms AllyName Permission"
  1089. send "%{@Prefix}% Perms for ally:"
  1090. send " &7build yes/no"
  1091. send " &7sethome yes/no"
  1092. send " &7interact (buttons,door,etc) yes/no"
  1093. send " &7break yes/no"
  1094. send " &7chest yes/no"
  1095. stop
  1096. if arg-3 isn't set:
  1097. send "Usage: /f perms AllyName Permission"
  1098. send "%{@Prefix}% Perms for ally:"
  1099. send " &7build"
  1100. send " &7sethome"
  1101. send " &7interact (buttons,door,etc)"
  1102. send " &7break"
  1103. send " &7chest"
  1104. stop
  1105. if arg-3 is "build":
  1106. if {x_factions_FAC::factions::%{_F}%:::ally::%{_p}%::perms::build} is "yes":
  1107. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::build} to "no"
  1108. send "Permission %arg-3% was set to DENY"
  1109. stop
  1110. else:
  1111. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::build} to "yes"
  1112. send "Permission %arg-3% was set to ALLOW"
  1113. stop
  1114. if arg-3 is "sethome":
  1115. if {x_factions_FAC::factions::%{_F}%:::ally::%{_p}%::perms::sethome} is "yes":
  1116. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::sethome} to "no"
  1117. send "Permission %arg-3% was set to DENY"
  1118. stop
  1119. else:
  1120. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::sethome} to "yes"
  1121. send "Permission %arg-3% was set to ALLOW"
  1122. stop
  1123. if arg-3 is "interact":
  1124. if {x_factions_FAC::factions::%{_F}%:::ally::%{_p}%::perms::interact} is "yes":
  1125. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::interact} to "no"
  1126. send "Permission %arg-3% was set to DENY"
  1127. stop
  1128. else:
  1129. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::interact} to "yes"
  1130. send "Permission %arg-3% was set to ALLOW"
  1131. stop
  1132. if arg-3 is "break":
  1133. if {x_factions_FAC::factions::%{_F}%:::ally::%{_p}%::perms::break} is "yes":
  1134. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::break} to "no"
  1135. send "Permission %arg-3% was set to DENY"
  1136. stop
  1137. else:
  1138. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::break} to "yes"
  1139. send "Permission %arg-3% was set to ALLOW"
  1140. stop
  1141. if arg-3 is "chest":
  1142. if {x_factions_FAC::factions::%{_F}%:::ally::%{_p}%::perms::chest} is "yes":
  1143. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::chest} to "no"
  1144. send "Permission %arg-3% was set to DENY"
  1145. stop
  1146. else:
  1147. set {x_factions_FAC::factions::%{_F}%::ally::%{_p}%::perms::chest} to "yes"
  1148. send "Permission %arg-3% was set to ALLOW"
  1149. stop
  1150. else:
  1151. send "%{@Prefix}% &7%{_p}% is not your ally"
  1152.  
  1153. else:
  1154. send "%{@Prefix}% &7There is no Faction with that name"
  1155. stop
  1156. else:
  1157. send "%{@Prefix}% Perms for ally:"
  1158. send " &7build"
  1159. send " &7sethome"
  1160. send " &7interact (buttons,door,etc)"
  1161. send " &7break"
  1162. send " &7chest"
  1163. stop
  1164. else:
  1165. send "%{@Prefix}% &7Only the owner can change the ally permissions"
  1166. stop
  1167. else:
  1168. send "%{@Prefix}% &7You must belong to a faction"
  1169. stop
  1170.  
  1171. # /F UNALLY {FACTION} [CANCEL AN ALLIANCE]
  1172. if arg-1 is "unally":
  1173. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  1174. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  1175. if {x_factions_FAC::factions::%{_F}%::mods::%uuid of player%} is set:
  1176. if arg-2 is {_F}:
  1177. send "%{@Prefix}% &7You can't make a truce with your self"
  1178. stop
  1179. if arg-2 is set:
  1180. set {_l} to length of the arg-2
  1181. if {_l} is more than 16:
  1182. send "%{@Prefix}% &7The name must contain at least 3 characters"
  1183. stop
  1184. if arg-2 parsed as player is online:
  1185. set {_p} to uuid of arg-2 parsed as a player
  1186. set {_p} to {x_factions_FAC::players::%{_p}%.faction}
  1187. else:
  1188. set {_p} to arg-2
  1189. #lets check that the faction %{_p}% exist
  1190. if {x_factions_FAC::Factions::%{_p}%} is set:
  1191. if {x_factions_FAC::factions::%{_F}%::ally::%arg-2%} isn't set:
  1192. if {x_factions_FAC::factions::%{_F}%::truce::%arg-2%} isn't set:
  1193. send "%{@Prefix}% &7You must have an active ally or truce to use this command"
  1194. stop
  1195. else:
  1196. delete {x_factions_FAC::factions::%{_F}%::truce::%arg-2%}
  1197. delete {x_factions_FAC::factions::%arg-2%::truce::%{_F}%}
  1198. set {_disband} to "truce"
  1199. FactionTag("call")
  1200. else:
  1201. delete {x_factions_FAC::factions::%arg-2%:::ally::%{_F}%::perms::*}
  1202. delete {x_factions_FAC::factions::%{_F}%::ally::%arg-2%::perms::*}
  1203.  
  1204. delete {x_factions_FAC::factions::%{_F}%::ally::%arg-2%}
  1205. delete {x_factions_FAC::factions::%arg-2%::ally::%{_F}%}
  1206. FactionTag("call")
  1207. set {_disband} to "ally"
  1208.  
  1209. loop {x_factions_FAC::factions::%arg-2%::players::*}:
  1210. send "%{@Prefix}% &d%{_F}% &7disbanded the %{_disband}% with %arg-2%" to player from uuid loop-value-1
  1211. #DISABLE ALLY CHAT
  1212. set {x_factions_FAC::players::%loop-value-1%.chat} to 1
  1213. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  1214. send "%{@Prefix}% &d%{_F}% &7disbanded the %{_disband}% with %arg-2%" to player from uuid loop-value-1
  1215. #DISABLE ALLY CHAT
  1216. set {x_factions_FAC::players::%loop-value-1%.chat} to 1
  1217. stop
  1218. else:
  1219. send "%{@Prefix}% &7There is no Faction with that name"
  1220. stop
  1221. else:
  1222. send "%{@Prefix}% &7You need to specify a faction, use &2/F show &7to see the ally or truce name"
  1223. stop
  1224. else:
  1225. send "%{@Prefix}% &7Only mods may cancel an ally pact!"
  1226. stop
  1227. else:
  1228. send "%{@Prefix}% &7Only faction's mods can cancel an ally pact!"
  1229. stop
  1230.  
  1231. # /F C [CHANGE THE CHAT CHANNEL]
  1232. if arg-1 is "c" or "chat":
  1233. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  1234. if {x_factions_FAC::players::%uuid of player%.chat} isn't set:
  1235. set {x_factions_FAC::players::%uuid of player%.chat} to 1
  1236. stop
  1237. if {x_factions_FAC::players::%uuid of player%.chat} is 1: #all
  1238. set {x_factions_FAC::players::%uuid of player%.chat} to 2
  1239. send "%{@Prefix}% &aFaction Channel"
  1240. stop
  1241. if {x_factions_FAC::players::%uuid of player%.chat} is 2: #fac
  1242. set {x_factions_FAC::players::%uuid of player%.chat} to 3
  1243. send "&dAlly Channel"
  1244. stop
  1245. if {x_factions_FAC::players::%uuid of player%.chat} is 3: #ally
  1246. set {x_factions_FAC::players::%uuid of player%.chat} to 1
  1247. send "%{@Prefix}% &cGlobal Channel"
  1248. stop
  1249. else:
  1250. send "&cYou must have a faction to use this command"
  1251. stop
  1252. #/F MAP
  1253. if arg-1 is "map":
  1254. set {_center} to player's location#location you want to loop the chunks around
  1255. set {_radius} to 4
  1256. set {_pos} to {_center}
  1257. set {_counter} to 1
  1258. if facing of player is north:
  1259. loop 2 * {_radius} + 1 times:
  1260. set z-coordinate of {_pos} to z-coordinate of {_center} - 16 * {_radius} + (loop-number - 1) * 16
  1261. set x-coordinate of {_pos} to x-coordinate of {_center} - 16 * {_radius}
  1262. loop 2 * {_radius} + 1 times:
  1263. set {_chunks::%{_counter}%} to chunk at {_pos}
  1264. add 1 to {_counter}
  1265. add 16 to x-coordinate of {_pos}
  1266. else if facing of player is south:
  1267. loop 2 * {_radius} + 1 times:
  1268. set z-coordinate of {_pos} to z-coordinate of {_center} + 16 * {_radius} - (loop-number - 1) * 16
  1269. set x-coordinate of {_pos} to x-coordinate of {_center} + 16 * {_radius}
  1270. loop 2 * {_radius} + 1 times:
  1271. set {_chunks::%{_counter}%} to chunk at {_pos}
  1272. add 1 to {_counter}
  1273. add -16 to x-coordinate of {_pos}
  1274. else if facing of player is west:
  1275. loop 2 * {_radius} + 1 times:
  1276. set x-coordinate of {_pos} to x-coordinate of {_center} - 16 * {_radius} + (loop-number - 1) * 16
  1277. set z-coordinate of {_pos} to z-coordinate of {_center} + 16 * {_radius}
  1278. loop 2 * {_radius} + 1 times:
  1279. set {_chunks::%{_counter}%} to chunk at {_pos}
  1280. add 1 to {_counter}
  1281. add -16 to z-coordinate of {_pos}
  1282. else if facing of player is east:
  1283. loop 2 * {_radius} + 1 times:
  1284. set x-coordinate of {_pos} to x-coordinate of {_center} + 16 * {_radius} - (loop-number - 1) * 16
  1285. set z-coordinate of {_pos} to z-coordinate of {_center} - 16 * {_radius}
  1286. loop 2 * {_radius} + 1 times:
  1287. set {_chunks::%{_counter}%} to chunk at {_pos}
  1288. add 1 to {_counter}
  1289. add 16 to z-coordinate of {_pos}
  1290.  
  1291. #comienzo buscar enemigos
  1292. #broadcast "%{_chunks::*}%"
  1293. set {_cont} to 0
  1294. set {_l1} to ""
  1295. set {_l2} to ""
  1296. set {_l3} to ""
  1297. set {_l4} to ""
  1298. set {_l5} to ""
  1299. set {_l6} to ""
  1300. set {_l7} to ""
  1301. set {_l8} to ""
  1302. set {_l9} to ""
  1303.  
  1304. set {_1} to "&8*"
  1305. set {_2} to "&8@"
  1306. set {_3} to "&8!"
  1307. set {_4} to "&8@"
  1308. set {_6} to "&8$"
  1309. set {_7} to "&8~"
  1310. set {_8} to "&8^"
  1311. set {_9} to "&8&"
  1312. loop {_chunks::*}:
  1313. if chunk at player's location is loop-value:
  1314. set {_ico} to "&b+&f"
  1315. else if {x_factions_FAC::chunks::%loop-value%} is set:
  1316. if {x_factions_FAC::chunks::%loop-value%.owner} is "&4WarZone":
  1317. set {_ico} to "&4+"
  1318. else:
  1319. set {_F} to {x_factions_FAC::chunks::%loop-value%.owner}
  1320. if {_faction.%{_F}%.icon} isn't set:
  1321. if {_1.used} isn't set:
  1322. set {_ico} to {_1}
  1323. set {_1.used} to {_F}
  1324. set {_faction.%{_F}%.icon} to {_1}
  1325. else if {_2.used} isn't set:
  1326. set {_ico} to {_2}
  1327. set {_2.used} to {_F}
  1328. set {_faction.%{_F}%.icon} to {_2}
  1329.  
  1330. else if {_3.used} isn't set:
  1331. set {_ico} to {_3}
  1332. set {_2.used} to {_F}
  1333. set {_faction.%{_F}%.icon} to {_3}
  1334.  
  1335. else if {_4.used} isn't set:
  1336. set {_ico} to {_4}
  1337. set {_4.used} to {_F}
  1338. set {_faction.%{_F}%.icon} to {_4}
  1339.  
  1340. else if {_5.used} isn't set:
  1341. set {_ico} to {_5}
  1342. set {_5.used} to {_F}
  1343. set {_faction.%{_F}%.icon} to {_5}
  1344.  
  1345. else if {_6.used} isn't set:
  1346. set {_ico} to {_6}
  1347. set {_6.used} to {_F}
  1348. set {_faction.%{_F}%.icon} to {_6}
  1349.  
  1350. else if {_7.used} isn't set:
  1351. set {_ico} to {_7}
  1352. set {_7.used} to {_F}
  1353. set {_faction.%{_F}%.icon} to {_7}
  1354.  
  1355. else if {_8.used} isn't set:
  1356. set {_ico} to {_8}
  1357. set {_8.used} to {_F}
  1358. set {_faction.%{_F}%.icon} to {_8}
  1359.  
  1360. else if {_9.used} isn't set:
  1361. set {_ico} to {_9}
  1362. set {_9.used} to {_F}
  1363. set {_faction.%{_F}%.icon} to {_9}
  1364. else:
  1365. set {_ico} to {_faction.%{_F}%.icon}
  1366. else:
  1367. set {_ico} to "&7-"
  1368. if {_cont} is less than 9:
  1369. set {_l1} to "%{_l1}% %{_ico}%"
  1370. add 1 to {_cont}
  1371. else if {_cont} is less than 18:
  1372. set {_l2} to "%{_l2}% %{_ico}%"
  1373. add 1 to {_cont}
  1374. else if {_cont} is less than 27:
  1375. set {_l3} to "%{_l3}% %{_ico}%"
  1376. add 1 to {_cont}
  1377. else if {_cont} is less than 36:
  1378. set {_l4} to "%{_l4}% %{_ico}%"
  1379. add 1 to {_cont}
  1380. else if {_cont} is less than 45:
  1381. set {_l5} to "%{_l5}% %{_ico}%"
  1382. add 1 to {_cont}
  1383. else if {_cont} is less than 54:
  1384. set {_l6} to "%{_l6}% %{_ico}%"
  1385. add 1 to {_cont}
  1386. else if {_cont} is less than 63:
  1387. set {_l7} to "%{_l7}% %{_ico}%"
  1388. add 1 to {_cont}
  1389. else if {_cont} is less than 72:
  1390. set {_l8} to "%{_l8}% %{_ico}%"
  1391. add 1 to {_cont}
  1392. else if {_cont} is less than 81:
  1393. set {_l9} to "%{_l9}% %{_ico}%"
  1394. add 1 to {_cont}
  1395.  
  1396. set {_n} to "N"
  1397. set {_s} to "S"
  1398. set {_e} to "E"
  1399. set {_w} to "W"
  1400. if facing of player is north:
  1401. set {_n} to "&4N&6"
  1402. else if facing of player is south:
  1403. set {_s} to "&4S&6"
  1404. else if facing of player is west:
  1405. set {_w} to "&4W&6"
  1406. else if facing of player is east:
  1407. set {_e} to "&4E&6"
  1408. set {_owner} to "Land of: %{x_factions_FAC::chunks::%chunk at player's location%.owner}%"
  1409. set {_encabezado} to "&6---------[&2%chunk at player's location%&6 %{_owner}% ]-----------"
  1410. replace "chunk" in {_encabezado} with ""
  1411. replace "of %player's world%" in {_encabezado} with ""
  1412. replace "<none>" in {_encabezado} with "nobody"
  1413. send "%{_encabezado}%"
  1414. send "%{_l1}%"
  1415. send "%{_l2}%"
  1416. send "%{_l3}%"
  1417. send "%{_l4}% &6\%{_n}%/"
  1418. send "%{_l5}% &6%{_w}%+%{_e}%"
  1419. send "%{_l6}% &6/%{_s}%\"
  1420. send "%{_l7}%"
  1421. send "%{_l8}%"
  1422. send "%{_l9}%"
  1423.  
  1424. if {_1.used} is set:
  1425. set {_l10} to "&8%{_1}% &9%{_1.used}%"
  1426.  
  1427. if {_2.used} is set:
  1428. set {_l10} to "%{_l10}% &f,%{_2}% &9%{_2.used}%"
  1429.  
  1430. if {_3.used} is set:
  1431. set {_l10} to "%{_l10}% &f,%{_3}% &9%{_3.used}%"
  1432.  
  1433. if {_4.used} is set:
  1434. set {_l10} to "%{_l10}% &f,%{_4}% &9%{_4.used}%"
  1435.  
  1436. if {_5.used} is set:
  1437. set {_l10} to "%{_l10}% &f,%{_5}% &9%{_5.used}%"
  1438.  
  1439. if {_6.used} is set:
  1440. set {_l10} to "%{_l10}% &f,%{_6}% &9%{_6.used}%"
  1441.  
  1442. if {_7.used} is set:
  1443. set {_l10} to "%{_l10}% &f,%{_7}% &9%{_7.used}%"
  1444.  
  1445. if {_8.used} is set:
  1446. set {_l10} to "%{_l10}% &f,%{_8}% &9%{_8.used}%"
  1447.  
  1448. if {_9.used} is set:
  1449. set {_l10} to "%{_l10}% &f,%{_9}% &9%{_9.used}%"
  1450. if {_l10} is set:
  1451. send "%{_l10}%"
  1452. stop
  1453.  
  1454. if arg-1 isn't set:
  1455. send "&6&m "
  1456. send "&e&lFaction Help &7(Page 1)"
  1457. send "&e/f create &6» &fCreates a faction"
  1458. send "&e/f show &6» &fFaction information"
  1459. send "&e/f rename &6» &fRename your faction"
  1460. send "&e/f list &6>> &fFaction list"
  1461. send "&e/f sethome &6» &fSets faction home"
  1462. send "&6&m "
  1463. stop
  1464.  
  1465. if arg-1 isn't "officer" or "create" or "perms" or "truce" or "invite" or "deinvite" or "join" or "unclaim" or "claim" or "tag" or "sethome" or "show" or "who" or "home" or "leave" or "list" or "disband" or "mod" or "kick" or "owner" or "ally" or "neutral" or "c" or "chat " or "map" or "2" or "3" or "help 2" or "help 3":
  1466. send "&6&m "
  1467. send "&e&lFaction Help &7(Page 1)"
  1468. send "&e/f create &6» &fCreates a faction"
  1469. send "&e/f show &6» &fFaction information"
  1470. send "&e/f rename &6» &fRename your faction"
  1471. send "&e/f list &6» &fFaction list"
  1472. send "&e/f sethome &6» &fSets faction home"
  1473. send "&6&m "
  1474. stop
  1475. stop
  1476.  
  1477. if arg-1 is "2" or "help 2":
  1478. send "&6&m "
  1479. send "&e&lFaction Help &7(Page 2)"
  1480. send "&ef home &6» &7Teleport a player to faction home"
  1481. send "&9/f leave &6» &7Leave your faction"
  1482. send "&9/f invite &6» &7Invite a player to your faction"
  1483. send "&9/f deinvite &6» &7Cancel invitation"
  1484. send "&9/f claim &6» &7Claim a chunk"
  1485. send "&6&m "
  1486. stop
  1487.  
  1488. if arg-1 is "3" or "help 3":
  1489. send "&6&m "
  1490. send "&e&lFaction Help &7(Page 3)"
  1491. send "&e/f unclaim &6» &fUnclaim land"
  1492. send "&e/f kick &6» &fKick a player from your faction"
  1493. send "&e/f mod &6» &fPromote a faction member"
  1494. send "&e/f chat &6» &fSwitch chat"
  1495. send "&e/f owner &6» &fSwitch chat"
  1496. send "&e/f officer &6» &fAllows a user to access your protected chests"
  1497. send "&6&m "
  1498. stop
  1499.  
  1500. command f-admin [<text>] [<text>] [<text>]:
  1501. permission: skript.faction.admin
  1502. trigger:
  1503. if arg-1 is "disband":
  1504. if arg-2 is set:
  1505. if {x_factions_FAC::factions::%arg-2%} is set:
  1506. set {_F} to arg-2
  1507. if {x_factions_FAC::factions::%{_F}%::ally::*} isn't empty:
  1508. loop {x_factions_FAC::factions::%{_F}%::ally::*}:
  1509. delete {x_factions_FAC::factions::%{_F}%::ally::%loop-value-1%}
  1510. delete {x_factions_FAC::factions::%loop-value-1%::ally::%{_F}%}
  1511. delete {x_factions_FAC::factions::%{_F}%::ally::%loop-value-1%::*}
  1512. delete {x_factions_FAC::factions::%loop-value-1%::ally::%{_F}%::*}
  1513.  
  1514. if {x_factions_FAC::factions::%{_F}%::truce::*} isn't empty:
  1515. loop {x_factions_FAC::factions::%{_F}%::truce::*}:
  1516. delete {x_factions_FAC::factions::%{_F}%::truce::%loop-value-1%}
  1517. delete {x_factions_FAC::factions::%loop-value-1%::truce::%{_F}%}
  1518. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  1519. send "%{@Prefix}% &8Faction deleted by an admin" to player from uuid loop-value-1
  1520. set {x_factions_FAC::players::%loop-value-1%.faction} to "wilder" #Make him a wilder
  1521. set {x_factions_FAC::players::%loop-value-1%.chat} to 1 #Force chat channel
  1522. loop {x_factions_FAC::factions::%{_F}%::lands::*}:
  1523. delete {x_factions_FAC::chunks::%loop-value-1%.owner}
  1524. delete {x_factions_FAC::chunks::%loop-value-1%}
  1525. delete {x_factions_FAC::factions::%{_F}%::*}
  1526. delete {x_factions_FAC::factions::%{_F}%}
  1527. delete {x_factions_FAC::factions::%{_F}%.owner}
  1528. delete {x_factions_FAC::factions::%{_F}%::lands::*}
  1529. delete {x_factions_FAC::factions::%{_F}%::mods::*}
  1530. delete {x_factions_FAC::factions::%{_F}%::players::*}
  1531. send "%{@Prefix}% &8Faction deleted"
  1532. stop
  1533. else:
  1534. send "%{@Prefix}% &8 That faction does not exist"
  1535. stop
  1536.  
  1537. if arg-1 is "kick":
  1538. if arg-2 is set:
  1539. set {_p} to uuid of arg-2 parsed as a player
  1540. if {x_factions_FAC::players::%{_p}%.faction} isn't "wilder":
  1541. set {_F} to {x_factions_FAC::players::%{_p}%.faction}
  1542. if {x_factions_FAC::factions::%{_F}%::owner} is {_p}:
  1543. send "%{@Prefix}%&8 Thans the owner, you can't kick him, use /f-admin disband"
  1544. stop
  1545. send "%{@Prefix}%&8 %player from uuid {_p}% was Kicked from %{_F}%"
  1546. delete {x_factions_FAC::factions::%{_F}%::players::%{_p}%}
  1547. if {x_factions_FAC::factions::%{_F}%::players::mods::%player%} is set:
  1548. delete {x_factions_FAC::factions::%{_F}%::players::mods::%{_p}%}
  1549. set {x_factions_FAC::players::%{_p}%.faction} to "wilder"
  1550. set {x_factions_FAC::players.%{_p}%.chat} to 1
  1551. stop
  1552. else:
  1553. send "%{@Prefix}%&8 %arg-2% is a wilder"
  1554. stop
  1555.  
  1556. if arg-1 is "givedtr":
  1557. if arg-2 is set:
  1558. if arg-3 is set:
  1559. if {x_factions_FAC::factions::%arg-2%} is set:
  1560. set {_F} to arg-2
  1561. set {x_factions_FAC::factions::%{_F}%::dtr} to {x_factions_FAC::factions::%{_F}%::dtr}+3
  1562. send "%{@Prefix}% &8 Added %arg-3% dtr to %{_F}%"
  1563. stop
  1564. else:
  1565. send "%{@Prefix}% &8Faction not found"
  1566. stop
  1567. else:
  1568. send "%{@Prefix}% &8 Specify a faction"
  1569. stop
  1570.  
  1571. if arg-1 is "removedtr":
  1572. if arg-2 is set:
  1573. if arg-3 is set:
  1574. if {x_factions_FAC::factions::%arg-2%} is set:
  1575. set {_F} to arg-2
  1576. set {x_factions_FAC::factions::%{_F}%::dtr} to {x_factions_FAC::factions::%{_F}%::dtr}-3
  1577. send "%{@Prefix}% &8Removed %arg-3% dtr to %{_F}%"
  1578. stop
  1579. else:
  1580. send "%{@Prefix}% &8Faction not found"
  1581. stop
  1582. else:
  1583. send "%{@Prefix}% &8Specify a faction"
  1584. stop
  1585.  
  1586. if arg-1 is "stopfreeze":
  1587. if arg-2 is set:
  1588. if {x_factions_FAC::factions::%arg-2%} is set:
  1589. set {_F} to arg-2
  1590. set {x_factions_FAC::factions::%{_F}%::dtr.freeze} to now
  1591. subtract 1 second from {x_factions_FAC::factions::%{_F}%::dtr.freeze}
  1592. send "%{@Prefix}% &8Dtr freeze removed from faction %{_F}%"
  1593. stop
  1594. else:
  1595. send "%{@Prefix}% &8Faction not found"
  1596. stop
  1597. else:
  1598. send "%{@Prefix}% &8Specify a faction"
  1599. stop
  1600.  
  1601. if arg-1 is "owner":
  1602. if arg-2 is set:
  1603. if {x_factions_FAC::factions::%arg-2%} is set:
  1604. if arg-3 is set:
  1605. set {_F} to arg-2
  1606. set {_owner} to uuid of arg-3 parsed as a player
  1607. set {x_factions_FAC::factions::%{_F}%::owner} to {_owner}
  1608. set {x_factions_FAC::factions::%{_F}%::mods::%{_owner}%} to {_owner}
  1609. send "%{@Prefix}% &8Owner cambiado? %{_F}%"
  1610. stop
  1611. else:
  1612. send "%{@Prefix}% &8Faction not found"
  1613. stop
  1614. else:
  1615. send "%{@Prefix}% &8Specify a faction"
  1616. stop
  1617.  
  1618.  
  1619. if arg-1 is "fix":
  1620. if arg-2 is set:
  1621. if {x_factions_FAC::factions::%arg-2%} is set:
  1622. if arg-3 is set:
  1623. set {_F} to arg-2
  1624. set {_fixer} to uuid of arg-3 parsed as a player
  1625. set {x_factions_FAC::factions::%{_F}%::mods::%{_fixer}%} to {_fixer}
  1626. set {x_factions_FAC::players::%{_fixer}%.faction} to {_F} #agrego el usuario a la faction
  1627. set {x_factions_FAC::factions::%{_F}%::players::%{_fixer}%} to {_fixer}
  1628. send "%{@Prefix}% &8Fixer creado? %{_F}%"
  1629. stop
  1630. else:
  1631. send "%{@Prefix}% &8Faction not found"
  1632. stop
  1633. else:
  1634. send "%{@Prefix}% &8Specify a faction"
  1635. stop
  1636.  
  1637. if arg-1 is "unfix":
  1638. if arg-2 is set:
  1639. if {x_factions_FAC::factions::%arg-2%} is set:
  1640. if arg-3 is set:
  1641. set {_F} to arg-2
  1642. set {_fixer} to uuid of arg-3 parsed as a player
  1643. delete {x_factions_FAC::factions::%{_F}%::mods::%{_fixer}%}
  1644. delete {x_factions_FAC::players::%{_fixer}%.faction}
  1645. set {x_factions_FAC::players::%{_fixer}%.faction} to "wilder"
  1646. delete {x_factions_FAC::factions::%{_F}%::players::%{_fixer}%}
  1647. send "%{@Prefix}% &8Fixer eliminado? %{_F}%"
  1648. stop
  1649. else:
  1650. send "%{@Prefix}% &8Faction not found"
  1651. stop
  1652. else:
  1653. send "%{@Prefix}% &8Specify a faction"
  1654. stop
  1655.  
  1656.  
  1657. if arg-1 is "deletelands":
  1658. if arg-2 is set:
  1659. if {x_factions_FAC::factions::%arg-2%} is set:
  1660. delete {x_factions_FAC::factions::%arg-2%::lands::*}
  1661. send "%{@Prefix}% &8Lands eliminadas? %arg-2%"
  1662. stop
  1663. else:
  1664. send "%{@Prefix}% &8Faction not found"
  1665. stop
  1666. else:
  1667. send "%{@Prefix}% &8Specify a faction"
  1668. stop
  1669.  
  1670.  
  1671. if arg-1 is "refreshtag":
  1672. FactionTag("call")
  1673. stop
  1674.  
  1675. if arg-1 isn't set:
  1676. send "&c--------------------------------------------"
  1677. send "&6&l FORTNITE"
  1678. send "&c--------------------------------------------"
  1679. send "&9/f-admin disband &2&l>> &7Disband a faction"
  1680. send "&9/f-admin kick&2&l >> &7kick a player from the faction"
  1681. send "&9/f-admin givedtr &2&l>> &7Give dtr to the faction"
  1682. send "&9/f-admin removedtr &2&l>> &7Takes dtr from the faction"
  1683. send "&9/f-admin stopfreeze &2&l>> &7Remove freeze from the faction"
  1684. send "&9/f-admin refreshtag &2&l>> &7Refresh the players tag"
  1685. send "&6---------------------------------------------------"
  1686. stop
  1687.  
  1688. if arg-1 isn't "disband" or "kick" or "givedtr" or "removedtr" or "stopfreeze" or "refreshtag":
  1689. send "&6--------------------------------------------"
  1690. send "&6&l Fortnite "
  1691. send "&6--------------------------------------------"
  1692. send "&9/f-admin disband &2&l>> &7Disband a faction"
  1693. send "&9/f-admin kick&2&l >> &7kick a player from the faction"
  1694. send "&9/f-admin givedtr &2&l>> &7Give dtr to the faction"
  1695. send "&9/f-admin removedtr &2&l>> &7Takes dtr from the faction"
  1696. send "&9/f-admin stopfreeze &2&l>> &7Remove freeze from the faction"
  1697. send "&9/f-admin refreshtag &2&l>> &7Refresh the players tag"
  1698. send "&6----------------------------------------------------"
  1699. stop
  1700.  
  1701. command f-warzone [<integer>]:
  1702. permission: skript.faction.admin
  1703. trigger:
  1704. if arg-1 is set:
  1705. set {_center} to player's location#location you want to loop the chunks around
  1706. set {_radius} to arg-1#radius (in chunks), if it is set to 0 it returns only the chunk at {_center}
  1707. set {_pos} to {_center}
  1708. send ""
  1709. send ""
  1710. send ""
  1711. send "%{@Prefix}% &C&lWAIT UNTIL THE DONE MESSAGE APPEARS!!!!"
  1712. send ""
  1713. send ""
  1714. send ""
  1715. loop 2 * {_radius} + 1 times:
  1716. set x-coordinate of {_pos} to x-coordinate of {_center} - 16 * {_radius} + (loop-number - 1) * 16
  1717. set z-coordinate of {_pos} to z-coordinate of {_center} - 16 * {_radius}
  1718. loop 2 * {_radius} + 1 times:
  1719. set {_chunks::%{_pos}%} to chunk at {_pos}
  1720. add 16 to z-coordinate of {_pos}
  1721. #If the land is claimed by another faction or the warzone it self, I won't claim it, you will need to use /f-wilderness
  1722. set {_cont} to 0
  1723. loop {_chunks::*}:
  1724. if {x_factions_FAC::chunks::%loop-value-1%} isn't set:
  1725. set {x_factions_FAC::chunks::%loop-value-1%} to loop-value-1
  1726. set {x_factions_FAC::chunks::%loop-value-1%.owner} to "&4WarZone"
  1727. set {x_factions_FAC::factions::%{_F}%::lands::%loop-value-1%} to loop-value-1
  1728. else:
  1729. set {_owner} to {x_factions_FAC::chunks::%loop-value-1%.owner}
  1730. send "%{@Prefix}% &7The chunk %loop-value-1% is claimed by %{_owner}%, use /f-admin unclaim"
  1731. send "%{@Prefix}% &8This one won't be claimed as warzone"
  1732. send ""
  1733. send ""
  1734. send ""
  1735. send "%{@Prefix}% &2&l>>> Done! <<<"
  1736. send ""
  1737. send ""
  1738. send ""
  1739. stop
  1740. else:
  1741. if {x_factions_FAC::chunks::%chunk at player's location%} isn't set:
  1742. set {x_factions_FAC::chunks::%chunk at player's location%} to chunk at player's location
  1743. set {x_factions_FAC::chunks::%chunk at player's location%.owner} to "&4WarZone"
  1744. send "%{@Prefix}% &8This chunk is now a warzone"
  1745. stop
  1746. else:
  1747. send "%{@Prefix}% &8This chunk is claimed by %{x_factions_FAC::chunks::%chunk at player's location%.owner}%"
  1748. stop
  1749.  
  1750. command f-wilderness [<integer>]:
  1751. permission: skript.factions.admin
  1752. trigger:
  1753. if arg-1 is set:
  1754. set {_center} to player's location#location you want to loop the chunks around
  1755. set {_radius} to arg-1#radius (in chunks), if it is set to 0 it returns only the chunk at {_center}
  1756. set {_pos} to {_center}
  1757. loop 2 * {_radius} + 1 times:
  1758. set x-coordinate of {_pos} to x-coordinate of {_center} - 16 * {_radius} + (loop-number - 1) * 16
  1759. set z-coordinate of {_pos} to z-coordinate of {_center} - 16 * {_radius}
  1760. loop 2 * {_radius} + 1 times:
  1761. add 16 to z-coordinate of {_pos}
  1762. #If there are some lands claimed, lets unclaim them
  1763. loop {_chunks::*}:
  1764. if {x_factions_FAC::chunks::%loop-value-1%} is set:
  1765. set {_F} to {x_factions_FAC::chunks::%loop-value-1%.owner}
  1766. delete {x_factions_FAC::chunks::%loop-value-1%}
  1767. delete {x_factions_FAC::chunks::%{_F}%.%loop-value-1%}
  1768. delete {x_factions_FAC::factions::%{_F}%::lands::%loop-value-1%}
  1769. delete {x_factions_FAC::chunks::%loop-value-1%.owner}
  1770. send "%{@Prefix}% &8All the chunks in a radius of %arg-1%, were deleted"
  1771. stop
  1772. else:
  1773. set {_chunk} to chunk at player's location
  1774. if {x_factions_FAC::chunks::%chunk at player's location%} is set:
  1775. set {_F} to {x_factions_FAC::chunks::%chunk at player's location%.owner}
  1776. delete {x_factions_FAC::chunks::%{_chunk}%}
  1777. delete {x_factions_FAC::chunks::%{_F}%.%{_chunk}%}
  1778. delete {x_factions_FAC::factions::%{_F}%::lands::%{_chunk}%}
  1779. delete {x_factions_FAC::chunks::%chunk at player's location%.owner}
  1780. send "%{@Prefix}% &8 You unclaimed this chunk"
  1781. stop
  1782. else:
  1783. send "%{@Prefix}% &8Use this on a claimed land"
  1784. stop
  1785.  
  1786. on script load:
  1787. loop {x_factions_FAC::players::*}:
  1788. if {x_factions_FAC::players::%loop-value%.faction} isn't set:
  1789. set {x_factions_FAC::%loop-value%.faction} to "wilder"
  1790. set {_F} to "&4WarZone"
  1791. if {x_factions_FAC::factions::%{_F}%} isn't set:
  1792. set {x_factions_FAC::factions::%{_F}%} to {_F}
  1793.  
  1794. #CHECK PLAYER'S LOCATION AND NOTIFY IF HE ENTERS TO A CLAIMED LAND
  1795. every 10 tick:
  1796. loop all players:
  1797. set {_chunk} to chunk at loop-player's location
  1798. set {_uuid} to uuid of loop-player
  1799. if {x_factions_FAC::chunks::%{_chunk}%} is set:
  1800. if {x_factions_FAC::players::%{_uuid}%.notificado_entrada} isn't set:
  1801. send "&cEntering &a%{x_factions_FAC::chunks::%chunk at loop-player's location%.owner}%" to loop-player
  1802. set {x_factions_FAC::players::%{_uuid}%.notificado_entrada} to true
  1803. set {x_factions_FAC::players::%{_uuid}%.lastland} to {x_factions_FAC::chunks::%chunk at loop-player's location%.owner}
  1804. delete {x_factions_FAC::players::%{_uuid}%.notificado_salida}
  1805. else:
  1806. if {x_factions_FAC::players::%{_uuid}%.notificado_salida} isn't set:
  1807. delete {x_factions_FAC::players::%{_uuid}%.notificado_entrada}
  1808. if {x_factions_FAC::players::%{_uuid}%.lastland} is set:
  1809. send "&cLeaving &a % {x_factions_FAC::players::%{_uuid}%.lastland}%" to loop-player
  1810. set {x_factions_FAC::players::%{_uuid}%.notificado_salida} to true
  1811.  
  1812. every 1 minute:
  1813. loop {x_factions_FAC::factions::*}:
  1814. set {_F} to loop-value
  1815. set {_p} to 0
  1816. if {x_factions_FAC::factions::%{_F}%::dtr.freeze} < now:
  1817. set {_jugadores} to 0
  1818. set {_jugadores} to size of {x_factions_FAC::factions::%{_F}%::players::*}
  1819. if {_jugadores} is more than 1:
  1820. set {_maxfactiondtr} to ({_jugadores} - 1) * {@player-dtr} + {@solo-faction}
  1821. if {x_factions_FAC::factions::%{_F}%::dtr} is less than {_maxfactiondtr}:
  1822. set {_adddtr} to {_jugadores}*{@minute-dtr}
  1823. set {x_factions_FAC::factions::%{_F}%::dtr} to {x_factions_FAC::factions::%{_F}%::dtr}+{_adddtr}
  1824. else:
  1825. set {x_factions_FAC::factions::%{_F}%::dtr} to {_maxfactiondtr}
  1826. else:
  1827. set {_maxfactiondtr} to {@solo-faction}
  1828. if {x_factions_FAC::factions::%{_F}%::dtr} is less than {_maxfactiondtr}:
  1829. set {_adddtr} to {_jugadores}*{@minute-dtr}
  1830. set {x_factions_FAC::factions::%{_F}%::dtr} to {x_factions_FAC::factions::%{_F}%::dtr}+{_adddtr}
  1831. else:
  1832. set {x_factions_FAC::factions::%{_F}%::dtr} to {@solo-faction}
  1833. FactionDtr("%{_F}%")
  1834.  
  1835. every 1 hours:
  1836. loop {x_factions_FAC::factions::*}:
  1837. set {_F} to loop-value
  1838. if {x_factions_FAC::factions::%{_F}%::lastactivicty} < now:
  1839. FactionDisband("%{_F}%")
  1840. FactionTag("call")
  1841. stop
  1842.  
  1843. #CANCEL DAMAGE BETWEEN MEMBERS OF FACTION OR ALLY
  1844. on damage of player:
  1845. #bypass damage by enderpearl
  1846. if damage was caused by fall:
  1847. if attacker is victim:
  1848. stop
  1849. if {x_factions_FAC::players::%uuid of attacker%.faction} isn't "wilder":
  1850. if {@faction-fire} is false:
  1851. if {x_factions_FAC::players::%uuid of attacker%.faction} is {x_factions_FAC::players::%uuid of victim%.faction}:
  1852. send "&2%victim% &eis in your faction." to attacker
  1853. cancel event
  1854. stop
  1855. if {@ally-fire} is false:
  1856. set {_faca} to {x_factions_FAC::players::%uuid of attacker%.faction}
  1857. set {_facv} to {x_factions_FAC::players::%uuid of victim%.faction}
  1858. if {x_factions_FAC::factions::%{_faca}%::ally::%{_facv}%} is set:
  1859. send "%{@Prefix}% &d%victim% &7is part of your ally" to attacker
  1860. cancel event
  1861. stop
  1862. if {@truce-fire} is false:
  1863. set {_faca} to {x_factions_FAC::players::%uuid of attacker%.faction}
  1864. set {_facv} to {x_factions_FAC::players::%uuid of victim%.faction}
  1865. if {x_factions_FAC::factions::%{_faca}%::truce::%{_facv}%} is set:
  1866. send "%{@Prefix}% &d%victim% &7you have a truce with them" to attacker
  1867. cancel event
  1868. stop
  1869.  
  1870. #APPLY DTR FREEZE IF PLAYER HAS NO FACTION
  1871. on death of player:
  1872. if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  1873. set {_F} to {x_factions_FAC::players::%uuid of victim%.faction}
  1874. set {x_factions_FAC::factions::%{_F}%::dtr} to {x_factions_FAC::factions::%{_F}%::dtr}-1
  1875. if {x_factions_FAC::factions::%{_F}%::dtr} is less than -5.5:
  1876. set {x_factions_FAC::factions::%{_F}%::dtr} to -5.5
  1877. set {x_factions_FAC::factions::%{_F}%::dtr.freeze} to now
  1878. add {@dtr-freeze} seconds to {x_factions_FAC::factions::%{_F}%::dtr.freeze}
  1879. FactionDtr("%{_F}%")
  1880.  
  1881. #UPDATE PLAYER'S TAG
  1882. on join:
  1883. wait 1 tick
  1884. if {x_factions_FAC::players::%uuid of player%.faction} isn't set:
  1885. set {x_factions_FAC::players::%uuid of player%.faction} to "wilder"
  1886. else if {x_factions_FAC::players::%uuid of player%.faction} isn't "wilder":
  1887. set {x_factions_FAC::factions::%{_F}%::lastactivicty} to now
  1888. add {@delete-faction-after} days to {x_factions_FAC::factions::%{_F}%::lastactivicty}
  1889. FactionTag("call")
  1890.  
  1891. on right click on {@I}:
  1892. if player is an op:
  1893. stop
  1894. if world of event-location is {@W}:
  1895. set {_chunk} to chunk at event-block's location
  1896. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  1897. if {x_factions_FAC::chunks::%{_chunk}%} is set:
  1898. set {_chunkowner} to {x_factions_FAC::chunks::%{_chunk}%.owner}
  1899. if {_chunkowner} is "&4WarZone":
  1900. if player has permission "sk.factions.admin":
  1901. stop
  1902. else:
  1903. cancel event
  1904. send "%{@Prefix}%&7 You can't do that!"
  1905. stop
  1906. if {x_factions_FAC::factions::%{_chunkowner}%::dtr.raideable} isn't true:
  1907. if {x_factions_FAC::players::%uuid of player%.faction} isn't {_chunkowner}:
  1908. if {x_factions_FAC::factions::%{_chunkowner}%::ally::%{_F}%::perms::interact} is "yes":
  1909. stop
  1910. else:
  1911. cancel event
  1912. send "%{@Prefix}%&7 You can't do that!"
  1913. stop
  1914.  
  1915. on right click on {@stash}:
  1916. set {_block} to block at {KOTH::koths::%{KOTH::running::kothname}%::chestloot}
  1917. if event-block is {_block}:
  1918. stop
  1919. if player is an op:
  1920. stop
  1921. if world of event-location is {@W}:
  1922. set {_chunk} to chunk at event-block's location
  1923. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  1924. if {x_factions_FAC::chunks::%{_chunk}%} is set:
  1925. set {_chunkowner} to {x_factions_FAC::chunks::%{_chunk}%.owner}
  1926. if {_chunkowner} is "&4WarZone":
  1927. if player has permission "sk.factions.admin":
  1928. stop
  1929. else:
  1930. cancel event
  1931. send "%{@Prefix}%&7 You can't do that!"
  1932. stop
  1933. if {x_factions_FAC::factions::%{_chunkowner}%::dtr.raideable} isn't true:
  1934. if {x_factions_FAC::players::%uuid of player%.faction} isn't {_chunkowner}:
  1935. if {x_factions_FAC::factions::%{_chunkowner}%::ally::%{_F}%::perms::chest} is "yes":
  1936. stop
  1937. else:
  1938. cancel event
  1939. send "%{@Prefix}%&7 You can't do that!"
  1940. stop
  1941. if {x_factions_FAC::factions::%{_F}%::officer::%uuid of player%} isn't set:
  1942. if block in front of event-block is a sign:
  1943. if line 1 of block in front of event-block is "[officer]":
  1944. send "<red>This chest is protected! Only Officers can open it!"
  1945. cancel event
  1946. if line 2 of block in front of event-block is "[officer]":
  1947. send "<red>This chest is protected! Only Officers can open it!"
  1948. cancel event
  1949. if line 3 of block in front of event-block is "[officer]":
  1950. send "<red>This chest is protected! Only Officers can open it!"
  1951. cancel event
  1952.  
  1953. On Break:
  1954. if player is an op:
  1955. stop
  1956. if world of event-location is {@W}:
  1957. set {_chunk} to chunk at event-block's location
  1958. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  1959. if {x_factions_FAC::chunks::%{_chunk}%} is set:
  1960. set {_chunkowner} to {x_factions_FAC::chunks::%{_chunk}%.owner}
  1961. if {_chunkowner} is "&4WarZone":
  1962. if player has permission "sk.factions.admin":
  1963. stop
  1964. else:
  1965. cancel event
  1966. send "%{@Prefix}%&7 You can't do that!"
  1967. stop
  1968. if {x_factions_FAC::factions::%{_chunkowner}%::dtr.raideable} isn't true:
  1969. if {x_factions_FAC::players::%uuid of player%.faction} isn't {_chunkowner}:
  1970. if {x_factions_FAC::factions::%{_chunkowner}%::ally::%{_F}%::perms::break} is "yes":
  1971. stop
  1972. else:
  1973. cancel event
  1974. send "%{@Prefix}%&7 You can't do that!"
  1975. stop
  1976. if event-block is a sign:
  1977. if {x_factions_FAC::factions::%{_F}%::owner::%uuid of player%} isn't set:
  1978. if line 1 of event-block is "[officer]":
  1979. send "<red>This chest is protected!"
  1980. cancel event
  1981. if line 2 of event-block is "[officer]":
  1982. send "<red>This chest is protected!"
  1983. cancel event
  1984. if line 3 of event-block is "[officer]":
  1985. send "<red>This chest is protected!"
  1986. cancel event
  1987. if event-block is {@stash}:
  1988. if {x_factions_FAC::factions::%{_F}%::owner::%uuid of player%} isn't set:
  1989. if block in front of event-block is a sign:
  1990. if line 1 of block in front of event-block is "[officer]":
  1991. send "<red>This chest is protected!"
  1992. cancel event
  1993. if line 2 of block in front of event-block is "[officer]":
  1994. send "<red>This chest is protected!"
  1995. cancel event
  1996. if line 3 of block in front of event-block is "[officer]":
  1997. send "<red>This chest is protected!"
  1998. cancel event
  1999. on place:
  2000. if player is an op:
  2001. stop
  2002. if world of event-location is {@W}:
  2003. set {_chunk} to chunk at event-block's location
  2004. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  2005. if {x_factions_FAC::chunks::%{_chunk}%} is set:
  2006. set {_chunkowner} to {x_factions_FAC::chunks::%{_chunk}%.owner}
  2007. if {_chunkowner} is "&4WarZone":
  2008. if player has permission "sk.factions.admin":
  2009. stop
  2010. else:
  2011. cancel event
  2012. send "%{@Prefix}%&7 You can't do that!"
  2013. stop
  2014. if {x_factions_FAC::factions::%{_chunkowner}%::dtr.raideable} isn't true:
  2015. if {x_factions_FAC::players::%uuid of player%.faction} isn't {_chunkowner}:
  2016. if {x_factions_FAC::factions::%{_chunkowner}%::ally::%{_F}%::perms::build} is "yes":
  2017. stop
  2018. else:
  2019. cancel event
  2020. send "%{@Prefix}%&7 You can't do that!"
  2021. stop
  2022.  
  2023. #PROTECT PRESSURE PLATE
  2024. on pressure plate:
  2025. if player is an op:
  2026. stop
  2027. if world of event-location is {@W}:
  2028. set {_chunk} to chunk at event-block's location
  2029. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  2030. if {x_factions_FAC::chunks::%{_chunk}%} is set:
  2031. set {_chunkowner} to {x_factions_FAC::chunks::%{_chunk}%.owner}
  2032. if {_chunkowner} is "&4WarZone":
  2033. if player has permission "sk.factions.admin":
  2034. stop
  2035. else:
  2036. cancel event
  2037. send "%{@Prefix}%&7 You can't do that!"
  2038. stop
  2039. if {x_factions_FAC::factions::%{_chunkowner}%::dtr.raideable} isn't true:
  2040. if {x_factions_FAC::players::%uuid of player%.faction} isn't {_chunkowner}:
  2041. if {x_factions_FAC::factions::%{_chunkowner}%::ally::%{_F}%::perms::interact} is "yes":
  2042. stop
  2043. else:
  2044. cancel event
  2045. send "%{@Prefix}%&7 You can't do that!"
  2046. stop
  2047.  
  2048.  
  2049.  
  2050. On Explode:
  2051. if world of event-location is {@W}:
  2052. set {_chunk} to chunk at event-location
  2053. if {x_factions_FAC::chunks::%{_chunk}%} is set:
  2054. set {_chunkowner} to {x_factions_FAC::chunks::%{_chunk}%.owner}
  2055. if {_chunkowner} is "&4WarZone":
  2056. cancel event
  2057. stop
  2058. if {x_factions_FAC::factions::%{_chunkowner}%::dtr.raideable} isn't true:
  2059. cancel event
  2060. stop
  2061.  
  2062. on enderman pickup:
  2063. if world of event-location is {@W}:
  2064. set {_chunk} to chunk at event-location
  2065. if {x_factions_FAC::chunks::%{_chunk}%} is set:
  2066. set {_chunkowner} to {x_factions_FAC::chunks::%{_chunk}%.owner}
  2067. if {_chunkowner} is "&4WarZone":
  2068. cancel event
  2069. stop
  2070. if {x_factions_FAC::factions::%{_chunkowner}%::dtr.raideable} isn't true:
  2071. cancel event
  2072. stop
  2073.  
  2074. On zombie breaking a door:
  2075. if world of event-location is {@W}:
  2076. set {_chunk} to chunk at event-location
  2077. if {x_factions_FAC::chunks::%{_chunk}%} is set:
  2078. set {_chunkowner} to {x_factions_FAC::chunks::%{_chunk}%.owner}
  2079. if {_chunkowner} is "&4WarZone":
  2080. cancel event
  2081. stop
  2082. if {x_factions_FAC::factions::%{_chunkowner}%::dtr.raideable} isn't true:
  2083. cancel event
  2084. stop
  2085.  
  2086. #FACTIONS CHAT
  2087. on chat:
  2088. if {@ChatSystem} is true:
  2089. if {x_factions_FAC::players::%uuid of player%.chat} isn't set:
  2090. set {x_factions_FAC::players::%uuid of player%.chat} to 1 #If the player's isnt set, force him to use global
  2091. #Get player's faction
  2092. set {_F} to {x_factions_FAC::players::%uuid of player%.faction}
  2093. if {_F} is "wilder":
  2094. #Just to make sure, if a player is a wilder, he can't be in a faction chat.
  2095. set {_F} to "-"
  2096. set {x_factions_FAC::players::%uuid of player%.chat} to 1
  2097.  
  2098. # GLOBAL CHAT
  2099. if {x_factions_FAC::players::%uuid of player%.chat} is 1:
  2100. if player is in world "ul_hcf":
  2101. player has permission "skript.chat.admin":
  2102. cancel event
  2103. broadcast "&6[&e%{_F}%&6] &7[&cAdmin&7] &c%player%&f &8» &f%message%"
  2104. set {rank.%player%} to "&cAdmin"
  2105. stop
  2106. player has permission "skript.chat.partner":
  2107. cancel event
  2108. broadcast "&6[&e%{_F}%&6] &8[&d&oPartner&8] &d%player%&f &8» &f%message%"
  2109. set {rank.%player%} to "&d&oPartner"
  2110. stop
  2111. player has permission "skript.chat.legend":
  2112. cancel event
  2113. broadcast "&6[&e%{_F}%&6] &7[&6Legend&7] &6%player%&f &8» &f%message%"
  2114. set {rank.%player%} to "&6Legend"
  2115. stop
  2116. player has permission "skript.chat.default":
  2117. cancel event
  2118. broadcast "&6[&e%{_F}%&6] &7%player%&f &8» &7%message%"
  2119. set {rank.%player%} to "&7Default"
  2120. stop
  2121. player has permission "skript.chat.mod":
  2122. cancel event
  2123. broadcast "&6[&e%{_F}%&6] &8[&3Mod&8] &3%player%&f &8» &f%message%"
  2124. set {rank.%player%} to "&3Mod"
  2125. stop
  2126. player has permission "skript.chat.youtuber":
  2127. cancel event
  2128. broadcast "&6[&e%{_F}%&6] &8[&cYou&fTuber&8] &c%player%&f &8» &f%message%"
  2129. set {rank.%player%} to "&cYou&fTuber"
  2130. stop
  2131. player has permission "skript.chat.trialmod":
  2132. cancel event
  2133. broadcast "&6[&e%{_F}%&6] &8[&eTrial-Mod&8] &e%player%&f &8» &f%message%"
  2134. set {rank.%player%} to "&eTrial-Mod"
  2135. stop
  2136. player has permission "skript.chat.royale":
  2137. cancel event
  2138. broadcast "&6[&e%{_F}%&6] &8[&3&oRoyale&8] &3%player%&f &8» &f%message%"
  2139. set {rank.%player%} to "&3&oRoyale"
  2140. stop
  2141.  
  2142. if {x_factions_FAC::players::%uuid of player%.chat} is 1:
  2143. if player is in world "ul_lobby":
  2144. player has permission "skript.chat.admin":
  2145. cancel event
  2146. broadcast "&7[&cAdmin&7] &c%player%&f &8» &f%message%"
  2147. set {rank.%player%} to "&cAdmin"
  2148. stop
  2149. player has permission "skript.chat.partner":
  2150. cancel event
  2151. broadcast "&8[&d&oPartner&8] &d%player%&f &8» &f%message%"
  2152. set {rank.%player%} to "&d&oPartner"
  2153. stop
  2154. player has permission "skript.chat.legend":
  2155. cancel event
  2156. broadcast "7[&6Legend&7] &6%player%&f &8» &f%message%"
  2157. set {rank.%player%} to "&6Legend"
  2158. stop
  2159. player has permission "skript.chat.default":
  2160. cancel event
  2161. broadcast "&7%player%&f &8» &7%message%"
  2162. set {rank.%player%} to "&7Default"
  2163. stop
  2164. player has permission "skript.chat.mod":
  2165. cancel event
  2166. broadcast "&8[&3Mod&8] &3%player%&f &8» &f%message%"
  2167. set {rank.%player%} to "&3Mod"
  2168. stop
  2169. player has permission "skript.chat.youtuber":
  2170. cancel event
  2171. broadcast "&8[&cYou&fTuber&8] &c%player%&f &8» &f%message%"
  2172. set {rank.%player%} to "&cYou&fTuber"
  2173. stop
  2174. player has permission "skript.chat.trialmod":
  2175. cancel event
  2176. broadcast "&8[&eTrial-Mod&8] &7%player%&f &8» &f%message%"
  2177. set {rank.%player%} to "&eTrial-Mod"
  2178. stop
  2179. player has permission "skript.chat.royale":
  2180. cancel event
  2181. broadcast "&8[&3&oRoyale&8] &3%player%&f &8» &f%message%"
  2182. set {rank.%player%} to "&3&oRoyale"
  2183. stop
  2184.  
  2185.  
  2186.  
  2187. #FACTION CHAT
  2188. if {x_factions_FAC::players::%uuid of player%.chat} is 2:
  2189. cancel event
  2190. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  2191. send "&f<&2%{_F}% &2%player%&f>: &a%message%" to player from uuid loop-value
  2192. stop
  2193.  
  2194. # ALLY CHAT
  2195. if {x_factions_FAC::players::%uuid of player%.chat} is 3:
  2196. cancel event
  2197. loop {x_factions_FAC::factions::%{_F}%::ally::*}:
  2198. set {_ally} to loop-value-1
  2199. loop {x_factions_FAC::factions::%{_ally}%::players::*}:
  2200. send "&f<&d%{_F}% &d%player%&f>: &d%message%" to player from uuid loop-value-2
  2201. loop {x_factions_FAC::factions::%{_F}%::players::*}:
  2202. send "&f<&d%{_F}% &d%player%&f>: &d%message%" to player from uuid loop-value-1
  2203. stop
  2204.  
  2205. #----------HCF CLASSES START----------#
  2206. options:
  2207. BardEnabled: true
  2208. RogueEnabled: true
  2209. ArcherEnabled: true
  2210. MinerEnabled: true
  2211. BardSelectedMessage: &aBard Selected
  2212. RogueSelectedMessage: &aRogue Selected
  2213. ArcherSelectedMessage: &aArcher Selected
  2214. MinerSelectedMessage: &aMiner Selected
  2215. BardDeselectedMessage: &cBard Deselected
  2216. RogueDeselectedMessage: &cRogue Deselected
  2217. ArcherDeselectedMessage: &cArcher Deselected
  2218. MinerDeselectedMessage: &cMiner Deselected
  2219.  
  2220. every 5 tick:
  2221. loop all players:
  2222. if {@BardEnabled} is true:
  2223. if loop-player is wearing all gold armor:
  2224. set {effects.%loop-player%.bard} to true
  2225. set {class.%loop-player%} to "&6Bard"
  2226. apply swiftness 2 to loop-player for 10 seconds
  2227. apply resistance 2 to the loop-player for 10 seconds
  2228. apply regeneration to loop-player for 10 seconds
  2229. if loop-player isn't wearing all gold armor:
  2230. if loop-player's gamemode is survival:
  2231. if {effects.%loop-player%.bard} is true:
  2232. set {class.%loop-player%} to "&7No Class"
  2233. remove swiftness from the loop-player
  2234. remove regeneration from the loop-player
  2235. remove resistance from the loop-player
  2236. delete {effects.%loop-player%.bard}
  2237. if {@RogueEnabled} is true:
  2238. if loop-player is wearing all chainmail armor:
  2239. set {effects.%loop-player%.rogue} to true
  2240. set {class.%loop-player%} to "&8Rogue"
  2241. apply swiftness 3 to loop-player for 10 seconds
  2242. apply jump boost 2 to loop-player for 10 seconds
  2243. apply resistance 1 to loop-player for 10 seconds
  2244. if loop-player isn't wearing all chainmail armor:
  2245. if loop-player's gamemode is survival:
  2246. if {effects.%loop-player%.rogue} is true:
  2247. set {class.%loop-player%} to "&7No Class"
  2248. remove swiftness from the loop-player
  2249. remove jump boost from the loop-player
  2250. remove resistance from the loop-player
  2251. delete {effects.%loop-player%.rogue}
  2252. if {@ArcherEnabled} is true:
  2253. if loop-player is wearing all leather armor:
  2254. set {class.%loop-player%} to "&5Archer"
  2255. set {effects.%loop-player%.archer} to true
  2256. apply swiftness 2 to loop-player for 10 seconds
  2257. apply resistance 3 to the loop-player for 10 seconds
  2258. if loop-player isn't wearing all leather armor:
  2259. if loop-player's gamemode is survival:
  2260. if {effects.%loop-player%.archer} is true:
  2261. set {class.%loop-player%} to "&7No Class"
  2262. remove swiftness from the loop-player
  2263. remove resistance from the loop-player
  2264. delete {effects.%loop-player%.archer}
  2265. if {@MinerEnabled} is true:
  2266. if loop-player is wearing all iron armor:
  2267. set {class.%loop-player%} to "&fMiner"
  2268. set {effects.%loop-player%.miner} to true
  2269. apply haste 2 to loop-player for 10 seconds
  2270. apply night vision 2 to the loop-player for 10 seconds
  2271. apply fire resistance to loop-player for 10 seconds
  2272. if loop-player isn't wearing all iron armor:
  2273. if loop-player's gamemode is survival:
  2274. if {effects.%loop-player%.miner} is true:
  2275. set {class.%loop-player%} to "&7No Class"
  2276. remove haste from the loop-player
  2277. remove night vision from the loop-player
  2278. remove fire resistance from the loop-player
  2279. delete {effects.%loop-player%.miner}
  2280.  
  2281. #----------HCF CLASSES END----------#
  2282. on right click on player:
  2283. if player's tool is an enderpearl:
  2284. cancel event
  2285.  
  2286. on right click with ender pearl:
  2287. if {used.pearl.%player%} is not set:
  2288. set {used.pearl.%player%} to now
  2289. stop
  2290. else:
  2291. set {_dif} to difference between {used.pearl.%player%} and now
  2292. if {_dif} is less than 15 seconds:
  2293. set {_dif2} to difference between 15 seconds and {_dif}
  2294. set {pearltime.%player%} to "&c%{_dif2}%"
  2295. send "&cYou cannot use this for another &c&l%{_dif2}%!" to player
  2296. cancel event
  2297. else:
  2298. set {used.pearl.%player%} to now
  2299.  
  2300. every tick:
  2301. loop all players:
  2302. if {used.pearl.%loop-player%} is set:
  2303. set {_dif} to difference between {used.pearl.%loop-player%} and now
  2304. if {_dif} is less than 15 seconds:
  2305. stop
  2306. else:
  2307. send "&cYour ender pearl cooldown has expired!" to loop-player
  2308. clear {used.pearl.%loop-player%}
  2309.  
  2310. on death:
  2311. clear {used.pearl.%victim%}
  2312.  
  2313. on damage:
  2314. victim is a player
  2315. attacker is a player
  2316. if {combat.%victim%} is true:
  2317. set {time.%victim%} to 30
  2318. if {combat.%attacker%} is true:
  2319. set {time.%attacker%} to 30
  2320. if {combat.%victim%} is not set:
  2321. set {time.%victim%} to 30
  2322. send "&cYou are now in &4&lCombat &cfor 30s." to victim
  2323. set {combat.%victim%} to true
  2324. if {combat.%attacker%} is not set:
  2325. set {time.%attacker%} to 30
  2326. send "&cYou are now in &4&lCombat &cfor 30s." to attacker
  2327. set {combat.%attacker%} to true
  2328.  
  2329. every 1 seconds:
  2330. loop all players:
  2331. if {combat.%loop-player%} is true:
  2332. remove 1 from {time.%loop-player%}
  2333. if {time.%loop-player%} = 0:
  2334. clear {time.%loop-player%}
  2335. clear {combat.%loop-player%}
  2336. send "&eYou are no longer spawn tagged" to loop-player
  2337.  
  2338. command /combat:
  2339. trigger:
  2340. if {combat.%player%} is true:
  2341. message "&eYou are currently spawn tagged for &6%{time.%player%}% seconds"
  2342. stop
  2343. else:
  2344. message "&eYou are currently not spawn tagged"
  2345. on quit:
  2346. if {combat.%player%} is true:
  2347. kill player
  2348. broadcast "&e &6%player% &ehas combat logged!"
  2349. clear {time.%player%}
  2350. clear {combat.%player%}
  2351. on join:
  2352. clear {time.%player%}
  2353. clear {combat.%player%}
  2354. on death:
  2355. clear {time.%victim%}
  2356. clear {combat.%victim%}
  2357. message "&eYou are no longer in combat" to victim
  2358.  
  2359. on join:
  2360. while player is online:
  2361. if {combat.%player%} is set:
  2362. loop blocks in radius 3 of player:
  2363. if loop-block is red wool:
  2364. make player see block above loop-block as red glass
  2365. make player see block 2 meters above loop-block as red glass
  2366. make player see block 3 meters above loop-block as red glass
  2367. make player see block 4 meters above loop-block as red glass
  2368. make player see block 5 meters above loop-block as red glass
  2369. make player see block 6 meters above loop-block as red glass
  2370. make player see block 7 meters above loop-block as red glass
  2371. make player see block 8 meters above loop-block as red glass
  2372. make player see block 9 meters above loop-block as red glass
  2373. make player see block 10 meters above loop-block as red glass
  2374. make player see block 11 meters above loop-block as red glass
  2375. make player see block 12 meters above loop-block as red glass
  2376. make player see block 13 meters above loop-block as red glass
  2377. make player see block 14 meters above loop-block as red glass
  2378. make player see block 15 meters above loop-block as red glass
  2379. make player see block 16 meters above loop-block as red glass
  2380. make player see block 17 meters above loop-block as red glass
  2381. make player see block 18 meters above loop-block as red glass
  2382. make player see block 19 meters above loop-block as red glass
  2383. make player see block 20 meters above loop-block as red glass
  2384. wait 1 tick
  2385.  
  2386.  
  2387. on join:
  2388. while player is online:
  2389. if {combat.%player%} is not set:
  2390. loop blocks in radius 5 of player:
  2391. if loop-block is red wool:
  2392. make player see block above loop-block as air
  2393. make player see block 2 meters above loop-block as air
  2394. make player see block 3 meters above loop-block as air
  2395. make player see block 4 meters above loop-block as air
  2396. make player see block 5 meters above loop-block as air
  2397. make player see block 6 meters above loop-block as air
  2398. make player see block 7 meters above loop-block as air
  2399. make player see block 8 meters above loop-block as air
  2400. make player see block 9 meters above loop-block as air
  2401. make player see block 10 meters above loop-block as air
  2402. make player see block 11 meters above loop-block as air
  2403. make player see block 12 meters above loop-block as air
  2404. make player see block 13 meters above loop-block as air
  2405. make player see block 14 meters above loop-block as air
  2406. make player see block 15 meters above loop-block as air
  2407. make player see block 16 meters above loop-block as air
  2408. make player see block 17 meters above loop-block as air
  2409. make player see block 18 meters above loop-block as air
  2410. make player see block 19 meters above loop-block as air
  2411. make player see block 20 meters above loop-block as air
  2412. wait 1 tick
  2413.  
  2414. every 1 second:
  2415. loop all players:
  2416. if loop-player is in world "ul_hcf":
  2417. if {pearltime.%loop-player%} is true:
  2418. wipe loop-player's sidebar
  2419. set name of sidebar of loop-player to "&5&lFortnite &7[Kit Map]"
  2420. set score "&7&m " in sidebar of loop-player to 3
  2421. set score "&4&lKills&7: &c%{ab::%uuid of loop-player%::kills}%" in sidebar of loop-player to 2
  2422. set score "&4&lDeaths&7: &c%{ab::%uuid of loop-player%::deaths}%" in sidebar of loop-player to 1
  2423. set score "%{pearltime.%loop-player%}% hi" in sidebar of loop-player to 4
  2424. set score "&7&m " in sidebar of loop-player to 0
  2425.  
  2426. every 1 second:
  2427. loop all players:
  2428. if loop-player is in world "ul_hcf":
  2429. wipe loop-player's sidebar
  2430. set name of sidebar of loop-player to "&5&lFortnite &7[Kit Map]"
  2431. set score "&7&m " in sidebar of loop-player to 3
  2432. set score "&4&lKills&7: &c%{ab::%uuid of loop-player%::kills}%" in sidebar of loop-player to 2
  2433. set score "&4&lDeaths&7: &c%{ab::%uuid of loop-player%::deaths}%" in sidebar of loop-player to 1
  2434. set score "&7&m " in sidebar of loop-player to 0
  2435. else:
  2436. if {ab::%uuid of loop-player%::kills} is not set:
  2437. set {ab::%uuid of loop-player%::kills} to 0
  2438. else:
  2439. if {ab::%uuid of loop-player%::deaths} is not set:
  2440. set {ab::%uuid of loop-player%::deaths} to 0
  2441.  
  2442. every 1 second:
  2443. loop all players:
  2444. if loop-player is in world "ul_hcf":
  2445. if {koth::started} is false:
  2446. if {combat.%loop-player%} is true:
  2447. wipe loop-player's sidebar
  2448. set name of sidebar of loop-player to "&5&lFortnite &7[Kit Map]"
  2449. set score "&7&m " in sidebar of loop-player to 4
  2450. set score "&4&lKills&7: &c%{ab::%uuid of loop-player%::kills}%" in sidebar of loop-player to 3
  2451. set score "&4&lDeaths&7: &c%{ab::%uuid of loop-player%::deaths}%" in sidebar of loop-player to 2
  2452. set score "&c&lSpawn Tag&7: &c%{time.%loop-player%}%" in sidebar of loop-player to 1
  2453. set score "&7&m " in sidebar of loop-player to 0
  2454.  
  2455. every 1 second:
  2456. loop all players:
  2457. if loop-player is in world "ul_hcf":
  2458. if {koth::started} is true:
  2459. wipe loop-player's sidebar
  2460. set name of sidebar of loop-player to "&5&lFortnite &7[Kit Map]"
  2461. set score "&7&m " in sidebar of loop-player to 4
  2462. set score "&4&lKills&7: &c%{ab::%uuid of loop-player%::kills}%" in sidebar of loop-player to 3
  2463. set score "&4&lDeaths&7: &c%{ab::%uuid of loop-player%::deaths}%" in sidebar of loop-player to 2
  2464. set score "&9&lSky&7: &c%{koth::timer}%" in sidebar of loop-player to 1
  2465. set score "&7&m " in sidebar of loop-player to 0
  2466.  
  2467. every 1 second:
  2468. loop all players:
  2469. if loop-player is in world "ul_hcf":
  2470. if {koth::started} is true:
  2471. if {combat.%loop-player%} is true:
  2472. wipe loop-player's sidebar
  2473. set name of sidebar of loop-player to "&5&lFortnite &7[Kit Map]"
  2474. set score "&7&m " in sidebar of loop-player to 5
  2475. set score "&4&lKills&7: &c%{ab::%uuid of loop-player%::kills}%" in sidebar of loop-player to 4
  2476. set score "&4&lDeaths&7: &c%{ab::%uuid of loop-player%::deaths}%" in sidebar of loop-player to 3
  2477. set score "&c&lSpawn Tag&7: &c%{time.%loop-player%}%" in sidebar of loop-player to 2
  2478. set score "&9&lSky&7: &c%{koth::timer}%" in sidebar of loop-player to 1
  2479. set score "&7&m " in sidebar of loop-player to 0
  2480.  
  2481. on death of player:
  2482. attacker is a player
  2483. victim is a player
  2484. add 1 to {ab::%uuid of attacker%::kills}
  2485. add 1 to {ab::%uuid of victim%::deaths}
  2486. if {ab::%uuid of attacker%::kills} = 0:
  2487. set {ab::%uuid of attacker%::kills} to 0
  2488.  
  2489. every 1 second:
  2490. loop all players:
  2491. if loop-player is in world "ul_lobby":
  2492. wipe loop-player's sidebar
  2493. set name of sidebar of loop-player to "&5&lFortnite &7&lNetwork"
  2494. set score "&7&m " in sidebar of loop-player to 15
  2495. set score "&5&lRank " in sidebar of loop-player to 14
  2496. set score "&f%{rank.%loop-player%}%" in sidebar of loop-player to 13
  2497. set score "&l" in sidebar of loop-player to 12
  2498. set score "&5&lOnline " in sidebar of loop-player to 11
  2499. set score "&f%number of all players%" in sidebar of loop-player to 10
  2500. set score "&d" in sidebar of loop-player to 9
  2501. set score "&5Fortnite.minehut.gg" in sidebar of loop-player to 8
  2502. set score "&7&m " in sidebar of loop-player to 7
  2503.  
  2504. on death:
  2505. add 1 to {stats.kill.%attacker's uuid%}
  2506. add 1 to {stats.death.%victim's uuid%}
  2507.  
  2508. every 1 second:
  2509. loop all players:
  2510. if loop-player is in world "ul_hcf":
  2511. if {koth::started} is true:
  2512. if {mod.%loop-player%} is true:
  2513. if {vanish.%loop-player%} is false:
  2514. wipe loop-player's sidebar
  2515. set name of sidebar of loop-player to "&5&lFortnite &7[Kit Map]"
  2516. set score "&7&m " in sidebar of loop-player to 6
  2517. set score "&4&lKills&7: &c%{ab::%uuid of loop-player%::kills}%" in sidebar of loop-player to 5
  2518. set score "&4&lDeaths&7: &c%{ab::%uuid of loop-player%::deaths}%" in sidebar of loop-player to 4
  2519. set score "&6&lStaff Mode&7&l:" in sidebar of loop-player to 3
  2520. set score "&f &6&l» &eVanish&7: &cDisabled" in sidebar of loop-player to 2
  2521. set score "&9&lSky&7: &c%{koth::timer}%" in sidebar of loop-player to 1
  2522. set score "&7&m " in sidebar of loop-player to 0
  2523.  
  2524. every 1 second:
  2525. loop all players:
  2526. if loop-player is in world "ul_hcf":
  2527. if {koth::started} is true:
  2528. if {mod.%loop-player%} is true:
  2529. if {vanish.%loop-player%} is true:
  2530. wipe loop-player's sidebar
  2531. set name of sidebar of loop-player to "&5&lFortnite &7[Kit Map]"
  2532. set score "&7&m " in sidebar of loop-player to 6
  2533. set score "&4&lKills&7: &c%{ab::%uuid of loop-player%::kills}%" in sidebar of loop-player to 5
  2534. set score "&4&lDeaths&7: &c%{ab::%uuid of loop-player%::deaths}%" in sidebar of loop-player to 4
  2535. set score "&5&lStaff Mode:" in sidebar of loop-player to 3
  2536. set score "&f &5&l» &fVanish&7: &aEnabled" in sidebar of loop-player to 2
  2537. set score "&9&lSky&7: &c%{koth::timer}%" in sidebar of loop-player to 1
  2538. set score "&7&m " in sidebar of loop-player to 0
  2539.  
  2540. every 1 second:
  2541. loop all players:
  2542. if loop-player is in world "ul_hcf":
  2543. if {koth::started} is false:
  2544. if {mod.%loop-player%} is true:
  2545. if {vanish.%loop-player%} is false:
  2546. wipe loop-player's sidebar
  2547. set name of sidebar of loop-player to "&5&lFortnite &7[Kit Map]"
  2548. set score "&7&m " in sidebar of loop-player to 5
  2549. set score "&4&lKills&7: &c%{ab::%uuid of loop-player%::kills}%" in sidebar of loop-player to 4
  2550. set score "&4&lDeaths&7: &c%{ab::%uuid of loop-player%::deaths}%" in sidebar of loop-player to 3
  2551. set score "&5&lStaff Mode:" in sidebar of loop-player to 2
  2552. set score "&f &5&l» &fVanish&7: &cDisabled" in sidebar of loop-player to 1
  2553. set score "&7&m " in sidebar of loop-player to 0
  2554.  
  2555. every 1 second:
  2556. loop all players:
  2557. if loop-player is in world "ul_hcf":
  2558. if {koth::started} is false:
  2559. if {mod.%loop-player%} is true:
  2560. if {vanish.%loop-player%} is true:
  2561. wipe loop-player's sidebar
  2562. set name of sidebar of loop-player to "&5&lFortnite &7[Kit Map]"
  2563. set score "&7&m " in sidebar of loop-player to 5
  2564. set score "&4&lKills&7: &c%{ab::%uuid of loop-player%::kills}%" in sidebar of loop-player to 4
  2565. set score "&4&lDeaths&7: &c%{ab::%uuid of loop-player%::deaths}%" in sidebar of loop-player to 3
  2566. set score "&5&lStaff Mode:" in sidebar of loop-player to 2
  2567. set score "&f &5&l» &fVanish&7: &aEnabled" in sidebar of loop-player to 1
  2568. set score "&7&m " in sidebar of loop-player to 0
  2569. else:
  2570. if {ab::%uuid of loop-player%::kills} is not set:
  2571. set {ab::%uuid of loop-player%::kills} to 0
  2572.  
  2573. command /tl:
  2574. trigger:
  2575. send "%player's location%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement