SHARE
TWEET

Clans skript for endersgens

a guest Oct 19th, 2019 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. command /clan <text> [<text>]:
  2.  trigger:
  3.   arg 1 is set
  4.   if arg 1 is "create":
  5.    if arg 2 is set:
  6.     if {clan::%player%} is not set:
  7.      if length of arg-2 is less than or equal to 6:
  8.       loop {clan::*}:
  9.        if loop-value is argument 2:
  10.         set {_n} to true
  11.       if {_n} is set:
  12.        send "&4Clan name already taken. Try a different name." to player
  13.       else if {_n} is not set:
  14.        set {owner::%arg 2%} to player
  15.        add 1 to {members::%arg 2%}
  16.        set {clan::%player%} to arg-2
  17.        send "&aSuccess! Created clan &c%arg 2%&a." to player
  18.        add player to {members::%{clan::%player%}%::*}
  19.        exit
  20.      else:
  21.       send "&4That clan name is too long. It has to be 6 characters or less."
  22.     else:
  23.      send "&4You are already in a clan. Do /clan leave to leave it."
  24.      exit
  25.    else:
  26.     send "&4Specify a clan name!"
  27.     exit
  28.   else if arg 1 is "invite":
  29.    if {clan::%player%} is set:
  30.     if arg 2 is set:
  31.      if arg-2 parsed as offlineplayer is online:
  32.       loop {members::%{clan::%player%}%} times:
  33.        add 1 to {_i}
  34.       if {_i} is less than 8:
  35.        set {_p} to arg 2 parsed as an offline player
  36.        send "" to player
  37.        send "&a%arg 2%&a Was invited to &c%{clan::%player%}%" to player
  38.        send "" to player
  39.        set {invited::%{clan::%player%}%} to arg-2
  40.        send "" to {_p}
  41.        send "&aYou were invited to the clan &c%{clan::%player%}%&a. Type /clan join &c%{clan::%player%}%&a to join." to {_p}
  42.        send "" to {_p}
  43.        remove arg-2 from {_p}
  44.       else:
  45.        send "&4Invite failure. Your clan has too many members."
  46.      else:
  47.       send "&4Invite failure. This player is not online!" to player
  48.   else if arg 1 is "join":
  49.    if {clan::%player%} is not set:
  50.     if player is equal to {invited::%arg 2%}:
  51.      send "&aSuccess! joined %arg 2%&a." to player
  52.      send "&a%player%&a has joined the clan." to {owner::%arg 2%}
  53.      set {clan::%player%} to arg-2
  54.      add 1 to {members::%arg 2%}
  55.      add player to {members::%arg 2%::*}
  56.     else:
  57.      send "&4You weren't invited to this clan." to player
  58.      exit
  59.    else:
  60.     send "&4Leave your current clan first." to player
  61.   else if arg 1 is "leave":
  62.    if {clan::%player%} is set:
  63.     if {owner::%{clan::%player%}%} is player:
  64.      send "&4You must disband your clan to leave." to player
  65.     send "&4Success! You have left your clan." to player
  66.     remove 1 from {members::%{clan::%player%}%}
  67.     remove player from {members::%{clan::%player%}%::*}
  68.     clear {clan::%player%}
  69.    
  70.    else:
  71.     send "&4You aren't in a clan right now." to player
  72.   else if arg 1 is "sethome":
  73.    if {clan::%player%} is set:
  74.     arg 2 is not set
  75.     if {owner::%{clan::%player%}%} is player:
  76.      set {clan::%{clan::%player%}%::home} to location of player
  77.      send "" to player
  78.      send "&aSet the clan home." to player
  79.      send "" to player
  80.     else:
  81.      send "&4Unsuccessful. You need to be the owner of your clan to set the home." to player
  82.    else:
  83.     send "&4Unsuccessful. You need to have a clan to set the home." to player
  84.   else if arg 1 is "home":
  85.    if {clan::%{clan::%player%}%::home} is set:
  86.     teleport the player to {clan::%{clan::%player%}%::home}
  87.     send "&6Teleporting..." to player
  88.    else:
  89.     send "&4The clan home isn't set. If you are the owner of your clan, type /clan sethome to set the home."
  90.   else if arg 1 is "disband":
  91.    if {owner::%{clan::%player%}%} is player:
  92.     send "&4Your clan was disbanded." to {members::%{clan::%player%}%::*}
  93.     clear {members::%{clan::%player%}%}
  94.     clear {members::%{clan::%player%}%::*}
  95.   else if arg 1 is "kick":
  96.    if {clan::%player%} is set:
  97.     if arg 2 is set:
  98.      if "%{members::%{clan::%player%}%::*}%" contains "%arg-2%":
  99.       if {owner::%{clan::%player%}%} is player:
  100.        if arg 2 is not player:
  101.         send "&4Kicked %arg 2% from %{clan::%player%}%&4." to player
  102.         clear {clan::%arg 2%}
  103.         remove arg 2 from {members::%{clan::%player%}%::*}
  104.         remove 1 from {members::%{clan::%player%}%}
  105.         send "&4You were kicked from %{clan::%player%}%&4!" to arg 2 parsed as offlineplayer
  106.        else:
  107.         send "&4You may not kick yourself!" to player
  108.       else:
  109.        send "&4You must be the owner of your clan to kick players!" to player
  110.      else:
  111.       send "&4That player is not in your clan!" to player
  112.     else:
  113.      send "&4Specify a player." to player
  114.    else:
  115.     send "&4You must be in a clan to execute this command." to player
  116.   else if arg 1 is "info":
  117.    if {clan::%player%} is set:
  118.     send "&c-------------------------------" to player
  119.     send "&cClanmates:" to player
  120.     send "&c%{members::%{clan::%player%}%::*}%" to player
  121.     send "&cOwner:" to player
  122.     send "&c%{owner::%{clan::%player%}%}%" to player
  123.     send "&cClan Name:" to player
  124.     send "&c%{clan::%player%}%" to player
  125.     send "&c-------------------------------" to player
  126.    else:
  127.     send "&4You are not in a clan." to player
  128.  
  129.  
  130.  
  131. on damage:
  132.  victim is a player
  133.  if {clan::%attacker%} is equal to {clan::%victim%}:
  134.   cancel event
  135.   send "&4You may not hurt clanmates!" to attacker
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