RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.2 /SVN 752] Shard Event with AP Event Gate (Advanced Player Gate)

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.
 

Attachments

  • ShardEvent with AP_EventGate.7z
    13.8 KB · Views: 55
  • ShardEvent with AP_EventGate.zip
    15.9 KB · Views: 107

nadious

Sorceror
Lokai,

I'm looking at using this for a shard that I'm working on. This is fantastic for what I'm planning! I do have a question: I'm going to use this on a ForkUO server (which is kind of based off the OrbSA 3.0 shard), which supports (or will support) the gargoyle race. Is there any change this could be updated to support Throwing / Mysticism?

Edit: Never-mind, apparently I had an older copy loaded on there already (didn't even know it) from a long time ago and that was missing the new skills. I see they are there now, so disregard! Thanks!
 

Hammerhand

Knight
Nadious, the AP_Event Gate already has coding for Imbuing, Mysticism & Throwing in the SetSkills region. Although, you may need to add items to the Skill Items region for them, but that looks to be pretty straight forward. You shouldnt have any trouble with adding them, but if you do... someone around here can help. :D
 

nadious

Sorceror
Thanks, Hammerhand... I just updated my post. I didn't realize I had an older copy already on the server. Must have been testing it back out on my last shard and forgot it was there. Since I got rid of it, I see now where it is working properly.

Thanks for the reply!
 

Gamble

Traveler
Hmm not sure what to do with this ... creat the even and gate .... nothing happens other than toons lose all their stats... i end event and stats do not come back. Not sure this would make ppl too happy
 

nadious

Sorceror
Gamble,

Are you adjusting the property of the gates and setting them to 'temp' gates? If not, that is probably what is happening.
 
Top