Jump to content
  • 0

what code to start an event on certain day on a certain time?


randell1993

Question

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  189
  • Reputation:   16
  • Joined:  11/20/11
  • Last Seen:  

OnClock: (On Military Hour)

OnInit: (On Server Start Up)

OnPCLogout

OnPCLogin

OnTouch

OnTimer#### (On NPC Timer)

For days, use gettime command

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  23
  • Reputation:   3
  • Joined:  12/10/11
  • Last Seen:  

OnClock0000:
if(gettime(5) == 1 && gettime(6) == 1) {
announce "Happy New Year",0;
}
end;

Change 0000 after OnClock to time your want, Change Date on 1 of gettime(5) and Change Month on 1 of gettimer(6)

Edited by Magic-Maker
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  76
  • Reputation:   4
  • Joined:  11/15/11
  • Last Seen:  

im wondering what codes i can combine so it will run every sunday at 8pm

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  23
  • Reputation:   3
  • Joined:  12/10/11
  • Last Seen:  

If what you want is the certain weekday and certain time you can use On.. label like this

On<weekday><Hour><Minute>:

weekdays are Sun,Mon,Tue,Wed,Thu,Fri,Sat.

For example , Sunday 8 PM

OnSun2000:
announce "Sunday 08:00 PM",0;
end;

it will announce "Sunday 08:00 PM" On Sunday 8 PM.

Edited by Magic-Maker
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
Answer this question...

×   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.

×
×
  • Create New...