Page 1 of 1

requesting info on possible code change

Posted: Sat Nov 11, 2006 4:09 am
by zerk
Okay, I want to use this system as a base to do something ... different.

I run a website for an MMORPG game called MapleStory - basically in the game it has quests (which require the use to complete a certain amount of tasks) and they then are rewarded.

I think your system could server well as a base. I will simply edit the word QUIZ to QUEST and remove any levels of right/ wrong -

Here is my question though: I ONLY want to reward users who have 100% correct on the imput options of the quiz. I think the rest I can handle changing, but can someone give me some code on how I might be able to edit this? I can maneuver around and delete php/tpl files, just not create :wink:

Thanks,
http://www.florinabeach.com is the website if you want to get an idea of how my board id setup. I havn't yet installed the quiz system.

Posted: Sat Nov 11, 2006 1:51 pm
by battye
Not tested, but might work:

in quiz.php, find:

Code: Select all

			if( $total_cash > 0 || $total_cash == 0 )
			{
			$cash_language_variable = sprintf($lang['Quiz_cash_total_result_gain'], $total_cash, $actual_cash_name['cash_name']);
BEFORE, ADD

Code: Select all

			if( $percentage == 100 )
			{
Later, FIND

Code: Select all

				if( !$db->sql_query($cash_sql) )
				{
					message_die(GENERAL_ERROR, 'Unable to execute cash update', '', __LINE__, __FILE__, $cash_sql);
				}
AFTER, ADD

Code: Select all

			}
Let me know how you go.