HallowedS

1

Jan 3rd, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 96.59 KB | None | 0 0
  1. #Changelog:
  2. # - Fixed one bug in /f dominar <3
  3. #Meta 2018:
  4. # - Conhecer a Sophia Lilis por internet e depois talvez in real life. [POSSÍVEL]
  5. command /teste1:
  6. trigger:
  7. set {_FactionTag} to value "%player%.FactionTag" get of "plugins/Factions/data.yml"
  8. set {_it::*} to configuration section "Terras" get of "plugins/Factions/claimdata.yml"
  9. loop {_it::*}:
  10. set {_n} to yml value "Terras.%loop-value%.%{_FactionTag}%" of file "plugins/Factions/claimdata.yml"
  11. if "%{_n}%" = "%{_FactionTag}%":
  12. delete yml nodes "Terras.%loop-value%" from file "plugins/Factions/claimdata.yml"
  13. on damage of player:
  14. set {_FactionV} to value "%victim%.FactionTag" get of "plugins/Factions/claimdata.yml"
  15. set {_FactionA} to value "%attacker%.FactionTag" get of "plugins/Factions/claimdata.yml"
  16. if {_FactionA} is equal to {_FactionV}:
  17. cancel event
  18. on damage:
  19. set {_Claim} to value "Terras.%chunk at victim%" get of "plugins/Factions/claimdata.yml"
  20. if {_Claim} is "safezone":
  21. cancel event
  22. on death of player:
  23. if attacker is player:
  24. set {_FactionTag} to value "%attacker%.FactionTag" get of "plugins/Factions/data.yml"
  25. set {_FactionRole} to value "%attacker%.FactionRole" get of "plugins/Factions/data.yml"
  26. if {_FactionRole} is "LEADER":
  27. set {_Role} to "##"
  28. if {_FactionRole} is "OFFICER":
  29. set {_Role} to "*"
  30. if {_FactionRole} is "MEMBER":
  31. set {_Role} to "+"
  32. if {_FactionRole} is "RECRUIT":
  33. set {_Role} to "-"
  34.  
  35. set {_FactionTagV} to value "%victim%.FactionTag" get of "plugins/Factions/data.yml"
  36. set {_FactionRoleV} to value "%victim%.FactionRole" get of "plugins/Factions/data.yml"
  37. if {_FactionRoleV} is "LEADER":
  38. set {_RoleV} to "##"
  39. if {_FactionRoleV} is "OFFICER":
  40. set {_RoleV} to "*"
  41. if {_FactionRoleV} is "MEMBER":
  42. set {_RoleV} to "+"
  43. if {_FactionRoleV} is "RECRUIT":
  44. set {_RoleV} to "-"
  45.  
  46. if {_FactionTagV} is "null":
  47. set {_Victim} to "%victim%"
  48. else:
  49. set {_Victim} to "[%{_RoleV}%%{_FactionTagV}%] %victim%"
  50.  
  51. if {_FactionTag} is "null":
  52. set {_Attacker} to "%victim%"
  53. else:
  54. set {_Attacker} to "[%{_Role}%%{_FactionTag}%] %attacker%"
  55. loop all players in radius 16 of player:
  56. add 1 to {_n}
  57. set {_players::%{_n}%} to loop-player
  58. send "&3%{_Victim}% &cfoi morto por &3%{_Attacker}%." to {_players::%{_n}%}
  59.  
  60. set {_Abates} to value "%attacker%.Abates" get of "plugins/Factions/data.yml"
  61. set {_Mortes} to value "%victim%.Mortes" get of "plugins/Factions/data.yml"
  62.  
  63. set {_Abates} to {_Abates} parsed as integer
  64. add 1 to {_Abates}
  65. set "%attacker%.Abates" to "%{_Abates}%" in yaml file "plugins/Factions/data.yml"
  66.  
  67. set {_Mortes} to {_Mortes} parsed as integer
  68. add 1 to {_Mortes}
  69. set "%victim%.Mortes" to "%{_Mortes}%" in yaml file "plugins/Factions/data.yml"
  70. command /c [<text>]:
  71. trigger:
  72. if sender is console:
  73. send "&cVocê não está permitido utilizar esta ferramenta."
  74. else:
  75. if arg 1 is set:
  76. set {_FactionTag} to value "%player%.FactionTag" get of "plugins/Factions/data.yml"
  77. set {_FactionRole} to value "%player%.FactionRole" get of "plugins/Factions/data.yml"
  78. if {_FactionRole} is "LEADER":
  79. set {_Tag} to "##"
  80. if {_FactionRole} is "OFFICER":
  81. set {_Tag} to "*"
  82. if {_FactionRole} is "MEMBER":
  83. set {_Tag} to "+"
  84. if {_FactionRole} is "RECRUIT":
  85. set {_Tag} to "-"
  86. if {_FactionTag} is "null":
  87. send "&cVocê não tem uma facção."
  88. else:
  89. loop all players:
  90. set {_FactionTagV} to value "%loop-player%.FactionTag" get of "plugins/Factions/data.yml"
  91. if {_FactionTag} is equal to {_FactionTagV}:
  92. send "&a%{_Tag}%&f%player%: &b%arg 1%" to loop-player
  93. else:
  94. send "&cUtilize /c <mensagem>."
  95. on right click:
  96. set {_FactionTag} to value "%player%.FactionTag" get of "plugins/Factions/data.yml"
  97. set {_FactionRole} to value "%player%.FactionRole" get of "plugins/Factions/data.yml"
  98. set {_Claim} to value "Terras.%chunk of event-block%" get of "plugins/Factions/claimdata.yml"
  99. if {_Claim} is "warzone" or "safezone":
  100. stop
  101. if {_Claim} is "%{_FactionTag}%":
  102. if {_FactionRole} is "RECRUIT":
  103. send "&cRecrutas não podem interagir com blocos nas terras da facção."
  104. else:
  105. stop
  106. if {_Claim} is "%{_FactionTag}%-PROTECTION":
  107. if {_FactionRole} is "RECRUIT":
  108. send "&cRecrutas não podem interagir com blocos nas terras da facção."
  109. else:
  110. stop
  111. if {_Claim} is set:
  112. loop {FactionList::*}:
  113. set {_FactionTagV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  114. if {_FactionTagV} is equal to {_Claim}:
  115. set {_FactionV} to value "%loop-value%.Faction" get of "plugins/Factions/data.yml"
  116. send "&cEste bloco pertence a facção [%{_Claim}%] %{_FactionV}%, você não pode interagir com ele."
  117. stop
  118. on break:
  119. set {_Admin} to value "%player%.Admin" get of "plugins/Factions/data.yml"
  120. if {_Admin} is "true":
  121. stop
  122. set {_FactionTag} to value "%player%.FactionTag" get of "plugins/Factions/data.yml"
  123. set {_FactionRole} to value "%player%.FactionRole" get of "plugins/Factions/data.yml"
  124. set {_Claim} to value "Terras.%chunk at player%" get of "plugins/Factions/claimdata.yml"
  125. if {_Claim} isn't set:
  126. stop
  127. if {_Claim} is "warzone" or "safezone":
  128. cancel event
  129. if {_Claim} is "%{_FactionTag}%-PROTECTION":
  130. if {_FactionRole} is "RECRUIT":
  131. stop
  132. if {_Claim} is "%{_FactionTag}%":
  133. if {_FactionRole} is "RECRUIT":
  134. stop
  135. else:
  136. cancel event
  137. on place:
  138. set {_Admin} to value "%player%.Admin" get of "plugins/Factions/data.yml"
  139. if {_Admin} is "true":
  140. stop
  141. set {_FactionTag} to value "%player%.FactionTag" get of "plugins/Factions/data.yml"
  142. set {_FactionRole} to value "%player%.FactionRole" get of "plugins/Factions/data.yml"
  143. set {_Claim} to value "Terras.%chunk at player%" get of "plugins/Factions/claimdata.yml"
  144. if {_Claim} isn't set:
  145. stop
  146. if {_Claim} is "warzone" or "safezone":
  147. cancel event
  148. if {_Claim} is "%{_FactionTag}%-PROTECTION":
  149. if {_FactionRole} is "RECRUIT":
  150. stop
  151. if {_Claim} is "%{_FactionTag}%":
  152. if {_FactionRole} is "RECRUIT":
  153. stop
  154. else:
  155. cancel event
  156. on load:
  157. if file "plugins/Factions/geradoresdata.yml" doesn't exists:
  158. create file "plugins/Factions/geradoresdata.yml"
  159. if file "plugins/Factions/claimdata.yml" doesn't exists:
  160. create file "plugins/Factions/claimdata.yml"
  161. if file "plugins/Factions/data.yml" doesn't exists:
  162. create file "plugins/Factions/data.yml"
  163. on join:
  164. set "%player%.isOnline" to "Online" in yml file "plugins/Factions/data.yml"
  165. on disconnect:
  166. set "%player%.isOnline" to "Offline" in yml file "plugins/Factions/data.yml"
  167. on quit:
  168. set {_tmpO} to now
  169. set {_dia} to day of month from date {_tmpO}
  170. if {_dia} is "0":
  171. set {_dia} to "00"
  172. if {_dia} is "1":
  173. set {_dia} to "01"
  174. if {_dia} is "2":
  175. set {_dia} to "02"
  176. if {_dia} is "3":
  177. set {_dia} to "03"
  178. if {_dia} is "4":
  179. set {_dia} to "04"
  180. if {_dia} is "5":
  181. set {_dia} to "05"
  182. if {_dia} is "6":
  183. set {_dia} to "06"
  184. if {_dia} is "7":
  185. set {_dia} to "07"
  186. if {_dia} is "8":
  187. set {_dia} to "08"
  188. if {_dia} is "9":
  189. set {_dia} to "09"
  190. set {_mes} to month from date {_tmpO}
  191. if {_mes} is "1":
  192. set {_mes} to "01"
  193. if {_mes} is "2":
  194. set {_mes} to "02"
  195. if {_mes} is "3":
  196. set {_mes} to "03"
  197. if {_mes} is "4":
  198. set {_mes} to "04"
  199. if {_mes} is "5":
  200. set {_mes} to "05"
  201. if {_mes} is "6":
  202. set {_mes} to "06"
  203. if {_mes} is "7":
  204. set {_mes} to "07"
  205. if {_mes} is "8":
  206. set {_mes} to "08"
  207. if {_mes} is "9":
  208. set {_mes} to "09"
  209. set {_ano} to year from date {_tmpO}
  210. set {_horas} to hours from date {_tmpO}
  211. if {_horas} is "0":
  212. set {_horas} to "00"
  213. if {_horas} is "1":
  214. set {_horas} to "01"
  215. if {_horas} is "2":
  216. set {_horas} to "02"
  217. if {_horas} is "3":
  218. set {_horas} to "03"
  219. if {_horas} is "4":
  220. set {_horas} to "04"
  221. if {_horas} is "5":
  222. set {_horas} to "05"
  223. if {_horas} is "6":
  224. set {_horas} to "06"
  225. if {_horas} is "7":
  226. set {_horas} to "07"
  227. if {_horas} is "8":
  228. set {_horas} to "08"
  229. if {_horas} is "9":
  230. set {_horas} to "09"
  231. set {_minutes} to minutes from date {_tmpO}
  232. if {_minutes} is "0":
  233. set {_minutes} to "00"
  234. if {_minutes} is "1":
  235. set {_minutes} to "01"
  236. if {_minutes} is "2":
  237. set {_minutes} to "02"
  238. if {_minutes} is "3":
  239. set {_minutes} to "03"
  240. if {_minutes} is "4":
  241. set {_minutes} to "04"
  242. if {_minutes} is "5":
  243. set {_minutes} to "05"
  244. if {_minutes} is "6":
  245. set {_minutes} to "06"
  246. if {_minutes} is "7":
  247. set {_minutes} to "07"
  248. if {_minutes} is "8":
  249. set {_minutes} to "08"
  250. if {_minutes} is "9":
  251. set {_minutes} to "09"
  252. set "%player%.LastDate" to "%{_dia}%/%{_mes}%/%{_ano}% %{_horas}%:%{_minutes}%" in yml file "plugins/Factions/data.yml"
  253. on disconnect:
  254. loop all players:
  255. set {_Faction} to value "%player%.Faction" get of "plugins/Factions/data.yml"
  256. set {_FactionL} to value "%loop-player%.Faction" get of "plugins/Factions/data.yml"
  257. if {_Faction} is "null":
  258. stop
  259. if {_FactionL} is equal to {_Faction}:
  260. if loop-player isn't player:
  261. send "&c%player% saiu." to loop-player
  262. stop
  263. on join:
  264. loop all players:
  265. set {_Faction} to value "%player%.Faction" get of "plugins/Factions/data.yml"
  266. set {_FactionL} to value "%loop-player%.Faction" get of "plugins/Factions/data.yml"
  267. if {_Faction} is "null":
  268. stop
  269. if {_FactionL} is equal to {_Faction}:
  270. if loop-player isn't player:
  271. send "&a%player% entrou." to loop-player
  272. stop
  273. on first join:
  274. add player to {FactionList::*}
  275. set {_tmpO} to now
  276. set {_dia} to day of month from date {_tmpO}
  277. if {_dia} is "1":
  278. set {_dia} to "01"
  279. if {_dia} is "2":
  280. set {_dia} to "02"
  281. if {_dia} is "3":
  282. set {_dia} to "03"
  283. if {_dia} is "4":
  284. set {_dia} to "04"
  285. if {_dia} is "5":
  286. set {_dia} to "05"
  287. if {_dia} is "6":
  288. set {_dia} to "06"
  289. if {_dia} is "7":
  290. set {_dia} to "07"
  291. if {_dia} is "8":
  292. set {_dia} to "08"
  293. if {_dia} is "9":
  294. set {_dia} to "09"
  295. set {_mes} to month from date {_tmpO}
  296. if {_mes} is "1":
  297. set {_mes} to "01"
  298. if {_mes} is "2":
  299. set {_mes} to "02"
  300. if {_mes} is "3":
  301. set {_mes} to "03"
  302. if {_mes} is "4":
  303. set {_mes} to "04"
  304. if {_mes} is "5":
  305. set {_mes} to "05"
  306. if {_mes} is "6":
  307. set {_mes} to "06"
  308. if {_mes} is "7":
  309. set {_mes} to "07"
  310. if {_mes} is "8":
  311. set {_mes} to "08"
  312. if {_mes} is "9":
  313. set {_mes} to "09"
  314. set {_ano} to year from date {_tmpO}
  315. set {_horas} to hours from date {_tmpO}
  316. if {_horas} is "0":
  317. set {_horas} to "00"
  318. if {_horas} is "1":
  319. set {_horas} to "01"
  320. if {_horas} is "2":
  321. set {_horas} to "02"
  322. if {_horas} is "3":
  323. set {_horas} to "03"
  324. if {_horas} is "4":
  325. set {_horas} to "04"
  326. if {_horas} is "5":
  327. set {_horas} to "05"
  328. if {_horas} is "6":
  329. set {_horas} to "06"
  330. if {_horas} is "7":
  331. set {_horas} to "07"
  332. if {_horas} is "8":
  333. set {_horas} to "08"
  334. if {_horas} is "9":
  335. set {_horas} to "09"
  336. set {_minutes} to minutes from date {_tmpO}
  337. if {_minutes} is "0":
  338. set {_minutes} to "00"
  339. if {_minutes} is "1":
  340. set {_minutes} to "01"
  341. if {_minutes} is "2":
  342. set {_minutes} to "02"
  343. if {_minutes} is "3":
  344. set {_minutes} to "03"
  345. if {_minutes} is "4":
  346. set {_minutes} to "04"
  347. if {_minutes} is "5":
  348. set {_minutes} to "05"
  349. if {_minutes} is "6":
  350. set {_minutes} to "06"
  351. if {_minutes} is "7":
  352. set {_minutes} to "07"
  353. if {_minutes} is "8":
  354. set {_minutes} to "08"
  355. if {_minutes} is "9":
  356. set {_minutes} to "09"
  357. set "%player%.Admin" to "false" in yml file "plugins/Factions/data.yml"
  358. set "%player%.NickName" to "%player%" in yml file "plugins/Factions/data.yml"
  359. set "%player%.Faction" to "null" in yml file "plugins/Factions/data.yml"
  360. set "%player%.FactionPower" to "5" in yml file "plugins/Factions/data.yml"
  361. set "%player%.FactionMaxPower" to "5" in yml file "plugins/Factions/data.yml"
  362. set "%player%.FactionRole" to "null" in yml file "plugins/Factions/data.yml"
  363. set "%player%.FactionTag" to "null" in yml file "plugins/Factions/data.yml"
  364. set "%player%.isOnline" to "Online" in yml file "plugins/Factions/data.yml"
  365. set "%player%.Group" to "Default" in yml file "plugins/Factions/data.yml"
  366. set "%player%.LastDate" to "%{_dia}%/%{_mes}%/%{_ano}% %{_horas}%:%{_minutes}%" in yml file "plugins/Factions/data.yml"
  367. set "%player%.Cadastrado" to "%{_dia}%/%{_mes}%/%{_ano}% %{_horas}%:%{_minutes}%" in yml file "plugins/Factions/data.yml"
  368. set "%player%.Mortes" to "0" in yml file "plugins/Factions/data.yml"
  369. set "%player%.Abates" to "0" in yml file "plugins/Factions/data.yml"
  370. set "%player%.Wins" to "0" in yml file "plugins/Factions/data.yml"
  371. set "%player%.Level" to "0" in yml file "plugins/Factions/data.yml"
  372. #send json of "&a&l[Facções] &71 facção acaba de ser desfeita por inatividade!" to all players
  373. command /f [<text>] [<text>] [<text>] [<text>]:
  374. aliases: /f:f
  375. trigger:
  376. if player have permission "master.group":
  377. set {_Tag} to "&6[Master]"
  378. if player have permission "gerente.group":
  379. set {_Tag} to "&4[Gerente]"
  380. if player have permission "admin.group":
  381. set {_Tag} to "&c[Admin]"
  382. if player have permission "moderador.group":
  383. set {_Tag} to "&2[Moderador]"
  384. if player have permission "ajudante.group":
  385. set {_Tag} to "&e[Ajudante]"
  386. if player have permission "youtuber.group":
  387. set {_Tag} to "&c[YT]"
  388. if player have permission "imperador.group":
  389. set {_Tag} to "&b[Imperador]"
  390. if player have permission "supremo.group":
  391. set {_Tag} to "&4[Supremo]"
  392. if player have permission "lendario.group":
  393. set {_Tag} to "&2[Lendário]"
  394. if player have permission "heroi.group":
  395. set {_Tag} to "&5[Herói]"
  396. if player have permission "campeao.group":
  397. set {_Tag} to "&3[Campeão]"
  398. if player have permission "default.group":
  399. set {_Tag} to "&7"
  400. set {_Admin} to value "%player%.Admin" get of "plugins/Factions/data.yml"
  401. set {_IsOnline} to value "%player%.isOnline" get of "plugins/Factions/data.yml"
  402. set {_FactionPower} to value "%player%.FactionPower" get of "plugins/Factions/data.yml"
  403. set {_Faction} to value "%player%.Faction" get of "plugins/Factions/data.yml"
  404. set {_FactionRole} to value "%player%.FactionRole" get of "plugins/Factions/data.yml"
  405. set {_FactionTag} to value "%player%.FactionTag" get of "plugins/Factions/data.yml"
  406. set {_FactionMaxPower} to value "%player%.FactionMaxPower" get of "plugins/Factions/data.yml"
  407. set {_LastDate} to value "%player%.LastDate" get of "plugins/Factions/data.yml"
  408. set {_Abates} to value "%player%.Abates" get of "plugins/Factions/data.yml"
  409. set {_Mortes} to value "%player%.Mortes" get of "plugins/Factions/data.yml"
  410. set {_Wins} to value "%player%.Wins" get of "plugins/Factions/data.yml"
  411.  
  412. set {_Abates} to {_Abates} parsed as integer
  413. set {_Mortes} to {_Mortes} parsed as integer
  414.  
  415. if arg 1 isn't set:
  416. if {_Faction} is "null":
  417. open chest with 5 rows named "%player%" to player
  418. format slot 10 of player with skull of ("%player%" parsed as an offline player) named "%{_Tag}%%player%" with lore "&fPoder: &7%{_FactionPower}%/%{_FactionMaxPower}%||&fCargo: &7%{_Role}%||&fKDR: &70.0||&fAbates: &7%{_Abates}%||&fMortes: &7%{_Mortes}%||&fStatus: &7%{_Status}%" to be unstealable
  419. if arg 1 is "aceitar":
  420. if arg 2 isn't set:
  421. send "&cUtilize /f aceitar convite <tag>."
  422. stop
  423. if arg 2 is set:
  424. if arg 3 isn't set:
  425. send "&cUtilize /f aceitar convite <tag>."
  426. stop
  427. else:
  428. if file "plugins/Factions/faction-%arg 3%.yml" exists:
  429. if {Convite::%arg 3%::%player%::*} is true:
  430. loop {FactionList::*}:
  431. set {_FactionTagV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  432. if {_FactionTagV} is equal to arg 3:
  433. add 1 to {_m}
  434. if {_m} >= 15:
  435. send "&cOps! Esta facção atingiu o limite máximo de jogadores."
  436. stop
  437. send "&aVocê juntou-se a facção %arg 3%!"
  438. delete {Convite::%arg 3%::%player%::*}
  439. set "%player%.FactionRole" to "RECRUIT" in yml file "plugins/Factions/data.yml"
  440. set "%player%.FactionTag" to "%arg 3%" in yml file "plugins/Factions/data.yml"
  441. loop all players:
  442. set {_FactionTagA} to value "%loop-player%.FactionTag" get of "plugins/Factions/data.yml"
  443. if {_FactionTagA} is equal to {_FactionTag}:
  444. send "&a%player% é mais novo membro desta facção!" to loop-player
  445. loop {FactionList::*}:
  446. set {_FactionTagA} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  447. if {_FactionTagA} is equal to arg 3:
  448. set {_FactionA} to value "%loop-value%.Faction" get of "plugins/Factions/data.yml"
  449. set "%player%.Faction" to "%{_FactionA}%" in yml file "plugins/Factions/data.yml"
  450. stop
  451. else:
  452. send "&cOxi! Você não foi convidado para entrar na facção ""%arg 3%""."
  453. stop
  454. else:
  455. send "&cOps! A facção informada não existe."
  456. stop
  457. if arg 1 is "convidarmenugui1177":
  458. if arg 2 isn't set:
  459. send "&cUtilize /f convidar <jogador>."
  460. if arg 2 is set:
  461. if {Convite::%{_FactionTag}%::%arg 2%} is true:
  462. send "&cHey! Você já enviou um convite de facção para este jogador!"
  463. stop
  464. if {_Faction} is "null":
  465. send "&cVocê não tem permissão para executar este comando."
  466. stop
  467. set {_IsOnline} to value "%arg 2%.isOnline" get of "plugins/Factions/data.yml"
  468. set {_FactionA} to value "%arg 2%.Faction" get of "plugins/Factions/data.yml"
  469. if {_IsOnline} is "Offline":
  470. send "&cEste usuário não está online."
  471. stop
  472. if {_IsOnline} is "Online":
  473. if {_FactionA} is "null":
  474. loop {FactionList::*}:
  475. set {_FactionV} to value "%loop-value%.NickName" get of "plugins/Factions/data.yml"
  476. if {_FactionV} is equal to arg 2:
  477. set {_Leader} to loop-value
  478. loop all players:
  479. if loop-player is "%arg 2%":
  480. send "&aVocê foi convidado para entrar na facção ""%{_FactionTag}%""." to loop-player
  481. send json of "&eClique" then " &e&lAQUI" run "/f convites" then " &epara ver seus convites." to loop-player
  482. send "&aVocê convidou %arg 2% para a sua facção."
  483. set {Convite::%{_FactionTag}%::%arg 2%::*} to true
  484. else:
  485. send "&cO jogador ""%arg 2%"" já faz parte de outra facção."
  486. stop
  487. else:
  488. send "&cEste usuário não existe."
  489. stop
  490. if arg 1 is "convidar":
  491. if arg 2 isn't set:
  492. send "&cUtilize /f convidar <jogador>."
  493. if arg 2 is set:
  494. if {Convite::%{_FactionTag}%::%arg 2%} is true:
  495. send "&cHey! Você já enviou um convite de facção para este jogador!"
  496. stop
  497. if {_Faction} is "null":
  498. send "&cVocê não tem permissão para executar este comando."
  499. stop
  500. set {_IsOnline} to value "%arg 2%.isOnline" get of "plugins/Factions/data.yml"
  501. set {_FactionTagA} to value "%arg 2%.FactionTag" get of "plugins/Factions/data.yml"
  502. if {_IsOnline} is "Offline":
  503. send "&cO jogador ""%arg 2%"" não está online!"
  504. stop
  505. if {_FactionTagA} isn't set:
  506. send "&cEste usuário não existe."
  507. stop
  508. if {_IsOnline} is "Online":
  509. if {_FactionTagA} is "null":
  510. loop {FactionList::*}:
  511. set {_FactionTagV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  512. if {_FactionTag} is equal to {_FactionTagV}:
  513. add 1 to {_m}
  514. if {_m} is 15:
  515. send "&cOps! Sua facção atingiu o limite máximo de jogadores."
  516. stop
  517. set {_FactionV} to value "%loop-value%.NickName" get of "plugins/Factions/data.yml"
  518. if {_FactionV} is equal to arg 2:
  519. set {_Leader} to loop-value
  520. loop all players:
  521. if loop-player is "%arg 2%":
  522. send "&aVocê foi convidado para entrar na facção ""%{_FactionTag}%""." to loop-player
  523. send json of "&eClique" then " &e&lAQUI" run "/f convites" then " &epara ver seus convites." to loop-player
  524. send "&aVocê convidou ""%arg 2%"" para a sua facção."
  525. set {Convite::%{_FactionTag}%::%arg 2%::*} to true
  526. else:
  527. send "&cO jogador ""%arg 2%"" já faz parte de outra facção."
  528. stop
  529. if arg 1 is "base":
  530. if arg 2 isn't set:
  531. if {_Faction} is "null":
  532. send "&cVocê não tem permissão para executar este comando."
  533. stop
  534. set {_Base} to value "location.enabled" get of "plugins/Factions/faction-%{_FactionTag}%.yml"
  535. set {_x} to yml value "location.x" from file "plugins/Factions/faction-%{_FactionTag}%.yml"
  536. set {_y} to yml value "location.y" from file "plugins/Factions/faction-%{_FactionTag}%.yml"
  537. set {_z} to yml value "location.z" from file "plugins/Factions/faction-%{_FactionTag}%.yml"
  538. set {_loc.x} to {_x} parsed as number
  539. set {_loc.y} to {_y} parsed as number
  540. set {_loc.z} to {_z} parsed as number
  541. if {_Base} is "true":
  542. set {_location} to location ({_loc.x}, {_loc.y}, {_loc.z})
  543. set {_Claim} to value "Terras.%chunk at {_location}%" get of "plugins/Factions/claimdata.yml"
  544. if {_Claim} is "%{_FactionTag}%":
  545. send "&aTeleportado para a base da sua facção."
  546. teleport sender to location ({_loc.x}, {_loc.y}, {_loc.z})
  547. stop
  548. else:
  549. send "&cO local da sua base não pertence mais a sua facção."
  550. set "location.enabled" to "false" in yml file "plugins/Factions/faction-%{_FactionTag}%.yml"
  551. stop
  552. if {_Base} is "false":
  553. send "&cHum... Sua facção ainda não está com sua base definida."
  554. stop
  555. if arg 2 is "remover":
  556. set "location.enabled" to "false" in yml file "plugins/Factions/faction-%{_FactionTag}%.yml"
  557. set "location.x" to "%player's X coordinate%" in yml file "plugins/Factions/faction-%{_FactionTag}%.yml"
  558. set "location.y" to "%player's Y coordinate%" in yml file "plugins/Factions/faction-%{_FactionTag}%.yml"
  559. set "location.z" to "%player's Z coordinate%" in yml file "plugins/Factions/faction-%{_FactionTag}%.yml"
  560. send "&aBase removida com sucesso!"
  561. stop
  562. if arg 2 is "definir":
  563. set {_Claim} to value "Terras.%chunk at player%" get of "plugins/Factions/claimdata.yml"
  564. if {_Claim} is "%{_FactionTag}%" or "%{_FactionTag}%-PROTECTION":
  565. set "location.enabled" to "true" in yml file "plugins/Factions/faction-%{_FactionTag}%.yml"
  566. set "location.x" to "%player's X coordinate%" in yml file "plugins/Factions/faction-%{_FactionTag}%.yml"
  567. set "location.y" to "%player's Y coordinate%" in yml file "plugins/Factions/faction-%{_FactionTag}%.yml"
  568. set "location.z" to "%player's Z coordinate%" in yml file "plugins/Factions/faction-%{_FactionTag}%.yml"
  569. send "&aLocalização de base alterada com sucesso."
  570. stop
  571. else:
  572. send "&cVocê só pode definir bases dentro das terras da sua facção."
  573. if arg 1 is "membros":
  574. if arg 2 isn't set:
  575. if {_Faction} is "null":
  576. send "&cVocê não faz parte de nenhum facção, utilize /f membros <tag>."
  577. stop
  578. else:
  579. open chest with 6 rows named "%{_Faction}% - Membros" to player
  580. format slot 11 of player with player head named "&7Vago" to be unstealable
  581. format slot 12 of player with player head named "&7Vago" to be unstealable
  582. format slot 13 of player with player head named "&7Vago" to be unstealable
  583. format slot 14 of player with player head named "&7Vago" to be unstealable
  584. format slot 15 of player with player head named "&7Vago" to be unstealable
  585. format slot 20 of player with player head named "&7Vago" to be unstealable
  586. format slot 21 of player with player head named "&7Vago" to be unstealable
  587. format slot 22 of player with player head named "&7Vago" to be unstealable
  588. format slot 23 of player with player head named "&7Vago" to be unstealable
  589. format slot 24 of player with player head named "&7Vago" to be unstealable
  590. format slot 29 of player with player head named "&7Vago" to be unstealable
  591. format slot 30 of player with player head named "&7Vago" to be unstealable
  592. format slot 31 of player with player head named "&7Vago" to be unstealable
  593. format slot 32 of player with player head named "&7Vago" to be unstealable
  594. format slot 33 of player with player head named "&7Vago" to be unstealable
  595. set {_s} to 11
  596. if {_s} is 15:
  597. set {_s} to 20
  598. if {_s} is 24:
  599. set {_s} to 29
  600. loop {FactionList::*}:
  601. set {_FactionTagL} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  602. if {_FactionTagL} is equal to {_FactionTag}:
  603. set {_IsOnlineV} to value "%loop-value%.isOnline" get of "plugins/Factions/data.yml"
  604. set {_FactionPowerV} to value "%loop-value%.FactionPower" get of "plugins/Factions/data.yml"
  605. set {_FactionV} to value "%loop-value%.Faction" get of "plugins/Factions/data.yml"
  606. set {_GroupV} to value "%loop-value%.Group" get of "plugins/Factions/data.yml"
  607. set {_FactionRoleV} to value "%loop-value%.FactionRole" get of "plugins/Factions/data.yml"
  608. set {_FactionTagV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  609. set {_FactionMaxPowerV} to value "%loop-value%.FactionMaxPower" get of "plugins/Factions/data.yml"
  610. set {_LastDateV} to value "%loop-value%.LastDate" get of "plugins/Factions/data.yml"
  611. set {_AbatesV} to value "%loop-value%.Abates" get of "plugins/Factions/data.yml"
  612. set {_MortesV} to value "%loop-value%.Mortes" get of "plugins/Factions/data.yml"
  613. set {_WinsV} to value "%loop-value%.Wins" get of "plugins/Factions/data.yml"
  614.  
  615. if {_GroupV} is "Default":
  616. set {_TagV} to "&7"
  617. if {_GroupV} is "Master":
  618. set {_TagV} to "&6[Master] "
  619. if {_GroupV} is "Gerente":
  620. set {_TagV} to "&4[Gerente] "
  621. if {_GroupV} is "Admin":
  622. set {_TagV} to "&c[Admin] "
  623. if {_GroupV} is "Moderador":
  624. set {_TagV} to "&2[Moderador] "
  625. if {_GroupV} is "Ajudante":
  626. set {_TagV} to "&e[Ajudante] "
  627. if {_GroupV} is "Supremo":
  628. set {_TagV} to "&4[Supremo] "
  629. if {_GroupV} is "Lendario":
  630. set {_TagV} to "&2[Lendário] "
  631. if {_GroupV} is "Heroi":
  632. set {_TagV} to "&5[Herói] "
  633. if {_GroupV} is "Campeao":
  634. set {_TagV} to "&3[Campeão] "
  635. if {_GroupV} is "Youtuber":
  636. set {_TagV} to "&c[YT] "
  637. if {_GroupV} is "Imperador":
  638. set {_TagV} to "&b[Imperador] "
  639. if {_FactionRoleV} is "LEADER":
  640. set {_RoleV} to "##Líder"
  641. if {_FactionRoleV} is "OFFICER":
  642. set {_RoleV} to "*Capitão"
  643. if {_FactionRoleV} is "MEMBER":
  644. set {_RoleV} to "+Membro"
  645. if {_FactionRoleV} is "RECRUIT":
  646. set {_RoleV} to "-Recruta"
  647. if {_IsOnlineV} is "Online":
  648. set {_OnlineV} to "&aOnline"
  649. if {_IsOnlineV} is "Offline":
  650. set {_OnlineV} to "&cOffline"
  651. format slot {_s} of player with skull of loop-value named "%{_TagV}%%loop-value%" with lore "&fPoder: &7%{_FactionPowerV}%/%{_FactionMaxPowerV}%||&fCargo: &7%{_RoleV}%||&fKDR: &70.0||&fAbates: &7%{_AbatesV}%||&fMortes: &7%{_MortesV}%||&fGuerras ganhas: &7%{_WinsV}%||&fStatus: &7%{_OnlineV}%||&fÚltimo login: &7%{_LastDateV}%" to be unstealable
  652. add 1 to {_s}
  653. else:
  654. if file "plugins/Factions/faction-%arg 2%.yml" exists:
  655. open chest with 6 rows named "%{_Faction}% - Membros" to player
  656. format slot 11 of player with player head named "&7Vago" to be unstealable
  657. format slot 12 of player with player head named "&7Vago" to be unstealable
  658. format slot 13 of player with player head named "&7Vago" to be unstealable
  659. format slot 14 of player with player head named "&7Vago" to be unstealable
  660. format slot 15 of player with player head named "&7Vago" to be unstealable
  661. format slot 20 of player with player head named "&7Vago" to be unstealable
  662. format slot 21 of player with player head named "&7Vago" to be unstealable
  663. format slot 22 of player with player head named "&7Vago" to be unstealable
  664. format slot 23 of player with player head named "&7Vago" to be unstealable
  665. format slot 24 of player with player head named "&7Vago" to be unstealable
  666. format slot 29 of player with player head named "&7Vago" to be unstealable
  667. format slot 30 of player with player head named "&7Vago" to be unstealable
  668. format slot 31 of player with player head named "&7Vago" to be unstealable
  669. format slot 32 of player with player head named "&7Vago" to be unstealable
  670. format slot 33 of player with player head named "&7Vago" to be unstealable
  671. set {_s} to 11
  672. if {_s} is 15:
  673. set {_s} to 20
  674. if {_s} is 24:
  675. set {_s} to 29
  676. loop {FactionList::*}:
  677. set {_FactionTagL} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  678. if {_FactionTagL} is equal to arg 2:
  679. set {_IsOnlineV} to value "%loop-value%.isOnline" get of "plugins/Factions/data.yml"
  680. set {_FactionPowerV} to value "%loop-value%.FactionPower" get of "plugins/Factions/data.yml"
  681. set {_FactionV} to value "%loop-value%.Faction" get of "plugins/Factions/data.yml"
  682. set {_FactionRoleV} to value "%loop-value%.FactionRole" get of "plugins/Factions/data.yml"
  683. set {_FactionTagV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  684. set {_FactionMaxPowerV} to value "%loop-value%.FactionMaxPower" get of "plugins/Factions/data.yml"
  685. set {_LastDateV} to value "%loop-value%.LastDate" get of "plugins/Factions/data.yml"
  686. set {_AbatesV} to value "%loop-value%.Abates" get of "plugins/Factions/data.yml"
  687. set {_MortesV} to value "%loop-value%.Mortes" get of "plugins/Factions/data.yml"
  688. set {_WinsV} to value "%loop-value%.Wins" get of "plugins/Factions/data.yml"
  689.  
  690. set {_AbatesV} to {_AbatesV} parsed as integer
  691. set {_MortesV} to {_MortesV} parsed as integer
  692.  
  693. if loop-value have permission "default.group":
  694. set {_TagV} to "&7"
  695. if loop-value have permission "master.group":
  696. set {_TagV} to "&6[Master]"
  697. if loop-value have permission "gerente.group":
  698. set {_TagV} to "&4[Gerente]"
  699. if loop-value have permission "admin.group":
  700. set {_TagV} to "&c[Admin]"
  701. if loop-value have permission "moderador.group":
  702. set {_TagV} to "&2[Moderador]"
  703. if loop-value have permission "ajudante.group":
  704. set {_TagV} to "&e[Ajudante]"
  705. if loop-value have permission "supremo.group":
  706. set {_TagV} to "&4[Supremo]"
  707. if loop-value have permission "lendario.group":
  708. set {_TagV} to "&2[Lendário]"
  709. if loop-value have permission "heroi.group":
  710. set {_TagV} to "&5[Herói]"
  711. if loop-value have permission "campeao.group":
  712. set {_TagV} to "&3[Campeão]"
  713. if loop-value have permission "youtuber.group":
  714. set {_TagV} to "&c[YT]"
  715. if loop-value have permission "imperador.group":
  716. set {_TagV} to "&b[Imperador]"
  717. if {_FactionRoleV} is "LEADER":
  718. set {_RoleV} to "##Líder"
  719. if {_FactionRoleV} is "OFFICER":
  720. set {_RoleV} to "*Capitão"
  721. if {_FactionRoleV} is "MEMBER":
  722. set {_RoleV} to "+Membro"
  723. if {_FactionRoleV} is "RECRUIT":
  724. set {_RoleV} to "-Recruta"
  725. if {_IsOnlineV} is "Online":
  726. set {_OnlineV} to "&aOnline"
  727. if {_IsOnlineV} is "Offline":
  728. set {_OnlineV} to "&cOffline"
  729. format slot {_s} of player with skull of loop-value named "%{_TagV}% %loop-value%" with lore "&fPoder: &7%{_FactionPowerV}%/%{_FactionMaxPowerV}%||&fCargo: &7%{_RoleV}%||&fKDR: &70.0||&fAbates: &7%{_AbatesV}%||&fMortes: &7%{_MortesV}%||&fGuerras ganhas: &7%{_WinsA}%||&fStatus: &7%{_OnlineV}%||&fÚltimo login: &7%{_LastDateV}%" to be unstealable
  730. add 1 to {_s}
  731. else:
  732. send "&cEsta facção não existe."
  733. if arg 1 is "listar":
  734. loop all players:
  735. set {_FactionTagL} to value "%loop-player%.FactionTag" get of "plugins/Factions/data.yml"
  736. set {_FactionL} to value "%loop-player%.Faction" get of "plugins/Factions/data.yml"
  737. loop {FactionList::*}:
  738. set {_FactionV} to value "%loop-value-2%.Faction" get of "plugins/Factions/data.yml"
  739. set {_FactionOnlineV} to value "%loop-value-2%.isOnline" get of "plugins/Factions/data.yml"
  740. if {_FactionV} is equal to {_FactionL}:
  741. if {_FactionOnlineV} is "Online":
  742. add 1 to {_maa}
  743. add 1 to {_ma}
  744. if {_FactionL} isn't "null":
  745. send " &eFacções Online - (1/1)"
  746. send " &a%{_FactionL}% &8- &7%{_FactionTagL}% &8- &f%{_maa}%/%{_ma}% &7online &8- &f0/0&7/0"
  747. else:
  748. send "&cNão há facções online no momento."
  749. stop
  750. if arg 1 is "perfil":
  751. if arg 2 is set:
  752. set {_NickNameA} to value "%arg 2%.NickName" get of "plugins/Factions/data.yml"
  753. set {_IsOnlineA} to value "%arg 2%.isOnline" get of "plugins/Factions/data.yml"
  754. set {_FactionPowerA} to value "%arg 2%.FactionPower" get of "plugins/Factions/data.yml"
  755. set {_FactionA} to value "%arg 2%.Faction" get of "plugins/Factions/data.yml"
  756. set {_FactionRoleA} to value "%arg 2%.FactionRole" get of "plugins/Factions/data.yml"
  757. set {_FactionTagA} to value "%arg 2%.FactionTag" get of "plugins/Factions/data.yml"
  758. set {_FactionMaxPowerA} to value "%arg 2%.FactionMaxPower" get of "plugins/Factions/data.yml"
  759. set {_Group} to value "%arg 2%.Group" get of "plugins/Factions/data.yml"
  760. set {_LastDateA} to value "%arg 2%.LastDate" get of "plugins/Factions/data.yml"
  761. set {_AbatesA} to value "%arg 2%.Abates" get of "plugins/Factions/data.yml"
  762. set {_MortesA} to value "%arg 2%.Mortes" get of "plugins/Factions/data.yml"
  763. set {_WinsA} to value "%arg 2%.Wins" get of "plugins/Factions/data.yml"
  764.  
  765. set {_AbatesA} to {_AbatesA} parsed as integer
  766. set {_MortesA} to {_MortesA} parsed as integer
  767.  
  768. if {_IsOnlineA} is "Online" or "Offline":
  769. send ""
  770. if {_Group} is "Default":
  771. set {_Tag} to ""
  772. if {_Group} is "Master":
  773. set {_Tag} to "&6[Master]"
  774. if {_Group} is "Gerente":
  775. set {_Tag} to "&4[Gerente]"
  776. if {_Group} is "Admin":
  777. set {_Tag} to "&c[Admin]"
  778. if {_Group} is "Moderador":
  779. set {_Tag} to "&2[Moderador]"
  780. if {_Group} is "Ajudante":
  781. set {_Tag} to "&e[Ajudante]"
  782. if {_Group} is "Youtuber":
  783. set {_Tag} to "&c[YT]"
  784. if {_Group} is "Imperador":
  785. set {_Tag} to "&b[Imperador]"
  786. if {_Group} is "Supremo":
  787. set {_Tag} to "&4[Supremo]"
  788. if {_Group} is "Lendario":
  789. set {_Tag} to "&2[Lendário]"
  790. if {_Group} is "Heroi":
  791. set {_Tag} to "&5[Herói]"
  792. if {_Group} is "Campeao":
  793. set {_Tag} to "&3[Campeão]"
  794. if {_Group} is "Default":
  795. set {_Tag} to ""
  796. if {_FactionRoleA} is "LEADER":
  797. set {_RoleAA} to "##"
  798. if {_FactionRoleA} is "OFFICER":
  799. set {_RoleAA} to "*"
  800. if {_FactionRoleA} is "MEMBER":
  801. set {_RoleAA} to "+"
  802. if {_FactionRoleA} is "RECRUIT":
  803. set {_RoleAA} to "-"
  804. if {_FactionRoleA} is "LEADER":
  805. set {_RoleA} to "##Líder"
  806. if {_FactionRoleA} is "OFFICER":
  807. set {_RoleA} to "*Capitão"
  808. if {_FactionRoleA} is "MEMBER":
  809. set {_RoleA} to "+Membro"
  810. if {_FactionRoleA} is "RECRUIT":
  811. set {_RoleA} to "-Recruta"
  812. if {_FactionA} is "null":
  813. send " %{_Tag}% &e%arg 2%"
  814. else:
  815. send " %{_Tag}% &e%{_FactionTagA}% %{_RoleAA}%%arg 2%"
  816. send ""
  817. send "&fPoder: &7%{_FactionPowerA}%/%{_FactionMaxPowerA}%"
  818. if {_FactionA} is "null":
  819. send "&fFacção: &7Nenhuma"
  820. else:
  821. send "&fFacção: &7%{_FactionTagA}% - %{_FactionA}%"
  822. if {_FactionRoleA} is "null":
  823. send "&fCargo: &7Nenhum"
  824. else:
  825. send "&fCargo: &7%{_RoleA}%"
  826. send "&fKDR: &70.0"
  827. send "&fAbates: &7%{_AbatesA}%"
  828. send "&fMortes: &7%{_MortesA}%"
  829. send "&fGuerras ganhas: &7%{_WinsA}%"
  830. if {_isOnlineA} is "Online":
  831. send "&fStatus: &aOnline"
  832. if {_IsOnlineA} is "Offline":
  833. send "&fStatus: &cOffline"
  834. if {_Tag} is "" or "&3[Campeão]" or "&5[Herói]" or "&2[Lendário]" or "&4[Supremo]" or "&b[Imperador]":
  835. send "&fÚltimo login: &7%{_LastDateA}%"
  836. send ""
  837. else:
  838. send "&cEste usuário não existe."
  839. stop
  840. if arg 2 isn't set:
  841. send ""
  842. if player have permission "master.group":
  843. set {_Tag} to "&6[Master]"
  844. if player have permission "gerente.group":
  845. set {_Tag} to "&4[Gerente]"
  846. if player have permission "admin.group":
  847. set {_Tag} to "&c[Admin]"
  848. if player have permission "moderador.group":
  849. set {_Tag} to "&2[Moderador]"
  850. if player have permission "ajudante.group":
  851. set {_Tag} to "&e[Ajudante]"
  852. if player have permission "youtuber.group":
  853. set {_Tag} to "&c[YT]"
  854. if player have permission "imperador.group":
  855. set {_Tag} to "&b[Imperador]"
  856. if player have permission "supremo.group":
  857. set {_Tag} to "&4[Supremo]"
  858. if player have permission "lendario.group":
  859. set {_Tag} to "&2[Lendário]"
  860. if player have permission "heroi.group":
  861. set {_Tag} to "&5[Herói]"
  862. if player have permission "campeao.group":
  863. set {_Tag} to "&3[Campeão]"
  864. if player have permission "default.group":
  865. set {_Tag} to ""
  866. if {_FactionRole} is "LEADER":
  867. set {_Role} to "Líder"
  868. if {_FactionRole} is "OFFICER":
  869. set {_Role} to "Capitão"
  870. if {_FactionRole} is "MEMBER":
  871. set {_Role} to "Membro"
  872. if {_FactionRole} is "RECRUIT":
  873. set {_Role} to "Recruta"
  874. if {_FactionRole} is "LEADER":
  875. set {_RoleY} to "##"
  876. if {_FactionRole} is "OFFICER":
  877. set {_RoleY} to "*"
  878. if {_FactionRole} is "MEMBER":
  879. set {_RoleY} to "+"
  880. if {_FactionRole} is "RECRUIT":
  881. set {_RoleY} to "-"
  882. if {_Faction} is "null":
  883. send " %{_Tag}% &e%player%"
  884. else:
  885. send " %{_Tag}% &e%{_FactionTag}% %{_RoleY}%%player%"
  886. send ""
  887. send "&fPoder: &7%{_FactionPower}%/%{_FactionMaxPower}%"
  888. if {_Faction} is "null":
  889. send "&fFacção: &7Nenhuma"
  890. else:
  891. send "&fFacção: &7%{_FactionTag}% - %{_Faction}%"
  892. if {_FactionRole} is "null":
  893. send "&fCargo: &7Nenhum"
  894. else:
  895. send "&fCargo: &7%{_RoleY}%%{_Role}%"
  896. send "&fKDR: &70.0"
  897. send "&fAbates: &7%{_Abates}%"
  898. send "&fMortes: &7%{_Mortes}%"
  899. send "&fGuerras ganhas: &7%{_Wins}%"
  900. if {_isOnline} is "Online":
  901. send "&fStatus: &aOnline"
  902. if {_IsOnline} is "Offline":
  903. send "&fStauts: &cOffline"
  904. if {_Tag} is "" or "&3[Campeão]" or "&5[Herói]" or "&2[Lendário]" or "&4[Supremo]" or "&b[Imperador]":
  905. send "&fÚltimo login: &7%{_LastDate}%"
  906. send ""
  907. if arg 1 is "info":
  908. if arg 2 isn't set:
  909. if sender is console:
  910. send "&cUtilize /f info <facção=tag>."
  911. stop
  912. else:
  913. if {_Faction} is "null":
  914. send "&cOps! Aparentemente você não possui nenhuma facção!"
  915. stop
  916. else:
  917. send ""
  918. send " &e%{_FactionTag}% - %{_Faction}%"
  919. send "&2Terras/&4Poder&2/&4Poder máximo&2: &7"
  920. loop {FactionList::*}:
  921. set {_FactionFactionV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  922. set {_FactionRoleV} to value "%loop-value%.FactionRole" get of "plugins/Factions/data.yml"
  923. if {_FactionFactionV} is equal to {_FactionTag}:
  924. if {_FactionRoleV} is "LEADER":
  925. set {_Leader} to loop-value
  926. send "&2Líder: &7%{_Leader}%"
  927. loop {FactionList::*}:
  928. set {_FactionFactionV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  929. if {_FactionFactionV} is {_FactionTag}:
  930. add 1 to {_m}
  931. loop all players:
  932. set {_FactionFactionL} to value "%loop-player%.FactionTag" get of "plugins/Factions/data.yml"
  933. if {_FactionFactionL} is equal to {_FactionTag}:
  934. set {_FactionRoleL} to value "%loop-player%.FactionRole" get of "plugins/Factions/data.yml"
  935. if {_FactionRoleL} is "LEADER":
  936. set {_mrole} to "##"
  937. if {_FactionRoleL} is "OFFICER":
  938. set {_mrole} to "*"
  939. if {_FactionRoleL} is "MEMBER":
  940. set {_mrole} to "+"
  941. if {_FactionRoleL} is "RECRUIT":
  942. set {_mrole} to "-"
  943. add 1 to {_mon}
  944. add "%{_mrole}%%loop-player%" to {_monl::*}
  945. send "&2Membros: &7%{_m}%"
  946. send "&2Membros online: &7%{_mon}%"
  947. send " &7%{_monl::*}%"
  948. send "&2Banco: &70"
  949. send "&2KDR: &70.0"
  950. send "&2Abates: &70"
  951. send "&2Mortes: &70"
  952. set {_FactionAlly} to value "Faction.Ally" get of "plugins/Factions/faction-%{_FactionTag}%.yml"
  953. if {_FactionAlly} is "null":
  954. send "&2Aliados: &7Nenhum"
  955. else:
  956. send "&2Aliados: &7%{_FactionAlly}%"
  957. set {_FactionEnemy} to value "Faction.Enemy" get of "plugins/Factions/faction-%{_FactionTag}%.yml"
  958. if {_FactionEnemy} is "null":
  959. send "&2Inimigos: &7Nenhum"
  960. else:
  961. send "&2Inimigos: &7%{_FactionEnemy}%"
  962. send "&eBatalhas:"
  963. set {_FactionWins} to value "Faction.Wins" get of "plugins/Factions/faction-%{_FactionTag}%.yml"
  964. set {_FactionLoses} to value "Faction.Loses" get of "plugins/Factions/faction-%{_FactionTag}%.yml"
  965. set {_FactionKills} to value "Faction.Kills" get of "plugins/Factions/faction-%{_FactionTag}%.yml"
  966. set {_FactionDeaths} to value "Faction.Deaths" get of "plugins/Factions/faction-%{_FactionTag}%.yml"
  967. send " &2Vitórias: &7%{_FactionWins}%"
  968. send " &2Derrotas: &7%{_FactionLoses}%"
  969. send " &2Abates: &7%{_FactionKills}%"
  970. send " &2Mortes: &7%{_FactionDeaths}%"
  971. else:
  972. if file "plugins/Factions/faction-%arg 2%.yml" exists:
  973. loop {FactionList::*}:
  974. set {_FactionFactionV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  975. set {_FactionV} to value "%loop-value%.Faction" get of "plugins/Factions/data.yml"
  976. set {_FactionRoleV} to value "%loop-value%.FactionRole" get of "plugins/Factions/data.yml"
  977. if {_FactionFactionV} is equal to arg 2:
  978. if {_FactionRoleV} is "LEADER":
  979. set {_Leader} to loop-value
  980. set {_Tag} to "%{_FactionFactionV}%"
  981. set {_Name} to "%{_FactionV}%"
  982. send ""
  983. send " &e%{_Tag}% - %{_Name}%"
  984. send "&2Terras/&4Poder&2/&4Poder máximo&2: &7"
  985. send "&2Líder: &7%{_Leader}%"
  986. if {_FactionFactionV} is equal to arg 2:
  987. add 1 to {_m}
  988. loop all players:
  989. set {_FactionFactionL} to value "%loop-player%.FactionTag" get of "plugins/Factions/data.yml"
  990. if {_FactionFactionL} is equal to arg 2:
  991. set {_FactionRoleL} to value "%loop-player%.FactionRole" get of "plugins/Factions/data.yml"
  992. if {_FactionRoleL} is "LEADER":
  993. set {_mrole} to "##"
  994. if {_FactionRoleL} is "OFFICER":
  995. set {_mrole} to "*"
  996. if {_FactionRoleL} is "MEMBER":
  997. set {_mrole} to "+"
  998. if {_FactionRoleL} is "RECRUIT":
  999. set {_mrole} to "-"
  1000. add 1 to {_mon}
  1001. add "%{_mrole}%%loop-player%" to {_monll::*}
  1002. send "&2Membros: &7%{_m}%"
  1003. if {_mon} isn't set:
  1004. send "&2Membros online: &70"
  1005. else:
  1006. set {_mensagem} to "%{_monll::*}%"
  1007. replace "and " with " " in {_mensagem}
  1008. replace ", " with " " in {_mensagem}
  1009. send "&2Membros online: &7%{_mon}%"
  1010. send " &7%{_mensagem}%"
  1011. send "&2Banco: &70"
  1012. send "&2KDR: &70.0"
  1013. send "&2Abates: &70"
  1014. send "&2Mortes: &70"
  1015. set {_FactionAlly} to value "Faction.Ally" get of "plugins/Factions/faction-%arg 2%.yml"
  1016. if {_FactionAlly} is "null":
  1017. send "&2Aliados: &7Nenhum"
  1018. else:
  1019. send "&2Aliados: &7%{_FactionAlly}%"
  1020. set {_FactionEnemy} to value "Faction.Enemy" get of "plugins/Factions/faction-%arg 2%.yml"
  1021. if {_FactionEnemy} is "null":
  1022. send "&2Inimigos: &7Nenhum"
  1023. else:
  1024. send "&2Inimigos: &7%{_FactionEnemy}%"
  1025. send "&eBatalhas:"
  1026. set {_FactionWins} to value "Faction.Wins" get of "plugins/Factions/faction-%arg 2%.yml"
  1027. set {_FactionLoses} to value "Faction.Loses" get of "plugins/Factions/faction-%arg 2%.yml"
  1028. set {_FactionKills} to value "Faction.Kills" get of "plugins/Factions/faction-%arg 2%.yml"
  1029. set {_FactionDeaths} to value "Faction.Deaths" get of "plugins/Factions/faction-%arg 2%.yml"
  1030. send " &2Vitórias: &7%{_FactionWins}%"
  1031. send " &2Derrotas: &7%{_FactionLoses}%"
  1032. send " &2Abates: &7%{_FactionKills}%"
  1033. send " &2Mortes: &7%{_FactionDeaths}%"
  1034. else:
  1035. send "&cFacção não encontrada!"
  1036. stop
  1037. if arg 1 is "desfazer":
  1038. if {_Faction} is "null":
  1039. send "&cVocê não tem permissão para executar este comando."
  1040. else:
  1041. if arg 2 isn't set:
  1042. if {_FactionRole} is "LEADER":
  1043. open chest with 3 rows named "Confirmação" to player
  1044. format slot 11 of player with light green wool named "&aAceitar (Leia abaixo)" with lore "&7Tem certeza que deseja terminar a facção %{_Faction}%?" to close then run [make player execute command "/f desfazer confirm"]
  1045. format slot 15 of player with red wool named "&cNegar" with lore "&7Cancelar esta operação." to close
  1046. if {_FactionRole} is "OFFICER" or "MEMBER" or "RECRUIT":
  1047. send "&cVocê não tem permissão para executar este comando."
  1048. if arg 2 is "confirm":
  1049. delete yml nodes "Terras.%{_FactionTag}%" from file "plugins/Factions/claimdata.yml"
  1050. send "&aA facção %{_Faction}% foi terminada com sucesso!"
  1051. delete yml list "Geradores.%{_FactionTag}%" from file "plugins/Factions/geradoresdata.yml"
  1052. remove {_FactionTag} from {FactionsList::*}
  1053. remove {_Faction} from {FactionsNameList::*}
  1054. delete file "plugins/Factions/faction-%{_FactionTag}%.yml"
  1055. set "%player%.Faction" to "null" in yml file "plugins/Factions/data.yml"
  1056. set "%player%.FactionRole" to "null" in yml file "plugins/Factions/data.yml"
  1057. set "%player%.FactionTag" to "null" in yml file "plugins/Factions/data.yml"
  1058. loop {FactionList::*}:
  1059. set {_FactionTagL} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  1060. if {_FactionTagL} is equal to {_FactionTag}:
  1061. set "%loop-value%.Faction" to "null" in yml file "plugins/Factions/data.yml"
  1062. set "%loop-value%.FactionRole" to "null" in yml file "plugins/Factions/data.yml"
  1063. set "%loop-value%.FactionTag" to "null" in yml file "plugins/Factions/data.yml"
  1064. if arg 1 is "criar":
  1065. if arg 2 isn't set:
  1066. send "&cUtilize /f criar <tag> <nome>"
  1067. stop
  1068. if arg 2 is set:
  1069. if arg 3 isn't set:
  1070. send "&cUtilize /f criar <tag> <nome>."
  1071. stop
  1072. if arg 3 is set:
  1073. set {_Faction} to value "%player%.Faction" get of "plugins/Factions/data.yml"
  1074. if {_Faction} isn't "null":
  1075. send "&cVocê não tem permissão para usar este comando."
  1076. stop
  1077. else:
  1078. set {_l} to length of the arg-2
  1079. set {_l2} to length of the arg-3
  1080. set {_Tag} to "%arg 2%"
  1081. replace "a" with "A" in {_Tag}
  1082. replace "b" with "B" in {_Tag}
  1083. replace "c" with "C" in {_Tag}
  1084. replace "d" with "D" in {_Tag}
  1085. replace "e" with "E" in {_Tag}
  1086. replace "f" with "F" in {_Tag}
  1087. replace "g" with "G" in {_Tag}
  1088. replace "h" with "H" in {_Tag}
  1089. replace "i" with "I" in {_Tag}
  1090. replace "j" with "J" in {_Tag}
  1091. replace "k" with "K" in {_Tag}
  1092. replace "l" with "L" in {_Tag}
  1093. replace "m" with "M" in {_Tag}
  1094. replace "n" with "N" in {_Tag}
  1095. replace "o" with "O" in {_Tag}
  1096. replace "p" with "P" in {_Tag}
  1097. replace "q" with "Q" in {_Tag}
  1098. replace "r" with "R" in {_Tag}
  1099. replace "s" with "S" in {_Tag}
  1100. replace "t" with "T" in {_Tag}
  1101. replace "u" with "U" in {_Tag}
  1102. replace "v" with "V" in {_Tag}
  1103. replace "w" with "W" in {_Tag}
  1104. replace "x" with "X" in {_Tag}
  1105. replace "y" with "Y" in {_Tag}
  1106. replace "z" with "Z" in {_Tag}
  1107. if {_l} is more than 3:
  1108. send "&cA tag da facção deve conter 3 caracteres."
  1109. stop
  1110. if {_l} is less than 3:
  1111. send "&cA tag da facção deve conter 3 caracteres."
  1112. stop
  1113. if {_l2} is more than 20:
  1114. send "&cO nome de sua facção deve conter de 5 a 20 caracteres."
  1115. stop
  1116. if {_l2} is less than 5:
  1117. send "&cO nome de sua facção deve conter de 5 a 20 caracteres."
  1118. stop
  1119. loop {FactionsList::*}:
  1120. if loop-value is "%arg 2%":
  1121. send "&cOps! Já existe outra facção utilizando a tag ""%arg 2%""."
  1122. stop
  1123. loop {FactionsNameList::*}:
  1124. if loop-value is "%arg 3%":
  1125. send "&cJá existe outra facção utilizando o nome ""%arg 3%""."
  1126. stop
  1127. if arg-2 contain "a" or "b" or "c" or "d" or "e" or "f" or "g" or "h" or "i" or "j" or "k" or "l" or "m" or "n" or "o" or "p" or "q" or "r" or "s" or "t" or "u" or "v" or "w" or "x" or "y" or "z" or "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9":
  1128. if arg-3 contain "a" or "b" or "c" or "d" or "e" or "f" or "g" or "h" or "i" or "j" or "k" or "l" or "m" or "n" or "o" or "p" or "q" or "r" or "s" or "t" or "u" or "v" or "w" or "x" or "y" or "z" or "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9":
  1129. add "%{_Tag}%" to {FactionsList::*}
  1130. add "%arg 3%" to {FactionsNameList::*}
  1131. set "%player%.Faction" to "%arg 3%" in yml file "plugins/Factions/data.yml"
  1132. set "%player%.FactionRole" to "LEADER" in yml file "plugins/Factions/data.yml"
  1133. set "%player%.FactionTag" to "%{_Tag}%" in yml file "plugins/Factions/data.yml"
  1134. create file "plugins/Factions/faction-%{_Tag}%.yml"
  1135. set yml value "Geradores.%{_Tag}%" from file "plugins/Factions/geradoresdata.yml" to true
  1136. add "FactionGeradores" to yml list "Geradores.%{_Tag}%" from file "plugins/Factions/geradoresdata.yml"
  1137. set "Claims.Quantity" to "0" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1138. set "Claims.Quantity" to "0" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1139. set "location.enabled" to "false" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1140. set "Faction.Ally" to "null" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1141. set "Faction.Neutral" to "null" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1142. set "Faction.Enemy" to "null" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1143. set "Faction.Wins" to "0" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1144. set "Faction.Loses" to "0" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1145. set "Faction.Kills" to "0" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1146. set "Faction.Deaths" to "0" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1147. set "location.x" to "%player's X coordinate%" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1148. set "location.y" to "%player's Y coordinate%" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1149. set "location.z" to "%player's Z coordinate%" in yml file "plugins/Factions/faction-%{_Tag}%.yml"
  1150. send "&eYAY! Sua facção foi criada com sucesso!"
  1151. else:
  1152. send "&cO nome da facção não pode conter caracteres especiais."
  1153. stop
  1154. else:
  1155. send "&cA tag da facção não pode conter caracteres especiais."
  1156. stop
  1157. if arg 1 is "expulsar":
  1158. if arg 2 isn't set:
  1159. send "&cUtilize /f expulsar <jogador>."
  1160. stop
  1161. else:
  1162. if {_Faction} is "null":
  1163. send "&cVocê não tem permissão para executar este comando."
  1164. stop
  1165. if {_FactionRole} is "LEADER" or "OFFICER":
  1166. set {_NickNameA} to value "%arg 2%.NickName" get of "plugins/Factions/data.yml"
  1167. set {_isOnlineA} to value "%arg 2%.isOnline" get of "plugins/Factions/data.yml"
  1168. set {_FactionPowerA} to value "%arg 2%.FactionPower" get of "plugins/Factions/data.yml"
  1169. set {_FactionA} to value "%arg 2%.Faction" get of "plugins/Factions/data.yml"
  1170. set {_FactionRoleA} to value "%arg 2%.FactionRole" get of "plugins/Factions/data.yml"
  1171. set {_FactionTagA} to value "%arg 2%.FactionTag" get of "plugins/Factions/data.yml"
  1172. set {_FactionMaxPowerA} to value "%arg 2%.FactionMaxPower" get of "plugins/Factions/data.yml"
  1173. set {_AbatesA} to value "%arg 2%.Mortes" get of "plugins/Factions/data.yml"
  1174. set {_MortesA} to value "%arg 2%.Abates" get of "plugins/Factions/data.yml"
  1175. if {_IsOnlineA} is "Online" or "Offline":
  1176. if arg 2 is player:
  1177. send "&cErrr.. Você não pode se auto-expulsar de sua facção!"
  1178. stop
  1179. if {_FactionA} is equal to {_Faction}:
  1180. if {_FactionRoleA} is "LEADER":
  1181. set {_RoleA} to "##Líder"
  1182. if {_FactionRoleA} is "OFFICER":
  1183. set {_RoleA} to "*Capitão"
  1184. if {_FactionRoleA} is "MEMBER":
  1185. set {_RoleA} to "+Membro"
  1186. if {_FactionRoleA} is "RECRUIT":
  1187. set {_RoleA} to "-Recruta"
  1188. if {_FactionTagA} is equal to {_FactionTag}:
  1189. open chest with 4 rows named "Confirmação" to player
  1190. if {_isOnlineA} is "Online":
  1191. set {_Status} to "&aOnline"
  1192. if {_isOnlineA} is "Offline":
  1193. set {_Status} to "&cOffline"
  1194. format slot 13 of player with skull of player named "%arg 2%" with lore " ||&fPoder: &7%{_FactionPowerA}%/%{_FactionMaxPowerA}%||&fCargo: &7%{_RoleA}%||&fKDR: &70.0||&fAbates: &7%{_AbatesA}%||&fMortes: &7%{_MortesA}%||&fStatus: &7%{_Status}%||&fÚltimo login: &7" to be unstealable
  1195. format slot 20 of player with light green wool named "&aAceitar (leia abaixo)" with lore "&cDeseja remover %arg 2%?" to close then run [make player execute command "/f expulsar %arg 2% confirm"]
  1196. format slot 24 of player with red wool named "&cNegar" to close
  1197. if arg 3 is "confirm":
  1198. set "%arg 2%.Faction" to "null" in yml file "plugins/Factions/data.yml"
  1199. set "%arg 2%.FactionRole" to "null" in yml file "plugins/Factions/data.yml"
  1200. set "%arg 2%.FactionTag" to "null" in yml file "plugins/Factions/data.yml"
  1201. loop all players:
  1202. if loop-player is arg 2:
  1203. set {_Player} to loop-player
  1204. send "&aO jogador ""%{_Player}%"" foi expulso de sua facção!"
  1205. else:
  1206. send "&cEsse jogador não faz parte da sua facção."
  1207. stop
  1208. else:
  1209. send "&cEste usuário não existe."
  1210. stop
  1211. else:
  1212. send "&cVocê não tem permissão para executar este comando."
  1213. stop
  1214. if arg 1 is "sair":
  1215. if {_Faction} is "null":
  1216. send "&cVocê não tem permissão para executar este comando."
  1217. else:
  1218. if {_FactionRole} is "LEADER":
  1219. send "&cO líder da facção não pode abandoná-la. Caso queira deletá-la, utilize /f desfazer."
  1220. stop
  1221. if {_FactionRole} is "OFFICER" or "MEMBER" or "RECRUIT":
  1222. if arg 2 isn't set:
  1223. open chest with 3 rows named "Confirmação" to player
  1224. format slot 11 of player with light green wool named "&aAceitar (Leia abaixo)" with lore "&7Tem certeza que deseja abandonar a facção %{_Faction}%?" to close then run [make player execute command "/f sair confirm"]
  1225. format slot 15 of player with red wool named "&cNegar" with lore "&7Cancelar esta operação." to close
  1226. if arg 2 is "confirm":
  1227. loop all players:
  1228. set {_FactionA} to value "%loop-player%.Faction" get of "plugins/Factions/data.yml"
  1229. if {_FactionA} is equal to {_Faction}:
  1230. send "&a%player% deixou de fazer parte de sua facção." to loop-player
  1231. send "&aVocê abandonou a facção [%{_FactionTag}%] %{_Faction}%."
  1232. set "%player%.Faction" to "null" in yml file "plugins/Factions/data.yml"
  1233. set "%player%.FactionRole" to "null" in yml file "plugins/Factions/data.yml"
  1234. set "%player%.FactionTag" to "null" in yml file "plugins/Factions/data.yml"
  1235. if arg 1 is "transferir":
  1236. if arg 2 isn't set:
  1237. send "&cUtilize /f transferir <jogador>."
  1238. else:
  1239. if arg 2 is player:
  1240. send "&cVocê não pode alterar seu próprio cargo."
  1241. stop
  1242. set {_FactionA} to value "%arg 2%.Faction" get of "plugins/Factions/data.yml"
  1243. set {_isOnlineA} to value "%arg 2%.isOnline" get of "plugins/Factions/data.yml"
  1244. if {_IsOnlineA} is "Online" or "Offline":
  1245. if {_FactionA} is equal to {_Faction}:
  1246. if {_Faction} is "null":
  1247. send "&cVocê não tem permissão para executar este comando."
  1248. stop
  1249. else:
  1250. if {_FactionRole} is "LEADER":
  1251. loop all players:
  1252. if loop-player is arg 2:
  1253. set {_NewLeader} to loop-player
  1254. send "&aVocê transferiu a liderança da [%{_FactionTag}%] %{_Faction}% para %{_NewLeader}%."
  1255. loop all players:
  1256. set {_FactionL} to value "%loop-player%.Faction" get of "plugins/Factions/data.yml"
  1257. if {_FactionL} is equal to {_Faction}:
  1258. send "&aAgora o líder da facção é %arg 2% , deem parabéns a ele!" to loop-player
  1259. set "%player%.FactionRole" to "RECRUIT" in yml file "plugins/Factions/data.yml"
  1260. set "%arg 2%.FactionRole" to "LEADER" in yml file "plugins/Factions/data.yml"
  1261. else:
  1262. send "&cVocê não tem permissão para executar este comando."
  1263. else:
  1264. send "&cEste jogador não faz parte da sua facção."
  1265. stop
  1266. else:
  1267. send "&cEste usuário não existe."
  1268. stop
  1269. if arg 1 is "rebaixar":
  1270. if arg 2 isn't set:
  1271. send "&cUtilize /f rebaixar <jogador>."
  1272. else:
  1273. if arg 2 is player:
  1274. send "&cVocê não pode alterar seu próprio cargo."
  1275. stop
  1276. if {_FactionRole} is "LEADER" or "OFFICER":
  1277. set {_FactionA} to value "%arg 2%.Faction" get of "plugins/Factions/data.yml"
  1278. set {_FactionRoleA} to value "%arg 2%.FactionRole" get of "plugins/Factions/data.yml"
  1279. set {_isOnlineA} to value "%arg 2%.isOnline" get of "plugins/Factions/data.yml"
  1280. if {_IsOnlineA} is "Online" or "Offline":
  1281. if {_FactionA} is equal to {_Faction}:
  1282. if {_FactionRole} is "LEADER":
  1283. if {_FactionRoleA} is "RECRUIT":
  1284. send "&cVocê não pode alterar o cargo desse jogador porque ele já é Recruta."
  1285. send "&cUse /f expulsar <jogador> se deseja expulsá-lo de sua facção."
  1286. stop
  1287. if {_FactionRoleA} is "MEMBER":
  1288. set "%arg 2%.FactionRole" to "RECRUIT" in yml file "plugins/Factions/data.yml"
  1289. send "&aJogador rebaixado para Recruta."
  1290. stop
  1291. if {_FactionRoleA} is "OFFICER":
  1292. set "%arg 2%.FactionRole" to "MEMBER" in yml file "plugins/Factions/data.yml"
  1293. send "&aJogador rebaixado para Membro."
  1294. stop
  1295. if {_FactionRole} is "OFFICER":
  1296. if {_FactionRoleA} is "RECRUIT":
  1297. send "&cVocê não pode alterar o cargo desse jogador porque ele já é Recruta."
  1298. send "&cUse /f expulsar <jogador> se deseja expulsa-lo de sua facção."
  1299. stop
  1300. if {_FactionRoleA} is "MEMBER":
  1301. set "%arg 2%.FactionRole" to "RECRUIT" in yml file "plugins/Factions/data.yml"
  1302. send "&aJogador rebaixado para Recruta."
  1303. stop
  1304. if {_FactionRoleA} is "OFFICER":
  1305. send "&cO jogador possui cargo igual ou superior ao seu."
  1306. stop
  1307. else:
  1308. send "&cEste jogador não existe ou não faz parte da sua facção."
  1309. stop
  1310. else:
  1311. send "&cEste usuário não existe."
  1312. if arg 1 is "promover":
  1313. if arg 2 isn't set:
  1314. send "&cUtilize /f promover <jogador>."
  1315. else:
  1316. if arg 2 is player:
  1317. send "&cVocê não pode alterar seu próprio cargo."
  1318. stop
  1319. if {_FactionRole} is "LEADER" or "OFFICER":
  1320. set {_FactionA} to value "%arg 2%.Faction" get of "plugins/Factions/data.yml"
  1321. set {_FactionRoleA} to value "%arg 2%.FactionRole" get of "plugins/Factions/data.yml"
  1322. set {_isOnlineA} to value "%arg 2%.isOnline" get of "plugins/Factions/data.yml"
  1323. if {_IsOnlineA} is "Online" or "Offline":
  1324. if {_FactionA} is equal to {_Faction}:
  1325. if {_FactionRole} is "LEADER":
  1326. if {_FactionRoleA} is "RECRUIT":
  1327. set "%arg 2%.FactionRole" to "MEMBER" in yml file "plugins/Factions/data.yml"
  1328. send "&aJogador promovido a Membro da facção."
  1329. loop all players:
  1330. if loop-player is arg 2:
  1331. send "&aVocê foi promovido a Membro da facção."
  1332. stop
  1333. if {_FactionRoleA} is "MEMBER":
  1334. set "%arg 2%.FactionRole" to "OFFICER" in yml file "plugins/Factions/data.yml"
  1335. send "&aJogador promovido a Capitão da facção."
  1336. loop all players:
  1337. if loop-player is arg 2:
  1338. send "&aVocê foi promovido a Capitão da facção."
  1339. stop
  1340. if {_FactionRoleA} is "OFFICER":
  1341. send "&cO cargo informado não pode ser igual ou superior ao seu."
  1342. stop
  1343. if {_FactionRole} is "OFFICER":
  1344. if {_FactionRoleA} is "RECRUIT":
  1345. set "%arg 2%.FactionRole" to "MEMBER" in yml file "plugins/Factions/data.yml"
  1346. send "&aJogador promovido a Membro da facção."
  1347. loop all players:
  1348. if loop-player is arg 2:
  1349. send "&aVocê foi promovido a Membro da facção."
  1350. stop
  1351. if {_FactionRoleA} is "MEMBER":
  1352. send "&cO cargo informado não pode ser igual ou superior ao seu."
  1353. stop
  1354. if {_FactionRoleA} is "OFFICER":
  1355. send "&cO jogador possui cargo igual ou superior ao seu."
  1356. stop
  1357. else:
  1358. send "&cEste jogador não existe ou não faz parte da sua facção."
  1359. stop
  1360. else:
  1361. send "&cEste usuário não existe."
  1362. stop
  1363. else:
  1364. send "&cVocê não tem permissão para executar este comando."
  1365. stop
  1366. if arg 1 is "dominar":
  1367. if world of player is "mine-1":
  1368. stop
  1369. if arg 2 is "warzone":
  1370. if {_Admin} is "true":
  1371. set "Terras.%chunk at player%" to "warzone" in yml file "plugins/Factions/claimdata.yml"
  1372. send "&aVocê dominou esta terra com sucesso!"
  1373. stop
  1374. else:
  1375. send "&cVocê não tem permissão para executar este comando."
  1376. stop
  1377. if arg 2 is "safezone":
  1378. if {_Admin} is "true":
  1379. set "Terras.%chunk at player%" to "safezone" in yml file "plugins/Factions/claimdata.yml"
  1380. send "&aVocê dominou esta terra com sucesso!"
  1381. stop
  1382. else:
  1383. send "&cVocê não tem permissão para executar este comando."
  1384. stop
  1385. set {_Claim} to value "Terras.%chunk at player%" get of "plugins/Factions/claimdata.yml"
  1386. loop {FactionList::*}:
  1387. set {_FactionTagV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  1388. if {_FactionTagV} is equal to {_FactionTag}:
  1389. set {_PoderV} to value "%loop-value%.FactionPower" get of "plugins/Factions/data.yml"
  1390. set {_PoderV} to {_PoderV} parsed as integer
  1391. add {_PoderV} to {_TotalPower}
  1392. set {_FactionClaims} to value "Claims.Quantity" get of "plugins/Factions/faction-%{_FactionTag}%.yml"
  1393. set {_FactionClaims} to {_FactionClaims} parsed as integer
  1394. if {_FactionClaims} is {_TotalPower}:
  1395. send "&cSua facção não tem poder suficiente para dominar esta terra."
  1396. stop
  1397. #send "&cAs seguintes facções estão próximas: %{_ClaimA}%. Portanto não foi possível dominar esta terra."
  1398. if {_Claim} is "safezone":
  1399. send "&cVocê não pode dominar Zona Protegida"
  1400. stop
  1401. if {_Claim} is "warzone":
  1402. send "&cVocê não pode dominar Zona de Guerra"
  1403. stop
  1404. if {_Faction} is "null":
  1405. send "&cVocê não tem permissão para executar este comando."
  1406. stop
  1407. else:
  1408. if {_Claim} is set:
  1409. if {_Claim} isn't "%{_FactionTag}%":
  1410. loop {FactionList::*}:
  1411. set {_FactionTagV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  1412. if {_FactionTagV} is equal to {_Claim}:
  1413. set {_FactionV} to value "%loop-value%.Faction" get of "plugins/Factions/data.yml"
  1414. send "&eOps! A facção &e[%{_Claim}%] %{_FactionV}% possui poder suficiente para manter esta terra."
  1415. stop
  1416. if {_Claim} is "%{_FactionTag}%":
  1417. send "&aEsta terra já está dominada por sua facção!"
  1418. stop
  1419. if {_FactionRole} is "OFFICER" or "LEADER":
  1420. set "Terras.%chunk at player%" to "%{_FactionTag}%" in yml file "plugins/Factions/claimdata.yml"
  1421. set {_FactionClaims} to value "Claims.Quantity" get of "plugins/Factions/faction-%{_Claim}%.yml"
  1422. set {_FactionClaims} to {_FactionClaims} parsed as integer
  1423. add 1 to {_FactionClaims}
  1424. set "Claims.Quantity" to "%{_FactionClaims}%" in yml file "plugins/Factions/faction-%{_Claim}%.yml"
  1425. send "&aVocê dominou esta terra com sucesso!"
  1426. if {_FactionRole} is "MEMBER" or "RECRUIT":
  1427. send "&cVocê não tem permissão para executar este comando."
  1428. stop
  1429. if arg 1 is "proteger":
  1430. set {_Claim} to value "Terras.%chunk at player%" get of "plugins/Factions/claimdata.yml"
  1431. if {_Faction} is "null":
  1432. send "&cVocê não tem permissão para executar este comando."
  1433. stop
  1434. else:
  1435. if arg 2 isn't set:
  1436. if {_Claim} is "%{_FactionTag}%":
  1437. send "&aVocê só pode dominar terrenos livres"
  1438. stop
  1439. if {_Claim} is set:
  1440. if {_Claim} isn't "%{_FactionTag}%":
  1441. send "&aVocê só pode dominar terrenos livres"
  1442. stop
  1443. else:
  1444. open chest with 4 rows named "Confirmação" to player
  1445. format slot 13 of player with grass named "Deseja proteger este terreno?" to be unstealable
  1446. format slot 20 of player with light green wool named "&aAceitar (leia abaixo)" with lore "&cSerá cobrado 20.000 coins de você." to close then run [make player execute command "/f proteger confirm"]
  1447. format slot 24 of player with red wool named "&cNegar" to close then run [make player execute command "/f proteger cancel"]
  1448. if arg 2 is "cancel":
  1449. play "VILLAGER_NO" to player at volume 0.2
  1450. send "&cTentativa de proteção cancelada"
  1451. if arg 2 is "confirm":
  1452. set {_x} to player's x-coordinate
  1453. set {_y} to player's y-coordinate
  1454. set {_z} to player's z-coordinate
  1455. set {_loc.x} to {_x} parsed as number
  1456. set {_loc.y} to {_y} parsed as number
  1457. set {_loc.z} to {_z} parsed as number
  1458. set {_location} to location ({_loc.x}, {_loc.y}, {_loc.z})
  1459. if {_FactionRole} is "OFFICER" or "LEADER":
  1460. if {_Claim} is "%{_FactionTag}%":
  1461. send "&aVocê só pode dominar terrenos livres"
  1462. stop
  1463. if {_Claim} is set:
  1464. if {_Claim} isn't "%{_FactionTag}%":
  1465. send "&aVocê só pode dominar terrenos livres"
  1466. stop
  1467. if {_Claim} isn't set:
  1468. #http://prntscr.com/hjhvmt
  1469. if player's money >= 20000:
  1470. set "Terras.%chunk at {_location}%" to "%{_FactionTag}%-PROTECTION" in yml file "plugins/Factions/claimdata.yml"
  1471. set "TerrasProtegidas.%chunk at {_location}%" to "%{_location}%" in yml file "plugins/Factions/claimdata.yml"
  1472. set "TerrasProtegidasTimeSeconds.%chunk at {_location}%" to "60" in yml file "plugins/Factions/claimdata.yml"
  1473. set "TerrasProtegidasTimeMinutes.%chunk at {_location}%" to "30" in yml file "plugins/Factions/claimdata.yml"
  1474. set {_ClaimA} to chunk at player
  1475. send "&aVocê protegeu esta terra com sucesso!"
  1476. remove 20000 from player's money
  1477. wait 30 minutes
  1478. delete yml nodes "Terras.%chunk at {_location}%" from file "plugins/Factions/claimdata.yml"
  1479. delete yml nodes "TerrasProtegidas.%chunk at {_location}%" from file "plugins/Factions/claimdata.yml"
  1480. delete yml nodes "TerrasProtegidasTimeSeconds.%chunk at {_location}%" from file "plugins/Factions/claimdata.yml"
  1481. delete yml nodes "TerrasProtegidasTimeMinutes.%chunk at {_location}%" from file "plugins/Factions/claimdata.yml"
  1482. else:
  1483.  
  1484. send "&cSaldo insuficiente para proteger este terreno."
  1485. stop
  1486. if {_FactionRole} is "MEMBER" or "RECRUIT":
  1487. send "&cVocê não tem permissão para executar este comando."
  1488. stop
  1489. if arg 1 is "geradores":
  1490. set {_Geradores::*} to value list "Geradores.%{_FactionTag}%" get of "plugins/Factions/geradoresdata.yml"
  1491. if {_Faction} is "null":
  1492. send "&cVocê não tem permissão para executar este comando."
  1493. stop
  1494. else:
  1495. if arg 2 isn't set:
  1496. if {_FactionRole} is "LEADER" or "OFFICER" or "MEMBER" or "RECRUIT":
  1497. open chest with 6 rows named "[%{_FactionTag}%] Geradores" to player
  1498. format slot 13 of player with empty map named "&aInformações" with lore " ||&fQuantidade atual de geradores: &7|| " to be unstealable
  1499. set {_s} to 28
  1500. loop {_Geradores::*}:
  1501. if loop-value is "FactionGeradores":
  1502. stop
  1503. set {_quantidade::*} to loop-value split at "-"
  1504. set {_quantidadespawners} to {_quantidade::2}
  1505. if loop-value is "Zombie-%{_quantidadespawners}%":
  1506. set {_Name} to "Zumbi"
  1507. set {_NameHead} to "Zombie"
  1508. if loop-value is "MHF_Cow-%{_quantidadespawners}%":
  1509. set {_Name} to "Vaca"
  1510. set {_NameHead} to "MHF_Cow"
  1511. if loop-value is "MHF_Chicken-%{_quantidadespawners}%":
  1512. set {_Name} to "Galinha"
  1513. set {_NameHead} to "MHF_Chicken"
  1514. if loop-value is "MHF_Spider-%{_quantidadespawners}%":
  1515. set {_Name} to "Aranha"
  1516. set {_NameHead} to "MHF_Spider"
  1517. if loop-value is "MHF_Skeleton-%{_quantidadespawners}%":
  1518. set {_Name} to "Esqueleto"
  1519. set {_NameHead} to "MHF_Skeleton"
  1520. if loop-value is "MHF_Slime-%{_quantidadespawners}%":
  1521. set {_Name} to "Slime"
  1522. set {_NameHead} to "MHF_Slime"
  1523. if loop-value is "MHF_Blaze-%{_quantidadespawners}%":
  1524. set {_Name} to "Blaze"
  1525. set {_NameHead} to "MHF_Blaze"
  1526. if loop-value is "MHF_PigZombie-%{_quantidadespawners}%":
  1527. set {_Name} to "Porco Zumbi"
  1528. set {_NameHead} to "MHF_PigZombie"
  1529. if loop-value is "MHF_LavaSlime-%{_quantidadespawners}%":
  1530. set {_Name} to "Cubo de Magma"
  1531. set {_NameHead} to "MHF_LavaSlime"
  1532. if loop-value is "MHF_Golem-%{_quantidadespawners}%":
  1533. set {_Name} to "Golem de Ferro"
  1534. set {_NameHead} to "MHF_Golem"
  1535. if loop-value is "Whiter-%{_quantidadespawners}%":
  1536. set {_Name} to "Whiter"
  1537. set {_NameHead} to "MHF_WSkeleton"
  1538. format slot {_s} of player with skull of ("%{_NameHead}%" parsed as an offline player) named "&e%{_quantidadespawners}% Gerador de %{_name}%." with lore "&fBotão esquerdo: &7Coletar gerador." to be unstealable
  1539. if {_s} is 34:
  1540. set {_s} to 36
  1541. add 1 to {_s}
  1542. if arg 1 is "relacao":
  1543. if arg 2 isn't set:
  1544. send "&cUtilize /f relacao <facção>."
  1545. else:
  1546. if {_Faction} is "null":
  1547. send "&cVocê não tem permissão para executar este comando."
  1548. stop
  1549. if arg 2 is "%{_FactionTag}%" or "%{_Faction}%":
  1550. send "&cNão é possível definir uma relação com a sua própria facção."
  1551. stop
  1552. loop {FactionsList::*}:
  1553. if loop-value is "%arg 2%":
  1554. if arg 3 isn't set:
  1555. open chest with 3 rows named "Relações - %{_FactionTag}% » %arg 2%" to player
  1556. format slot 11 of player with leather chestplate coloured blue named "&aAliada" to run [make player execute command "/f relacao %arg 2% ally"]
  1557. format slot 13 of player with leather chestplate coloured white named "&fNeutra" to run [make player execute command "/f relacao %arg 2% neutral"]
  1558. format slot 15 of player with leather chestplate coloured red named "&cInimiga" to run [make player execute command "/f relacao %arg 2% enemy"]
  1559. stop
  1560. if arg 3 is "enemy":
  1561. loop {FactionList::*}:
  1562. set {_FactionV} to value "%loop-value-2%.Faction" get of "plugins/Factions/data.yml"
  1563. set {_FactionFactionV} to value "%loop-value-2%.FactionTag" get of "plugins/Factions/data.yml"
  1564. set {_FactionRoleV} to value "%loop-value-2%.FactionRole" get of "plugins/Factions/data.yml"
  1565. if {_FactionFactionV} is equal to arg 2:
  1566. if {_FactionRoleV} is "LEADER":
  1567. set {_FactionVV} to {_FactionV}
  1568. send "&aAgora a facção %{_FactionVV}% é Inimiga."
  1569. stop
  1570. if arg 3 is "neutral":
  1571. loop {FactionList::*}:
  1572. set {_FactionV} to value "%loop-value-2%.Faction" get of "plugins/Factions/data.yml"
  1573. set {_FactionFactionV} to value "%loop-value-2%.FactionTag" get of "plugins/Factions/data.yml"
  1574. set {_FactionRoleV} to value "%loop-value-2%.FactionRole" get of "plugins/Factions/data.yml"
  1575. if {_FactionFactionV} is equal to arg 2:
  1576. if {_FactionRoleV} is "LEADER":
  1577. set {_Leader} to loop-value-2
  1578. set {_FactionVV} to {_FactionV}
  1579. set {_isOnlineV} to value "%loop-value-2%.isOnline" get of "plugins/Factions/data.yml"
  1580. if {_isOnlineV} is "Online":
  1581. #agora a facção fac é Aliada.
  1582. send "&aVocê recebeu uma proposta de 'Neutro' da facção %{_Faction}% digite '/f menu' para mais informações." to {_Leader}
  1583. send "&aUm pedido de 'Neutro' foi enviado para %{_FactionVV}%"
  1584. stop
  1585. else:
  1586. send "&cO lider da facção %{_FactionVV}% precisa estar online para aceitar este pedido."
  1587. stop
  1588. if arg 3 is "ally":
  1589. loop {FactionList::*}:
  1590. set {_FactionV} to value "%loop-value-2%.Faction" get of "plugins/Factions/data.yml"
  1591. set {_FactionFactionV} to value "%loop-value-2%.FactionTag" get of "plugins/Factions/data.yml"
  1592. set {_FactionRoleV} to value "%loop-value-2%.FactionRole" get of "plugins/Factions/data.yml"
  1593. if {_FactionFactionV} is equal to arg 2:
  1594. if {_FactionRoleV} is "LEADER":
  1595. set {_Leader} to loop-value-2
  1596. set {_FactionVV} to {_FactionV}
  1597. set {_isOnlineV} to value "%loop-value-2%.isOnline" get of "plugins/Factions/data.yml"
  1598. if {_isOnlineV} is "Online":
  1599. send "&aVocê recebeu uma proposta de 'Aliada' da facção %{_Faction}% digite '/f menu' para mais informações." to {_Leader}
  1600. send "&aUm pedido de 'Aliada' foi enviado para %{_FactionVV}%"
  1601. stop
  1602. else:
  1603. send "&cO lider da facção %{_FactionVV}% precisa estar online para aceitar este pedido."
  1604. stop
  1605. else:
  1606. send "&c%arg 2% não é uma facção existente."
  1607. stop
  1608. if arg 1 is "admin":
  1609. if sender is console:
  1610. send "&cVocê já está no modo desenvolvedor."
  1611. stop
  1612. else:
  1613. if player have permission "faction.admin":
  1614. if {_Admin} is "false":
  1615. set "%player%.Admin" to "true" in yml file "plugins/Factions/data.yml"
  1616. send "&aModo admin ligado."
  1617. stop
  1618. if {_Admin} is "true":
  1619. set "%player%.Admin" to "false" in yml file "plugins/Factions/data.yml"
  1620. send "&cModo admin desligado."
  1621. stop
  1622. else:
  1623. send "&cVocê não tem permissão para usar este comando."
  1624. if arg 1 is "abandonar":
  1625. set {_Claim} to value "Terras.%chunk at player%" get of "plugins/Factions/claimdata.yml"
  1626. if {_Faction} is "null":
  1627. send "&cVocê não tem permissão para executar este comando."
  1628. stop
  1629. else:
  1630. if arg 2 isn't set:
  1631. if {_Claim} is "safezone":
  1632. send "&eEsta terra não pertence a você."
  1633. stop
  1634. if {_Claim} is "warzone":
  1635. send "&eEsta terra não pertence a você."
  1636. stop
  1637. if {_Claim} isn't set:
  1638. send "&eEsta terra não pertence a você."
  1639. stop
  1640. if {_Claim} is set:
  1641. if {_Claim} isn't "%{_FactionTag}%" or "%{_FactionTag}%-PROTECTION":
  1642. send "&eEsta terra não pertence a você."
  1643. stop
  1644. if {_Claim} is set:
  1645. if {_Claim} is "%{_FactionTag}%" or "%{_FactionTag}%-PROTECTION":
  1646. open chest with 4 rows named "Confirmação" to player
  1647. format slot 13 of player with grass named "Deseja abandonar a terra?" to be unstealable
  1648. format slot 20 of player with light green wool named "&aAceitar (leia abaixo)" to close then run [make player execute command "/f abandonar confirm"]
  1649. format slot 24 of player with red wool named "&cNegar" with lore "&7Cancelar esta operação" to close then run [make player execute command "/f abandonar cancel"]
  1650. if arg 2 is "cancel":
  1651. play "VILLAGER_NO" to player at volume 0.2
  1652. if arg 2 is "todas":
  1653. send "&cEste comando está desabilitado temporariamente."
  1654. stop
  1655. if arg 2 is "confirm":
  1656. if {_Admin} is "true":
  1657. if {_Claim} isn't set:
  1658. send "&cA seguinte facção tem imunidade."
  1659. stop
  1660. else:
  1661. send "&aA facção %{_Claim}% perdeu esta terra."
  1662. set {_FactionClaims} to value "Claims.Quantity" get of "plugins/Factions/faction-%{_Claim}%.yml"
  1663. set {_FactionClaims} to {_FactionClaims} parsed as integer
  1664. remove 1 from {_FactionClaims}
  1665. set "Claims.Quantity" to "%{_FactionClaims}%" in yaml file "plugins/Factions/faction-%{_Claim}%.yml"
  1666. delete yml nodes "Terras.%chunk at player%" from file "plugins/Factions/claimdata.yml"
  1667. delete yml nodes "TerrasProtegidas.%chunk at player%" from file "plugins/Factions/claimdata.yml"
  1668. delete yml nodes "TerrasProtegidasTimeSeconds.%chunk at player%" from file "plugins/Factions/claimdata.yml"
  1669. delete yml nodes "TerrasProtegidasTimeMinutes.%chunk at player%" from file "plugins/Factions/claimdata.yml"
  1670. stop
  1671. if {_FactionRole} is "OFFICER" or "LEADER":
  1672. if {_Claim} is "%{_FactionTag}%" or "%{_FactionTag}%-PROTECTION":
  1673. send "&aTerra perdida com sucesso."
  1674. set {_FactionClaims} to value "Claims.Quantity" get of "plugins/Factions/faction-%{_FactionTag}%.yml"
  1675. set {_FactionClaims} to {_FactionClaims} parsed as integer
  1676. remove 1 from {_FactionClaims}
  1677. set "Claims.Quantity" to "%{_FactionClaims}%" in yaml file "plugins/Factions/faction-%{_FactionTag}%.yml"
  1678. delete yml nodes "Terras.%chunk at player%" from file "plugins/Factions/claimdata.yml"
  1679. delete yml nodes "TerrasProtegidas.%chunk at player%" from file "plugins/Factions/claimdata.yml"
  1680. delete yml nodes "TerrasProtegidasTimeSeconds.%chunk at player%" from file "plugins/Factions/claimdata.yml"
  1681. delete yml nodes "TerrasProtegidasTimeMinutes.%chunk at player%" from file "plugins/Factions/claimdata.yml"
  1682. stop
  1683. if {_FactionRole} is "MEMBER" or "RECRUIT":
  1684. send "&cVocê não tem permissão para executar este comando."
  1685. stop
  1686. else:
  1687. if arg 2 isn't "todas":
  1688. send "&a/f abandonar &8- &7Abandonar a terra atual."
  1689. send "&a/f abandonar todas &8- &7Abandona todas as terras da sua facção."
  1690. stop
  1691. if arg 1 is "mapa":
  1692. send ""
  1693. set {_mapX} to 9
  1694. set {_mapY} to 9
  1695. set {_m} to ""
  1696. loop 19 times:
  1697. loop 19 times:
  1698. set {_x} to {_mapX} * 16
  1699. set {_y} to {_mapY} * 16
  1700. set {_chunk} to chunk at block {_y} blocks north {_x} blocks west of player
  1701. set {_Claim} to value "Terras.%{_chunk}%" get of "plugins/Factions/claimdata.yml"
  1702. if {_Claim} isn't set:
  1703. set {_result} to ""
  1704. else:
  1705. set {_result} to "%{_Claim}%"
  1706. if {_chunk} is chunk at player:
  1707. set {_m} to "%{_m}%&e█"
  1708. else if {_result} is {_FactionTag}:
  1709. set {_m} to "%{_m}%&8█"
  1710. else if {_result} is "":
  1711. set {_m} to "%{_m}%&7█"
  1712. else if {_result} is "warzone":
  1713. set {_m} to "%{_m}%&4█"
  1714. else if {_result} is "safezone":
  1715. set {_m} to "%{_m}%&6█"
  1716. else:
  1717. set {_m} to "%{_m}%&f█"
  1718. add -1 to {_mapX}
  1719. send "&l%{_m}%" to player
  1720. set {_m} to ""
  1721. add -1 to {_mapY}
  1722. set {_mapX} to 9
  1723. if arg 1 is "voar":
  1724. set {_Claim} to value "Terras.%chunk at player%" get of "plugins/Factions/claimdata.yml"
  1725. if player have permission "claim.fly":
  1726. if {_FactionTag} isn't "null":
  1727. if {_Claim} is "%{_FactionTag}%":
  1728. if player's fly mode is false:
  1729. set player's fly mode to true
  1730. send "&aModo de voo ativado dentro das suas terras."
  1731. stop
  1732. if player's fly mode is true:
  1733. set player's fly mode to false
  1734. send "&aModo de voo desativado dentro das suas terras."
  1735. stop
  1736. else:
  1737. send "&cVocê precisa estar no terreno de sua facção."
  1738. else:
  1739. send "&cOps! Você precisa ter uma facção para poder voar em seu terreno de sua facção."
  1740. stop
  1741. else:
  1742. send "&cVocê precisa do grupo &2Lendário &cou superior para executar este comando."
  1743.  
  1744. if arg 1 is "ajuda":
  1745. send ""
  1746. send "&2Comandos disponíveis:"
  1747. send ""
  1748. if player have permission "faction.admin":
  1749. send "&a/f admin &8- &7Modo admin."
  1750. send "&a/f aceitar convite <tag> &8- &7Utilize para aceitar convites de facções!"
  1751. send "&a/f convites &8- &7Utilize para ver seus convites de facção."
  1752. send "&a/f criar <tag> <nome> &8- &7Crie sua própria facção."
  1753. send "&a/f geradores &8- &7Utilize para ver o geradores da sua facção."
  1754. send "&a/f info <tag> &8- &7Utilize para ver informações sobre uma facção."
  1755. send "&a/f listar &8- &7Utilize para ver todas as facções online."
  1756. send "&a/f mapa &8- &7Utilize para ver o mapa."
  1757. send "&a/f membros <tag> &8- &7Utilize para listar membros de uma facção."
  1758. send "&a/f perfil <jogador> &8- &7Mostrar as informações de um jogador."
  1759. send "&a/f verterras &8- &7Mostrar delimitações das terras."
  1760. if {_FactionRole} is "LEADER":
  1761. send "&a/f desfazer &8- &7Utilize para terminar sua facção."
  1762. if {_FactionRole} is "LEADER" or "OFFICER":
  1763. send "&a/f convidar <jogador> &8- &7Utilize para enviar convites de facções."
  1764. send "&a/f dominar &8- &7Utilize para dominar uma terra."
  1765. send "&a/f expulsar <jogador> &8- &7Utilize para expulsar membros de sua facção."
  1766. send "&a/f promover <jogador> &8- &7Promove o jogador de cargo."
  1767. send "&a/f proteger &8- &7Utilize para proteger um terreno temporariamente."
  1768. send "&a/f rebaixar <jogador> &8- &7Demover um jogador."
  1769. send "&a/f relacao <facção> &8- &7Gerenciar relação com outras facções."
  1770. send "&a/f sair &8- &7Utilize para abandonar sua facção."
  1771. send "&a/f transferir <jogador> &8- &7Transfere a liderança da facção para outro jogador."
  1772. if {_FactionTag} isn't "null":
  1773. send "&a/f voar &8- &7Habilite ou desabilite voar nos seus terrenos."
  1774. if arg 1 isn't "voar" or "base" or "convidarmenugui1177" or "aceitar" or "admin" or "convites" or "criar" or "info" or "listar" or "mapa" or "membros" or "perfil" or "verterras" or "desfazer" or "convidar" or "dominar" or "expulsar" or "promover" or "proteger" or "rebaixar" or "relacao" or "sair" or "transferir" or "abandonar" or "ajuda":
  1775. if sender is console:
  1776. send "&cNão há esta opção na versão de desenvolvedor, utilize /f ajuda."
  1777. else:
  1778. set {_Claim} to value "Terras.%chunk at player%" get of "plugins/Factions/claimdata.yml"
  1779. set {_Owner} to value "TerrasProtegidas.%chunk at player%" get of "plugins/Factions/claimdata.yml"
  1780. set {_Seconds} to value "TerrasProtegidasTimeSeconds.%chunk at player%" get of "plugins/Factions/claimdata.yml"
  1781. set {_Minutes} to value "TerrasProtegidasTimeMinutes.%chunk at player%" get of "plugins/Factions/claimdata.yml"
  1782. set {_GroupA} to value "%arg 1%.Group" get of "plugins/Factions/data.yml"
  1783. if player have permission "master.group":
  1784. set {_Tag} to "&6[Master] "
  1785. if player have permission "gerente.group":
  1786. set {_Tag} to "&4[Gerente] "
  1787. if player have permission "admin.group":
  1788. set {_Tag} to "&c[Admin] "
  1789. if player have permission "moderador.group":
  1790. set {_Tag} to "&2[Moderador] "
  1791. if player have permission "ajudante.group":
  1792. set {_Tag} to "&e[Ajudante] "
  1793. if player have permission "imperador.group":
  1794. set {_Tag} to "&b[Imperador] "
  1795. if player have permission "supremo.group":
  1796. set {_Tag} to "&4[Supremo] "
  1797. if player have permission "lendario.group":
  1798. set {_Tag} to "&2[Lendário] "
  1799. if player have permission "heroi.group":
  1800. set {_Tag} to "&5[Herói] "
  1801. if player have permission "campeao.group":
  1802. set {_Tag} to "&3[Campeão] "
  1803. if player have permission "default.group":
  1804. set {_Tag} to "&7"
  1805. if {_GroupA} is "Master":
  1806. set {_TagA} to "&6[Master] "
  1807. if {_GroupA} is "Gerente":
  1808. set {_TagA} to "&4[Gerente] "
  1809. if {_GroupA} is "Admin":
  1810. set {_TagA} to "&c[Admin] "
  1811. if {_GroupA} is "Moderador":
  1812. set {_TagA} to "&2[Moderador] "
  1813. if {_GroupA} is "Ajudante":
  1814. set {_TagA} to "&e[Ajudante] "
  1815. if {_GroupA} is "Youtuber":
  1816. set {_TagA} to "&c[YT] "
  1817. if {_GroupA} is "Imperador":
  1818. set {_TagA} to "&b[Imperador] "
  1819. if {_GroupA} is "Supremo":
  1820. set {_TagA} to "&4[Supremo] "
  1821. if {_GroupA} is "Lendario":
  1822. set {_TagA} to "&2[Lendário] "
  1823. if {_GroupA} is "Heroi":
  1824. set {_TagA} to "&5[Herói] "
  1825. if {_GroupA} is "Campeao":
  1826. set {_TagA} to "&3[Campeão] "
  1827. if {_GroupA} is "Default":
  1828. set {_TagA} to "&7"
  1829. set {_AdminA} to value "%arg 1%.Admin" get of "plugins/Factions/data.yml"
  1830. set {_IsOnlineA} to value "%arg 1%.isOnline" get of "plugins/Factions/data.yml"
  1831. set {_FactionPowerA} to value "%arg 1%.FactionPower" get of "plugins/Factions/data.yml"
  1832. set {_FactionA} to value "%arg 1%.Faction" get of "plugins/Factions/data.yml"
  1833. set {_FactionRoleA} to value "%arg 1%.FactionRole" get of "plugins/Factions/data.yml"
  1834. set {_FactionTagA} to value "%arg 1%.FactionTag" get of "plugins/Factions/data.yml"
  1835. set {_FactionMaxPowerA} to value "%arg 1%.FactionMaxPower" get of "plugins/Factions/data.yml"
  1836. set {_LastDateA} to value "%arg 1%.LastDate" get of "plugins/Factions/data.yml"
  1837. set {_AbatesA} to value "%arg 1%.Abates" get of "plugins/Factions/data.yml"
  1838. set {_MortesA} to value "%arg 1%.Mortes" get of "plugins/Factions/data.yml"
  1839. set {_WinsA} to value "%arg 1%.Wins" get of "plugins/Factions/data.yml"
  1840.  
  1841. if {_FactionRole} is "LEADER":
  1842. set {_Role} to "##Líder"
  1843. if {_FactionRole} is "OFFICER":
  1844. set {_Role} to "*Capitão"
  1845. if {_FactionRole} is "MEMBER":
  1846. set {_Role} to "+Membro"
  1847. if {_FactionRole} is "RECRUIT":
  1848. set {_Role} to "-Recruta"
  1849. if {_FactionRoleA} is "LEADER":
  1850. set {_RoleA} to "##Líder"
  1851. if {_FactionRoleA} is "OFFICER":
  1852. set {_RoleA} to "*Capitão"
  1853. if {_FactionRoleA} is "MEMBER":
  1854. set {_RoleA} to "+Membro"
  1855. if {_FactionRoleA} is "RECRUIT":
  1856. set {_RoleA} to "-Recruta"
  1857. if {_FactionRole} is "null":
  1858. set {_Role} to "Nenhum"
  1859. if {_FactionRoleA} is "null":
  1860. set {_RoleA} to "Nenhum"
  1861. if {_IsOnline} is "Online":
  1862. set {_Status} to "&aOnline"
  1863. if {_IsOnline} is "Offline":
  1864. set {_Status} to "&cOffline"
  1865. if {_IsOnlineA} is "Offline":
  1866. set {_StatusA} to "&cOffline"
  1867. if {_IsOnlineA} is "Online":
  1868. set {_StatusA} to "&aOnline"
  1869. if {_Claim} isn't set:
  1870. set {_Claim} to "Zona Livre"
  1871. if {_Claim} is "warzone":
  1872. set {_Claim} to "Zona de Guerra"
  1873. if {_Claim} is "safezone":
  1874. set {_Claim} to "Zona Protegida"
  1875. if {_Claim} is "%{_FactionTag}%-PROTECTION":
  1876. set {_Claim} to "PROTECTION"
  1877. if {_IsOnlineA} is "Online" or "Offline":
  1878. if {_FactionTagA} is "null":
  1879. open chest with 5 rows named "%arg 1%" to player
  1880. else:
  1881. open chest with 5 rows named "[%{_FactionTagA}%] %arg 1%" to player
  1882. if {_FactionTag} is "null":
  1883. if player have permission "master.group" or "gerente.group" or "admin.group" or "moderador.group":
  1884. format slot 12 of player with skull of ("%player%" parsed as an offline player) named "%{_Tag}%%player%" with lore "&fPoder: &7%{_FactionPower}%/%{_FactionMaxPower}%||&fCargo: &7%{_Role}%||&fKDR: &70.0||&fAbates: &7%{_Abates}%||&fMortes: &7%{_Mortes}%||&fGuerras ganhas: &7%{_Wins}%||&fStatus: &7%{_Status}%" to be unstealable
  1885. else:
  1886. format slot 12 of player with skull of ("%player%" parsed as an offline player) named "%{_Tag}%%player%" with lore "&fPoder: &7%{_FactionPower}%/%{_FactionMaxPower}%||&fCargo: &7%{_Role}%||&fKDR: &70.0||&fAbates: &7%{_Abates}%||&fMortes: &7%{_Mortes}%||&fGuerras ganhas: &7%{_Wins}%||&fStatus: &7%{_Status}%||&fÚltimo login: &7%{_LastDate}%" to be unstealable
  1887. if {_Claim} is "Zona Livre":
  1888. format slot 14 of player with a dirt named "&aTerreno da %{_Claim}%" to be unstealable
  1889. if {_Claim} is "PROTECTION":
  1890. format slot 14 of player with a dirt:2 named "&aTerreno da sua facção" with lore "&fBotão esquerdo: &7Abandonar||&fProtegida por: &7%{_Owner}%||&7A proteção acaba em %{_Minutes}%m %{_Seconds}%sec" to close then run [make player execute command "f abandonar confirm"]
  1891. if {_Claim} is "%{_FactionTag}%":
  1892. format slot 14 of player with a grass named "&aTerreno da sua facção" with lore "&fBotão esquerdo: &7Abandonar" to close then run [make player execute command "f abandonar confirm"]
  1893. if {_Claim} is set:
  1894. if {_Claim} isn't "%{_FactionTag}%":
  1895. if {_Claim} isn't "Zona Livre":
  1896. if {_Claim} isn't "PROTECTION":
  1897. format slot 14 of player with a grass named "&aTerreno da %{_Claim}%" to be unstealable
  1898. else:
  1899. loop {FactionList::*}:
  1900. set {_FactionFactionV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  1901. set {_FactionRoleV} to value "%loop-value%.FactionRole" get of "plugins/Factions/data.yml"
  1902. if {_FactionFactionV} is equal to {_FactionTag}:
  1903. if {_FactionRoleV} is "LEADER":
  1904. set {_Leader} to loop-value
  1905. loop {FactionList::*}:
  1906. set {_FactionFactionV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  1907. if {_FactionFactionV} is {_FactionTag}:
  1908. add 1 to {_m}
  1909. loop all players:
  1910. set {_FactionFactionL} to value "%loop-player%.FactionTag" get of "plugins/Factions/data.yml"
  1911. if {_FactionFactionL} is equal to {_FactionTag}:
  1912. set {_FactionRoleL} to value "%loop-player%.FactionRole" get of "plugins/Factions/data.yml"
  1913. if {_FactionRoleL} is "LEADER":
  1914. set {_mrole} to "##"
  1915. if {_FactionRoleL} is "OFFICER":
  1916. set {_mrole} to "*"
  1917. if {_FactionRoleL} is "MEMBER":
  1918. set {_mrole} to "+"
  1919. if {_FactionRoleL} is "RECRUIT":
  1920. set {_mrole} to "-"
  1921. add 1 to {_mon}
  1922. add "%{_mrole}%%loop-player%" to {_monl::*}
  1923. set {_FactionAlly} to value "Faction.Ally" get of "plugins/Factions/faction-%{_FactionTag}%.yml"
  1924. set {_FactionEnemy} to value "Faction.Enemy" get of "plugins/Factions/faction-%{_FactionTag}%.yml"
  1925. if {_FactionAlly} is "null":
  1926. set {_FactionAllyY} to "Nenhum"
  1927. if {_FactionEnemy} is "null":
  1928. set {_FactionEnemyY} to "Nenhum"
  1929. if player have permission "master.group" or "gerente.group" or "admin.group" or "moderador.group":
  1930. format slot 11 of player with skull of ("%player%" parsed as an offline player) named "%{_Tag}%%player%" with lore "&fPoder: &7%{_FactionPower}%/%{_FactionMaxPower}%||&fCargo: &7%{_Role}%||&fKDR: &70.0||&fAbates: &7%{_Abates}%||&fMortes: &7%{_Mortes}%||&fGuerras ganhas: &7%{_Wins}%||&fStatus: &7%{_Status}%" to be unstealable
  1931. else:
  1932. format slot 11 of player with skull of ("%player%" parsed as an offline player) named "%{_Tag}%%player%" with lore "&fPoder: &7%{_FactionPower}%/%{_FactionMaxPower}%||&fCargo: &7%{_Role}%||&fKDR: &70.0||&fAbates: &7%{_Abates}%||&fMortes: &7%{_Mortes}%||&fGuerras ganhas: &7%{_Wins}%||&fStatus: &7%{_Status}%||&fÚltimo login: &7%{_LastDate}%" to be unstealable
  1933. format slot 13 of player with white named "&e%{_FactionTag}% - %{_Faction}%" with lore "&fTerras: &70||&fPoder: &75||&fPoder máximo: &75||&fLíder: &7[%{_FactionTag}%] &f%{_Leader}%||&fMembros: &7%{_m}%/15||&fMembros online: &7%{_monl::*}%||&fKDR: &70.0||&fAbates: &70||&fMortes: &70||&fAliados: &7%{_FactionAllyY}%||&fInimigos: &7%{_FactionEnemyY}%" to be unstealable
  1934. if {_Claim} is "Zona Livre":
  1935. format slot 15 of player with a dirt named "&aTerreno da %{_Claim}%" to be unstealable
  1936. if {_Claim} is "PROTECTION":
  1937. format slot 15 of player with a dirt:2 named "&aTerreno da sua facção" with lore "&fBotão esquerdo: &7Abandonar||&fProtegida por: &7%{_Owner}%||&7A proteção acaba em %{_Minutes}%m %{_Seconds}%sec" to close then run [make player execute command "f abandonar confirm"]
  1938. if {_Claim} is "%{_FactionTag}%":
  1939. format slot 15 of player with a grass named "&aTerreno da sua facção" with lore "&fBotão esquerdo: &7Abandonar" to close then run [make player execute command "f abandonar confirm"]
  1940. if {_Claim} is set:
  1941. if {_Claim} isn't "%{_FactionTag}%":
  1942. if {_Claim} isn't "Zona Livre":
  1943. if {_Claim} isn't "PROTECTION":
  1944. format slot 15 of player with a grass named "&aTerreno da %{_Claim}%" to be unstealable
  1945. if {_FactionTagA} is "null":
  1946. if {_FactionRole} is "LEADER" or "OFFICER":
  1947. if {_TagA} is "&6[Master] " or "&4[Gerente] " or "&c[Admin] " or "&2[Moderador] ":
  1948. format slot 30 of player with skull of ("%arg 1%" parsed as an offline player) named "%{_TagA}%%arg 1%" with lore "&fPoder: &7%{_FactionPowerA}%/%{_FactionMaxPowerA}%||&fCargo: &7%{_RoleA}%||&fKDR: &70.0||&fAbates: &7%{_Abates}%||&fGuerras ganhas: &7%{_WinsA}%||&fMortes: &7%{_Mortes}%||&fStatus: &7%{_StatusA}%" to be unstealable
  1949. else:
  1950. format slot 30 of player with skull of ("%arg 1%" parsed as an offline player) named "%{_TagA}%%arg 1%" with lore "&fPoder: &7%{_FactionPowerA}%/%{_FactionMaxPowerA}%||&fCargo: &7%{_RoleA}%||&fKDR: &70.0||&fAbates: &7%{_Abates}%||&fGuerras ganhas: &7%{_WinsA}%||&fMortes: &7%{_Mortes}%||&fStatus: &7%{_StatusA}%" to be unstealable
  1951. format slot 32 of player with paper named "&aConvidar" with lore "&7Convidar para entrar na facção." to run [make player execute command "f convidarmenugui1177 %arg 1%"]
  1952. else:
  1953. if {_TagA} is "&6[Master] " or "&4[Gerente] " or "&c[Admin] " or "&2[Moderador] ":
  1954. format slot 31 of player with skull of ("%arg 1%" parsed as an offline player) named "%{_TagA}%%arg 1%" with lore "&fPoder: &7%{_FactionPowerA}%/%{_FactionMaxPowerA}%||&fCargo: &7%{_RoleA}%||&fKDR: &70.0||&fAbates: &7%{_Abates}%||&fGuerras ganhas: &7%{_WinsA}%||&fMortes: &7%{_Mortes}%||&fStatus: &7%{_StatusA}%" to be unstealable
  1955. else:
  1956. format slot 31 of player with skull of ("%arg 1%" parsed as an offline player) named "%{_TagA}%%arg 1%" with lore "&fPoder: &7%{_FactionPowerA}%/%{_FactionMaxPowerA}%||&fCargo: &7%{_RoleA}%||&fKDR: &70.0||&fAbates: &7%{_Abates}%||&fMortes: &7%{_Mortes}%||&fStatus: &7%{_StatusA}%||&fÚltimo login: &7%{_LastDateA}%" to be unstealable
  1957. else:
  1958. set {_TagV} to value "%arg 1%.FactionTag" get of "plugins/Factions/data.yml"
  1959. set {_AbatesV} to value "%arg 1%.Abates" get of "plugins/Factions/data.yml"
  1960. set {_MortesV} to value "%arg 1%.Mortes" get of "plugins/Factions/data.yml"
  1961. set {_NameV} to value "%arg 1%.Faction" get of "plugins/Factions/data.yml"
  1962. loop {FactionList::*}:
  1963. set {_FactionFactionV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  1964. set {_FactionRoleV} to value "%loop-value%.FactionRole" get of "plugins/Factions/data.yml"
  1965. if {_FactionFactionV} is equal to {_TagV}:
  1966. if {_FactionRoleV} is "LEADER":
  1967. set {_LeaderV} to loop-value
  1968. loop {FactionList::*}:
  1969. set {_FactionFactionV} to value "%loop-value%.FactionTag" get of "plugins/Factions/data.yml"
  1970. if {_FactionFactionV} is {_TagV}:
  1971. add 1 to {_mV}
  1972. loop all players:
  1973. set {_FactionFactionL} to value "%loop-player%.FactionTag" get of "plugins/Factions/data.yml"
  1974. if {_FactionFactionL} is equal to {_TagV}:
  1975. set {_FactionRoleL} to value "%loop-player%.FactionRole" get of "plugins/Factions/data.yml"
  1976. if {_FactionRoleL} is "LEADER":
  1977. set {_mroleV} to "##"
  1978. if {_FactionRoleL} is "OFFICER":
  1979. set {_mroleV} to "*"
  1980. if {_FactionRoleL} is "MEMBER":
  1981. set {_mroleV} to "+"
  1982. if {_FactionRoleL} is "RECRUIT":
  1983. set {_mroleV} to "-"
  1984. add 1 to {_monV}
  1985. add "%{_mrole}%%loop-player%" to {_monlV::*}
  1986. set {_FactionAllyVV} to value "Faction.Ally" get of "plugins/Factions/faction-%{_TagV}%.yml"
  1987. set {_FactionEnemyVV} to value "Faction.Enemy" get of "plugins/Factions/faction-%{_TagV}%.yml"
  1988. if {_FactionAllyVV} is "null":
  1989. set {_FactionAllyV} to "Nenhum"
  1990. else:
  1991. set {_FactionAllyV} to "%{_FactionAllyVV}%"
  1992. if {_FactionEnemyVV} is "null":
  1993. set {_FactionEnemyV} to "Nenhum"
  1994. else:
  1995. set {_FactionEnemyV} to "%{_FactionEnemyVV}%"
  1996. set {_FactionEnemyVV} to value "Faction.Enemy" get of "plugins/Factions/faction-%{_TagV}%.yml"
  1997. if {_TagA} is "&6[Master] " or "&4[Gerente] " or "&c[Admin] " or "&2[Moderador] ":
  1998. format slot 30 of player with skull of ("%arg 1%" parsed as an offline player) named "%{_TagA}%%arg 1%" with lore "&fPoder: &7%{_FactionPowerA}%/%{_FactionMaxPowerA}%||&fCargo: &7%{_RoleA}%||&fKDR: &70.0||&fAbates: &7%{_AbatesA}%||&fMortes: &7%{_MortesA}%||&fGuerras ganhas: &7%{_WinsA}%||&fStatus: &7%{_StatusA}%" to be unstealable
  1999. else:
  2000. format slot 30 of player with skull of ("%arg 1%" parsed as an offline player) named "%{_TagA}%%arg 1%" with lore "&fPoder: &7%{_FactionPowerA}%/%{_FactionMaxPowerA}%||&fCargo: &7%{_RoleA}%||&fKDR: &70.0||&fAbates: &7%{_AbatesA}%||&fMortes: &7%{_MortesA}%||&fGuerras ganhas: &7%{_WinsA}%||&fStatus: &7%{_StatusA}%||&fÚltimo login: &7%{_LastDateA}%" to be unstealable
  2001. if {_monlV::*} isn't set:
  2002. set {_monlV::*} to "Nenhum"
  2003. format slot 32 of player with white named "&e%{_TagV}% - %{_NameV}%" with lore "&fTerras: &70||&fPoder: &75||&fPoder máximo: &75||&fLíder: &7[%{_TagV}%] &f%{_LeaderV}%||&fMembros: &7%{_mV}%/15||&fMembros online: &7%{_monlV::*}%||&fKDR: &70.0||&fAbates: &70||&fMortes: &70||&fAliados: &7%{_FactionAllyV}%||&fInimigos: &7%{_FactionEnemyV}%" to be unstealable
  2004. else:
  2005. send "&cEste usuário não existe."
Advertisement
Add Comment
Please, Sign In to add comment