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]

Edited by Rendril
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Forum Statistics

    17.5k
    Total Topics
    182.5k
    Total Posts
  • Recently Browsing

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

×
×
  • Create New...