Files
redteam.sk
Code
1 36
redteam.sk
# Team Pressure Plates for Tug of War
options:
prefix: &6[ToW]&r
on step on stone pressure plate:
# RED TEAM PLATES (blocks at x=-93, z=-248 to -245, y=21)
if floor(player's x-coordinate) is -93:
if player's y-coordinate is 21:
if floor(player's z-coordinate) is between -248 and -245:
set {team::%player's uuid%} to "red"
send "{@prefix} &cYou joined the &lRED&r&c team!" to player
set {_h} to leather helmet named "&cRed Helmet"
set color of {_h} to red
set {_c} to leather chestplate named "&cRed Chestplate"
set color of {_c} to red
set {_l} to leather leggings named "&cRed Leggings"
set color of {_l} to red
set {_b} to leather boots named "&cRed Boots"
set color of {_b} to red
set player's helmet to {_h}
set player's chestplate to {_c}
set player's leggings to {_l}
set player's boots to {_b}
on damage:
if attacker is a player:
if victim is a player:
if {team::%attacker's uuid%} is set:
if {team::%victim's uuid%} is set:
if {team::%attacker's uuid%} is {team::%victim's uuid%}:
cancel event
send "{@prefix} &cYou can't hit your own teammate!" to attacker
on quit:
delete {team::%player's uuid%}