Jump to content
MakeWebGames

[mccode v2] Screening Mod and Research Facility Centre Mod


War_Hero
 Share

Recommended Posts

Hi all.

This is my first mod, so it's not the best. I coded all of this from scratch. I'm not sure if it's been posted before either.

This mod can be used if you decide to introduce a virus into your game. For example, I posted a news article in my newspaper about a virus spreading. So I created a mod that required the user to be screened before they accessed certain pages, and then re-screened after they travelled.

Details

Version: V2

Installation Time: Approx 10-20 mins

So, the mod:

Step 1

Create a file called screening.php and paste this code in it:

You're unable to view this code.

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

 

Step 2

Run this SQL:

You're unable to view this code.

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

 

Step 3

Then add this cron into the cron_fivemins.php:

You're unable to view this code.

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

 

Step 4

Now create a file called screen.php and paste this code into it:

You're unable to view this code.

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

 

Step 5

Then run this SQL:

You're unable to view this code.

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

 

Step 6

Then add this cron into cron_day (or cron_hour.php if you want the users to be screened every hour):

You're unable to view this code.

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

 

Place this on every page that you want the user to have to be screened first before they can access it:

You're unable to view this code.

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

 

That's the screening part done. Now for the Research Facility.

Step 1

Create an item called Research Facility Area 1 Key Card. Make it non-buyable with no effects.

Step 2

Create a file called research.php and paste this code into it:

You're unable to view this code.

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

 

Step 3

Create a file called researchcollect.php and paste this code into it:

You're unable to view this code.

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

 

NOTE: Replace ~~ITEM ID HERE~~ with the item ID of the Research Facility Area 1 Key Card

Step 4

Run this SQL:

You're unable to view this code.

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

 

Step 5

Then add this cron into cron_day.php:

You're unable to view this code.

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

 

Step 6

Create a file called researchfacility.php and paste this code into it:

You're unable to view this code.

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

 

Step 7

Create a file called researcharea1.php and paste this code into it:

You're unable to view this code.

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

 

NOTE: Replace ~~ITEM ID HERE~~ with the item ID of the Research Facility Area 1 Key Card

Step 8

Then run this SQL:

You're unable to view this code.

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

 

Step 9

Then add this cron into cron_day.php:

You're unable to view this code.

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

 

And then you're done. I hope you enjoy. As I say, it's not the best because it's my first mod. :)

 

If you find any errors, please post them here. =] I've tested it on my brother's game and it works, so hopefully all will be well. :)

I'd like to thank Floydian, Isomerizer and fbiss for helping me sort out some errors that occured during the making of this mod. Thank you. :)

 

EDIT: Re-posted the screen.php. There was an error in it. If anyone finds anymore errors, please post them here. :)

Link to comment
Share on other sites

Re: Screening Mod and Research Facility Centre Mod [FREE][V2]

Nice mod ill be checking this out

it would go great wid my Desease control mod and this oh yeah this will be nice if i have the time to add the desease mod and this so yeah Thanks for a good mod

Link to comment
Share on other sites

Re: Screening Mod and Research Facility Centre Mod [FREE][V2]

Joker, Aren;t you going to talk about how it has "Security Issue's"? And how your gonna fix it up all nice and good? :wink:

Use some sprintf on that mod! Woooo

Nice mod thou :-P Look's like you worked hard and considering it's your first mod :-)

Link to comment
Share on other sites

Re: Screening Mod and Research Facility Centre Mod [FREE][V2]

Thank you for the positive feedback. :)

Yeah, security is one of main problems. So there may have to be some tightening up in places, which, I would be greatful to anyone who could show me how. :)

It took me two days to code the Research Facility mod because I had some problems. And it took me about 1 hour to code the screening mod. :-P

Link to comment
Share on other sites

Re: Screening Mod and Research Facility Centre Mod [FREE][V2]

 

in my opinion you did a very good job

didnt test it yet but im sure you worked hard on it

well done and keep it up :)

Thank you. :)

I did work very hard on it.

I'll be trying to improve my PHP skills a lot more. For example, working on security and cases/functions, which are my main two areas that cause me trouble. :-P

Link to comment
Share on other sites

Re: Screening Mod and Research Facility Centre Mod [FREE][V2]

Have you created a field in your users table called screen?

If you have and the problem still occurs, please post you screen.php and I'll compare it with mine because mine works fine. :)

Link to comment
Share on other sites

Re: Screening Mod and Research Facility Centre Mod [FREE][V2]

Hey War_Hero, very nice mod. I won't be using it but I thought I'd just give you some advice.

Basically, you can put all of those files and combine them into one.

I usually use cases/functions as shown below

 

You're unable to view this code.

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

 

and so on.

This way, you can put each file into one larger file. Also, I'd advise if you perhaps made your code slightly easier to read by adding some spaces and lines between them. Finally, I'd like to say it's great seeing first timers try their hardest and actually code their own work.

Continue to work like this, and you'll be a successful coder :).

All you need to do know is increase your php/sql etc knowledge even more.

Regards,

Akash :)

P.S If you need help on what I explained in this post, PM me or add my msn [email protected].

Link to comment
Share on other sites

Re: Screening Mod and Research Facility Centre Mod [FREE][V2]

Thank you for your reply Akash. I'll definetly take into account what you said. Cases and functions are one of my worst areas at the moment. I get stuck with them. :(

As for making it easier to read, I should have spaced it out before I posted it. I admit, I forgot. :lol:

But, because cases and functions are one my worst areas, I'll be trying my best to teach myself how they work. :)

 

And jds137, I'll re-post that script in a min. I found the error, I believe. There was an un-necessary ' in the script. It's my keyboard. It's not set to English, it's set to French or something because I'm in Belgium on holiday. :-P

Link to comment
Share on other sites

Re: Screening Mod and Research Facility Centre Mod [FREE][V2]

 

You're unable to view this code.

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

 

Find:

You're unable to view this code.

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

 

Replace:

You're unable to view this code.

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

Link to comment
Share on other sites

Re: Screening Mod and Research Facility Centre Mod [FREE][V2]

 

Fixed. :)

And thanks for pointing that out = YarX =. :)

No problemo :)

And...

 

You're unable to view this code.

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

 

http://mobslife.net/researcharea1.php

Show us your code for where you entered the ItemID, and we'll point out what needs correcting :)

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

 Share

×
×
  • Create New...