Chance (Condition) — Skript

Addon: Skript · Category: Condition · Since: 1.0, 2.14 (chance fails)

Syntax

chance of %number%(\%|) [(fails|failed)]

Description

A condition that randomly succeeds or fails. Valid values are between 0% and 100%, or if the percent sign is omitted, between 0 and 1.

Examples

chance of 50%:
	drop a diamond at location(100, 100, 100, "world')
chance of {chance}% # {chance} between 0 and 100
chance of {chance} # {chance} between 0 and 1
if chance of 99% fails:
	broadcast "Haha loser! *points and laughs*"

View source