Jump to content

mmorpg style timer help.


user51

Recommended Posts

Ok guys, I'm gonna have to throw a question out there. I am building a mmorpg. And I could use some help with some coding.

 

I have two cron files that run every hour and every day(24 hrs )

My question is, how can I add a visual countdown based on server time to show how long the cron has left to tick?

 

I have tried many countdowns but most of them reset once I leave the page.

 

So basically I need a countdown timer to show the user how long till he getts more food or whatever.

 

Any help would be greatly appreciated.

 

Thank you in advance for taking time to read and/or help.

 

 

Link to comment
Share on other sites

I'm guessing I have to insert This code in the cron file and call it from there. Right?

I doubt that. Javascript is client side. I assume although - I have no exact idea on how to yet - you insert the javascript on the page where the user is present. That javascript uses the time it receives from a database or a text file. Maybe Ajax is something to look in further. That way your client doesn't needs to refresh it's browser, but the stuff just happends 'realtime'.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.