Page 2 of 5

Re: Castle Control Script

Posted: Fri May 08, 2009 1:47 pm
by janiii
ingame voiced command script updated: viewtopic.php?f=94&t=10730&p=49083#p49083

Re: Castle Control Script

Posted: Fri May 08, 2009 5:22 pm
by daedalus
Maybe make another topic ? ;D

But your ingame castle control script look nice :)

Re: Castle Control Script

Posted: Sat May 09, 2009 4:28 pm
by Bloodshed
//delete sorry

Re: Castle Control Script

Posted: Sat May 09, 2009 4:30 pm
by Bloodshed
something simular is allready in L2 :)

Image


(sorry for the offtopic)

Re: Castle Control Script

Posted: Sat May 09, 2009 4:40 pm
by janiii
Bloodshed wrote:something simular is allready in L2 :)
ah, yeah, you are right :DD ExShowCastleInfo :D

Re: Castle Control Script

Posted: Sat May 09, 2009 5:19 pm
by toastgodsupreme
Bloodshed wrote:something simular is allready in L2 :)

Image


(sorry for the offtopic)
rofl, just goes to show how rarely we mess with those screens XD

Re: Castle Control Script

Posted: Sun May 24, 2009 11:41 pm
by daedalus
Yop,

I've updated my castle control script. Now you can see manor pricing.

Regards

Re: Castle Control Script

Posted: Fri Jan 29, 2010 7:40 am
by disorder35
I was able to add ally to this script but could not add the clan leader. Can anyone help me add the clan leader's name to the script? So it will show:
controled By:
Clan Leader:
ally:
tax rate:
next siege:
ally:

thanks

Re: Castle Control Script

Posted: Fri Jan 29, 2010 7:44 am
by janiii
disorder35 wrote:I was able to add ally to this script but could not add the clan leader. Can anyone help me add the clan leader's name to the script? So it will show:
controled By:
Clan Leader:
ally:
tax rate:
next siege:
ally:

thanks
what is the sql statement you are using now?

Re: Castle Control Script

Posted: Fri Jan 29, 2010 1:44 pm
by disorder35
I was not able to figure it out the sql statement that's why I couldn't do it. I was able only to get the leader id to print.

Re: Castle Control Script

Posted: Fri Jan 29, 2010 2:21 pm
by disorder35

Code: Select all

$sql = @mysql_query('SELECT id,name,taxPercent,siegeDate FROM `castle`') or die('Query failed!'); $gen = "\n"; while ($castle = @mysql_fetch_array($sql)){	$gen .= "\n".strtolower($castle['name']) . 'info = \'<div class="castleWrapper">';	$gen .= '<div class="castlePic" id="' . ucfirst(strtolower($castle['name'])) . 'Pic"></div>';	$gen .= '<div class="castleInfo">';	$gen .= '<div class="castleName"><strong>' . ucfirst(strtolower($castle['name'])) . ' Castle</strong></div>'; 	$clan = @mysql_fetch_array(mysql_query('SELECT clan_name,hasCastle FROM `clan_data` WHERE hasCastle = ' . $castle['id']));	$clan_name = (isset($clan['clan_name'])) ? htmlspecialchars($clan['clan_name'], ENT_QUOTES) : 'UNCLAIMED';	$ally = @mysql_fetch_array(mysql_query('SELECT ally_name FROM `clan_data` WHERE hasCastle = ' . $castle['id']));	$ally_name = (isset($ally['ally_name'])) ? htmlspecialchars($ally['ally_name'], ENT_QUOTES) : 'NO ALLY';  	$gen .= '<div><strong>Controlled by:</strong> ' . $clan_name . '</div>';	$gen .= '<div><strong>Leader:</strong> ' . $leader_name . '</div>';	$gen .= '<div><strong>Ally:</strong> ' . $ally_name . '</div>'; 	if (isset($clan['clan_name'])) $gen .= '<div><strong>Tax Rate:</strong> ' . $castle['taxPercent'] . '%</div>'; 	$gen .= '<div><strong>Next Siege:</strong> ' . date('M d Y h:iA ',$castle['siegeDate']/1000) . ' ' . date('T') . '</div>';	$gen .= '</div>';

Re: Castle Control Script

Posted: Fri Jan 29, 2010 2:28 pm
by janiii

Code: Select all

$sql = @mysql_query('SELECT id,name,taxPercent,siegeDate FROM `castle`') or die('Query failed!'); $gen = "\n"; while ($castle = @mysql_fetch_array($sql)){	$gen .= "\n".strtolower($castle['name']) . 'info = \'<div class="castleWrapper">';	$gen .= '<div class="castlePic" id="' . ucfirst(strtolower($castle['name'])) . 'Pic"></div>';	$gen .= '<div class="castleInfo">';	$gen .= '<div class="castleName"><strong>' . ucfirst(strtolower($castle['name'])) . ' Castle</strong></div>'; 	$clan = @mysql_fetch_array(mysql_query('SELECT char_name,clan_name,ally_name,hasCastle FROM `clan_data` LEFT JOIN `characters` ON charId = leader_id WHERE hasCastle = ' . $castle['id']));	$clan_name = (isset($clan['clan_name'])) ? htmlspecialchars($clan['clan_name'], ENT_QUOTES) : 'UNCLAIMED';	$leader_name = (isset($clan['char_name'])) ? htmlspecialchars($clan['char_name'], ENT_QUOTES) : '---';	$ally_name = (isset($clan['ally_name'])) ? htmlspecialchars($clan['ally_name'], ENT_QUOTES) : 'NO ALLY';  	$gen .= '<div><strong>Controlled by:</strong> ' . $clan_name . '</div>';	$gen .= '<div><strong>Leader:</strong> ' . $leader_name . '</div>';	$gen .= '<div><strong>Ally:</strong> ' . $ally_name . '</div>'; 	if (isset($clan['clan_name'])) $gen .= '<div><strong>Tax Rate:</strong> ' . $castle['taxPercent'] . '%</div>'; 	$gen .= '<div><strong>Next Siege:</strong> ' . date('M d Y h:iA ',$castle['siegeDate']/1000) . ' ' . date('T') . '</div>';	$gen .= '</div>';

Re: Castle Control Script

Posted: Fri Jan 29, 2010 2:44 pm
by disorder35
Thank you very much works perfectly.

Re: Castle Control Script

Posted: Sat Jan 30, 2010 12:00 am
by leanndr
awesome script :D

how can we exclude the seeds with price = 0 ?

Re: Castle Control Script

Posted: Sat Jan 30, 2010 7:48 am
by disorder35
One question, when we view this script on Firefox browser, it is nice with the picture on the left and the castle status on the right but when we use Internet Explorer, the picture is on the left (good) but the castle status is on the bottom of the picture. Why is that? Can somebody fix the index.php so that it looks about the same on both browsers. I tried change a few things but it did not work. 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?

Thank you.