Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Must Have D4's Team manager
- options:
- Pre: &8[&cSlave Market&8] &e
- command /capteams:
- permission: skript.capteams
- description: Creates Captain Teams
- trigger:
- set {_count} to 1
- loop 8 times:
- set {_TeamNumber} to {_count}
- set {Teams::%{_TeamNumber}%} to {_count}
- command "/scoreboard teams add UHC%{_TeamNumber}%"
- increase {_count} by 1
- set {_TeamNumber} to {_count}
- execute console command "/scoreboard teams option UHC1 color aqua"
- execute console command "/scoreboard teams option UHC2 color black"
- execute console command "/scoreboard teams option UHC3 color red"
- execute console command "/scoreboard teams option UHC4 color yellow"
- execute console command "/scoreboard teams option UHC5 color dark_green"
- execute console command "/scoreboard teams option UHC6 color gray"
- execute console command "/scoreboard teams option UHC7 color gold"
- execute console command "/scoreboard teams option UHC8 color dark_purple"
- message "{@Pre} Setup captain teams!"
- command /addcaptains <player> <integer>:
- permission: slavemarket.addcaptain
- trigger:
- if {Captain::*} is greater than 8:
- message "{@Pre} There May only be 8 captains!"
- else if {Captain.%arg-2%::*} contains (arg 1):
- message "{@Pre} Already A Captain of That Team!"
- else if {Captain::%arg-1%} is set:
- message "{@Pre} Already a captain please use /removecaptain %arg-1%"
- else:
- add (arg-1) to {Captain.%arg-2%::*}
- set {Captain::%arg-1%} to true
- broadcast "{@Pre} - %arg-1% &bIs now a captain of Team %arg-2%"
- command "/team join %arg-2% %arg-1%"
- command "/warp cbox%arg-2% %arg-1%"
- command /removecaptain <player>:
- permission: slavemarket.removecaptain
- trigger:
- if {Captain::%arg-1%} is true:
- command "team leave %arg-1%"
- message "{@Pre} You removed %arg-1% Captains Powers!"
- broadcast "{@Pre} Is No Longer A Captain!"
- delete {Captain::%arg-1%}
- else if {Auction.Going} is true:
- message "{@Pre} Cant remove %arg-1%'s Captain Powers while Auction is going"
- command /auction [<integer=30>]:
- permission: slavemarket.auction
- trigger:
- if {Auction.Going} is not set:
- set {Auction.Going} to true
- loop all players:
- add loop-player to {Slaves::*}
- loop {Captain::*}:
- set {_Captain} to {Captain::%loop-value%}
- remove {_Captain} from {Slaves::*}
- delete {biggestbidder}
- set {biggestbet} to -1
- set {_Player} to (random element out of {Slaves::*})
- loop {Slaves::*}:
- set {BeingAuction::%loop-value%} to loop-value
- set {IsAuction::%loop-value%} to {_Player}
- remove {_Player} from {Slaves::*}
- command "/warp auction %{_Player}%"
- broadcast "{@Pre} &b%{_Player}% &eIs Being Auctioned!"
- set {slavetime} to arg-1
- while {slavetime} is greater than 0:
- wait 1 second
- subtract 1 from {slavetime}
- if {biggestbidder} is set:
- broadcast "{@Pre} %{biggestbidder}% has won the bid!"
- if {Slaves::*} is equal to 0:
- broadcast "{@Pre} No one is left to auction!"
- delete {Auction.Going}
- command /addslave <player>:
- permission: slavemarket.addslaves
- trigger:
- if {Slaves::*} does not contain "%arg-1%":
- add arg-1 to {Slaves::*}
- broadcast "{@Pre} &b%arg-1% &eIs Added to the Slave list!"
- else if {Captain::%arg-1%} is true:
- message "{@Pre} %arg-1% is a captain!"
- command /slavetp:
- permission: slavemarket.slavetp
- trigger:
- loop all players:
- command "/warp slavewaiting %loop-player%"
- command /bid <integer>:
- trigger:
- if {Captain::%player%} is true:
- if arg-1 is greater than -1:
- if arg-1 is greater than {biggestbet}:
- set {biggestbet} to arg-1
- set {biggestbidder} to the player
- broadcast "{@Pre} - &b%player% &eBid %arg-1%"
- else:
- message "{@Pre} Your bid needs to be bigger than -1"
- else:
- message "{@Pre} You need to be a captain to bid!"
- command /slavediamond <integer>:
- permission: slavemarket.slavediamond
- trigger:
- loop {Captain::*}:
- command "/give %loop-player% diamond %arg-1%"
- command /move <player> <integer>:
- permission: skript.op
- trigger:
- command "warp cc%arg-2% %arg-1%"
- command "team join %arg-2% %arg-1%"
- command /resetcaptains:
- permission: slavemarket.resetcaptains
- trigger:
- set {_teamdelete} to 1
- loop 8 times:
- set {_TeamNumber} to {_teamdelete}
- set {Teams::%{_TeamNumber}%} to {_teamdelete}
- set {_CaptainNumber} to {_teamdelete}
- set {Captain.%{_CaptainNumber}%::*} to {_teamdelete}
- delete {Captain.%{_CaptainNumber}%::*}
- delete {Captain::*}
- command "/scoreboard teams remove UHC%{_TeamNumber}%"
- increase {_delete} by 1
- set {_TeamNumber} to {_delete}
- delete {Auction.Going}
- command "team reset"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement