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?
Castle Control Script
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: Castle Control Script
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
- disorder35
- Posts: 700
- Joined: Sat Aug 01, 2009 3:29 pm
- kocinski
- Posts: 141
- Joined: Wed May 06, 2009 3:12 pm
- Location: España
- Contact:
Re: Castle Control Script
And how can I add the Castle attackers?
Thanks.
Thanks.
- pinkcore
- Posts: 247
- Joined: Fri Jul 24, 2009 3:04 am
- Location: Czech Republic
Re: Castle Control Script
Stop using permissions 777 for files !!!!! Just use 755.
I'm not here only for food!
- disorder35
- Posts: 700
- Joined: Sat Aug 01, 2009 3:29 pm
Re: Castle Control Script
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.
So What?????
- pinkcore
- Posts: 247
- Joined: Fri Jul 24, 2009 3:04 am
- Location: Czech Republic
Re: Castle Control Script
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.
![Smile :)](./images/smilies/icon_smile.gif)
Save all values to array, use Inner / Left / Right Join to translate clan_id to clan_name from clan_data table.
Sort all clans to Castle by castle_id and by type you determine Attackers / Defenders.
![Smile :)](./images/smilies/icon_smile.gif)
I can edit this script but i have too much work at this time :X
But why to do it in PHP script to website, players can read it easily through game at NPCs, I think is not good to make players more lazzy
![Smile :)](./images/smilies/icon_smile.gif)
I'm not here only for food!
- regenx
- Posts: 319
- Joined: Sat Jul 17, 2010 6:55 am
Re: Castle Control Script
Nice work. Working for Freya Core: 4422 / DP: 7669 ?? Ty
- pinkcore
- Posts: 247
- Joined: Fri Jul 24, 2009 3:04 am
- Location: Czech Republic
Re: Castle Control Script
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
I'm not here only for food!
-
- Posts: 7
- Joined: Sat Mar 13, 2010 2:38 am
Re: Castle Control Script
I'm trying to add a ally_name and leadername in this script with no success.
Can anyone help?
Can anyone help?
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>
- u3games
- Posts: 1156
- Joined: Sun Feb 27, 2011 7:00 pm
- Location: España
- Contact:
Re: Castle Control Script
error in generator.php:
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
- malkavcrow
- Posts: 5
- Joined: Wed Mar 02, 2011 1:22 am
Re: Castle Control Script
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 itor 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
- shinomidefuego
- Posts: 122
- Joined: Thu Jun 28, 2007 5:37 pm
- Location: Venezuela
- Contact:
Re: Castle Control Script
nice, works perfect in freya, thanks!!!
i adapted to my site and looks good
i adapted to my site and looks good
![Image](http://www.l2knowing.com/userbars/adobe_user.gif)
MMMMMmmmmmMMMMM
-
- Posts: 21
- Joined: Mon Jun 23, 2008 7:51 pm
Re: Castle Control Script
the etcitem table doesnt exist anymore, so the script shows an error:
by the way, voice commands script is corrupt
i cant open it
Code: Select all
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in xxxx/generator.php on line 57
![Sad :(](./images/smilies/icon_sad.gif)
- St3eT
- Posts: 961
- Joined: Sun Mar 07, 2010 6:50 pm
Re: Castle Control Script
Yes already is ectitem in XML. Any idea?
-
- Posts: 53
- Joined: Wed Jun 23, 2010 11:56 am
Re: Castle Control Script
Old topic but Daedalus is guarantee ![Razz :P](./images/smilies/icon_razz.gif)
I have one problem On Local Diskw i got the Time that siege will begin correct ex. Controlled by: UNCLAIMED
Next Siege: Jul 24 2011 08:00PM EEST
But on website : Controlled by: UNCLAIMED
Next Siege: Jul 24 2011 01:00PM EDT
I think because of timezone of site hosting company?
I have put the correct permissions to file helios.
edit: $gen .= '<div><strong>Next Siege:</strong> ' . date('M d Y h:iA ',$castle['siegeDate']/1000) . ' ' . date('T') . '</div>';
here is the code that i must add timezone +2 GMt
![Razz :P](./images/smilies/icon_razz.gif)
I have one problem On Local Diskw i got the Time that siege will begin correct ex. Controlled by: UNCLAIMED
Next Siege: Jul 24 2011 08:00PM EEST
But on website : Controlled by: UNCLAIMED
Next Siege: Jul 24 2011 01:00PM EDT
I think because of timezone of site hosting company?
I have put the correct permissions to file helios.
edit: $gen .= '<div><strong>Next Siege:</strong> ' . date('M d Y h:iA ',$castle['siegeDate']/1000) . ' ' . date('T') . '</div>';
here is the code that i must add timezone +2 GMt