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.0]Shard Event with AP Event Gate

Lokai

Knight
[RunUO 2.0]Shard Event with AP Event Gate



* ShardEvent.cs
*
* Description: Event system using AP_EventGate (formerly AdvancedPlayerGate.)
* System includes Invitations, 9 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.
* - 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.
*
In case there are still troubles with downloading zip files from here, I will also host the file online here:

http://www.frontiernet.net/~tvbowman/lokai/ShardEvent with AP_EventGate.zip
 

Attachments

  • ShardEvent with AP_EventGate.zip
    14.8 KB · Views: 382

Lokai

Knight
Let me explain briefly how I envision this working best.

You will create the Event in a Gate Room of some kind, where you will set up some AP_EventGates. This way, when the Event is done, everyone will return to the Gate Room. You can also scatter Gates all over the world, depending on how diversly your population is spread. Again, all Gates that are given the TempGate setting will be removed at the end of the Event, so clean up is easy.

One cool use for this is to create Roles for each participant. To do this, you set the Name and Title functions on the Gates, and use [props to set the MaxPlayers to 1 on each Gate. This way, you can have like 10-20 gates each with their own role that someone will become for the Event. (I can imagine some of the possibilities - 'How to Host a Murder', 'House on Haunted Hill', to name just a couple.)

Another note, the AP_EventGate is still basically an AdvancedPlayerGate at heart, so if you have used those, these are pretty much the same. You can still use them as 'Class Gates' or 'Race Gates' or whatever you choose, but I wanted to add better functionaility for those that wanted to use them for Events, hence the name change. Also, I changed the name to make sure nobody would have to wipe their existing APGs if they already had them, due to the differences in the Serialization.
 

GhostRiderGrey

Sorceror
Lokai, another great script. Will it work with RC1?

Would you consider it a replacement for your Advanced Player Gates?

Thanks,
GhostRiderGrey
 

GhostRiderGrey

Sorceror
I have tried now with RC1 and received the following error:
Code:
Errors:
 + Customs/[029] ShardEvent with AP_EventGate/AP_EventGate.cs:
    CS0101: Line 1300: The namespace 'Server.Custom' already contains a definition for 'GateDialogGump'
    CS0102: Line 1677: The type 'Server.Custom.GateDialogGump' already contains a definition for 'RenamePrompt'
    CS0102: Line 1725: The type 'Server.Custom.GateDialogGump' already contains a definition for 'PromptEntry'
Scripts: One or more scripts failed to compile or no script files were found.
I know this means I have something else installed that is conflicting. I do have your Advanced Plaer Gate installed, but thought this script could exist with that one.

Thank you,
-GhostRiderGrey [before long, I'll have the entire Lokai library installed :)]
 

Lokai

Knight
GhostRiderGrey;757462 said:
I have tried now with RC1 and received the following error:
Code:
Errors:
 + Customs/[029] ShardEvent with AP_EventGate/AP_EventGate.cs:
    CS0101: Line 1300: The namespace 'Server.Custom' already contains a definition for 'GateDialogGump'
    CS0102: Line 1677: The type 'Server.Custom.GateDialogGump' already contains a definition for 'RenamePrompt'
    CS0102: Line 1725: The type 'Server.Custom.GateDialogGump' already contains a definition for 'PromptEntry'
Scripts: One or more scripts failed to compile or no script files were found.
I know this means I have something else installed that is conflicting. I do have your Advanced Plaer Gate installed, but thought this script could exist with that one.

Thank you,
-GhostRiderGrey [before long, I'll have the entire Lokai library installed :)]

This is a replacement for the Advanced Player Gate, but you do NOT have to remove the old one to use this, simply remove your old GateDialogGump.cs script.
 

GhostRiderGrey

Sorceror
Thank you Lokai. I have the just installed the old Advanced Player Gate and the Event Gate scripts but have not done anything with either of them yet. If I am understanding you correctly, I would be advised to take out the old AdvPlayGate scripts and just use the new EventGates, as they do everything the old system does. Am I thinking correctly?

-GhostRiderGrey
 

Lokai

Knight
GhostRiderGrey;757489 said:
Thank you Lokai. I have the just installed the old Advanced Player Gate and the Event Gate scripts but have not done anything with either of them yet. If I am understanding you correctly, I would be advised to take out the old AdvPlayGate scripts and just use the new EventGates, as they do everything the old system does. Am I thinking correctly?

-GhostRiderGrey

Correct. They are functionally nearly identical. The AP_EventGate just adds the Event functionality.
 

GhostRiderGrey

Sorceror
Lokai, We were working with the EventGate last night and have a question for you.

We would like to have an event gate were the gate gives you a BagofPaintBall Stuff for the paintball area we are creating. I see in the script where you could adjust items given for a specific skill (archery, for example, instead of bow, I would make it BagofPaintBall) but if I change it here, is that not a universal change?

I mean, if I also want to use other event gates(in the form of AdvPlayerGates) for new characters to the shard (to give them starting skills and stats based on the class they choose) wont they then get the paintballbag, rather then the bow they should start with?

Or is there an area of the script that lets you set items given for a particular event gate (not based on skills, but rather based on that particular gate (and event)), and I am just overlooking that?

Great Script as always!
-GhostRiderGrey
 

Lokai

Knight
GhostRiderGrey;757677 said:
Lokai, We were working with the EventGate last night and have a question for you.

We would like to have an event gate were the gate gives you a BagofPaintBall Stuff for the paintball area we are creating. I see in the script where you could adjust items given for a specific skill (archery, for example, instead of bow, I would make it BagofPaintBall) but if I change it here, is that not a universal change?

I mean, if I also want to use other event gates(in the form of AdvPlayerGates) for new characters to the shard (to give them starting skills and stats based on the class they choose) wont they then get the paintballbag, rather then the bow they should start with?

Or is there an area of the script that lets you set items given for a particular event gate (not based on skills, but rather based on that particular gate (and event)), and I am just overlooking that?

Great Script as always!
-GhostRiderGrey

The old gates at one time had an Items section, but over various revisions it became rather buggy, and I removed it, in favor of the skill-based ones.

I recommend you use your original AdvancedPlayerGates for your new characters, and customize the AP_EventGate with skill-based items geared toward your Event. They use separate code, so that might work for you, at least until you want to do another Event.
 

GhostRiderGrey

Sorceror
Lokai;757484 said:
This is a replacement for the Advanced Player Gate, but you do NOT have to remove the old one to use this, simply remove your old GateDialogGump.cs script.

Ok, I will put the AdvPlayerGate back in. When I do, this error returns, and I do not have a GateDialogGump.cs file to remove.

Thoughts?
-GhostRiderGrey
 

Lokai

Knight
GhostRiderGrey;757709 said:
Ok, I will put the AdvPlayerGate back in. When I do, this error returns, and I do not have a GateDialogGump.cs file to remove.

Thoughts?
-GhostRiderGrey

Oops. I forgot, the gate used different names but the same Gump name. That was unintended. You will probably need to rename the Gump in one of the scripts. Just do a Global Search and Replace in one of the files and change the GateDialogGump name to something else, like AP_EventGateGump or something.
 

GhostRiderGrey

Sorceror
That worked very well. I replaced the "GateDialogGump" name with "APGateDialogGump" in the old Advanced Player Gate file and the shard is back up and running again.

Thank you for your continued assistance. :)
-GhostRiderGrey
 

GhostRiderGrey

Sorceror
Lokai, I just discovered that the ShardEvent with AP_EventGate is giving the following warnings:
Code:
Warnings:
 + Customs/[028] ShardEvent with AP_EventGate/ShardEvent.cs:
    CS0114: Line 470: 'Server.Custom.ShardEvent.Location' hides inherited member
 'Server.Item.Location'. To make the current member override that implementation
, add the override keyword. Otherwise add the new keyword.
    CS0108: Line 472: 'Server.Custom.ShardEvent.Map' hides inherited member 'Ser
ver.Item.Map'. Use the new keyword if hiding was intended.
    CS0472: Line 271: The result of the expression is always 'true' since a valu
e of type 'int' is never equal to 'null' of type 'int?'

Just thought I'd pass that on.

Thanks,
-GhostRiderGrey
 

Lokai

Knight
GhostRiderGrey;758007 said:
Lokai, I just discovered that the ShardEvent with AP_EventGate is giving the following warnings:
Code:
Warnings:
 + Customs/[028] ShardEvent with AP_EventGate/ShardEvent.cs:
    CS0114: Line 470: 'Server.Custom.ShardEvent.Location' hides inherited member
 'Server.Item.Location'. To make the current member override that implementation
, add the override keyword. Otherwise add the new keyword.
    CS0108: Line 472: 'Server.Custom.ShardEvent.Map' hides inherited member 'Ser
ver.Item.Map'. Use the new keyword if hiding was intended.
    CS0472: Line 271: The result of the expression is always 'true' since a valu
e of type 'int' is never equal to 'null' of type 'int?'

Just thought I'd pass that on.

Thanks,
-GhostRiderGrey

Line 271 should read:

Code:
if (num > 0)

I thought I had already changed that. Oh well...
 

kat20

Sorceror
Lokai;752155 said:
* ShardEvent.cs
*
* Description: Event system using AP_EventGate (formerly AdvancedPlayerGate.)
* System includes Invitations, 9 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.
* - 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.
*
In case there are still troubles with downloading zip files from here, I will also host the file online here:

http://www.frontiernet.net/~tvbowman/lokai/ShardEvent with AP_EventGate.zip


Ok I have a dumb question? Um when the "NEW EVENT" token is placed in your bag and I double click it nothing happens! So basicly how do I set up my event? am I doing something wrong? Thanks
 

Lokai

Knight
As you quoted from the first post, simply use one of the other commands to do whatever it is you want to do. The actual Event details need to be handled by you. All the Shard Event token does is provide you with the ability to use the commands available, and set the parameters for the Event. I believe you might also be able to use [props on the stone to call certain features.

kat20;775866 said:
Ok I have a dumb question? Um when the "NEW EVENT" token is placed in your bag and I double click it nothing happens! So basicly how do I set up my event? am I doing something wrong? Thanks
 

Sir Notez

Wanderer
I would very much like to download and use this, but it seems when i open it with winrar and try to extract it it says its a windows file, like its corrupted, ? any way to fix that or any way to get the file??
 
Top