SHARE
TWEET

Untitled

a guest Nov 30th, 2014 343 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Must Have D4's Team manager
  2.  
  3. options:
  4.         Pre: &8[&cSlave Market&8] &e
  5.        
  6.        
  7.        
  8. command /capteams:
  9.         permission: skript.capteams
  10.         description: Creates Captain Teams
  11.         trigger:
  12.                 set {_count} to 1
  13.                 loop 8 times:
  14.                         set {_TeamNumber} to {_count}
  15.                         set {Teams::%{_TeamNumber}%} to {_count}
  16.                         command "/scoreboard teams add UHC%{_TeamNumber}%"     
  17.                         increase {_count} by 1
  18.                         set {_TeamNumber} to {_count}
  19.                 execute console command "/scoreboard teams option UHC1 color aqua"
  20.                 execute console command "/scoreboard teams option UHC2 color black"
  21.                 execute console command "/scoreboard teams option UHC3 color red"
  22.                 execute console command "/scoreboard teams option UHC4 color yellow"
  23.                 execute console command "/scoreboard teams option UHC5 color dark_green"
  24.                 execute console command "/scoreboard teams option UHC6 color gray"
  25.                 execute console command "/scoreboard teams option UHC7 color gold"
  26.                 execute console command "/scoreboard teams option UHC8 color dark_purple"
  27.                 message "{@Pre} Setup captain teams!"
  28.                
  29. command /addcaptains <player> <integer>:
  30.         permission: slavemarket.addcaptain
  31.         trigger:
  32.                 if {Captain::*} is greater than 8:
  33.                         message "{@Pre} There May only be 8 captains!"
  34.                
  35.                 else if {Captain.%arg-2%::*} contains (arg 1):
  36.                         message "{@Pre} Already A Captain of That Team!"
  37.                        
  38.                 else if {Captain::%arg-1%} is set:
  39.                         message "{@Pre} Already a captain please use /removecaptain %arg-1%"
  40.                        
  41.                 else:
  42.                         add (arg-1) to {Captain.%arg-2%::*}
  43.                         set {Captain::%arg-1%} to true
  44.                         broadcast "{@Pre} - %arg-1% &bIs now a captain of Team %arg-2%"
  45.                         command "/team join %arg-2% %arg-1%"
  46.                         command "/warp cbox%arg-2% %arg-1%"
  47.                        
  48. command /removecaptain <player>:
  49.         permission: slavemarket.removecaptain
  50.         trigger:
  51.                 if {Captain::%arg-1%} is true:
  52.                         command "team leave %arg-1%"
  53.                         message "{@Pre} You removed %arg-1% Captains Powers!"
  54.                         broadcast "{@Pre} Is No Longer A Captain!"
  55.                         delete {Captain::%arg-1%}
  56.                 else if {Auction.Going} is true:
  57.                         message "{@Pre} Cant remove %arg-1%'s Captain Powers while Auction is going"
  58.                        
  59. command /auction [<integer=30>]:
  60.         permission: slavemarket.auction
  61.         trigger:
  62.                 if {Auction.Going} is not set:
  63.                         set {Auction.Going} to true
  64.                         loop all players:
  65.                                 add loop-player to {Slaves::*}
  66.                         loop {Captain::*}:
  67.                                 set {_Captain} to {Captain::%loop-value%}
  68.                                 remove {_Captain} from {Slaves::*}
  69.                         delete {biggestbidder}
  70.                         set {biggestbet} to -1
  71.                         set {_Player} to (random element out of {Slaves::*})
  72.                         loop {Slaves::*}:
  73.                                 set {BeingAuction::%loop-value%} to loop-value
  74.                                 set {IsAuction::%loop-value%} to {_Player}
  75.                                 remove {_Player} from {Slaves::*}
  76.                                 command "/warp auction %{_Player}%"
  77.                                 broadcast "{@Pre} &b%{_Player}% &eIs Being Auctioned!"
  78.                                 set {slavetime} to arg-1
  79.                                 while {slavetime} is greater than 0:
  80.                                         wait 1 second
  81.                                         subtract 1 from {slavetime}
  82.                                 if {biggestbidder} is set:
  83.                                         broadcast "{@Pre} %{biggestbidder}% has won the bid!"
  84.                         if {Slaves::*} is equal to 0:
  85.                                 broadcast "{@Pre} No one is left to auction!"
  86.                         delete {Auction.Going}
  87.                                
  88.                                
  89. command /addslave <player>:
  90.         permission: slavemarket.addslaves
  91.         trigger:
  92.                 if {Slaves::*} does not contain "%arg-1%":
  93.                         add arg-1 to {Slaves::*}
  94.                         broadcast "{@Pre} &b%arg-1% &eIs Added to the Slave list!"
  95.                 else if {Captain::%arg-1%} is true:
  96.                         message "{@Pre} %arg-1% is a captain!"
  97.                        
  98. command /slavetp:
  99.         permission: slavemarket.slavetp
  100.         trigger:
  101.                 loop all players:
  102.                         command "/warp slavewaiting %loop-player%"
  103.        
  104.                        
  105. command /bid <integer>:
  106.         trigger:
  107.                 if {Captain::%player%} is true:
  108.                         if arg-1 is greater than -1:
  109.                                 if arg-1 is greater than {biggestbet}:
  110.                                         set {biggestbet} to arg-1
  111.                                         set {biggestbidder} to the player
  112.                                 broadcast "{@Pre} - &b%player% &eBid %arg-1%"
  113.                         else:
  114.                                 message "{@Pre} Your bid needs to be bigger than -1"
  115.                 else:
  116.                         message "{@Pre} You need to be a captain to bid!"
  117.                        
  118. command /slavediamond <integer>:
  119.         permission: slavemarket.slavediamond
  120.         trigger:
  121.                 loop {Captain::*}:
  122.                         command "/give %loop-player% diamond %arg-1%"
  123.                        
  124. command /move <player> <integer>:
  125.         permission: skript.op
  126.         trigger:
  127.                 command "warp cc%arg-2% %arg-1%"
  128.                 command "team join %arg-2% %arg-1%"
  129.                
  130. command /resetcaptains:
  131.         permission: slavemarket.resetcaptains
  132.         trigger:
  133.                 set {_teamdelete} to 1
  134.                 loop 8 times:
  135.                         set {_TeamNumber} to {_teamdelete}
  136.                         set {Teams::%{_TeamNumber}%} to {_teamdelete}
  137.                         set {_CaptainNumber} to {_teamdelete}
  138.                         set {Captain.%{_CaptainNumber}%::*} to {_teamdelete}
  139.                         delete {Captain.%{_CaptainNumber}%::*}
  140.                         delete {Captain::*}
  141.                         command "/scoreboard teams remove UHC%{_TeamNumber}%"  
  142.                         increase {_delete} by 1
  143.                         set {_TeamNumber} to {_delete}
  144.                 delete {Auction.Going}
  145.                 command "team reset"
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