unliAmmo

Module: player_unliAmmo.lua

What it does

Toggles unlimited ammunition for the player's held ranged weapon. When turned on, the magazine is refilled to maximum every time the player swings (fires) the weapon. An optional duration (in in-game hours) can be set; when that time elapses the effect deactivates automatically. Sending action = "off" disables it immediately.

Trigger type

unliAmmo

Parameters

ParameterTypeDefaultValid ValuesDescription
action string none (required) "on", "off" Enable or disable the unlimited ammo effect.
duration number 0 (indefinite) Any positive integer Number of in-game hours before the effect automatically turns off. Only relevant when action = "on". A value of 0 or omitted means indefinite.
The effect only applies to the weapon in the player's primary hand at the moment of each weapon swing. Switching weapons does not break the effect — it simply refills whichever ranged weapon is then held.

Examples

Enable unlimited ammo for 2 in-game hours
{ type="unliAmmo", action="on", duration=2 }
Enable unlimited ammo indefinitely
{ type="unliAmmo", action="on" }
Disable unlimited ammo immediately
{ type="unliAmmo", action="off" }