Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Eudemons Online > EO PServer Hosting > EO PServer Guides & Releases
You last visited: Today at 06:31

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE] Show LW Winner on your site

Discussion on [RELEASE] Show LW Winner on your site within the EO PServer Guides & Releases forum part of the EO PServer Hosting category.

Reply
 
Old   #1
 
corey88's Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 113
Received Thanks: 58
[RELEASE] Show LW Winner on your site

Hello guys!
this script is to show in ur site the LW winner!
NEEDS CONFIG.PHP!!
PHP Code:
<?
  
function LegNome($id){
        
$sql "SELECT * FROM cq_syndicate WHERE id = '".$id."'";
    
$res mysql_query($sql);
    
$leg mysql_fetch_array($res);
    return 
$leg['NAME'];
}
$lw mysql_query("SELECT * FROM cq_map WHERE id = '1100'");
$owner mysql_fetch_array($lw);
$ocupante $owner['owner_id'];
echo 
LegNome($ocupante);
?>
Credits: Me.
Enjoy!
corey88 is offline  
Thanks
8 Users
Old 03/17/2012, 21:17   #2
 
hio77's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 1,759
Received Thanks: 825
good work on this, something i personally didn't look into at all.. just a few little tips you could take into consideration for your next script

it would be better to use sql like this..

Code:
SELECT `NAME` FROM cq_syndicate WHERE id = $id

SELECT owner_id FROM cq_map WHERE id = 1100
have a little read into why using wildcard (*) is bad..

but in saying that here is how i would do this sql

Code:
SELECT `NAME` FROM cq_syndicate WHERE id = (SELECT owner_id FROM cq_map WHERE id = 1100)
many other ways you could do a joined sql but in all it comes down to how you want to do it, using a code like this you have now reduced down to as little as 1 line (as messy as that would be :L )

myself, ild move onto using PDO, its more universal and just straight out is better without getting down into things, however this gets onto OOP.

-hio77
hio77 is offline  
Thanks
1 User
Old 03/31/2012, 15:43   #3
 
Syahmi Eo's Avatar
 
elite*gold: 0
Join Date: Jan 2012
Posts: 21
Received Thanks: 4
Where To Put It?

<?
function LegNome($id){
$sql = "SELECT * FROM cq_syndicate WHERE id = '".$id."'";
$res = mysql_query($sql);
$leg = mysql_fetch_array($res);
return $leg['NAME'];
}
$lw = mysql_query("SELECT * FROM cq_map WHERE id = '1100'");
$owner = mysql_fetch_array($lw);
$ocupante = $owner['owner_id'];
echo LegNome($ocupante);
?>
Syahmi Eo is offline  
Old 03/31/2012, 16:39   #4
 
cruey's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 698
Received Thanks: 855
In the code of your PHP file that your website uses.
cruey is offline  
Thanks
1 User
Old 04/02/2012, 06:53   #5
 
elite*gold: 0
Join Date: Mar 2012
Posts: 492
Received Thanks: 125
Save this as a .php file and define the location...
then add this to wherever you want your script...



Code:
<?phpinclude("your directory for your file")?>
Sir*DeviL is offline  
Reply


Similar Threads Similar Threads
[Release]How to show a video ingame
03/08/2012 - Metin2 PServer Guides & Strategies - 4 Replies
Link: ShowVideo (source) Required: (game.py) #serverCommandList "mall":self.__InGameShop_Show, #__IngameShop_Show def def __InGameShop_Show(self, url): self.interface.OpenWebWindow(url) Screen:
[release] Fashion Show Bot
03/08/2012 - Mabinogi Hacks, Bots, Cheats & Exploits - 1 Replies
Ware's Fashion Fixer This macro will rapidly press WASD for you during the fashion show. Score about 100-130.
[Release] Guild War Winner npc
12/29/2009 - CO2 PServer Guides & Releases - 27 Replies
Ok so what this npc does is checks to see if the person who is trying to talk to the npc is the guild leader and if that guild leader won guild war and if it isnt the guild leader of the winning guild then it does not say anything at all Here it is #region Gw Winner npc case 6701: { if (Control == 0) { if...
Pkt bug There is no winner
09/04/2009 - EO PServer Hosting - 1 Replies
hello everyone, i need help again, this is about the Pk Tournament, after everyone is killed and there is one last player left he/she cant leave the tournament, there is only an nps saying if you want to go to cronus, there isa no awarder, now this would tell everything, it would be a problem in the cq_npc but no, the awarder appears sometimes when you try to claim cthe price if just teleports you to cronus, i was looking in cq_action, but nothing. if you've have this problem and have fixed it...



All times are GMT +2. The time now is 06:31.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.