SHARE
TWEET

CLANS WIP (dont steal k thnx)

a guest May 19th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. options:
  2.    
  3.     prefix: &7&l[&d&lCLANS&7&l]
  4.  
  5. command /clan [<text>] [<text>]:
  6.     trigger:
  7.         if arg-1 isn't set:
  8.             send ""
  9.             send "  {@prefix} /clan create:&c Create a new clan!"
  10.             send "  {@prefix} /clan invite:&c Invite people to your clan!"
  11.             send "  {@prefix} /clan leave:&c To leave your clan"
  12.             send ""
  13.         else:
  14.             arg-1 = "create":
  15.                 arg-2 is set:
  16.                     {clans::*} contains arg-2:
  17.                         send ""
  18.                         send "  {@prefix} That clan already exists!"
  19.                         send ""
  20.                         stop
  21.                     if {clans::%player's uuid%} = {clans::%player's uuid%}:
  22.                         send ""
  23.                         send "  {@prefix} You are already in a clan!"
  24.                         send ""
  25.                         stop
  26.                     else:
  27.                         broadcast ""
  28.                         broadcast "  {@prefix}&b&l %player%&7&l Created the new clan&7&L ➟&b&l %arg-2%"
  29.                         broadcast ""
  30.                         set {clan.owner::%player's uuid%} to player
  31.                         add arg-2 to {clans::*}
  32.                         set {clans::%player's uuid%} to arg-2
  33.                         stop
  34.                 else:
  35.                     send ""
  36.                     send "  {@prefix} Please type a clan name to create!"
  37.                     send ""
  38.             arg-1 = "Leave":
  39.                 if {clans::%player's uuid%} is set:
  40.                     if {clans::%player's uuid%} >= {clan.members::%player's uuid%}:
  41.                         set {clan.random} to random element out of {clans::%player's uuid%}
  42.                         broadcast ""
  43.                         broadcast "  {@prefix}&b %player%&7 Has disbanded the clan&b %{clans::%player's uuid%}%"
  44.                         broadcast "  {@prefix} New owner&b&l %{clan.random}%"
  45.                         broadcast ""
  46.                         delete {clan.owner::%player's uuid%}
  47.                         remove {clans::%player's uuid%} from {clans::*}
  48.                     else:
  49.                         send ""
  50.                         send "  {@prefix} No players are in the clan, deleting the clan!"
  51.                         send ""
  52.                         delete {clan.owner::%player's uuid%}
  53.                         remove {clans::%player's uuid%} from {clans::*}
  54.                         delete {clans::%player's uuid%}
  55.                 else:
  56.                     send ""
  57.                     send "  {@prefix} You don't own a clan!"
  58.                     send ""
  59.             arg-1 = "invite":
  60.                 arg-2 is set:
  61.                     if {clans::*} does not contain {clans::%player's uuid%}:
  62.                         send ""
  63.                         send "  {@prefix} You are not in a clan!"
  64.                         send ""
  65.                     else:
  66.                         set {_p} to arg-2 parsed as offline player
  67.                         set {_uuid} to uuid of {_p}
  68.                         set {clan.invited::%{_uuid}%} to true
  69.                         if {clan.invited::%{_uuid}%} = true:
  70.                             set {clan.invited::%{_uuid}%} to {_p}
  71.                             send "" to {_p}
  72.                             send "  {@prefix} You have been invited to&b&l %arg-2%" to {_p}
  73.                             send "  {@prefix} You have 60 seconds to join, &b&l/clan join %{clans::%player's uuid%}%" to {_p}
  74.                             send "" to {_p}
  75.                             send "" to player
  76.                             send "  {@prefix} You invited&b&l %arg-2%&7&l to your clan!" to player
  77.                             send "" to player
  78.                             wait 60 seconds
  79.                             delete {clan.invited::%{_uuid}%}
  80.                             set {clan::%{_uuid}%} to player
  81.                             set {clan.invited::%{_uuid}%} to {clans::%player's uuid%}
  82.                             set {clan.invited::%{_uuid}%} to false
  83.                             if {clan.invited::%{_uuid}%} is false:
  84.                                 send "" to {_p}
  85.                                 send "  {@prefix} You can no longer join this clan!" to {_p}
  86.                                 send "" to {_p}
  87.                                 stop
  88.                         if {clan.invited::%{_uuid}%} = false:
  89.                             send ""
  90.                             send "  {@prefix}&b&l %arg-2%&7&l is already invited to your clan!"
  91.                             send ""
  92.                             stop
  93.                 else:
  94.                     send ""
  95.                     send "  {@prefix} Please type a player to invite"
  96.                     send ""
  97.         arg-1 = "join":
  98.             arg-2 is set:
  99.                 if {clan.invited::%player's uuid%} = true:
  100.                     set {clan.invited.inv::%player's uuid%} to {clan.invited::%arg-2%::%player's uuid%}
  101.                     loop all players:
  102.                         loop-player is in {clan::%arg-2%::%player's uuid%}:
  103.                             add 1 to {clan.members::%arg-2%::%player's uuid%}
  104.                             send "k" to loop-player
  105.  
  106. command /te:
  107.     trigger:
  108.         delete {clans::*}
  109.  
  110. chat:
  111.     if {clans::*} contains {clans::%player's uuid%}:
  112.         set chat format to "&7&l[&b&l%{clans::%player's uuid%}%&7&l]&c %player's display name%&7 %message%"
  113.     else:
  114.         set chat format to "&c %player's display name%&7 %message%"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top