Advertisement
sora200507

Untitled

Jan 20th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.17 KB | None | 0 0
  1. options:
  2. #CommandInfo
  3. Command: /party
  4. #Lang
  5. PartyMaxPlayers: 10
  6. PartyListSpacer1: &7&l----&aParty&7&l----
  7. PartyListSpacer2: &7&l------------
  8. PartyListFormat: &c%{_Number}%&7. &d%{_Player}%
  9.  
  10.  
  11. PartyUsage: &c%{_Command}% (%arg 1%) [(player)]
  12. PartyUsageNothingSet: &c%{_Command}% (create, disband, invite, accept, leave) [(player)]
  13. PartyCreate: &cYou created a party.
  14. PartyDisband: &cYou disbanded your party.
  15. PartyJoin: &aYou joined a party.
  16. PartyJoinNotInvited: &cYou have not been invited to this party.
  17. PartyLeave: &cYou left your party.
  18. PartyInvite: &aYou were invited to a party by %{_Inviter}%
  19. PartyInviteTooltip: &7Click to &8[&aAccept&8]
  20. PartyInviteExceedsPartyLimit: &cYou already have %{_MaxNumber}% players in your party.
  21. PartyInvitedPlayer: &aYou have invited %{_Invited}%
  22. PartyKick: &cYou were kicked from your party.
  23. PartyAlreadyInParty: &cYou are already in a party.
  24. PartyNotOwner: &cYou are not the owner of this party.
  25. PartyNotInParty: &cYou are not in a party.
  26. PartyDisbandKick: &cYou were kicked from the party due to: &aDisband
  27. PartyPlayerLeftYourParty: &c%{_Player}% left your party.
  28. PartyPlayerJoinedYourParty: &a%{_Player}% joined your party.
  29. PartyKicked: &cYou kicked %{_Player}%.
  30. PartyPlayerNotInYourParty: &cThis player is not in your party.
  31. command {@Command} [<text>] [<offline player>]:
  32. trigger:
  33. if arg 1 is "create":
  34. if {Ownerofparty.%player%} is set:
  35. message "{@PartyAlreadyInParty}" to player
  36. else:
  37. set {Ownerofparty.%player%} to player
  38. add player to {party.%player%.list::*}
  39. message "{@PartyCreate}" to player
  40. else if arg 1 is "disband":
  41. if {Ownerofparty.%player%} is player:
  42. loop {party.%{Ownerofparty.%player%}%.list::*}:
  43. add 1 to {_Number}
  44. delete {Ownerofparty.%loop-variable%}
  45. message "{@PartyDisbandKick}" to loop-variable
  46. delete {Ownerofparty.%player%}
  47. clear {party.%player%.list::*}
  48. message "{@PartyDisband}" to player
  49. else:
  50. message "{@PartyNotOwner}" to player
  51. else if arg 1 is "invite":
  52. if arg 2 is set:
  53. if {Ownerofparty.%player%} is set:
  54. if {Ownerofparty.%player%} is player:
  55. if (size of {party.%player%.list::*}) <= ({@PartyMaxPlayers} - 1):
  56. set {_Inviter} to player
  57. add player to {invites.%arg 2%.list::*}
  58. set {_Command} to "{@Command}"
  59. set {_Invited} to arg 2
  60. message "{@PartyInvitedPlayer}" to player
  61. send json "{@PartyInvite}" tooltip "{@PartyInviteTooltip}" run "%{_Command}% accept %player%" to arg 2
  62. wait 10 seconds
  63. remove player from {invites.%arg 2%.list::*}
  64. else:
  65. set {_MaxNumbers} to "{@PartyMaxPlayers}"
  66. message "{@PartyInviteExceedsPartyLimit}" to player
  67. else:
  68. message "{@PartyNotOwner}" to player
  69. else:
  70. message "{@PartyNotInParty}" to player
  71. else:
  72. set {_Command} to "{@Command}"
  73. message "{@PartyUsage}" to player
  74. else if arg 1 is "accept":
  75. if arg 2 is set:
  76. if {invites.%player%.list::*} contains arg 2:
  77. if {Ownerofparty.%player%} is not set:
  78. add player to {party.%arg 2%.list::*}
  79. set {Ownerofparty.%player%} to arg 2
  80. message "{@PartyJoin}" to player
  81. loop {party.%{Ownerofparty.%player%}%.list::*}:
  82. add 1 to {_Number}
  83. set {_Player} to player
  84. message "{@PartyPlayerJoinedYourParty}" to loop-variable
  85. else:
  86. message "{@PartyAlreadyInParty}" to player
  87. else:
  88. message "{@PartyJoinNotInvited}" to player
  89. else:
  90. set {_Command} to "{@Command}"
  91. message "{@PartyUsage}" to player
  92. else if arg 1 is "leave":
  93. if {Ownerofparty.%player%} is set:
  94. if {Ownerofparty.%player%} is player:
  95. make player execute command "{@Command} disband"
  96. else:
  97. loop {party.%{Ownerofparty.%player%}%.list::*}:
  98. if loop-variable is player:
  99. message "{@PartyLeave}" to player
  100. else:
  101. set {_Player} to player
  102. message "{@PartyPlayerLeftYourParty}" to loop-variable
  103. remove player from {party.%{Ownerofparty.%player%}%.list::*}
  104. wait 1 tick
  105. delete {Ownerofparty.%player%}
  106. else:
  107. message "{@PartyNotInParty}" to player
  108. else if arg 1 is "list":
  109. if {Ownerofparty.%player%} is set:
  110. message "{@PartyListSpacer1}" to player
  111. loop {party.%{Ownerofparty.%player%}%.list::*}:
  112. add 1 to {_Number}
  113. set {_Player} to loop-variable
  114. message "{@PartyListFormat}" to player
  115. message "{@PartyListSpacer2}" to player
  116. else:
  117. message "{@PartyNotInParty}" to player
  118. else if arg 1 is "kick":
  119. if arg 2 is set:
  120. if {Ownerofparty.%player%} is set:
  121. if {Ownerofparty.%player%} is player:
  122. if {party.%player%.list::*} contains arg 2:
  123. set {_Player} to arg 2
  124. message "{@PartyKicked}" to player
  125. message "{@PartyKick}" to arg 2
  126. make arg 2 execute command "/party leave"
  127. else:
  128. message "{@PartyPlayerNotInYourParty}" to player
  129. else:
  130. message "{@PartyNotOwner}" to player
  131. else:
  132. message "{@PartyNotInParty}" to player
  133. else:
  134. set {_Command} to "{@Command}"
  135. message "{@PartyUsage}" to player
  136. else:
  137. set {_Command} to "{@Command}"
  138. message "{@PartyUsageNothingSet}" to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement