1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Easter 2014] Raised Easter Bunnies & Marshmallow Ducklings 1.01

2014 Easter Gifts found on Official UO Servers

  1. Tecmo
    Requirements:
    Client 7.0.34.22
    Characters atleast [X] days old logging in between publish day and 12:01 AM 5/1/2014 will receive an Easter Gift!
    [​IMG]
    • An Easter Bunny raised in one of Sosaria’s various cities, with a chance at a rare location!
    • The Easter Bunny comes in eight (8) different vest colors.
    • 8 possible rare locations! [Add as many as you like]
    • 5 possible rare hues! [Add as many as you like]
    • Once every 24 hours the Easter Bunny will prepare an edible marshmallow duckling that can be eaten.
    • Marshmallow ducklings come in six (6) different colors.
    [​IMG]


    How old shall account be in order to obtain Easter Gift?
    GiftGiving.cs - Line 60 (by default I have this set to 7 days, adjust as you like)
    Code (C#):
    1. public virtual TimeSpan MinimumAge{ get{ return TimeSpan.FromDays( 7.0 ); } }
    Note: GiftGiving.cs should already be in your Scripts\Misc\Gifts folder, if not then use this copy.


    What day shall the Easter gift giving begin and end?
    HappyEasterBasketGiver.cs - Line 15 & 16
    Code (C#):
    1. public override DateTime Start{ get{ return new DateTime( HolidayConfig.m_CurrentYear, 4, 16 ); } }
    2. public override DateTime Finish{ get{ return new DateTime( HolidayConfig.m_CurrentYear, 5, 1 ); } }
    IMPORTANT NOTE! Be sure the START date is at least 1 day later than your latest restart. Example: If you want to give out gifts starting on 4-20-14 then set the date to 4-20-14 but be sure you restart your server on or before 4-19-14. If you do not follow this procedure not all players will get the gift.

    Year Tagging!
    Included in this package is the HolidayConfig.cs
    Take notice in RaisedEasterBunny.cs and the HolidayConfig.cs files to see how to use this in your own holiday scripts. This will allow you to reuse the same gifts another year without the need to code another just to show a different date.


    THE EASTER BUNNY!
    Code (C#):
    1. /* Script Name: Easter Bunny
    2. * Author(s): Tecmo [email protected]
    3. * Version: 1.00
    4. * Release Date: 2014.04.16
    5. * Copyright: The Ninth Virtue © 2014 Tecmo http://www.ninthvirtue.com
    6. * Free to use, edit and redistribute. Please leave header intact.
    7. * Purpose: EA Item obtained @ Easter Holiday
    8. * Characters atleast 7 days old logging in between publish day and 12:01 AM 5/1/2014 will receive an Easter Gift! •
    9. * An Easter Bunny raised in one of Sosaria’s various cities (26), with a chance at a rare location (8)! •
    10. * The Easter Bunny comes in eight (8) different vest colors •
    11. * Once every 24 hours the Easter Bunny will prepare an edible marshmallow duckling that can be eaten •
    12. * Marshmallow ducklings come in six (6) different colors.
    13. */
    Customize the details of the Easter Bunny to your liking...

    Important Note: If using GiftGiving be sure to restart your server with this Easter Package before 12:01 AM of the day you wish to start the gift giving. This is suggested to prevent "I didn't get my gift" pages.
    Code (C#):
    1.  
    2.   #region Config
    3. /* What months will you allow the Bunny to give gifts? */
    4. /* Jan = 1, Feb = 2, Mar = 3, Apr = 4, May = 5, Jun = 6, Jul = 7, Aug = 8, Sep = 9, Oct = 10, Nov = 11, Dec = 12 */
    5. /* Note: Starting month must be a lesser or equal to ending month! */
    6. private int m_StartingMonth = 3; //Will allow Bunny to start giving gifts on the 1st day of this month. [Default: 3]
    7. private int m_EndingMonth = 4; //Will allow Bunny to give gifts up to the last day of this month. [Default: 4]
    8.  
    9. private TimeSpan m_GiftTimer = TimeSpan.FromHours(24); //Time that will expire before Bunny will give another gift. [Default: TimeSpan.FromHours(24)]
    10. private double m_GiftChance = 0.05;//Chance to gift a rare gift such as Chocolate Jellybeans [Min value of 0.01 to Max value of 1.00, Default: 0.05]
    11.  
    12. private static int[] m_NormalHues = new int[] { 17, 33, 1196, 1359, 1366, 1372, 1378, }; //Default = Official Servers
    13. private static int[] m_RareHues = new int[] { 1151, 1157, 1175, 1283, 1289, }; //Custom Hues
    14. private bool AllowRareHueOnAll = false; //Do you want Rare Hue chance for all or just Rare Locations? If true the chance to get rare hue on all is same as RareLocationChance (below).
    15. private double m_RareLocationChance = 0.05;//Chance that Easter Bunny will be shown as being raised in a Rare Location.
    16.  
    17. private static string[] m_RareLocations = new string[]
    18. {
    19. "King Blackthorn's Castle",
    20. "Bet-Lem Reg", /*Ilshenar: Pixie village*/
    21. "Lakeshire", /*Ilshenar: Home city of the Meer people*/
    22. "Mireg", /*Ilshenar: Home city of the Meer people (native spelling)*/
    23. "Mistas", /*Ilshenar: Ruined city*/
    24. "Montor", /*Ilshenar: Ruined city*/
    25. "Reg Volom", /*Ilshenar: Home of the Ethereals*/
    26. "Ver Lor Reg", /*Ilshenar: Gargoyle City*/
    27. };
    28. #endregion

    Images

    1. easterbunny.png
    2. marhmallowduckling.png
    Mogster likes this.