New Potion Effect (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.5.2, 2.14 (syntax changes, infinite duration support)

Syntax

[a[n]] [ambient] potion effect of %potioneffecttype% [[of tier] %-number%] [for %-timespan%]

Description

Create a new potion effect that can be applied to an entity or item type.

Examples

set {_potion} to a potion effect of speed 2 for 10 minutes:
	hide the effect's icon
	hide the effect's particles
add strength 5 to the potion effects of the player's tool
apply invisibility to the player for 5 minutes:
	hide the effect's particles
add a potion effect of speed 1 to the potion effects of the player
# creates a potion effect with the properties of an existing potion effect
set {_potion} to a potion effect of slowness based on the player's speed effect

View source