Jump to content
MakeWebGames

Job Addon


Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Dominion
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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 by Dominion
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...
  • 3 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...