effect
Plays graphic effects for the players around: at a point, on a mobile or an item, flying between two, or a lightning bolt.
Source: src/Moongate.Server.Ultima/Modules/EffectModule.cs
Functions
Section titled “Functions”effect.at(map, x, y, z, graphic, options?) -> booleanPlays an effect graphic that stays at x, y, z of a map (a MapType number); false for a value out of range.
The smoke of a teleport, at a point of a map:
effect.at(MapType.Trammel, 1600, 1628, 5, EffectGraphicType.Smoke)| Parameter | Type | Default |
|---|---|---|
map | integer | |
x | integer | |
y | integer | |
z | integer | |
graphic | integer | |
options (optional) | table | nil |
Returns boolean.
lightning
Section titled “lightning”effect.lightning(serial, hue?) -> booleanStrikes a mobile or a ground item with a lightning bolt, optionally of a hue; false for something not in the world or a hue out of range.
| Parameter | Type | Default |
|---|---|---|
serial | integer | |
hue (optional) | integer | 0 |
Returns boolean.
moving
Section titled “moving”effect.moving(from, to, graphic, options?) -> booleanPlays an effect graphic flying from one mobile or ground item to another on the same map; false when one is not in the world, they are on two maps or a value is out of range.
A fireball from the caster to the target, exploding there:
effect.moving(caster, target, EffectGraphicType.LargeFireball, { speed = 7, duration = 0, explodes = true })| Parameter | Type | Default |
|---|---|---|
from | integer | |
to | integer | |
graphic | integer | |
options (optional) | table | nil |
Returns boolean.
moving_to
Section titled “moving_to”effect.moving_to(from, x, y, z, graphic, options?) -> booleanPlays an effect graphic flying from a mobile or a ground item to x, y, z on its own map, as a thrown potion; false when it is not in the world or a value is out of range.
| Parameter | Type | Default |
|---|---|---|
from | integer | |
x | integer | |
y | integer | |
z | integer | |
graphic | integer | |
options (optional) | table | nil |
Returns boolean.
effect.on(serial, graphic, options?) -> booleanPlays an effect graphic on a mobile, which it follows, or on a ground item; false for something not in the world or a value out of range.
The healing sparkle on a mobile; the Enhanced Client also gets particles at the waist:
effect.on(who, EffectGraphicType.SparkleHeal, { speed = 9, duration = 32, particle = 5005, layer = EffectLayerType.Waist })| Parameter | Type | Default |
|---|---|---|
serial | integer | |
graphic | integer | |
options (optional) | table | nil |
Returns boolean.
Made with ❤️ by Tom
