Jump to content
MakeWebGames

Recommended Posts

Posted

yep i know ive done this one before but my first attempt had many flaws. This version however has been Rigorously tested and im Pleased to say its a fully working Process..

New features......

1 = Adds decimal to all stats ( old version didnt do this infact old version didnt even update them oops)

2 = New staff options you can now add the item directly without an ID and give the Item a name so users can see their reward instead of an ID#

3 = Crystals have been introduced so you can now offer Crystals as a Reward other than Items and Cash...

4 = All added Education Modules can now be set so you can have so many clicks per day and so many clicks per hour.

5 = Courses can be completed by users as many times as the user wishes.

6 = Staff have an Hidden section for those wanting to test new Education Outcomes

7 = Modules work from clicks and NOT crons so users dont have to wait X amount of days for a course to finish....

8 = The new version will alow those who have other types of gains that arnt crystals to be added quite easily....

9 = Admins can view which users are doing which course and the achieved percentage for that course

10 = Damn cant think of a 10 but the other 9 are great ;)

Will post up new script later today........

  • Replies 77
  • Created
  • Last Reply

Top Posters In This Topic

Posted

I hate awards they just make people Code faster and mess up more. Id sooner have a decent working Project than an Award for messing up scripts..

Just my opinion :)

Posted

FIRST OFF SQLS

[mysql]CREATE TABLE IF NOT EXISTS `schools` (

`crID` int(11) NOT NULL AUTO_INCREMENT,

`crNAME` varchar(255) NOT NULL DEFAULT '',

`crDESC` text NOT NULL,

`crSTARTING` text NOT NULL,

`crCOMPLETED` text NOT NULL,

`crCOST` int(11) NOT NULL DEFAULT '0',

`crENERGY` int(11) NOT NULL DEFAULT '0',

`crCASHPRIZE` int(11) NOT NULL DEFAULT '0',

`crCRYSTALS` int(11) NOT NULL,

`crITEM` int(11) NOT NULL DEFAULT '0',

`crITEMNAME` varchar(100) NOT NULL,

`crQTY` int(11) NOT NULL DEFAULT '0',

`crCOMPPERCENT` int(11) NOT NULL DEFAULT '0',

`crPERCENT` int(11) NOT NULL DEFAULT '0',

`crCLICKS` int(11) NOT NULL DEFAULT '0',

`crPERCLICKS` int(11) NOT NULL DEFAULT '0',

`crSTR` decimal(65,4) NOT NULL DEFAULT '0.0000',

`crGUARD` decimal(65,4) NOT NULL DEFAULT '0.0000',

`crLABOUR` decimal(65,4) NOT NULL DEFAULT '0.0000',

`crAGIL` decimal(65,4) NOT NULL DEFAULT '0.0000',

`crIQ` decimal(65,6) NOT NULL DEFAULT '0.000000',

PRIMARY KEY (`crID`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

----- USER SQLS ------

ALTER users ADD cpercent decimal(4,1) NOT NULL DEFAULT 0.0;

ALTER users ADD course_clicks int(11) NOT NULL DEFAULT 0;

ALTER users ADD minus_clicks int(11) NOT NULL DEFAULT 0;

ALTER users ADD clickend int(11) NOT NULL DEFAULT 0;

ALTER users ADD dailycclicks int(11) NOT NULL DEFAULT 0;

ALTER users ADD crtimes int(11) NOT NULL DEFAULT 0;

---- HOMEWORK SQLS -------

CREATE TABLE IF NOT EXISTS `schoolhomework` (

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

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

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

`lastcourse` int(11) NOT NULL

) ENGINE=MyISAM DEFAULT CHARSET=latin1;[/mysql]

call this file staff_courses.php

 

You're unable to view this code.

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

 

Add these links to smenu.php

 

You're unable to view this code.

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

 

add this to global_func.php

 

You're unable to view this code.

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

 

 

NEXT PART BELOW.....

Posted

PART 2..

Call this file edureset.php Its for the Staff testing section...

 

You're unable to view this code.

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

 

call this file schooling.php

 

You're unable to view this code.

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

 

schooling.php and edureset.php FILES HAVE BEEN UPDATED DUE TO NEW SQLS.......

Posted

now add this CSS bit to your header.php or if your using an external css add it in with that...

 

You're unable to view this code.

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

 

Still in the header.php change the link education.php to schooling.php or create both links one hidden for testing..

Posted

Great job! keep it up so far i added the new codes just waiting on the crons!

i did find one small error:

line 24 on SQLS should be

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

just remove the

= after latin

Posted
Great job! keep it up so far i added the new codes just waiting on the crons!

i did find one small error:

line 24 on SQLS should be

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

just remove the

= after latin

Thanks rowbvp for spotting that error the SQLS ablve for line 24 have been ammended :)

Posted

If anyone is able to help me out who has installed his mod on their site and dont mind giving me access to their FTP/CPANEL so i can sort the crons out i would be very greatful as for some reason my testing site has decided to stop running crons... Email me on here pls if your abale to assist...

HELP FOUND ( Big thanks to DJKANNA for helping out ) Cheers Matey.

Posted

Heres the cron for Hourly Updates for user clicks

 

You're unable to view this code.

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

 

Still working on the daily one as its a bit more complex than i thought :) this is due to courses having different click rates than others

