dnenb Posted December 18, 2013 Posted December 18, 2013 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. Quote
Guest Posted December 18, 2013 Posted December 18, 2013 Why would someone want to click 42 times? Sure if your on a phone. Anyhow good job with it :) Quote
dnenb Posted December 18, 2013 Author Posted December 18, 2013 Gives the players somehting to do:) Thanks! Quote
Guest Posted December 18, 2013 Posted December 18, 2013 If it took like 1 brave or will per click maybe there is some incentive. My players always have something to do :) Quote
dnenb Posted December 18, 2013 Author Posted December 18, 2013 (edited) If it took like 1 brave or will per click maybe there is some incentive. My players always have something to do :) That's a good idea! I've implemented it. Original post updated. Edited December 18, 2013 by dnenb Quote
Magictallguy Posted December 18, 2013 Posted December 18, 2013 (edited) 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 December 18, 2013 by Magictallguy Updated the staff panel Quote
dnenb Posted December 18, 2013 Author Posted December 18, 2013 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. Quote
Magictallguy Posted December 18, 2013 Posted December 18, 2013 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 Quote
dnenb Posted December 18, 2013 Author Posted December 18, 2013 And I'll update the staff panel to match :P Awesome:) Changes done and first post updated. Quote
Magictallguy Posted December 18, 2013 Posted December 18, 2013 Awesome:) Changes done and first post updated. Staff-side updated Quote
Uridium Posted December 20, 2013 Posted December 20, 2013 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... Quote
CENilsen Posted December 30, 2013 Posted December 30, 2013 Great Mod just installed it works like a charm :) Quote
dnenb Posted December 31, 2013 Author Posted December 31, 2013 Great Mod just installed it works like a charm :) Glad to hear that :) Quote
Raven1992 Posted March 2, 2014 Posted March 2, 2014 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 Quote
dnenb Posted March 2, 2014 Author Posted March 2, 2014 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 :) Quote
Script47 Posted March 2, 2014 Posted March 2, 2014 (edited) 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 March 2, 2014 by Script47 Quote
Revolution-NOTL Posted March 2, 2014 Posted March 2, 2014 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. [ATTACH=CONFIG]1323[/ATTACH] You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Raven1992 Posted March 2, 2014 Posted March 2, 2014 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. the error keeps showing normally line 2 and lines 4 any help on this Quote
Revolution-NOTL Posted March 2, 2014 Posted March 2, 2014 Really easy fix. Replace line 2 with - You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace line 4 with - You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
dnenb Posted March 3, 2014 Author Posted March 3, 2014 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? Quote
Revolution-NOTL Posted March 3, 2014 Posted March 3, 2014 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? Quote
dnenb Posted March 3, 2014 Author Posted March 3, 2014 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. Quote
Raven1992 Posted March 3, 2014 Posted March 3, 2014 Parse error: syntax error, unexpected '";' (T_CONSTANT_ENCAPSED_STRING) in /home/hellcent/public_html/schooling.php on line 4 this dosnt get better and better You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
dnenb Posted March 4, 2014 Author Posted March 4, 2014 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. 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.