SHOW:
|
|
- or go back to the newest paste.
1 | - | #Slave/Blood Market Skript |
1 | + | #Must Have D4's Team manager |
2 | - | #Skript by 8bitfusion |
2 | + | |
3 | options: | |
4 | - | P: <aqua>[UHC-Markets] |
4 | + | Pre: &8[&cSlave Market&8] &e |
5 | - | command /UHCcaptains [<text>] [<player>]: |
5 | + | |
6 | - | permission:skript.op |
6 | + | |
7 | ||
8 | - | if arg 1 is "add": |
8 | + | command /capteams: |
9 | - | arg 2 is set |
9 | + | permission: skript.capteams |
10 | - | set {captains::%arg 2%} to "%arg 2%" |
10 | + | description: Creates Captain Teams |
11 | - | send "{@P} <green>%arg 2% is now a captain!" to the player |
11 | + | |
12 | - | else if arg 1 is "remove": |
12 | + | set {_count} to 1 |
13 | - | arg 2 is set |
13 | + | loop 8 times: |
14 | - | remove arg 2 from {captains::*} |
14 | + | set {_TeamNumber} to {_count} |
15 | - | send "{@P} <green>%arg 2% is no longer a captain!" to the player |
15 | + | set {Teams::%{_TeamNumber}%} to {_count} |
16 | - | else if arg 1 is "reset": |
16 | + | command "/scoreboard teams add UHC%{_TeamNumber}%" |
17 | - | delete {captains::*} |
17 | + | increase {_count} by 1 |
18 | - | send "{@P} <green>All captains have been reset!" to the player |
18 | + | set {_TeamNumber} to {_count} |
19 | - | else if arg 1 is not set: |
19 | + | execute console command "/scoreboard teams option UHC1 color aqua" |
20 | - | send "{@P} <green>Captains are:" to the player |
20 | + | execute console command "/scoreboard teams option UHC2 color black" |
21 | - | loop {captains::*}: |
21 | + | execute console command "/scoreboard teams option UHC3 color red" |
22 | - | send "{@P} <green>%{captains::%loop-index%}%" to the player |
22 | + | execute console command "/scoreboard teams option UHC4 color yellow" |
23 | execute console command "/scoreboard teams option UHC5 color dark_green" | |
24 | - | send "{@P} <green>That is not a valid command!" to the player |
24 | + | execute console command "/scoreboard teams option UHC6 color gray" |
25 | - | command /openbid <text> <player> [<integer=30>]: |
25 | + | execute console command "/scoreboard teams option UHC7 color gold" |
26 | - | permission:skript.op |
26 | + | execute console command "/scoreboard teams option UHC8 color dark_purple" |
27 | - | usage:/openbid <silent/standard> <player> <time, default=30s> |
27 | + | message "{@Pre} Setup captain teams!" |
28 | ||
29 | - | if arg 1 is "silent": |
29 | + | command /addcaptains <player> <integer>: |
30 | - | broadcast "{@P} <green>The host opened a <aqua>%arg 1% <green>bid on <aqua>%arg 2% <green>of length <aqua>%arg 3% seconds!" |
30 | + | permission: slavemarket.addcaptain |
31 | - | broadcast "{@P} <green>Captains, make your bids using <aqua>/bid <amount>!" |
31 | + | |
32 | - | set {silentbid} to true |
32 | + | if {Captain::*} is greater than 8: |
33 | - | set {uhcm_time} to arg 3 |
33 | + | message "{@Pre} There May only be 8 captains!" |
34 | - | delete {largest_player} |
34 | + | |
35 | - | set {largest_bet} to -1 |
35 | + | else if {Captain.%arg-2%::*} contains (arg 1): |
36 | - | while {uhcm_time} is greater than 0: |
36 | + | message "{@Pre} Already A Captain of That Team!" |
37 | - | wait 1 second |
37 | + | |
38 | - | subtract 1 from {uhcm_time} |
38 | + | else if {Captain::%arg-1%} is set: |
39 | - | set {silentbid} to false |
39 | + | message "{@Pre} Already a captain please use /removecaptain %arg-1%" |
40 | - | if {largest_player} is set: |
40 | + | |
41 | - | broadcast "{@P} <green>Captain <aqua>%{largest_player}% <green> has won the bid on <aqua>%arg 2% <green>by bidding <aqua>%{largest_bet}%!" |
41 | + | |
42 | add (arg-1) to {Captain.%arg-2%::*} | |
43 | - | broadcast "{@P} <green>No bids were made on <aqua>%arg 2%!" |
43 | + | set {Captain::%arg-1%} to true |
44 | - | if arg 1 is "standard": |
44 | + | broadcast "{@Pre} - %arg-1% &bIs now a captain of Team %arg-2%" |
45 | - | broadcast "{@P} <green>The host opened a <aqua>%arg 1% <green>bid on <aqua>%arg 2% <green>of length <aqua>%arg 3% seconds!" |
45 | + | command "/team join %arg-2% %arg-1%" |
46 | - | broadcast "{@P} <green>Captains, make your bids using <aqua>/bid <amount>!" |
46 | + | command "/warp cbox%arg-2% %arg-1%" |
47 | - | set {standardbid} to true |
47 | + | |
48 | - | set {uhcm_time} to arg 3 |
48 | + | command /removecaptain <player>: |
49 | - | delete {largest_player} |
49 | + | permission: slavemarket.removecaptain |
50 | - | set {largest_bet} to -1 |
50 | + | |
51 | - | while {uhcm_time} is greater than 0: |
51 | + | if {Captain::%arg-1%} is true: |
52 | - | wait 1 second |
52 | + | command "team leave %arg-1%" |
53 | - | subtract 1 from {uhcm_time} |
53 | + | message "{@Pre} You removed %arg-1% Captains Powers!" |
54 | - | set {standardbid} to false |
54 | + | broadcast "{@Pre} Is No Longer A Captain!" |
55 | - | if {largest_player} is set: |
55 | + | delete {Captain::%arg-1%} |
56 | - | broadcast "{@P} <green>Captain <aqua>%{largest_player}% <green> has won the bid on <aqua>%arg 2% <green>by bidding <aqua>%{largest_bet}%!" |
56 | + | else if {Auction.Going} is true: |
57 | message "{@Pre} Cant remove %arg-1%'s Captain Powers while Auction is going" | |
58 | - | broadcast "{@P} <green>No bids were made on <aqua>%arg 2%!" |
58 | + | |
59 | command /auction [<integer=30>]: | |
60 | - | usage:/bid <amount> |
60 | + | permission: slavemarket.auction |
61 | trigger: | |
62 | - | if {captains::%player%} is "%player%": |
62 | + | if {Auction.Going} is not set: |
63 | - | if arg 1 is greater than -1: |
63 | + | set {Auction.Going} to true |
64 | - | if {silentbid} is true: |
64 | + | loop all players: |
65 | - | if arg 1 is greater than {largest_bet}: |
65 | + | add loop-player to {Slaves::*} |
66 | - | set {largest_bet} to arg 1 |
66 | + | loop {Captain::*}: |
67 | - | set {largest_player} to the player |
67 | + | set {_Captain} to {Captain::%loop-value%} |
68 | - | send "{@P} <green>You bid <aqua>%arg 1%!" to the player |
68 | + | remove {_Captain} from {Slaves::*} |
69 | - | else if {standardbid} is true: |
69 | + | delete {biggestbidder} |
70 | - | if arg 1 is greater than {largest_bet}: |
70 | + | set {biggestbet} to -1 |
71 | - | set {largest_bet} to arg 1 |
71 | + | set {_Player} to (random element out of {Slaves::*}) |
72 | - | set {largest_player} to the player |
72 | + | loop {Slaves::*}: |
73 | - | broadcast "{@P} <green>%player% bid <aqua>%arg 1%!" |
73 | + | set {BeingAuction::%loop-value%} to loop-value |
74 | - | else: |
74 | + | set {IsAuction::%loop-value%} to {_Player} |
75 | - | send "{@P} <green>There are no bids open at this time!" to the player |
75 | + | remove {_Player} from {Slaves::*} |
76 | - | else: |
76 | + | command "/warp auction %{_Player}%" |
77 | - | send "{@P} <green>You must choose a positive number to bid!" to the player |
77 | + | broadcast "{@Pre} &b%{_Player}% &eIs Being Auctioned!" |
78 | set {slavetime} to arg-1 | |
79 | - | send "{@P} <green>You are not a captain! You don't have access to this command!" to the player |
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" |