Posted

For the daily cron to work ive had to redo schooling.php and edureset.php so if you have an older copy then get the updated one from posting on 1st page..

More SQLS sorry this was the only way i could make the Daily Crons match the clicks for each Education made....

[mysql]CREATE TABLE IF NOT EXISTS `schoolday` (

`userid` int(11) NOT NULL default '0',

`courseid` int(11) NOT NULL default '0',

`clicks` int(11) NOT NULL default '0'

) ENGINE=MyISAM DEFAULT CHARSET=latin1;[/mysql]

And finally the Cron...

 

You're unable to view this code.

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

Posted

SCREENIES

STAFF CHEAT SCREEN

cheat.jpg

CHEAT OUTCOME

cheatoutcome.jpg

CHOOSING A COURSE TO STUDY

choosing.jpg

TAKING THE COURSE

takingcourse.jpg

COURSE OUTCOME WHEN FINISHED

reandout.jpg

 

SORRY FOR THE IMAGES NOT SHOWING SEEMS MY TEST SITE HAS GONE WALK ABOUTS :(

STAFF EDITING COURSES

editing.jpg

Posted

im getting this error when viewing schooling.php page

QUERY ERROR: Unknown column 'crtimes' in 'field list'

Query was SELECT crtimes FROM users WHERE userid=1 AND course=1

any ideas

Posted

"Yes" thou i had to add this field manually ,

`crtimes` int(11) NOT NULL default '0' just had to remove the default in SQL

then edit the table by setting crtimes to 0.

One thing i did notice is that the staff_courses is adding course to the old courses table.

So i deleted all the old courses sql and updated it with the schools SQL's, this worked.To test this i added

a new course, and it 'installed' to the old table named courses.But it worked because the SQL are the same as

schools table.So if we change the php where it say,courses to schools this may work!

Posted
One thing i did notice is that the staff_courses is adding course to the old courses table.

Thats impossible as the table courses hasnt been used Look again all INSERTS, UPDATES DELETE, Statements point to the table SCHOOL

Posted

You know what your right 'illusions',looking in a php file there can't find anywhere where it says courses.I guess ill be remove all and SQL and starting over.

Posted

I know this might sound daft but are you sure your looking at schooling.php and not education.php when you click the link to start an education from mainmenu... ?

Posted

Yes i already changed education.php link to schooling.php!for some reason im getting error

Schooling

[align=center]Here is a list of available schools.

QUERY

ERROR: Unknown column 'course' in 'where clause'

Query was SELECT crtimes FROM users WHERE userid=1 AND course=1

[align=left]I install two test courses but there not showing,crtimes is install in users table

[/align][/align]

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