Re: Castle Control Script
Posted: Sat Jan 30, 2010 8:15 am
in index.php delete "overflow: auto;"disorder35 wrote:Also on IE it have scrolling on the right side and on the bottom of each castle box. How do we get the scrolling off?
in index.php delete "overflow: auto;"disorder35 wrote:Also on IE it have scrolling on the right side and on the bottom of each castle box. How do we get the scrolling off?
Just use siege_clans tabledisorder35 wrote:Yes good idea how can we add the siege attacker to this script? I was trying to do that the other day but couldn't do it.
Yeah it works perfectly, there was no changes with castle siege since this long time.regenx wrote:Nice work. Working for Freya Core: 4422 / DP: 7669 ?? Ty
Code: Select all
<?php/* ---- Configuration ---- */$noneed=1;include('castles/config.php'); // Print top of page /* ---- GIRAN ---- */$giranOwner = "no clan";$giranAlly = "no ally";$giranSiegeDate = " ... ";$giranTax ="";/* ---- OREN ---- */$orenOwner = "no clan";$orenAlly = "no ally";$orenSiegeDate = " ... ";$orenTax ="";/* ---- ADEN ---- */$adenOwner = "no clan";$adenAlly = "no ally";$adenSiegeDate = " ... ";$adenTax ="";/* ---- Gludio ---- */$gludioOwner = "no clan";$gludioAlly = "no ally";$gludioSiegeDate = "...";$gludioTax ="";/* ---- DION ---- */$dionOwner = "no clan";$dionAlly = "no ally";$dionSiegeDate = " ... ";$dionTax ="";/* ---- INNADRIL ---- */$innadrilOwner = "no clan";$innadrilAlly = "no ally";$innadrilSiegeDate = " ... ";$innadrilTax ="";/* ---- GODDARD ---- */$goddardOwner = "no clan";$goddardAlly = "no ally";$goddardSiegeDate = " ... ";$goddardTax ="";/* ---- RUNE ---- */$runeOwner = "no clan";$runeAlly = "no ally";$runeSiegeDate = " ... ";$runeTax ="";/* ---- SCHUTTGART ---- */$schuttgartOwner = "no clan";$schuttgartAlly = "no ally";$schuttgartSiegeDate = " ... ";$schuttgartTax ="";/* ---------------------- */$result = mysql_query("SELECT castle.name, clan_data.clan_name, clan_data.ally_name FROM castle,clan_data WHERE clan_data.hasCastle=castle.id");while($row= mysql_fetch_array($result,MYSQL_ASSOC)){switch($row['name']){case 'Giran':$giranOwner=$row['clan_name'];$giranAlly=$row['ally_name'];break;case 'Oren':$orenOwner=$row['clan_name'];$orenAlly=$row['ally_name'];break; case 'Aden':$adenOwner=$row['clan_name'];$adenAlly=$row['ally_name'];break;case 'Gludio':$gludioOwner=$row['clan_name'];$gludiolly=$row['ally_name'];break;case 'Dion':$dionOwner=$row['clan_name'];$dionAlly=$row['ally_name'];break;case 'Innadril':$innadrilOwner=$row['clan_name'];$innadrilAlly=$row['ally_name'];break;case 'Goddard':$goddardOwner=$row['clan_name'];$goddardAlly=$row['ally_name'];break;case 'Rune':$runeOwner=$row['clan_name'];$runeAlly=$row['ally_name'];break;case 'Schuttgart':$schuttgartOwner=$row['clan_name'];$schuttgartAlly=$row['ally_name'];break;}}$result = mysql_query("SELECT name,taxPercent,siegeDate FROM castle");while($row=mysql_fetch_array($result,MYSQL_ASSOC)){switch($row['name']){case 'Giran':$giranTax=$row['taxPercent'].'%';$giranSiegeDate=date('D\, j M Y H\:i',$row['siegeDate']/1000);break;case 'Oren':$orenTax=$row['taxPercent'].'%';$orenSiegeDate=date('D\, j M Y H\:i',$row['siegeDate']/1000);break;case 'Aden':$adenTax=$row['taxPercent'].'%';$adenSiegeDate=date('D\, j M Y H\:i',$row['siegeDate']/1000);break;case 'Gludio':$gludioTax=$row['taxPercent'].'%';$gludioSiegeDate=date('D\, j M Y H\:i',$row['siegeDate']/1000);break;case 'Dion':$dionTax=$row['taxPercent'].'%';$dionSiegeDate=date('D\, j M Y H\:i',$row['siegeDate']/1000);break;case 'Innadril':$innadrilTax=$row['taxPercent'].'%';$innadrilSiegeDate=date('D\, j M Y H\:i',$row['siegeDate']/1000);break;case 'Goddard':$goddardTax=$row['taxPercent'].'%';$goddardSiegeDate=date('D\, j M Y H\:i',$row['siegeDate']/1000);break; case 'Rune':$runeTax=$row['taxPercent'].'%';$runeSiegeDate=date('D\, j M Y H\:i',$row['siegeDate']/1000);break; case 'Schuttgart':$SchuttgartTax=$row['taxPercent'].'%';$SchuttgartSiegeDate=date('D\, j M Y H\:i',$row['siegeDate']/1000);break; }}?> <h1>Castle Siege</h1><!-- --------------------- ADEN --------------------- --><ul class="cs_table"> <li class="title_cs"> <h2>Aden Castle</h2> </li> <li class="img_castle"><img src="castles/imgcs/aden.jpg" alt="Aden Castle" /></li> <li class="dono_cs">Data do Siege</li> <li class="data_cs"><?php print $adenSiegeDate; ?></li> <li class="dono_cs">Dono do Castelo</li> <li class="data_cs"><?php print $adenOwner; ?></li> <li class="dono_cs">Ally</li> <li class="data_cs"><?php print $adenAlly; ?></li> <li class="dono_cs">Clan Leader</li> <li class="data_cs"><?php print $adenLeader; ?></li> <li class="dono_cs">Taxa</li> <li class="data_cs"><?php print $adenTax; ?></li> <li class="espaco"> </li> <li class="atac_cs">Atacantes</li> <li class="def_cs">Defensores</li> <li class="atac_cs"> <?php$result = mysql_query("SELECT clan_id FROM siege_clans WHERE castle_id='5' AND type='1'");while($row=mysql_fetch_array($result)){$result2 = mysql_query("SELECT clan_name FROM clan_data WHERE clan_id='$row[0]'"); while($row2=mysql_fetch_array($result2)){print $row2[0];print'<br />';}} ?> </li> <li class="def_cs"> <?php$result = mysql_query("SELECT clan_id FROM siege_clans WHERE castle_id='5' AND type='0'");while($row=mysql_fetch_array($result)){$result2 = mysql_query("SELECT clan_name FROM clan_data WHERE clan_id='$row[0]'");while($row2=mysql_fetch_array($result2)){print $row2[0];print'<br />';if($row2[0]!=""){$s11="1";break;}}}if($s11=="1"){print '';}elseprint 'NPC';?> </li></ul><br class="clear" /><div class="divisor"><img src="imagens/divisor.png" alt="divisor" /></div>
any suggestions?Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\castle\generator.php on line 57
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\castle\generator.php on line 57
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\castle\generator.php on line 57
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\castle\generator.php on line 57
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\castle\generator.php on line 57
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\castle\generator.php on line 57
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\castle\generator.php on line 57
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\castle\generator.php on line 57
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\castle\generator.php on line 57
I downloaded the file twice and in both, the message of corrupted file. It happened just me?janiii wrote:i am not really a design guru, so feel free to change the design
is only basic functionality, so if someone makes it better, i would be happy to see it or if someone has ideas how it should look like, me (or someone else) can change the code
v2 - cache version (better use this one):
data is read from objects already loaded by gameserver
voice commands: .castle and .siege
Code: Select all
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in xxxx/generator.php on line 57