File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1- namespace SER . Code . Examples ;
1+ using JetBrains . Annotations ;
22
3+ namespace SER . Code . Examples ;
4+
5+ [ UsedImplicitly ]
36public class HotPotatoScript : Example
47{
58 public override string Name => "hotPotato" ;
@@ -14,6 +17,11 @@ Wait 1m
1417 # Get a random player from the alive players
1518 @potatoCarrier = LimitPlayers @alivePlayers 1
1619
20+ # if no player is alive, continue to next attempt
21+ if {AmountOf @potatoCarrier} is 0
22+ continue
23+ end
24+
1725 Hint @potatoCarrier 3s "YOU HAVE THE HOT POTATO! DROP IT OR DIE!"
1826 GiveItem @potatoCarrier GunA7
1927
@@ -27,6 +35,7 @@ Wait 3s
2735 continue
2836 end
2937
38+ AdvDestroyItem *item
3039 Explode @potatoCarrier
3140 Broadcast @all 5s "{@potatoCarrier name} failed the Hot Potato!"
3241 stop
You can’t perform that action at this time.
0 commit comments