HallowedS

Untitled

Feb 6th, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.11 KB | None | 0 0
  1. # Creator: minouis55
  2. # Version: fc-FactionSize-1.8.8-V0.1-d3846c
  3. # Name: FactionSize
  4.  
  5. options:
  6. permission-message: &cVocê não tem permissão de utilizar este comando.
  7. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  8. # Update for new version
  9. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  10. command /factionversion:
  11. aliases: /vf, /fv
  12. trigger:
  13. set {_ajouts} to text from "http://pastebin.com/raw/YcEKwjuy"
  14. loop {_ajouts::*}:
  15. send "This faction running in FactionSize version"
  16. send "%loop-value% (MC: 1.8.8) Implementing"
  17. send "API version 1.8.8-F0.2)"
  18. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  19. # ?
  20. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  21. every 4 seconds:
  22. loop 8 times:
  23. loop all players:
  24. if world of loop-player is "world":
  25. set {_access} to ""
  26. if {f.access.%loop-player%} is set:
  27. set {_access} to "&6Free Access everywhere ! &8| "
  28. if {f.zone.%loop-player%} is "<none>":
  29. set {_zone} to "&aLibre"
  30. else if {f.zone.%loop-player%} is "WARZONE":
  31. set {_zone} to "&cWarZone"
  32. else if {f.zone.%loop-player%} is "SAFE":
  33. set {_zone} to "&bSafeZone"
  34. else:
  35. set {_zone} to "&b%{f.zone.%loop-player%}%"
  36. set {_x} to random integer between (loop-player's x-coordinate) and (loop-player's x-coordinate + 1)
  37. set {_y} to random integer between (loop-player's y-coordinate) and (loop-player's y-coordinate + 1)
  38. set {_z} to random integer between (loop-player's z-coordinate) and (loop-player's z-coordinate + 1)
  39. wait 10 ticks
  40. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  41. # ?
  42. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  43. on join:
  44. if "%{f.list.players::*}%" doesn't contain "%player%":
  45. add player to {f.list.players::*}
  46. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  47. # Comando principal
  48. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  49. command /faction [<text>] [<text>]: # http://prntscr.com/e5a1l5 http://prntscr.com/e5a1pn
  50. permission: faction.member
  51. permission message: {@permission-message}
  52. aliases: /f , /fac
  53. description: Comando principal de faction
  54. trigger:
  55. if argument 1 is "criar":
  56. if {f.fac.name.%player%} is set:
  57. send "&cVocê já faz parte de uma facção."
  58. else if arg-2 isn't set:
  59. send "&cUtilize /f criar <nome>."
  60. else if "%{f.list.factions::*}%" contain "%arg-2%":
  61. send "&cOpa Já existe outra facção utilizando o nome '%arg-2%'."
  62.  
  63. else if arg-2 contain "/" or "[" or "]" or "\" or "~" or "^":
  64. send "&cO nome da facção não pode conter caracteres especiais."
  65. else:
  66. add arg-2 to {f.list.factions::*}
  67. set {f.fac.name.%player%} to arg-2
  68. set {f.fac.grade.%player%} to 3
  69. send "&eYAY! Sua facção foi criada com sucesso!"
  70. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  71. # Funções
  72. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  73.  
  74. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  75. # Comando de dominar área
  76. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  77. else if argument 1 is "dominar":
  78. if {f.fac.name.%player%} isn't set:
  79. send "&cVocê não está em uma facção."
  80. else if {f.fac.grade.%player%} < 2:
  81. send "&cVocê não tem o grau necessário."
  82. else if "%{f.chunk::%chunk at player%}%" is "%{f.fac.name.%player%}%":
  83. send "&aEsta terra já está dominada por sua facção!"
  84. else if {f.chunk::%chunk at player%} is set:
  85. send "&cA facção '%{f.chunk::%chunk at player%}%' já dominou esta terra. Portanto não foi possível dominar esta terra."
  86. else:
  87. add 1 to {f.fac.chunksclaims.%{f.fac.name.%player%}%}
  88. set {f.chunk::%chunk at player%} to {f.fac.name.%player%}
  89. send "&aVocê dominou esta terra com sucesso!"
  90. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  91. # CLAIMS/CHUNK
  92. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  93. else if argument 1 is "surclaim":
  94. if {f.fac.name.%player%} isn't set:
  95. send "&cVous n'avez pas de Faction !"
  96. else if {f.fac.grade.%player%} < 2:
  97. send "&cVous n'avez pas le grade requis !"
  98. else if "%{f.chunk::%chunk at player%}%" is "%{f.fac.name.%player%}%":
  99. send "&cCe Chunk vous appartient !"
  100. else if "%{f.chunk::%chunk at player%}%" is "<none>":
  101. send "&cCe Chunk n'est pas occupé, dans ce cas la faite: &f/f surclaim %{f.fac.name.%player%}%"
  102. else if FactionPower("%{f.chunk::%chunk at player%}%") >= {f.fac.chunksclaims.%{f.chunk::%chunk at player%}%}:
  103. send "&cLa faction a assez de power pour garder ses chunks !"
  104. else if FactionPower("%{f.fac.name.%player%}%") <= {f.fac.chunksclaims.%{f.fac.name.%player%}%}:
  105. send "&cIl vous faut %{f.fac.chunksclaims.%{f.fac.name.%player%}%} + 1% powers pour claim un autre chunk !"
  106. else:
  107. add 1 to {f.fac.chunksclaims.%{f.fac.name.%player%}%}
  108. subtract 1 from {f.fac.chunksclaims.%{f.chunk::%chunk at player%}%}
  109. set {f.chunk::%chunk at player%} to {f.fac.name.%player%}
  110. send "&cHeey! %player% está tentando claimar a sua terra em %chunk at player%" to {_c}
  111. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  112. # Mapa/Chat/List
  113. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  114. else if argument 1 is "chat":
  115. if {f.chat.%player%} is "faction":
  116. message " Votre chat est passé sur le mode &aAllié &7!"
  117. set {f.chat.%player%} to "ally"
  118. else if {f.chat.%player%} is "ally":
  119. message " Votre chat est passé sur le mode &dGlobal &7!"
  120. set {f.chat.%player%} to "global"
  121. else:
  122. message " Votre chat est passé sur le mode &bFaction &7!"
  123. set {f.chat.%player%} to "faction"
  124. else if argument 1 is "listar":
  125. if size of {f.list.factions::*} is 0:
  126. message " &cOps! Ainda não tem facções existente, crie a sua!"
  127. else:
  128. loop {f.list.factions::*}:
  129. set {_c} to 0
  130. set {_nbchefs} to 0
  131. loop all players:
  132. if "%{f.fac.name.%loop-player%}%" is "%loop-value-1%":
  133. add 1 to {_c}
  134. if {f.fac.grade.%loop-player%} >= 2:
  135. add 1 to {_nbchefs}
  136. if {f.fac.invitation.%loop-value%} is true:
  137. message " &a%loop-value-1% &f- %{_c}% &aonline &f- &a %{f.fac.chunksclaims.%loop-value-1%}% &aterras"
  138. else:
  139. message " &a%loop-value-1% &f- %{_c}% &aonline &f- &a %{f.fac.chunksclaims.%loop-value-1%}% &aterras"
  140. else if argument 1 is "mapa":
  141. if argument 2 is "off":
  142. delete {f.fac.bouclemap::%player%}
  143. loop 15 times:
  144. send " "
  145. send "&aModo mapa desativado com sucesso."
  146. else if argument 2 is "on":
  147. set {f.fac.bouclemap::%player%} to true
  148. send "&aModo mapa ativado com sucesso."
  149. else if argument 2 isn't "auto":
  150. send "&cUtilize /f mapa [on|off]."
  151. else:
  152. set {_mapX} to 11
  153. set {_mapY} to 6
  154. set {_m} to ""
  155. loop 13 times:
  156. loop 23 times:
  157. set {_x} to {_mapX} * 16
  158. set {_y} to {_mapY} * 16
  159. set {_chunk} to chunk at block {_y} blocks north {_x} blocks west of player
  160. if {f.chunk::%{_chunk}%} isn't set:
  161. set {_result} to ""
  162. else:
  163. set {_result} to {f.chunk::%{_chunk}%}
  164. if {_chunk} is chunk at player:
  165. set {_m} to "%{_m}%&e█"
  166. else if {_result} is {f.fac.name.%player%}:
  167. set {_m} to "%{_m}%&8█"
  168. else if {_result} is "SAFEZONE":
  169. set {_m} to "%{_m}%&6█"
  170. else if {_result} is "WARZONE":
  171. set {_m} to "%{_m}%&4█"
  172. else if {_result} is "":
  173. set {_m} to "%{_m}%&7█"
  174. else:
  175. set {_m} to "%{_m}%&c█"
  176. add -1 to {_mapX}
  177. send "%{_m}%" to player
  178. set {_m} to ""
  179. add -1 to {_mapY}
  180. set {_mapX} to 11
  181. if arg-2 isn't "auto":
  182. send " "
  183. send "&8█ &fSua facção &e█ &fSua posição &c█ &fInimiga"
  184. send "&6█ &fZona Protegida &7█ &fZona Livre &4█ &fWARZONE"
  185. else if arg-2 isn't set:
  186. send " "
  187. send "&8█ &fSua facção &e█ &fSua posição &c█ &fInimiga"
  188. send "&6█ &fZona Protegida &7█ &fZona Livre &4█ &fWARZONE"
  189. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  190. # Zonas Protegidas
  191. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  192. else if argument 1 is "setsafe":
  193. if player doesn't have permission "faction.admin":
  194. send "{@permission-message}"
  195. else if {f.chunk::%chunk at player%} is set:
  196. send "&aZona Protegida já está claimado nesta terra."
  197. else:
  198. send "&aVocê dominou esta terra com sucesso!"
  199. set {f.chunk::%chunk at player%} to "SAFE"
  200. else if argument 1 is "remsafe":
  201. if player doesn't have permission "faction.admin":
  202. send "{@permission-message}"
  203. else if {f.chunk::%chunk at player%} isn't "SAFE":
  204. send "&aEsta terra é da facção '%{f.chunk::%chunk at player%}%'!"
  205. else:
  206. send "&aVocê dominou esta terra com sucesso!"
  207. delete {f.chunk::%chunk at player%}
  208. else if argument 1 is "setwarzone":
  209. if player doesn't have permission "faction.admin":
  210. send "{@permission-message}"
  211. else if {f.chunk::%chunk at player%} is set:
  212. send "&aWARZONE já está claimado nesta terra."
  213. else:
  214. send "&aVocê dominou esta terra com sucesso!"
  215. set {f.chunk::%chunk at player%} to "WARZONE"
  216. else if argument 1 is "remwarzone":
  217. if player doesn't have permission "faction.admin":
  218. send "{@permission-message}"
  219. else if {f.chunk::%chunk at player%} isn't "WARZONE":
  220. send "&aEsta terra é da facção '%{f.chunk::%chunk at player%}%'!"
  221. else:
  222. send "&aVocê dominou esta terra com sucesso!"
  223. delete {f.chunk::%chunk at player%}
  224. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  225. # Comando de abandonar área
  226. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  227. else if argument 1 is "abandonarc":
  228. if {f.fac.name.%player%} isn't set:
  229. send "&cVocê não está em uma facção."
  230. else if {f.fac.grade.%player%} < 2:
  231. send "&cVocê não tem o grau necessário."
  232. else if {f.chunk::%chunk at player%} isn't set:
  233. send "&cEsta terra não é de sua facção!"
  234. else if {f.chunk::%chunk at player%} isn't {f.fac.name.%player%}:
  235. send "&cEsta terra não é de sua facção!"
  236. else:
  237. subtract 1 from {f.fac.chunksclaims.%{f.fac.name.%player%}%}
  238. delete {f.chunk::%chunk at player%}
  239. send "&aTerra perdida com sucesso."
  240. else if argument 1 is "abandonaradmin":
  241. subtract 1 from {f.fac.chunksclaims.%{f.fac.name.%player%}%}
  242. delete {f.chunk::%chunk at player%}
  243. send "&aTerra perdida com sucesso."
  244. else if argument 1 is "admin":
  245. if player doesn't have permission "faction.admin":
  246. send "{@permission-message}"
  247. if {f.bypass.%player%} isn't set:
  248. send "&cAtive o seu modo admin para utilizar esta ferramenta."
  249. if {f.bypass.%player%} is set:
  250. send "&a/f admin [on|off] &8- &7Utilize para ativar o modo admin."
  251. send "&a/f admin abandonar &8 - &7Utilize para retirar a dominação de alguma facção."
  252. if argument 2 is "abandonar":
  253. subtract 1 from {f.fac.chunksclaims.%{f.fac.name.%player%}%}
  254. delete {f.chunk::%chunk at player%}
  255. send "&cTerra perdida com sucesso. Lembre-se seu admin está ativado!"
  256. if argument 2 is "off":
  257. delete {f.bypass.%player%}
  258. send "&aModo admin desativado."
  259. else if argument 2 is "on":
  260. set {f.bypass.%player%} to true
  261. send "&aModo admin ativado."
  262. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  263. # Comando de remover/sair (de) facção
  264. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  265. else if argument 1 is "desfazerc" or "sairc":
  266. if command sender is a player:
  267. if {f.fac.name.%player%} isn't set:
  268. send "&cVocê não está em uma facção."
  269. else if {f.fac.grade.%player%} isn't 3:
  270. send "&cVocê não tem o grau necessário."
  271. else:
  272. set {_faction} to "%{f.fac.name.%player%}%"
  273. else:
  274. if arg-2 isn't set:
  275. stop
  276. set {_faction} to "%arg-2%"
  277. if command sender is a player:
  278. send "&aA facção %{f.fac.name.%player%}% foi terminada com sucesso!"
  279. loop {f.list.factions::*}:
  280. if "%{_faction}%" is "%loop-value%":
  281. remove loop-value from {f.list.factions::*}
  282. delete {f.fac.desc.%{_faction}%}
  283. delete {f.fac.powerboost.%{_faction}%}
  284. delete {f.fac.tag.%{_faction}%}
  285. delete {f.fac.lastconnection.%{_faction}%}
  286. delete {f.fac.home.%{_faction}%}
  287. delete {f.fac.invitation.%{_faction}%}
  288. delete {f.fac.chunksclaims.%{_faction}%}
  289. clear {f.fac.ennemy.%{_faction}%::*}
  290. loop {f.fac.ally.%{_faction}%::*}:
  291. loop {f.fac.ally.%loop-value-1%::*}:
  292. if "%loop-value-2%" is "%{_faction}%":
  293. remove loop-value-2 from {f.fac.ennemy.%loop-value-1%::*}
  294. clear {f.fac.ally.%{_faction}%::*}
  295. loop {f.chunk::*}:
  296. if "%loop-value-1%" is "%{_faction}%":
  297. remove loop-value-1 from {f.chunk::*}
  298. loop {f.list.players::*}:
  299. if {f.fac.name.%loop-value-1%} is {_faction}:
  300. delete {f.fac.name.%loop-value-1%}
  301. delete {f.fac.grade.%loop-value-1%}
  302. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  303. # HOME/SETHOME
  304. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  305. else if argument 1 is "definir":
  306. if argument 2 is "base":
  307. if {f.fac.name.%player%} isn't set:
  308. send "&cVocê não está em uma facção."
  309. else if {f.fac.grade.%player%} < 1:
  310. send "&cVocê não tem o grau necessário."
  311. else if {f.chunk::%chunk at player%} isn't set:
  312. send "&cVocê só pode definir bases dentro das terras da sua facção!"
  313. else if {f.chunk::%chunk at player%} isn't {f.fac.name.%player%}:
  314. send "&cVocê só pode definir bases dentro das terras da sua facção!"
  315. else if arg-2 isn't set:
  316. send "&cUtilize /f definir base."
  317. else:
  318. set {f.fac.home.%{f.fac.name.%player%}%} to location of player
  319. send "&aLocalização de base alterada com sucesso."
  320. else if argument 1 is "base":
  321. if {f.fac.name.%player%} isn't set:
  322. send "&cVocê não está em uma facção."
  323. else if {f.fac.home.%{f.fac.name.%player%}%} isn't set:
  324. send "&cHum... Sua facção ainda não está com sua base definida."
  325. else:
  326. teleport player to {f.fac.home.%{f.fac.name.%player%}%}
  327. send "&aTeleportado para a base da sua facção!" # delete {f.fac.home.%{_faction}%}
  328. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  329. # Descrição
  330. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  331. else if argument 1 is "info" or "who" or "show" or "f":
  332. if arg-2 is set:
  333. if player is op:
  334. if {f.fac.chunksclaims.%arg-2%} isn't set:
  335. if {f.fac.name.%arg-2%} isn't set:
  336. send "&cOps! Parece que esta facção não existe!"
  337. stop
  338. else:
  339. set {_faction} to "%{f.fac.name.%arg-2%}%"
  340. else:
  341. set {_faction} to "%arg-2%"
  342. else:
  343. send "{permission-send}"
  344. stop
  345. else:
  346. if {f.fac.name.%player%} isn't set:
  347. send "&cOps! Aparentemente você não possuí nenhuma facção!"
  348. stop
  349. else:
  350. set {_faction} to "%{f.fac.name.%player%}%"
  351. if {_faction} isn't set:
  352. send " &4ERREUR !"
  353. stop
  354. send " "
  355. send " &e%{_faction}% "
  356. # Informations
  357. if {f.fac.invitation.%{_faction}%} is true:
  358. send "&2Terras/&4Poder&2/&4Poder máximo&2: &7%{f.fac.chunksclaims.%{_faction}%}%/%{_p}%"
  359. else:
  360. send "&2Terras/&4Poder&2/&4Poder máximo&2: &7%{f.fac.chunksclaims.%{_faction}%}%/%{_p}%"
  361. set {_dif} to difference between now and {f.fac.lastconnection.%{_faction}%}
  362. if {f.fac.lastconnection.%{_faction}%} is set:
  363. set {_dif_D} to "%difference between 14 days and {_dif}%"
  364. replace all " hours" with "&6h&e" in {_dif_D}
  365. replace all " hour" with "&6h&e" in {_dif_D}
  366. replace all " days" with "&6j&e" in {_dif_D}
  367. replace all " day" with "&6j&e" in {_dif_D}
  368. replace all " minutes" with "&6m&e" in {_dif_D}
  369. replace all " minute" with "&6m&e" in {_dif_D}
  370. replace all " seconds" with "&6s&e" in {_dif_D}
  371. replace all " second" with "&6s&e" in {_dif_D}
  372. replace all " and " with " " in {_dif_D}
  373. send "&7Suppression Auto dans: &e%{_dif_D}%"
  374. set {_p} to FactionPower("%{_faction}%")
  375. # connecté et membres
  376. set {_c} to 0
  377. set {_nbchefs} to 0
  378. loop all players:
  379. if "%{f.fac.name.%loop-player%}%" is "%{_faction}%":
  380. add 1 to {_c}
  381. if {f.fac.grade.%loop-player%} is 3:
  382. if {_m} is set:
  383. set {_m} to "%{_m}%&7, &c%loop-player%"
  384. else:
  385. set {_m} to "&7%loop-player%"
  386. add 1 to {_nbchefs}
  387. else if {f.fac.grade.%loop-player%} is 2:
  388. if {_m} is set:
  389. set {_m} to "%{_m}%&7, &5%loop-player%"
  390. else:
  391. set {_m} to "&5%loop-player%"
  392. add 1 to {_nbchefs}
  393. else:
  394. if {_m} is set:
  395. set {_m} to "%{_m}%&7, &d%loop-player%"
  396. else:
  397. set {_m} to "&d%loop-player%"
  398. if {_m} isn't set:
  399. set {_m} to "&7Nenhum."
  400. loop {f.list.players::*}:
  401. if {f.fac.name.%loop-value%} is {_faction}:
  402. if {_mem} is set:
  403. set {_mem} to "%{_mem}%, %loop-value%"
  404. else:
  405. set {_mem} to "%loop-value%"
  406. if {_mem} isn't set:
  407. set {_mem} to "&fFaction Vide !"
  408. send "&2Líder: &7%{_nbchefs}%"
  409. send "&2Membros: &7%{_c}%"
  410.  
  411. send "&2Membros online: &7%{_c}% %newline% &7%{_m}%"
  412.  
  413. # Allié et Ennemis
  414. loop {f.fac.ennemy.%{f.fac.name.%player%}%::*}:
  415. if {_e} is set:
  416. set {_e} to "%{_e}%&7, &c%loop-value%"
  417. else:
  418. set {_e} to "&c%loop-value%"
  419. loop {f.fac.ally.%{f.fac.name.%player%}%::*}:
  420. if {_a} is set:
  421. set {_a} to "%{_a}%&7, &a%loop-value%"
  422. else:
  423. set {_a} to "&a%loop-value%"
  424. if {_e} isn't set:
  425. set {_e} to "&7Nenhum"
  426. if {_a} isn't set:
  427. set {_a} to "&7Nenhum"
  428. send "&2Aliados: %{_a}%"
  429. send "&2Inimigos: %{_e}%"
  430. send " "
  431. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  432. # menu
  433. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  434. if argument 1 is "menu":
  435. if {f.fac.name.%player%} isn't set:
  436. send "&cVocê não faz parte de uma facção."
  437. else:
  438. open chest with 3 rows named "%{f.fac.name.%player%}%" to player
  439. format slot 10 of player with a paper named "&aRelações" with lore "&7Mostrar relações com outras facções" to close then run [make player execute command "/f sairc"]
  440. format slot 12 of player with head:3 named "&aMembros" with lore "&7Mostrar membros de sua facção." to run [execute player command "/f invitations"]
  441. format slot 14 of player with a grass named "&aTerras" with lore "&7Mostrar todas as terras dominadas." to close then run [make player execute command "/negar"]
  442. format slot 16 of player with map named "&aPedidos" with lore "&7Mostrar todos os pedidos pendentes." to run [execute player command "/f invitations"]
  443. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  444. # Desfazer
  445. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  446. else if argument 1 is "sair":
  447. if {f.fac.name.%player%} isn't set:
  448. send "&cVocê não faz parte de uma facção."
  449. stop
  450. else if {f.fac.grade.%player%} > 2:
  451. send "&cO líder da facção não pode abandoná-la. Caso queira deletá-la, utilize /f desfazer."
  452. else:
  453. delete {f.fac.name.%player%}
  454. delete {f.fac.grade.%player%}
  455. open chest with 3 rows named "Confirmação" to player
  456. format slot 12 of player with a wool:5 named "&aAceitar (Leia Abaixo)" to close then run [make player execute command "/f sairc"]
  457. format slot 16 of player with a wool:14 named "&cNegar" with lore "&7Cancelar esta operação." to close then run [make player execute command "/negar"]
  458. stop
  459. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  460. # Remover
  461. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  462. else if argument 1 is "desfazerc":
  463. if command sender is a player:
  464. if {f.fac.name.%player%} isn't set:
  465. send "&cVocê não está em uma facção."
  466. stop
  467. else if {f.fac.grade.%player%} isn't 3:
  468. send "&cVocê não tem o grau necessário."
  469. stop
  470. else:
  471. set {_faction} to "%{f.fac.name.%player%}%"
  472. else:
  473. if arg-2 isn't set:
  474. stop
  475. set {_faction} to "%arg-2%"
  476. if command sender is a player:
  477. send "&cVocê acaba de sair da sua facção."
  478. loop {f.list.factions::*}:
  479. if "%{_faction}%" is "%loop-value%":
  480. remove loop-value from {f.list.factions::*}
  481. delete {f.fac.desc.%{_faction}%}
  482. delete {f.fac.powerboost.%{_faction}%}
  483. delete {f.fac.tag.%{_faction}%}
  484. delete {f.fac.lastconnection.%{_faction}%}
  485. delete {f.fac.home.%{_faction}%}
  486. delete {f.fac.invitation.%{_faction}%}
  487. delete {f.fac.chunksclaims.%{_faction}%}
  488. clear {f.fac.ennemy.%{_faction}%::*}
  489. loop {f.fac.ally.%{_faction}%::*}:
  490. loop {f.fac.ally.%loop-value-1%::*}:
  491. if "%loop-value-2%" is "%{_faction}%":
  492. remove loop-value-2 from {f.fac.ennemy.%loop-value-1%::*}
  493. clear {f.fac.ally.%{_faction}%::*}
  494. loop {f.chunk::*}:
  495. if "%loop-value-1%" is "%{_faction}%":
  496. remove loop-value-1 from {f.chunk::*}
  497. loop {f.list.players::*}:
  498. if {f.fac.name.%loop-value-1%} is {_faction}:
  499. delete {f.fac.name.%loop-value-1%}
  500. delete {f.fac.grade.%loop-value-1%}
  501. delete {f.fac.name.%player%}
  502. delete {f.fac.grade.%player%}
  503. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  504. # Desfazer Principal
  505. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  506. else if argument 1 is "desfazer":
  507. if {f.fac.name.%player%} isn't set:
  508. send "&cVocê não faz parte de uma facção."
  509. else:
  510. open chest with 3 rows named "Confirmação" to player
  511. format slot 11 of player with a wool:5 named "&aAceitar (Leia Abaixo)" with lore "&cVocê tem certeza que quer desfazer sua facção?" to close then run [make player execute command "/f desfazerc"]
  512. format slot 15 of player with a wool:14 named "&cNegar" with lore "&7Cancelar esta operação." to close then run [make player execute command "/negar"]
  513. wait 45 seconds
  514. send "&cVocê está sendo monitorado por atividades suspeitas."
  515. stop
  516. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  517. # Abandonar Principal
  518. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  519. else if argument 1 is "abandonar":
  520. if {f.fac.name.%player%} isn't set:
  521. send "&cVocê não faz parte de uma facção."
  522. stop
  523. else if {f.fac.grade.%player%} < 2:
  524. send "&cVocê não tem o grau necessário."
  525. stop
  526. else if {f.chunk::%chunk at player%} isn't set:
  527. send "&cVocê não pode retirar terras de outras facções!"
  528. stop
  529. else if {f.chunk::%chunk at player%} isn't {f.fac.name.%player%}:
  530. send "&cVocê não pode retirar terras de outras facções!"
  531. stop
  532. else:
  533. subtract 1 from {f.fac.chunksclaims.%{f.fac.name.%player%}%}
  534. delete {f.chunk::%chunk at player%}
  535. open chest with 4 rows named "Confirmação" to player
  536. format slot 13 of player with a grass named "Tem certeza que quer abandonar esta terra?" to close then run [make player execute command "/example1"]
  537. format slot 20 of player with a wool:5 named "&aAceitar (Leia Abaixo)" to close then run [make player execute command "/f abandonarc"]
  538. format slot 24 of player with a wool:14 named "&cNegar" with lore "&7Cancelar esta operação." to close then run [make player execute command "/negar"]
  539. add 1 to {f.fac.chunksclaims.%{f.fac.name.%player%}%}
  540. set {f.chunk::%chunk at player%} to {f.fac.name.%player%}
  541. stop
  542. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  543. # QUIT/KICK/PROMOTE
  544. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  545. else if argument 1 is "expulsarc":
  546. if {f.fac.name.%player%} isn't set:
  547. send "&cVocê não está em uma facção."
  548. else if arg-2 isn't set:
  549. send "&cUtilize /f expulsar <jogador>."
  550. else if {f.fac.grade.%player%} < 2:
  551. send "&c&cVocê não tem o grau necessário."
  552. else if {f.fac.name.%arg-2%} isn't {f.fac.name.%player%}:
  553. send "&cOps! O jogador %arg-2% não está em sua facção!"
  554. else if {f.fac.grade.%arg-2%} isn't 1:
  555. send "&cVocê deve rebaixar a classificação do jogador antes de expulsa-lo!"
  556. else:
  557. delete {f.fac.name.%arg-2%}
  558. delete {f.fac.grade.%arg-2%}
  559. send "&aO jogador %player% foi expulso de sua facção!" to {_c}
  560. else if argument 1 is "expulsar":
  561. if {f.fac.name.%player%} isn't set:
  562. send "&cVocê não está em uma facção."
  563. else if arg-2 isn't set:
  564. send "&cUtilize /f expulsar <jogador>."
  565. else if {f.fac.grade.%player%} < 2:
  566. send "&c&cVocê não tem o grau necessário."
  567. else if {f.fac.name.%arg-2%} isn't {f.fac.name.%player%}:
  568. send "&cOps! O jogador %arg-2% não está em sua facção!"
  569. else if {f.fac.grade.%arg-2%} isn't 1:
  570. send "&cVocê deve rebaixar a classificação do jogador antes de expulsa-lo!"
  571. else:
  572. open chest with 3 rows named "Confirmação" to player
  573. format slot 11 of player with a wool:5 named "&aAceitar (Leia Abaixo)" with lore "&cVocê tem certeza que deseja remover este jogador?" to close then run [make player execute command "/f expulsarc %arg-2%"]
  574. format slot 15 of player with a wool:14 named "&cNegar" with lore "&7Cancelar esta operação." to close then run [make player execute command "/negar"]
  575. stop
  576. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  577. # INVITATION/MEMBRE
  578. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  579. else if argument 1 is "invitation" or "invitations":
  580. if arg-2 isn't set:
  581. if {f.fac.name.%player%} isn't set:
  582. set {_objet} to "me"
  583. else:
  584. set {_objet} to "faction"
  585. else if arg-2 isn't "me" or "faction":
  586. send "&cUtilize /f invitation [me/faction]"
  587. stop
  588. else:
  589. set {_objet} to "%arg-2%"
  590. if {_objet} is "me":
  591. open chest with 6 rows named "Convites de si mesmo." to player
  592. else:
  593. open chest with 5 rows named "%{f.fac.name.%player%}% - Pedidos" to player
  594. wait 2 tick
  595. set {_case} to 0
  596. set {_case1} to 0
  597. if {_objet} is "me":
  598. loop {f.list.factions::*}:
  599. loop {f.fac.invitations.%loop-value-1%::*}:
  600. if "%loop-value-2%" is "%player%":
  601. format slot {_case} of player with 1 of paper named "&7Facção: &f%loop-value-1%" with lore " ||&7Convite em andamente...|| ||&7Para aceitar: &a/f aceitar %loop-value-1%||&7Para recusar: &c/f recusar %loop-value-1%" to be unstealable
  602. add 1 to {_case}
  603. format slot {_case1} of player with 1 of paper named "&7Facção: &f%loop-value-1%" with lore " ||&7Convite em andamente...|| ||&7Para aceitar: &a/f aceitar %loop-value-1%||&7Para recusar: &c/f recusar %loop-value-1%" to be unstealable
  604. add 1 to {_case1}
  605. else:
  606. loop {f.fac.invitations.%{f.fac.name.%player%}%::*}:
  607. format slot {_case} of player with 1 of loop-value's skull named "&7Jogador: &f%loop-value%" with lore " ||&7Convite em andamente...|| ||&cClique para recusar o recrutamento." to run "faction reminvitation|%loop-value% %player%"
  608. add 1 to {_case}
  609. else if argument 1 contains "reminvitation":
  610. if command sender isn't console:
  611. stop
  612. else:
  613. set {_a} to "%arg-1%"
  614. set {_a::*} to {_a} split at "|"
  615. loop {f.fac.invitations.%{f.fac.name.%arg-2%}%::*}:
  616. if "%loop-value%" is "%{_a::2}%":
  617. remove loop-value from {f.fac.invitations.%{f.fac.name.%arg-2%}%::*}
  618. send "&cVocê revogou o convite do jogador %{_a::2}%." to (arg-2 parsed as player)
  619. execute (arg-2 parsed as player) command "/faction invitations"
  620. else if argument 1 is "toggleinvitation" or "toggleinvite":
  621. if {f.fac.name.%player%} isn't set:
  622. send "&cVocê não está em uma facção."
  623. else if {f.fac.grade.%player%} < 2:
  624. send "&cVocê não tem o grau necessário."
  625. else if {f.fac.invitation.%{f.fac.name.%player%}%} is true:
  626. delete {f.fac.invitation.%{f.fac.name.%player%}%}
  627. clear {f.fac.invitations.%{f.fac.name.%player%}%::*}
  628. send "&aAgora não é possível convidar membros!"
  629. else if {f.fac.invitation.%{f.fac.name.%player%}%} isn't set:
  630. set {f.fac.invitation.%{f.fac.name.%player%}%} to true
  631. send "&aAgora é possível convidar membros!"
  632. else if argument 1 is "convidar" or "invite":
  633. if {f.fac.name.%player%} isn't set:
  634. send "&cVocê não está em uma facção."
  635. else if {f.fac.invitation.%{f.fac.name.%player%}%} isn't set:
  636. send "&cA sua facção não está convidando membros. Para poder convidar membros digite '/f toggleinvite'."
  637. else if arg-2 isn't set:
  638. send "&cUtilize /f convidar <jogador>"
  639. else if {f.fac.name.%arg-2%} is set:
  640. send "&c%arg-2% já tem uma facção!"
  641. else if "%{f.fac.invitations.%{f.fac.name.%player%}%::*}%" contains "%arg-2%":
  642. send "&cOps! Um convite já está em andamento, espere ele aceitar ou recusar para fazer outro."
  643. else:
  644. set {_p} to (arg-2 parsed as player)
  645. add {_p} to {f.fac.invitations.%{f.fac.name.%player%}%::*}
  646. send "&aVocê convidou '%{_p}%' para sua facção."
  647. send "&a%player% está te convidando para a facção '%{f.fac.name.%player%}%'." to {_p}
  648. else if argument 1 is "aceitar":
  649. if {f.fac.name.%player%} is set:
  650. send "&cVocê já está em uma facção!"
  651. else if arg-2 isn't set:
  652. send "&cUtilize /f aceitar <nome>."
  653. else if "%{f.fac.invitations.%arg-2%::*}%" doesn't contain "%player%":
  654. send "&cEsta facção não te convidou para participar."
  655. else:
  656. set {f.fac.name.%player%} to "%arg-2%"
  657. set {f.fac.grade.%player%} to 1
  658. loop {f.fac.invitations.%arg-2%::*}:
  659. if "%loop-value%" is "%player%":
  660. remove loop-value from {f.fac.invitations.%arg-2%::*}
  661. send "&aVocê entrou na facção %arg-2%!"
  662. else if argument 1 is "recusar":
  663. if {f.fac.name.%player%} is set:
  664. send "&cVocê já está em uma facção."
  665. else if arg-2 isn't set:
  666. send "&cVocê precisa especificar uma facção depois do '%arg-1%'."
  667. else if "%{f.fac.invitations.%arg-2%::*}%" doesn't contain "%player%":
  668. send "&cEsta facção não te convidou para participar."
  669. else:
  670. send "&cVocê recusou o pedido da facção '%arg-2%'."
  671. loop {f.fac.invitations.%arg-2%::*}:
  672. if "%loop-value%" is "%player%":
  673. remove loop-value from {f.fac.invitations.%arg-2%::*}
  674. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  675. # Descrição
  676. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  677. if argument 1 is "desc":
  678. if {f.fac.name.%player%} isn't set:
  679. send "&cVocê não está em uma facção."
  680. else if arg-2 isn't set:
  681. send "&cColoque a descrição após o 'desc'."
  682. else if {f.fac.grade.%player%} < 2:
  683. send "&cVocê não tem o grau necessário."
  684. else:
  685. set {f.fac.desc.%{f.fac.name.%player%}%} to arg-2
  686. send "&aVocê definiu a descrição da facção para '%arg-2%'."
  687. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  688. # Ajuda
  689. #-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
  690. else if argument 1 is "ajuda":
  691. if {f.fac.name.%player%} isn't set:
  692. send "&a/f listar &8- &7Utilize para ver as facções online."
  693. send "&a/f info <nome> &8- &7Utilize para as informações sobre uma facção."
  694. send "&a/f perfil <jogador> &8- &7Utilize para ver as informações de um jogador."
  695. send "&a/f criar <nome> &8- &7Crie sua própia facção."
  696. send "&a/f aceitar <nome>&8- &7Utilize para aceitar um convite."
  697. send "&a/f recusar &8- &7Utilize para recusar um convite."
  698. send "&a/f menu &8- &7Utilize para ver o menu da sua facção."
  699. send "&a/f membros <nome> &8- &7Utilize para listar membros de uma facção."
  700. send "&a/f mapa [on|off] &8- &7Utilize para ver o mapa."
  701. send "&a/f verterras &8- &7Mostrar delimitações das terras."
  702. else:
  703. send "&a/f listar &8- &7Utilize para listar todas as facções."
  704. send "&a/f info <facção> &8- &7Utilize para ver as informações sobre uma facção."
  705. send "&a/f sair &8- &7Utilize para sair de sua facção."
  706. send "&a/f dominar &8- &7Utilize para dominar uma terra."
  707. send "&a/f abandonar &8- &7Utilize abandonar uma terra de sua facção."
  708. send "&a/f base &8- &7Utilize para ir até a base de sua facção."
  709. send "&a/f definir base &8- &7Definir localização da base.."
  710. send "&a/f expulsar <jogador> &8- &7Utilize para expulsar algum jogador de sua facção."
  711. send "&a/f desfazer &8- &7Utilize para caso for lider exclua a sua facção."
  712. send "&a/f criar <nome> &8- &7Utilize para criar sua facção."
  713. send "&a/f desc <descrição> &8- &7Utilize para definir a descrição."
  714. send "&a/f mapa [on/off] &8- &7Utilize para ver o mapa."
  715. send "&a/f menu &8- &7Utilize para ver o menu da facção."
  716. send "&a/f convidar <jogador> &8- &7Utilize para convidar um jogador para uma facção."
Advertisement
Add Comment
Please, Sign In to add comment