RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
script for certain areas to open on certain days

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 82
Watching You
first off Hi and thanks for taking a look at this request

now what i really need is a script or something either a script or an event that will allow a certain area to either appear or open up on a certain day at a certain time i.e. i want an area to open up on halloween or christmas and then close after that day was over, it would start at 12am and finish 24 hours later

*
Rep:
Level 102
2014 Biggest Narcissist Award2014 Biggest Forum Potato2014 Best Non-RM Creator2013 Best Game Creator (Non-RM)2013 Best IRC ChatterboxParticipant - GIAW 112012 Most Successful Troll2012 Funniest Member2012 Best Use Of Avatar and Signature space2012 Best IRC ChatterboxSecret Santa 2012 ParticipantProject of the Month winner for November 2009For being a noted contributor to the RMRK Wiki2010 Most Successful Troll2010 Biggest Forum Couch Potato2010 Best IRC Chatterbox
I'm pretty sure this can be done with events.

Unless you're talking about real world time.

**
Rep: +0/-0Level 82
Watching You
hmmm it would be ok to be done through events but really i want it in real world time where it checks the computers calander or something i would even put a in game calander for the event where it has real world events. christmas,halloween on the actual days

**
Rep: +0/-0Level 75
Hello everyone ^_^
If I understand correctly, if you had a variable that represented the days (1-365), you could have a common event that set the variable = to the day of the year (i.e. January 5th = 5, December 25 = 359 etc). Then you could also have that common event check to see if the variable = the number corresponding to the date of Halloween, Christmas, etc. And then if the variable does = the number for Halloween, then you can have whatever you want happen after that.

Here is an example for Christmas
Code: [Select]
Control variable [day of the year] +1   #obviously upon a new year, you will need to set this variable = 0
Conditional Branch: variable [day of year] = 359
     Text: Merry Christmas!    #put whatever you want to happen on Christmas here
 Else
     (empty)
 Branch End

You can just keep adding conditional branches for whatever day of the year you want, and can add 1 to the variable however you want. This would only work for an in game calendar, and honestly having a special even happen one a specific day in the real world might be kind of worthless? Using an in game calendar would be much more useful, I believe. I hope this helps.
« Last Edit: February 23, 2011, 10:21:58 AM by hikomarukun »
RPMG2k forever!

***
Rep:
Level 82
IT ALL ENDED.
If you're using a script to use the computer calendar, there must be some way to store the value in a variable.
the rest is pretty much explained by /\ them

**
Rep: +0/-0Level 82
Watching You
hmmmm i think i understand i shall have to learn a bit more about this because i am not a very good scripter but want to learn  :V

but thanks for the replies i have copied the last 2 replies into a work document to help me at a later time thanks all

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
You can use the Time class to retrieve the system time.
Here are examples which you can use in snippets:
Code: [Select]
$game_variables[42] = Time.now.year
$game_variables[42] = Time.now.month
 
$game_variables[42] = Time.now.day    # Day of month
$game_variables[42] = Time.now.wday   # Day of the week
$game_variables[42] = Time.now.yday   # Day of the year

$game_variables[42] = Time.now.hour
$game_variables[42] = Time.now.min
$game_variables[42] = Time.now.sec
$game_variables[42] = Time.now.usec   # Microseconds

# Note $game_variables[042] and $game_variables[0042] is wrong. No leading 0s

The day of week is a bit tricky in that it gives a value from 0 to 6 where 0 = Sunday, 1 = Monday, ... , 6 = Saturday.

*hugs*