[Znote AAC] Quest Information

krotus

New Member
Joined
Jul 15, 2009
Messages
65
Best answers
0
Reaction score
3
Hi folks!
I was boring so, I decided to make a simple piece of PHP code to show which quest has done the player and which not yet.
So, It's a simple code so don't blame me, it's my first resource that I make.

Well, let's go to move to our principal folder ('www') and open the file, characterprofile.php and search the line:
PHP:
<li><font class="profile_font" name="profile_font_comment">Comment:</font> <br><textarea name="profile_comment_textarea" cols="70" rows="10" readonly="readonly"><?php echo $profile_znote_data['comment']; ?></textarea></li>
Below from this last line between the clauses comment text and death list, anyway you can put this anywhere but I decided there, put this :
PHP:
<!-- Quest information by Krotus to Otland.net-->
				<div>
				<table>
					<th colspan="2">Quest</th>
				<?php
				$storage=array('First Quest' => 50020, 'Second Quest' => 42355, 'Third Quest' => 52321);
				foreach($storage as $name => $value)
				{
					echo "<tr>";
					echo "<td width=90%>".$name."</td>";
					$quest = mysql_select_single("SELECT `value` FROM `player_storage` WHERE `key`='$value' AND `player_id`='$user_id' LIMIT 1;"); 
					if ($quest['value'] == 1) {
						echo "<td><img src='images/yes_quest.png'></td>";
					}else{
						echo "<td><img src='images/no_quest.png' ></td>";
					}
					echo "</tr>";
				}
				?>
				</table>
				</div>
Configuration:
On the line:
PHP:
$storage=array('First Quest' => 50020, 'Second Quest' => 42355, 'Third Quest' => 52321);
You can change the Questname and his storage value, it is just an exemple.

This method shows us if the player has done the quest with an image, so you can put any path/picture that you want.
How I said before It's a simple code but I think that could be useful got it on our website.

Exemple:
quest_information.jpg

Regards,
Krotus
 

GOD Suimy

Member
Joined
Sep 11, 2012
Messages
98
Best answers
0
Reaction score
15
I show the error it says:

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 39 in C:\xampp\htdocs\engine\function\users.php on line 990
But the system works.

How I put the images?
 
OP
K

krotus

New Member
Joined
Jul 15, 2009
Messages
65
Best answers
0
Reaction score
3
To put your image you've to change the tag <img src='by your path/source'>
PHP:
echo "<td><img src='images/yes_quest.png'></td>";
Where the images/ <-- is the folder which contain the source PNG.
The first tag is for player has done the quest and the second is when the player doesn't done it yet.
 

GOD Suimy

Member
Joined
Sep 11, 2012
Messages
98
Best answers
0
Reaction score
15
!bump
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 39 in C:\xampp\htdocs\engine\function\users.php on line 990
 

GOD Suimy

Member
Joined
Sep 11, 2012
Messages
98
Best answers
0
Reaction score
15
!bump

Code:
 Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 39 in C:\xampp\htdocs\engine\function\users.php on line 990
 

ralke

Felipe
Joined
Dec 17, 2011
Messages
311
Best answers
3
Reaction score
48
Location
Chile
how i can set more that one storage in one quest? example annihilator, that needs 49111, 49112, 49113, 49114 storages ^^ anyways thanks for this, its working perfectly!!
 
Last edited:
Top