Delay open until Dec. 25th

Discussion in 'Script Support' started by manwitch, Dec 3, 2017.

  1. manwitch

    manwitch Wanderer

    Joined:
    Mar 22, 2017
    Messages:
    31
    Likes Received:
    5
    I've put together a few snippets from other scripts to create a random gift box that when double clicked the gift box deletes and gives you a random present. I'm planning on selling these to players from a vendor stone. So far the script compiles and works fine. I am having zero luck finding a snippet to make it so the players can't open the gift box until Dec. 25th. Any ideas?
    .
     
  2. maybeshewill

    maybeshewill Sorceror

    Joined:
    Nov 6, 2010
    Messages:
    401
    Likes Received:
    65
    manwitch likes this.
  3. manwitch

    manwitch Wanderer

    Joined:
    Mar 22, 2017
    Messages:
    31
    Likes Received:
    5
    Thank You! :) There's a lot there to go through, But it looks like close to what I need. Thanks again! *scampers of to read*
     
    maybeshewill likes this.
  4. maybeshewill

    maybeshewill Sorceror

    Joined:
    Nov 6, 2010
    Messages:
    401
    Likes Received:
    65
    In the ondoubleclick method

    Code:
    if ( DateTime.Now.Month == 12 &&  DateTime.Now.Day == 25)  //december, day 25 so player can open the gift
    {
    
    }
    else
    {
    return false;  
    }
            
    something like that
     
    manwitch likes this.
  5. manwitch

    manwitch Wanderer

    Joined:
    Mar 22, 2017
    Messages:
    31
    Likes Received:
    5
    Thanks Again! This worked really well for a starting point. I had to get rid of the "false" after the return... no clue why, but it worked. I also added another if statement in there to send the message that they can't open until Dec. 25th. One other problem I'm having, It's my first holiday season, so I am selling cheaper presents on the stone that can be opened any time (with holiday deco in them), sometimes right at purchase, the present opens when it arrives in pack....?? Any ideas why or how to fix this? Thanks again for all your help.
     
    maybeshewill likes this.
  6. maybeshewill

    maybeshewill Sorceror

    Joined:
    Nov 6, 2010
    Messages:
    401
    Likes Received:
    65
    Thats probably RAZOR, go to Display/Counters and look there if ''Auto search new containers'' is checked
     
    manwitch likes this.
  7. manwitch

    manwitch Wanderer

    Joined:
    Mar 22, 2017
    Messages:
    31
    Likes Received:
    5
    AHA! Yes it was checked, so I'll just have to post a sign that tells them to uncheck that before purchase. Brilliant! Thank you Soooooo much, The holidays will be much better because of you! :)
     
    Enroq and maybeshewill like this.
  8. maybeshewill

    maybeshewill Sorceror

    Joined:
    Nov 6, 2010
    Messages:
    401
    Likes Received:
    65
    :p You are welcome!
     
    Enroq and manwitch like this.

Share This Page