• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

percent quest complite

I wrote something like that:
17414292.png

PHP:
			$quest = $SQL->query('SELECT COUNT(`key`) FROM `player_storage` WHERE `player_id` = '. $player->getId() .' AND `key` IN (20001, 20003, 20009, 20005, 20007, 20011, 20006, 20014, 20013, 20016, 20015, 20017, 20021, 20020, 20019, 20018, 20023, 20026, 20025, 20022, 20030, 20031, 20032, 20029, 20046, 20034, 20038, 22401, 22402, 22403, 20033, 20052, 20051, 20053, 20054, 20055, 20060)')->fetch();
			
			$ilosc = 37; //ilosc questow (ilosc storage w zapytaniu)
			$procent = ($quest[0]*100)/$ilosc;
			$procent = round($procent, 0);
			
			$main_content .= '<br />
				<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=60% align="center">
					<TR BGCOLOR="'.$config['site']['vdarkborder'].'">
						<TD CLASS=white WIDTH=100%><b><center>Quests</center></b></TD></TR>
					<TR BGCOLOR="'.$config['site']['darkborder'].'">
						<TD WIDTH=100%><center>Finished quests: '.$quest[0].'/'.$ilosc.' 
				<div align="left" style="border:2px groove"; title="'.$procent.'%"; style="width: 100%; height: 10px; border: 1px solid #000;"><div style="background: grey; width: '.$quest[0].'%; height: 10px;">
						</TD>
					</TR>
					<TR>
						<TD colspan=4>
							<div align="right"><font size="1"><b>Author of script: <a href="http://otland.net/members/aleh/">Aleh</a></b></font></div>
						</TD>
					</TR>
				</TABLE>';
Paste this to characters.php wherever you want.
 
Back
Top