Introduction
Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž
This plugin adds unlimited self switches to events and allows
them to be easily activated via script calls.
You can name self switches however you want and activate them
from a different map.
Keep in mind that triggering a self switch from a different map
will not work unless that map has been visited at least once.
How to Use
Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž
Use the comment tag: <SelfSwitch: NameHere>
"NameHere" is your switch name. This can be important if you use
specific "phases", where only one should be ON at a time.
You can also reset a group of switches for the current event,
which is useful for repeatable quest events.
IMPORTANT:
Default self switches (A, B, C, D) can still be used normally.
However, if a page uses <SelfSwitch: NameHere>, it is best to
avoid using self switches (A, B, C, D) on that page and instead
leave the Self Switch condition blank.
When the Self Switch condition is blank and the comment tag is
used, the page is treated as a named self switch activation page.
Examples
Íž Íž Íž Íž Íž Íž Íž Íž
setNamedSelfSwitch(name, value, mapId, eventId);
mapId and eventId can be omitted when used on the current event.
Valid values: "on", "off", "true", "false", true, false, "toggle"
setNamedSelfSwitch("DoorOpen", "on");
setNamedSelfSwitch("Phase2", "toggle");
setNamedSelfSwitch("BossAwake", true, 12, 3);
setExclusiveSelfSwitch(name, value);
name : the self switch name (treated as a group name)
value : see valid values above
setExclusiveSelfSwitch("Phase2", "on");
The name "Phase2" will turn off "Phase1", "Phase3", etc.
Other switch names are ignored.
You can also turn off all self switches, either fully or partially:
resetEventSelfSwitches(name, mapId, eventId);
Fully reset all self switches for an event:
resetEventSelfSwitches(); => Current event
resetEventSelfSwitches("", 7, 3); => Explicit map and event
Or partially, for repeatable quests or mini-games:
resetEventSelfSwitches("Bonus"); => Turns off Bonus1, Bonus2, etc.
resetEventSelfSwitches("Phase", 12, 3); => Only resets Phase1, Phase2, Phase3