Jump to content
MakeWebGames

Recommended Posts

  • 2 weeks later...
  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Quick questions about how this works. If you are running off a timestamp, it only updates when the affected person clicks right? Or if anyone clicks, will it update the time a person is in recovery or jail? The reason I ask, is we have waring situations where we have to wait for people in the hospital to get out before we can gain points off them again. If that user is offline, (or not clicking) will they come out of recovery so we can gain points off them again?

Posted
Quick questions about how this works. If you are running off a timestamp, it only updates when the affected person clicks right? Or if anyone clicks, will it update the time a person is in recovery or jail? The reason I ask, is we have waring situations where we have to wait for people in the hospital to get out before we can gain points off them again. If that user is offline, (or not clicking) will they come out of recovery so we can gain points off them again?
it is a timestamp if you log in say 10 mins later it will update and take off 10 mins however i am not sure there is a cap on how many times this will run so if you log in after 10 years you may be in for a wait not 100% on that however hope this helps even if only a little
Posted

The way it actually works is if anyone is active on the game it gets run (so for example if 8 people are online and each click it will be run 8 times) so no matter if the user that's in hospital their time will go down as long as there is people online (if everyones offline it will not go down until someone comes online and starts clicking away(playing the game).

EDIT: The number of clicks doesn't effect the ammount of time going down that is still done by timestamps so will go down every minute like it should but people do need to be playing for the script to run :)

Posted

yeah, it will ask that box in the DB 8 times if it is ready to loose 1 min, basically. and if no one was online to click I guess it wouldn't affect the game negatively, it wouldn't really matter if they were in recovery or hospital. So yes, that is very helpful, Thank you Djkanna. I suppose now I just have to decide if I want server load, or user PC load.

Posted
Normally if I wasn't feeling so lazy, I would recode shit so it based it on timestamps (mainly for jail and hospital) but since i AM lazy, I jused used the origin script from here, and modded it to work for ALL crons. XD The only thing I've left out just now is teh validate crap, appart from that, it seems to be running fine... Here's my codes...

Note: As with all my posts made so far, I don't expect this to work, and don't care if it does or doesn't... I'm really still not sure why I'm posting this crap here. XD

ENJOY!

Also, ALL credit goes to the genius who started this thread.

updates.sql

[mysql]

CREATE TABLE IF NOT EXISTS `updates` (

`name` varchar(255) NOT NULL default '',

`last` int(255) NOT NULL default '60'

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

INSERT INTO `updates` (`name`, `last`) VALUES

('1min', 1273503540),

('5min', 1273503300),

('1hour', 1273500000),

('1day', 1273449600);

[/mysql]

Add

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

RIGHT under

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

in globals.php

crons.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

cron_minute.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

cron_fivemins.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

cron_hour.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

cron_day.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

This doesnt update jobs pay and stuff

  • 2 months later...
Posted

I know Im missing something here,

where do you put a command to place a time stamp into (somewhere in the DB) so the program knows what its taking the min from?

This file seems to update timestamps just fine, but how do you get timestamps there in the first place?

I'm so confused and cant get this to work.

OK, so I get it, no help for the dumb ass...... Helps when you install to the right server...... (installed to test, was checking it on main) This worked perfectly only with changes to the cron commands that I have customized.

  • 7 months later...

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.


×
×
  • Create New...