Castle Control Script

Have you created a useful tool? or Do you want to get help building one? This is the right place!
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Castle Control Script

Post by janiii »

ingame voiced command script updated: viewtopic.php?f=94&t=10730&p=49083#p49083
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
daedalus
Posts: 155
Joined: Sun Mar 12, 2006 12:16 pm

Re: Castle Control Script

Post by daedalus »

Maybe make another topic ? ;D

But your ingame castle control script look nice :)
Daedalus
User avatar
Bloodshed
L2j Veteran
L2j Veteran
Posts: 816
Joined: Mon Jun 23, 2008 9:54 am
Location: Dorf Town

Re: Castle Control Script

Post by Bloodshed »

//delete sorry
taking a break;
User avatar
Bloodshed
L2j Veteran
L2j Veteran
Posts: 816
Joined: Mon Jun 23, 2008 9:54 am
Location: Dorf Town

Re: Castle Control Script

Post by Bloodshed »

something simular is allready in L2 :)

Image


(sorry for the offtopic)
taking a break;
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Castle Control Script

Post by janiii »

Bloodshed wrote:something simular is allready in L2 :)
ah, yeah, you are right :DD ExShowCastleInfo :D
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
toastgodsupreme
Posts: 750
Joined: Sun Dec 07, 2008 7:01 pm
Location: Poland

Re: Castle Control Script

Post 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
User avatar
daedalus
Posts: 155
Joined: Sun Mar 12, 2006 12:16 pm

Re: Castle Control Script

Post by daedalus »

Yop,

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

Regards
Daedalus
User avatar
disorder35
Posts: 700
Joined: Sat Aug 01, 2009 3:29 pm

Re: Castle Control Script

Post 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
So What?????
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Castle Control Script

Post 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?
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
disorder35
Posts: 700
Joined: Sat Aug 01, 2009 3:29 pm

Re: Castle Control Script

Post 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.
So What?????
User avatar
disorder35
Posts: 700
Joined: Sat Aug 01, 2009 3:29 pm

Re: Castle Control Script

Post 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>';
So What?????
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Castle Control Script

Post 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>';
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
disorder35
Posts: 700
Joined: Sat Aug 01, 2009 3:29 pm

Re: Castle Control Script

Post by disorder35 »

Thank you very much works perfectly.
So What?????
User avatar
leanndr
Posts: 92
Joined: Fri Dec 04, 2009 1:01 am

Re: Castle Control Script

Post by leanndr »

awesome script :D

how can we exclude the seeds with price = 0 ?
"Arrogance diminishes wisdom" / "Arrogância diminui a sabedoria"
User avatar
disorder35
Posts: 700
Joined: Sat Aug 01, 2009 3:29 pm

Re: Castle Control Script

Post 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.
So What?????
Post Reply