Lokai
Knight
Code:
* Originally created as:
* "Advanced Player Gate" for RunUO 2.0 (Now RunUO 2.2)
* by Lokai
*
* 4/18/2008 Added TempGateItem for Event handling
* - Item retains skills, stats, etc.
* - Until deleted by GM/Admin at which
* - time it restores user to original state.
*
* 4/19/2008 Changed to AP_EventGate, and added to
* - new ShardEvent system.
*
* 2/9/2012 Added support for RunUO 2.2 new skills.
* - TempGateItem remembers what items you got, and
* - tries to delete them when the TempGateItem is
* - deleted. GateDialogGump renamed to AP_EventGateGump.
* - Fixed some crashes when reloading. Made it so any
* - time you use an AP_EventGate, it deletes any
* - TempGateItems you have, which also removes any items
* - you received from them. (Only 1 Temp Gate can be used.)
* Description: Event system using AP_EventGate (formerly AdvancedPlayerGate.)
* System includes Invitations, 12 new commands, ability to adjust
* player stats, skills, etc., give items, and remove all Event items,
* skill and stat adjustments, hue, name and title changes, when
* the Event is finished.
*
* Installation: Drop in Custom folder. No Distro changes needed.
*
* Use: GMs+ can create an Event using the 'EventNew' command. Players can join
* an open Event or by Invitation. Events can be limited to certain numbers
* of players. The following is the complete command list:
*
* - EventNew: creates a ShardEvent item in the GM's pack. Begins the Event planning stage.
* - EventJoin: players use this to attempt to join an Event in progress.
* - EventInvite: Host uses this to place invitations in a person's pack (or use 'all' argument for all users.)
* - EventI: - same as EventInvite -
* - EventMark: Host uses this to move the join location to his current location and map.
* - EventGate Creates an AP_EventGate at host's current location, with Gate Target being the current Join location.
* - EventOpen: Sets the Event to Open access. Anyone can join without an Invitation.
* - EventMax: Sets the Max number of players permitted. If no parameter given, uses default number.
* - EventShut: Closes access to the Event. Status is set to 'Shut'.
* - EventEnd: Sets the Status of the Event to 'Finished'.
* - EventFinish: - same as ClearGates -
* - ClearGates: Removes all Event items, including Temporary gates, Invitations, temp Items given, and restores users
* to their state before they entered any Temporary AP_EventGate
*
* AP_EventGate: The new AP_EventGate will do the following when used (when BOOL is true - misc.):
*
* - Teleports the user to the location and map set on the Moongate. (m_DoesTeleport)
* - Renames the user (m_DoesRename - m_NameGiven)
* - May only allow certain number of players (m_PlayerCountMax) to use the gate (m_PlayerCountLimited - m_PlayerCountExeededMessage)
* - Changes the player's Title (m_TitleAdds - m_TitleToAdd)
* - Resurrects the player (m_DoesResurrect)
* - Alters the player's skills (m_ChangesSkills) and stats (m_ChangesStats)
* - Changes the player's Hue (m_ChangesHue - uses the Hue of the Gate)
* - Gives Items based on Skill levels given (m_SkillsGiveItems - when skill value >= m_SkillsItemsMin)
*
* TempGateItem: When a player uses an AP_EventGate, with the TempGate option set to 'true', the player will
* receive a TempGateItem, which stores their current stats, skills, name, title, hue, and a list of
* the items given when using the gate. At the end of the Event, when the item is deleted, it will be
* Activated, restoring the player to their former state.
INSTALLATION: Drop in anywhere and reload the Server.
CUSTOMIZATION: If you want different items to be given based on skills, you will need to modify the " Skill Items " section as needed. You can also adjust the AMOUNT variable on the Gump to change how the values go up and down when you use the Plus and Minus symbols.
USE: Events, Races, Classes, etc.
MAINTENANCE: You can use "[props" command to see all of the variables, or you can double-click the gate to use the Gate GUI to set values. If you are using the ShardEvent system, using the "[ClearGates" command should remove ALL gates that were used for the Event, plus any invitations, temp items, etc. Temp Gates can be removed by simply deleting them. Any users that used the gate will be returned to the spot the gate was on, and their stats, skills, etc. will be returned to their previous setting.
FEEDBACK: Please let me know successes/failures. I did much testing on this, and want to know how it turns out for those that actually run shards.