healScp
Download the raw healScp.ser file
Uses: AmountOf · Broadcast · Except · Heal · Reply · Round · Take · CustomCommand
Complete script
healScp.ser
# Disabled by default: remove # from the filename to enable this script.
!-- CustomCommand healscp
-- description "heals a random SCP"
-- availableFor player
-- requireSender
-- cooldown 10s
# dont allow SCPs to use this command
if {@sender -> team} is "SCPs"
stop
end
# get a random SCP that is not a SCP-079
@target = Take {Except @scpPlayers @scp079Players} 1
# check if the was no viable target
if {AmountOf @target} is 0
Reply "There is no SCP to heal"
stop
end
# get 5% of the SCP's max health
$healAmount = Round ({@target -> maxHealth} * 0.05)
# heal
Heal @target $healAmount
# inform
Broadcast @target 4s "{@sender -> name} healed you with {$healAmount} HP!"
Reply "You have healed {@target -> name} ({@target -> role}) by {$healAmount} HP!"
This file is compiled during the SER build and is safe to use as a current-syntax learning example.