HallowedS

Untitled

Feb 12th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.84 KB | None | 0 0
  1. else if argument 1 is "invitation" or "invitations":
  2. if arg-2 isn't set:
  3. if {f.fac.name.%player%} isn't set:
  4. set {_objet} to "me"
  5. else:
  6. set {_objet} to "faction"
  7. else if arg-2 isn't "me" or "faction":
  8. send "&cUtilize /f invitation [me/faction]"
  9. stop
  10. else:
  11. set {_objet} to "%arg-2%"
  12. if {_objet} is "me":
  13. open chest with 6 rows named "Convites de si mesmo." to player
  14. else:
  15. open chest with 5 rows named "%{f.fac.name.%player%}% - Pedidos" to player
  16. wait 2 tick
  17. set {_case} to 0
  18. set {_case1} to 0
  19. if {_objet} is "me":
  20. loop {f.list.factions::*}:
  21. loop {f.fac.invitations.%loop-value-1%::*}:
  22. if "%loop-value-2%" is "%player%":
  23. format slot {_case} of player with 1 of paper named "&7Facção: &f%loop-value-1%" with lore " ||&7Convite em andamente...|| ||&7Para aceitar: &a/f aceitar %loop-value-1%||&7Para recusar: &c/f recusar %loop-value-1%" to be unstealable
  24. add 1 to {_case}
  25. format slot {_case1} of player with 1 of paper named "&7Facção: &f%loop-value-1%" with lore " ||&7Convite em andamente...|| ||&7Para aceitar: &a/f aceitar %loop-value-1%||&7Para recusar: &c/f recusar %loop-value-1%" to be unstealable
  26. add 1 to {_case1}
  27. else:
  28. loop {f.fac.invitations.%{f.fac.name.%player%}%::*}:
  29. format slot {_case} of player with 1 of loop-value's skull named "&7Jogador: &f%loop-value%" with lore " ||&7Convite em andamente...|| ||&cClique para recusar o recrutamento." to run "faction reminvitation|%loop-value% %player%"
  30. add 1 to {_case}
  31. else if argument 1 contains "reminvitation":
  32. if command sender isn't console:
  33. stop
  34. else:
  35. set {_a} to "%arg-1%"
  36. set {_a::*} to {_a} split at "|"
  37. loop {f.fac.invitations.%{f.fac.name.%arg-2%}%::*}:
  38. if "%loop-value%" is "%{_a::2}%":
  39. remove loop-value from {f.fac.invitations.%{f.fac.name.%arg-2%}%::*}
  40. send "&cVocê revogou o convite do jogador %{_a::2}%." to (arg-2 parsed as player)
  41. execute (arg-2 parsed as player) command "/faction invitations"
  42. else if argument 1 is "toggleinvitation" or "toggleinvite":
  43. if {f.fac.name.%player%} isn't set:
  44. send "&cVocê não está em uma facção."
  45. else if {f.fac.grade.%player%} < 2:
  46. send "&cVocê não tem o grau necessário."
  47. else if {f.fac.invitation.%{f.fac.name.%player%}%} is true:
  48. delete {f.fac.invitation.%{f.fac.name.%player%}%}
  49. clear {f.fac.invitations.%{f.fac.name.%player%}%::*}
  50. send "&aAgora não é possível convidar membros!"
  51. else if {f.fac.invitation.%{f.fac.name.%player%}%} isn't set:
  52. set {f.fac.invitation.%{f.fac.name.%player%}%} to true
  53. send "&aAgora é possível convidar membros!"
  54. else if argument 1 is "convidar" or "invite":
  55. if {f.fac.name.%player%} isn't set:
  56. send "&cVocê não está em uma facção."
  57. else if {f.fac.invitation.%{f.fac.name.%player%}%} isn't set:
  58. send "&cA sua facção não está convidando membros. Para poder convidar membros digite '/f toggleinvite'."
  59. else if arg-2 isn't set:
  60. send "&cUtilize /f convidar <jogador>"
  61. else if {f.fac.name.%arg-2%} is set:
  62. send "&c%arg-2% já tem uma facção!"
  63. else if "%{f.fac.invitations.%{f.fac.name.%player%}%::*}%" contains "%arg-2%":
  64. send "&cOps! Um convite já está em andamento, espere ele aceitar ou recusar para fazer outro."
  65. else:
  66. set {_p} to (arg-2 parsed as player)
  67. add {_p} to {f.fac.invitations.%{f.fac.name.%player%}%::*}
  68. send "&aVocê convidou '%{_p}%' para sua facção."
  69. send "&a%player% está te convidando para a facção '%{f.fac.name.%player%}%'." to {_p}
  70. else if argument 1 is "aceitar":
  71. if {f.fac.name.%player%} is set:
  72. send "&cVocê já está em uma facção!"
  73. else if arg-2 isn't set:
  74. send "&cVocê precisa especificar a facção depois do '%arg-1%'."
  75. else if "%{f.fac.invitations.%arg-2%::*}%" doesn't contain "%player%":
  76. send "&cEsta facção não te convidou para participar."
  77. else:
  78. set {f.fac.name.%player%} to "%arg-2%"
  79. set {f.fac.grade.%player%} to 1
  80. loop {f.fac.invitations.%arg-2%::*}:
  81. if "%loop-value%" is "%player%":
  82. remove loop-value from {f.fac.invitations.%arg-2%::*}
  83. send "&aVocê entrou na facção %arg-2%!"
  84. else if argument 1 is "recusar":
  85. if {f.fac.name.%player%} is set:
  86. send "&cVocê já está em uma facção."
  87. else if arg-2 isn't set:
  88. send "&cVocê precisa especificar uma facção depois do '%arg-1%'."
  89. else if "%{f.fac.invitations.%arg-2%::*}%" doesn't contain "%player%":
  90. send "&cEsta facção não te convidou para participar."
  91. else:
  92. send "&cVocê recusou o pedido da facção '%arg-2%'."
  93. loop {f.fac.invitations.%arg-2%::*}:
  94. if "%loop-value%" is "%player%":
  95. remove loop-value from {f.fac.invitations.%arg-2%::*}
Advertisement
Add Comment
Please, Sign In to add comment