Jump to content

Event At Specific Time Of Day


Rendril

Recommended Posts

This code will allow the user the recieve the "Noon Key" only at midday.
[code]
@vz = "rendrilrevant-";//the key prefix to use
if(mds_has_rpcq_keys(@vz. "noon-key")){//check if the player is carrying the key already
echo "The Sun smiles upon you, you are carrying the Noon Key";
}
else
{
//check that the current time is between 11:30 and 12:30
if(time() > mktime(11, 30, 0, date("m") , date("j"), date("Y")) && time() < mktime(12, 30, 0, date("m") , date("j"), date("Y")))
{
mds_give_rpcq_keys(@vz . "noon-key");
echo "Rays of light shimmer across the water, materialising into the Noon Key.<br/>You take the key and move on with your quest.";
}
else{
echo "You look into the pool of water and see only your own reflection.<br/>Words of the poem linger in your thoughts<br/><br/>\"<i>Only at the Sun's zenith will you see the light</i>\"";
}
}
[/code]

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Forum Statistics

    16,149
    Total Topics
    176,377
    Total Posts
  • Recently Browsing

    No registered users viewing this page.

  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

×
×
  • Create New...