Network Variable Set

Description

Sets a network variable on every server. Setting a variable that exists replaces its value, type and expiry.

This mechanic requires MythicMobs Premium!

Attributes

Attribute Aliases Description Default
var variable, name, n, key, k Name of the variable. Required. Can contain placeholders. See Variable Names
value val, v The value to store. Required. Can contain placeholders, but math is not calculated. Use double quotes if it contains ;
scope s Who the variable belongs to. See Variable Scopes global
type t How value is read. See Variable Types INTEGER
duration d, expire, e Lifetime in ticks, 0 for none. See Persistence and Expiry 0
save false stops the proxy from handing the variable out again. See Persistence and Expiry true

scope, type, duration and save are read when the skill loads, so they cannot contain placeholders. networkVariableAdd takes var, scope, type, duration and save as well, and networkVariableUnset takes var and scope.

Examples

A player who right-clicks the shrine is blessed for 10 minutes (12000 ticks), on every server.

Shrine:
  Type: VILLAGER
  Skills:
  - networkVariableSet{var=blessed;scope=target;type=BOOLEAN;value=true;duration=12000} ~onInteract

The Raid Titan shares its health with every server once per second (20 ticks). It uses save=false, see Persistence and Expiry.

RaidTitan:
  Type: IRON_GOLEM
  Skills:
  - networkVariableSet{var=titan_hp;type=DOUBLE;value=<caster.hp>;save=false} @self ~onTimer:20

Aliases

  • netvarset
  • setnetvar
  • networkSetVariable

netvarset is also an alias of the networkVariableIsSet condition. In a Skills list it is this mechanic, in a condition it is networkVariableIsSet.

Updated Oct 29, 2026