Jump to content
MakeWebGames

Education mod


dnenb

Recommended Posts

Hey guys,

This mod is based on illusions idea from here. I ran into a lot of problems installing that to my game, so I took the idea and wrote something similar.

How it works

This is almost the same as the education that comes with v2, only that the players has to performs "clicks" in order to finish courses. When you add a course you can say that it takes 42 clicks to finish that course. 1 click costs 1 brave (thanks !Angel for the suggestion). Then the player has to click a link that says "click here to study" 42 times in order to finish the course. Limits are set on how many clicks the player can perform for this course per hour and per day. This makes education something more than just "click start course and wait until it's done".

Also, if you set a course id in the "mustBeTakenBefore"-field, then that course must be taken before starting this new one. Example: You can set it so that a "basic computer course" must be taken before an "advanced computer course".

Screnshots

[ATTACH=CONFIG]1236[/ATTACH] [ATTACH=CONFIG]1237[/ATTACH] [ATTACH=CONFIG]1238[/ATTACH] [ATTACH=CONFIG]1239[/ATTACH]

Installing

1. Add the tables and fields:

You're unable to view this code.

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

 

 

2. Create a new file called "schooling.php":

You're unable to view this code.

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

 

 

3. Edit cron_hour.php and add this:

You're unable to view this code.

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

 

 

4. Edit cron_day.php and add this:

You're unable to view this code.

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

 

 

5. Add a link to schooling.php from explore or wherever.

And that's it! This is the first code I give out here I think, so please give me some feedback. I didn't make a staff panel, since I just use phpmyadmin myself.

screen1.PNG.3b780b24d1729b24cf69af492c47c1ce.PNG

screen2.PNG.9ca9dff5a68fdfb46ecf9250cc683342.PNG

screen3.PNG.1ff20e1793a1edfacb4a1086786796c8.PNG

screen4.PNG.e48015f39c335420dfb0c449da4088a1.PNG

Link to comment
Share on other sites

Hey guys,

This mod is based on illusions idea from here. I ran into a lot of problems installing that to my game, so I took the idea and wrote something similar.

How it works

This is almost the same as the education that comes with v2, only that the players has to performs "clicks" in order to finish courses. When you add a course you can say that it takes 42 clicks to finish that course. Then the player has to click a link that says "click here to study" 42 times in order to finish the course. Limits are set on how many clicks the player can perform for this course per hour and per day. This makes education something more than just "click start course and wait until it's done".

Screnshots

[ATTACH=CONFIG]1236[/ATTACH] [ATTACH=CONFIG]1237[/ATTACH] [ATTACH=CONFIG]1238[/ATTACH] [ATTACH=CONFIG]1239[/ATTACH]

Installing

1. Add the tables and fields:

You're unable to view this code.

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

 

2. Create a new file called "schooling.php":

You're unable to view this code.

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

 

3. Edit cron_hour.php and add this:

You're unable to view this code.

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

 

4. Edit cron_day.php and add this:

You're unable to view this code.

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

 

5. Add a link to schooling.php from explore or wherever.

And that's it! This is the first code I give out here I think, so please give me some feedback. I didn't make a staff panel, since I just use phpmyadmin myself.

Just a quick note, not everyone's using the same file system as you.

To everyone using this: make sure to change the globals.php include file path to match your own setting

Also, one fully-tested, brand-spankin'-new Staff Panel for it :)

You're unable to view this code.

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

A copy of this is available on my site

http://magictallguy.tk/dl/mods/schooling.php

Edited by Magictallguy
Updated the staff panel
Link to comment
Share on other sites

Currently working on adding functionality so that you can say that a certain course must be completed before you can start another one. Example: You gotta finish "basic computer course" before you can start "intermediate computer course". I'll update the first post with everything once I'm done.

Link to comment
Share on other sites

Currently working on adding functionality so that you can say that a certain course must be completed before you can start another one. Example: You gotta finish "basic computer course" before you can start "intermediate computer course". I'll update the first post with everything once I'm done.

And I'll update the staff panel to match :P

Link to comment
Share on other sites

I did actually do a rewrite fo this script but never released it as a free mod. the updated version let you add Sub categories to courses example

Course 1: Scavaging had 3 sub courses so you had to finish all 3 before the Savaging course was fully completed...

Course could have an Immediate Effect on an outcome EXAMPLE.. end of course could give user an instant one time reward or if you wanted to you could use the course as a daily reward which meant a link would show up in your Explore page so you could use it once per day...

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

yeah sorry if it a bump but the sql gives me error

Error

SQL query:

CREATE TABLE IF NOT EXISTS `education_coursesdone` (

`userid` INT( 11 ) NOT NULL DEFAULT '0',

`courseid` INT( 11 ) NOT NULL DEFAULT '0',

`crtimes` INT( 11 ) NOT NULL DEFAULT '0',

PRIMARY KEY ( `userid` , `courseid` )

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5

Link to comment
Share on other sites

yeah sorry if it a bump but the sql gives me error

Error

SQL query:

CREATE TABLE IF NOT EXISTS `education_coursesdone` (

`userid` INT( 11 ) NOT NULL DEFAULT '0',

`courseid` INT( 11 ) NOT NULL DEFAULT '0',

`crtimes` INT( 11 ) NOT NULL DEFAULT '0',

PRIMARY KEY ( `userid` , `courseid` )

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5

Can't check it again now, but it should work out of the box. My guess is that the formatter here on the forum has messed something up. Try writing it off (don't copy+paste) or creating the table with phpmyadmin :)

Link to comment
Share on other sites

yeah sorry if it a bump but the sql gives me error

Error

SQL query:

CREATE TABLE IF NOT EXISTS `education_coursesdone` (

`userid` INT( 11 ) NOT NULL DEFAULT '0',

`courseid` INT( 11 ) NOT NULL DEFAULT '0',

`crtimes` INT( 11 ) NOT NULL DEFAULT '0',

PRIMARY KEY ( `userid` , `courseid` )

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5

You are opening a "(" but not closing it, try this:

 

You're unable to view this code.

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

Edited by Script47
Link to comment
Share on other sites

Hello all, I have installed this onto my game. Everything work's so far as I know of...

How ever the courses does not show up...?

I have a Version 1 and converted everything to V1.

Did you create the courses and add them in your database?

Link to comment
Share on other sites

I've created the courses. I've check my database to see if it has been created. It has been created. But doesn't show?

Then my best guess is that you have no courses with `mustBeTakenBefore` = 0. If `mustBeTakenBefore` is not equal to 0, then the coursenumber it is equal to has to be finished before that course will be visible.

Link to comment
Share on other sites

Yeah. To Raven1992, Revolution-NOTL and everyone else: This mod is working without any issues, but you have to be careful about copying code from the highlighter in this forum as it sometimes messes up some small things. My suggestion is that you actually write it off line by line. That way you'll see at once if there are any quotes missing or similar.

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.

×
×
  • Create New...