Dragon Blade Posted June 7, 2013 Posted June 7, 2013 Hello all, I do not know if this mod has been created. But it is a easy addon. If you have not logged in for 3 days you will be fired from your Job. As I do not have a V2, my instructions will be rubbish. Go to this thread to link into this http://makewebgames.io/showthread.php/43543-Job-Addon So first alter this query - You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open up cron_day.php and add - You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Any error's I am sorry! Hope you like it. Its the first addon I have ever made. Quote
Guest Posted June 7, 2013 Posted June 7, 2013 Ha, simple but effective, maybe you could modify the jobs so if you have a bad track history it won't let you apply for some jobs ^.^. Also with that mod surely whenever the cron runs it will always add a day on? There is no check to see if the user has logged in? Quote
Dayo Posted June 7, 2013 Posted June 7, 2013 Ian it automaticly sets it to 0 upon login maby chuck an if statment around it so it dosent update on each page load ie You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. In the 4th block of code you have put f {...} and not if {...} probly just didnt copy the whole code :P Quote
Dayo Posted June 7, 2013 Posted June 7, 2013 easily done :P and forgot to say it looks like a simple yet effective add-on and one i actually have not seen made for McCodes so even better :P maby add something to the jobs page to say if you dont turn up for work for 3 days you will get fires, im sure people would be like "WFT why do i no longer have a job" Quote
Guest Posted June 7, 2013 Posted June 7, 2013 easily done :P and forgot to say it looks like a simple yet effective add-on and one i actually have not seen made for McCodes so even better :P maby add something to the jobs page to say if you dont turn up for work for 3 days you will get fires, im sure people would be like "WFT why do i no longer have a job" Hmm possibly, though they do get an event ^.^, little things in life eh. Quote
KyleMassacre Posted June 7, 2013 Posted June 7, 2013 easily done :P and forgot to say it looks like a simple yet effective add-on and one i actually have not seen made for McCodes so even better :P maby add something to the jobs page to say if you dont turn up for work for 3 days you will get fires, im sure people would be like "WFT why do i no longer have a job" I have seen something like that around here. I didn't take that big of a look at it but pretty similar Quote
Octarine Posted June 7, 2013 Posted June 7, 2013 A handy addition, but why bother overloading an already greatly over-used users table, and indeed why even bother with a cron? In authenticate.php, a simple check prior to updating the last_login field would be to check that field against time(). If it is greater than 3 days ago, update the user's job & jobrank fields accordingly and proceed with the normal login process. The same trick can be used for a myriad of things if you look carefully. Quote
Dominion Posted June 7, 2013 Posted June 7, 2013 In authenticate.php, a simple check prior to updating the last_login field would be to check that field against time(). If it is greater than 3 days ago, update the user's job & jobrank fields accordingly and proceed with the normal login process. Part of the point of removing the job would be the remove the money placed into their account, and the stat increase. Doing it via authenticate would simply be an annoyance once people finally login rather then anything practical. Of course you could remove all the stat, and money given since X date, but it seems kind of pointless, and you would need to take into account someone may mug them. Quote
Octarine Posted June 7, 2013 Posted June 7, 2013 You mean you don't know when somebody is mugged? Oh well, this type of trick works in any number of situations, and I've still to see the need for any in-game crons on any McCode's based system. Server-side crons doing garbage collection, reporting, etc I'll accept, as that is pretty much standard across the board, but another field in the users table and another query to run at some often arbitrary midnight? Now those simple unnecessary imo. Quote
Dominion Posted June 7, 2013 Posted June 7, 2013 (edited) Down to opinion. I'm not attacking/defending the way this modification is done I was simply stating that a check (per player or game wide) in authenticate wouldn't be any better then this for that reason. I don't feel taking money off someone who has mugged a player would be fair just because that player has not logged on for a while. So having logs is irrelevant to my point. @OP - I'm glad to see you posting, and I'm not actually attacking your mod. Well done, simple but not something I've seen for MCC before. :) Edited June 7, 2013 by Dominion Quote
Dragon Blade Posted June 7, 2013 Author Posted June 7, 2013 Thanks for the comments :') I was just thinking, instead of the crons paying you at 5:00PM I think I want to make where you can go onto jobs.php and go click to work. And when your at work you cannot do anything. After say 10minutes of work you will get paid...? Quote
Guest Posted June 7, 2013 Posted June 7, 2013 Thanks for the comments :') I was just thinking, instead of the crons paying you at 5:00PM I think I want to make where you can go onto jobs.php and go click to work. And when your at work you cannot do anything. After say 10minutes of work you will get paid...? 10 minutes wait would be annoying without doing anything. However it is a good idea. Quote
Dragon Blade Posted June 7, 2013 Author Posted June 7, 2013 Hmmm...annoying...but life you will have to work to gain your money. In some cases you dont need to work...but most places alot of people work...and waste there time to gain money... but then you don't want your members to be annoyed... but then there is jai and hospitall...You will have to wait... Quote
Guest Posted June 7, 2013 Posted June 7, 2013 Hmmm...annoying...but life you will have to work to gain your money. In some cases you dont need to work...but most places alot of people work...and waste there time to gain money... but then you don't want your members to be annoyed... but then there is jai and hospitall...You will have to wait... I work and do other stuff IRL :s. Your choice :) Quote
Dragon Blade Posted June 7, 2013 Author Posted June 7, 2013 I know :D But then I don't want to annoy my members... :( (If I get any) Quote
Guest Posted June 7, 2013 Posted June 7, 2013 I know :D But then I don't want to annoy my members... :( (If I get any) You can't please the world, and everyone has there own opinions :) Quote
JamesRage Posted June 7, 2013 Posted June 7, 2013 I hate this mod alot, thanks Dragon Blade for nothing, it damaged my game. Quote
KyleMassacre Posted June 7, 2013 Posted June 7, 2013 I hate this mod alot, thanks Dragon Blade for nothing, it damaged my game. care to explain how it damaged your game? maybe its the mod, maybe its the install? Quote
Dominion Posted June 7, 2013 Posted June 7, 2013 (edited) I hate this mod alot, thanks Dragon Blade for nothing, it damaged my game. If you have nothing constructive to say, and so far you really haven't, then don't post at all. If you need help ask, but being rude isn't helping. BTW - I removed the posts for a reason. Do not continue this in the thread. Edited June 7, 2013 by Dominion Quote
Dominion Posted June 7, 2013 Posted June 7, 2013 Just to be clear if this conversation doesn't go away I'm going to ban somebody. Quote
Guest Posted June 7, 2013 Posted June 7, 2013 Okay I need help, I have a V1 jobs. And I always get a error when I try to be promoted Error - You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Line 128 - You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Line 123 - 140 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open a separate thread in support Quote
dnenb Posted October 13, 2013 Posted October 13, 2013 I love this idea! What do you think about doing it like this? A check on login: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. (haven't tested this, just want an opinion) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.