Skip to content
Nathan Wolf edited this page Mar 6, 2018 · 7 revisions

Skript Integration

Skript is a plugin that provides natural language scripting for Bukkit servers.

Magic provides events and effects that can be used in Skripts.

Cast Event

The cast event is triggered when a player or mob casts a spell. You may use the "caster" expression to get the caster entity and the "targets" expression for any targets hit by the spell.

Examples:

on cast:
  send "You cast a spell" to caster
  damage targets by 20 hearts

on cast spell "missile":
  send "You throw a Magic Missile" to caster

# The casting event triggers before a spell is cast, versus when it finishes
on casting spell "missile":
  send "You ready Magic Missile" to caster

Cast Effect

The cast effect can be used to force a player to cast a spell, or to cast a spell via the console. Examples:

on place of sand:
  make player cast the spell "rubberize"

# Use some parameters
on step on glass:
  make player cast the spell "fling" with "pdy 1 pdx 0 pdz 0 min_speed 5 max_speed 5"

on death:
  cast "day"

Conditionals

You may use conditionals to check if a player has a specific class or wand:

on step on glass:
  player is class "airbender"
  player is holding wand "airbending"
  make player cast the spell "fling" with "pdy 1 pdx 0 pdz 0 min_speed 5 max_speed 5"


Clone this wiki locally