Xerus Posted February 24, 2010 Posted February 24, 2010 hello guys i need a castle php script for my site i searched but i didnt found any for castles... if someone have it pls share Quote
0 Matim Posted February 24, 2010 Posted February 24, 2010 Note: Not tested. <? $host = "91.205.74.22"; $user = "root"; $password = "66778811"; $dbase = "l2jdb"; $connect = mysql_connect ($host,$root,$password) or die ("Could not connect to Server"); $db_connect = mysql_select_db ($dbase,$connect) or die ("Could not connect to Data Base"); ?> <body> <table width="332" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="322"><div align="center"> <p>ADEN</p> <p><img src="graficos/castillo_aden.jpg" width="322" height="233" /></p> <p> <? require ("config.php"); $query = "Select clan_name from clan_data where hasCastle = 5"; $mk = mysql_query($query); $res = mysql_fetch_array($mk); if ($res['clan_name']=="") { $res = "nadie."; } else {$res = $res['clan_name']; } echo "<center>En posesion de ".$res."</center>"; ?> </p> </div></td> </tr> <tr> <td><div align="center"> <p>DION</p> <p><img src="graficos/castillo_dion.jpg" width="322" height="233" /></p> <p> <? require ("config.php"); $query = "Select clan_name from clan_data where hasCastle = 2"; $mk = mysql_query($query); $res = mysql_fetch_array($mk); if ($res['clan_name']=="") { $res = "nadie."; } else {$res = $res['clan_name']; } echo "<center>En posesion de ".$res."</center>"; ?> </p> </div></td> </tr> <tr> <td><div align="center"> <p>GIRAN</p> <p><img src="graficos/castillo_giran.jpg" width="322" height="233" /></p> <p> <? require ("config.php"); $query = "Select clan_name from clan_data where hasCastle = 3"; $mk = mysql_query($query); $res = mysql_fetch_array($mk); if ($res['clan_name']=="") { $res = "nadie."; } else {$res = $res['clan_name']; } echo "<center>En posesion de ".$res."</center>"; ?> </p> </div></td> </tr> <tr> <td><div align="center"> <p>GLUDIO</p> <p><img src="graficos/castillo_gludio.jpg" width="322" height="233" /></p> <p> <? require ("config.php"); $query = "Select clan_name from clan_data where hasCastle = 1"; $mk = mysql_query($query); $res = mysql_fetch_array($mk); if ($res['clan_name']=="") { $res = "nadie."; } else {$res = $res['clan_name']; } echo "<center>En posesion de ".$res."</center>"; ?> </p> </div></td> </tr> <tr> <td><div align="center"> <p>GODDARD</p> <p><img src="graficos/castillo_goddard.jpg" width="322" height="233" /></p> <p> <? require ("config.php"); $query = "Select clan_name from clan_data where hasCastle = 7"; $mk = mysql_query($query); $res = mysql_fetch_array($mk); if ($res['clan_name']=="") { $res = "nadie."; } else {$res = $res['clan_name']; } echo "<center>En posesion de ".$res."</center>"; ?> </p> </div></td> </tr> <tr> <td><div align="center"> <p>INNADRIL</p> <p><img src="graficos/castillo_innadril.jpg" width="322" height="233" /></p> <p> <? require ("config.php"); $query = "Select clan_name from clan_data where hasCastle = 6"; $mk = mysql_query($query); $res = mysql_fetch_array($mk); if ($res['clan_name']=="") { $res = "nadie."; } else {$res = $res['clan_name']; } echo "<center>En posesion de ".$res."</center>"; ?> </p> </div></td> </tr> <tr> <td><div align="center"> <p>OREN</p> <p><img src="graficos/castillo_oren.jpg" width="322" height="233" /></p> <p> <? require ("config.php"); $query = "Select clan_name from clan_data where hasCastle = 4"; $mk = mysql_query($query); $res = mysql_fetch_array($mk); if ($res['clan_name']=="") { $res = "nadie."; } else {$res = $res['clan_name']; } echo "<center>En posesion de ".$res."</center>"; ?> </p> </div></td> </tr> <tr> <td><div align="center"> <p>RUNE</p> <p><img src="graficos/castillo_rune.jpg" width="322" height="233" /></p> <p> <? require ("config.php"); $query = "Select clan_name from clan_data where hasCastle = 8"; $mk = mysql_query($query); $res = mysql_fetch_array($mk); if ($res['clan_name']=="") { $res = "nadie."; } else {$res = $res['clan_name']; } echo "<center>En posesion de ".$res."</center>"; ?> </p> </div></td> </tr> <tr> <td><div align="center"> <p>STUTGART</p> <p><img src="graficos/castillo_stutgart.jpg" width="322" height="233" /></p> <p> <? require ("config.php"); $query = "Select clan_name from clan_data where hasCastle = 9"; $mk = mysql_query($query); $res = mysql_fetch_array($mk); if ($res['clan_name']=="") { $res = "nadie."; } else {$res = $res['clan_name']; } echo "<center>En posesion de ".$res."</center>"; ?> </p> </div></td> </tr> </table> </body> Quote
0 Xerus Posted February 24, 2010 Author Posted February 24, 2010 Note: Not tested. i tried but its not working Quote
0 `Rοmeο Posted February 24, 2010 Posted February 24, 2010 http://www.maxcheaters.com/forum/index.php?topic=54780.0 I recomend you that one: http://www.maxcheaters.com/forum/index.php?topic=33862.0 Quote
0 Xerus Posted February 25, 2010 Author Posted February 25, 2010 http://www.maxcheaters.com/forum/index.php?topic=54780.0 I recomend you that one: http://www.maxcheaters.com/forum/index.php?topic=33862.0 dude that http://www.maxcheaters.com/forum/index.php?topic=33862.0 is the script i have but i gave castle to my char and change siege time but nothing changed... and what it means add attribute 777 to helios? Quote
0 Matim Posted February 25, 2010 Posted February 25, 2010 dude that http://www.maxcheaters.com/forum/index.php?topic=33862.0 is the script i have but i gave castle to my char and change siege time but nothing changed... and what it means add attribute 777 to helios? Im not sure, but i guess he was talking about files permission (acces/hmods) Open your ftp client, and press right mouse button on this file and set permission to 777. Quote
0 Horus Posted February 26, 2010 Posted February 26, 2010 Anyway Matim you should have used a loop for the queries, makes no sense making a script that big when you can replace it with a loop. e.g. require_once('config.php'); while($i=<castlenumber) { $i++; echo '<td><div align="center"> <p>GLUDIO</p> <p><img src="graficos/'getCastleImg($i)'" width="322" height="233" /></p> <p>' $query = "Select clan_name from clan_data where hasCastle = '$i'"; $mk = mysql_query($query); $res = mysql_fetch_array($mk); if ($res['clan_name']=="") { $res = 'nadie.'; } else {$res = $res['clan_name']; } '<center>En posesion de '.$res.'</center>'; ?> } Obviously you'd have to make a function that returns the image name based on the $i ,and, the script probably has tons of errors since I just made it here in the board in 20 seconds without notepad or smth but you get the picture ^^ Quote
0 Gxz Posted February 26, 2010 Posted February 26, 2010 Anyway Matim you should have used a loop for the queries, makes no sense making a script that big when you can replace it with a loop. e.g. require_once('config.php'); while($i=<castlenumber) { $i++; echo '<td><div align="center"> <p>GLUDIO</p> <p><img src="graficos/'getCastleImg($i)'" width="322" height="233" /></p> <p>' $query = "Select clan_name from clan_data where hasCastle = '$i'"; $mk = mysql_query($query); $res = mysql_fetch_array($mk); if ($res['clan_name']=="") { $res = 'nadie.'; } else {$res = $res['clan_name']; } '<center>En posesion de '.$res.'</center>'; ?> } Obviously you'd have to make a function that returns the image name based on the $i ,and, the script probably has tons of errors since I just made it here in the board in 20 seconds without notepad or smth but you get the picture ^^ dude i cant understand what you posted, i am newbie at php so more info would be explain smt more... Quote
0 Horus Posted February 26, 2010 Posted February 26, 2010 Oh my post was to Matim x) Sorry about that. But you can use what I gave you as a start, read some PHP tutorials and you'll get it ^^ Quote
0 Matim Posted February 26, 2010 Posted February 26, 2010 Oh my post was to Matim x) Sorry about that. But you can use what I gave you as a start, read some PHP tutorials and you'll get it ^^ Im not author of this PHP Script (thats why i told him its not tested, i just saw it somewhere) Quote
Question
Xerus
hello guys i need a castle php script for my site i searched but i didnt found any for castles... if someone have it pls share
9 answers to this question
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.
Note: Your post will require moderator approval before it will be visible.