Vorspire
Knight
[RUO 2.0] Shard Voting
PACKAGE:
----------
namsepace Server.Voting
----------
OVERVIEW:
----------
----------
- The XML documentation summaries will provide pop-up information to VS users.
----------
----------
FUNCTIONALITY:
----------
----------
When the system is running, it will allow players to vote for your shard in 2 different ways;
This system supplies you with a VoteStone which can be added ingame by using one of these commands:
When you have added the VoteStone, it will automatically use the default options provided by the VoteConfig object, which can be configured by using the [VoteConfig command (See: COMMANDS).
When the VoteSite' Valid property is false, this means that the URL you have entered is Invalid and voting from this stone will be Unavailable.
Unavailability will prevent anyone from attempting to vote for this vote site.
When a vote request is invoked, the system determines whether they are allowed to vote based on Account Tags (as sugested by David) to keep track of the last time the player invoked a vote request that was successful.
As you can see, each VoteSite profile has it's own tag.
The system will not let the player vote until the time of the Account Tag plus the CoolDown time for that VoteSite is less than the current time (DateTime.Now).
The system can very easily be modified to give rewards upon voting too, you can simply override the OnVote( Mobile m, VoteStatus status ) method provided by the base VoteItem to have it drop an item in the players' backpack if the vote was successful or not.
The VoteStatus variable argument can determine the status of the vote request at that point. The standard values are:
----------
----------
COMMANDS:
----------
----------
The system comes with 3 standard commands:
This command does not support multiple vote sites, however, it does make use of the internal VoteItem instance to allow players to cast a vote.
[VoteInstance:
This command allows you to configure the internal VoteItem instance for use with the [Vote command.
[VoteConfig:
This command allows you to change the overall default settings of the vote system. These settings are typically used whenever a new VoteItem object is created.
----------
----------
INSTALLATION:
----------
----------
----------
REGARDS:
----------
----------
Thank you for taking the time to read this post, I hope this system was of use to you and that it may benefit your shard greatly.
-Vorspire
Shard Voting
----------PACKAGE:
----------
namsepace Server.Voting
----------
OVERVIEW:
----------
----------
- The ability to specify multiple vote websites and track each one seperately.
- The ability to choose standard options for each vote site.
- Capturing vote requests and invoking a special event to broaden system functionality.
- The XML documentation summaries will provide pop-up information to VS users.
----------
----------
FUNCTIONALITY:
----------
----------
When the system is running, it will allow players to vote for your shard in 2 different ways;
- Using the [Vote command (See: COMMANDS)
- Using an ingame VoteItem object.
This system supplies you with a VoteStone which can be added ingame by using one of these commands:
- [Add VoteStone - Creates an instance of VoteStone.
- [Add VoteStone <string name> - Creates an instance of VoteStone with custom name.
- [Add VoteStone <string name> <int hue> - Creates an instance of VoteStone with custom name and hue.
When you have added the VoteStone, it will automatically use the default options provided by the VoteConfig object, which can be configured by using the [VoteConfig command (See: COMMANDS).
When the VoteSite' Valid property is false, this means that the URL you have entered is Invalid and voting from this stone will be Unavailable.
Unavailability will prevent anyone from attempting to vote for this vote site.
When a vote request is invoked, the system determines whether they are allowed to vote based on Account Tags (as sugested by David) to keep track of the last time the player invoked a vote request that was successful.
As you can see, each VoteSite profile has it's own tag.
The system will not let the player vote until the time of the Account Tag plus the CoolDown time for that VoteSite is less than the current time (DateTime.Now).
The system can very easily be modified to give rewards upon voting too, you can simply override the OnVote( Mobile m, VoteStatus status ) method provided by the base VoteItem to have it drop an item in the players' backpack if the vote was successful or not.
The VoteStatus variable argument can determine the status of the vote request at that point. The standard values are:
- Invalid - The request was rejected because something went wrong. This can happen when a VoteItem is not set up properly.
- Success - The request was successful.
- TooEarly - The request was rejected because it was made before the CoolDown delay reached zero.
- Custom - The request was rejected because the VoteItem.OnBeforeVote method returned false.
----------
----------
COMMANDS:
----------
----------
The system comes with 3 standard commands:
- [Vote - Cast a vote for your shard. (Player)
- [VoteInstance - Gets the props menu for the internal VoteItem instance. (GameMaster)
- [VoteConfig - Gets the props menu for the internal vote system configuration. (GameMaster)
This command does not support multiple vote sites, however, it does make use of the internal VoteItem instance to allow players to cast a vote.
[VoteInstance:
This command allows you to configure the internal VoteItem instance for use with the [Vote command.
[VoteConfig:
This command allows you to change the overall default settings of the vote system. These settings are typically used whenever a new VoteItem object is created.
----------
----------
INSTALLATION:
----------
----------
- Extract the archive.
- Drag & Drop the 'Voting' folder into your 'Scripts' directory.
- Check and configure the base options in 'VoteConfig.cs' to make sure they suit your shard.
- Start RunUO, log-in and add your 'VoteStone'.
- Finished, unless you wish to configure your 'VoteStone' more, use the [Props command.
----------
REGARDS:
----------
----------
Thank you for taking the time to read this post, I hope this system was of use to you and that it may benefit your shard greatly.
-Vorspire