Skip to content

Commit 4f19499

Browse files
Update healScpCommand.ser
1 parent 39e6e23 commit 4f19499

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

Example Scripts/healScpCommand.ser

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,20 @@ if {@sender -> team} is "SCPs"
99
end
1010

1111
# get a random SCP that is not a SCP-079
12-
@randomScp = Take {Except @scpPlayers @scp079Players} 1
12+
@target = Take {Except @scpPlayers @scp079Players} 1
13+
14+
# check if the was no viable target
15+
if {AmountOf @target} is 0
16+
Reply "There is no SCP to heal"
17+
stop
18+
end
1319

1420
# get 5% of the SCP's max health
15-
$healAmount = Round ({@randomScp -> maxHealth} * 0.05)
21+
$healAmount = Round ({@target -> maxHealth} * 0.05)
22+
23+
# heal
24+
Heal @target $healAmount
1625

17-
Heal @randomScp $healAmount
18-
Broadcast @randomScp 4s "{@sender -> name} healed you with {$healAmount} HP!"
26+
# inform
27+
Broadcast @target 4s "{@sender -> name} healed you with {$healAmount} HP!"
28+
Reply "You have healed {@target -> name} by {$healAmount} HP!"

0 commit comments

Comments
 (0)