Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Eudemons Online > EO PServer Hosting
You last visited: Today at 15:59

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

Advertisement



[REQUEST] legion member script

Discussion on [REQUEST] legion member script within the EO PServer Hosting forum part of the Eudemons Online category.

Reply
 
Old   #1

 
PowerChaos's Avatar
 
elite*gold: 90
Join Date: Feb 2008
Posts: 1,112
Received Thanks: 640
Cool [HELP] legion member script

ok guys , Thank you all for helping me so far but i got a other problem that i cant get fixed :S

i try to show the legion name of every member on my info page , but i cant get it to work becouse it says all the time that i got a error in the script :S

let me explain what i try to create ^^ that always helps

first i need to get a conection of 2 differend tables
so i use the Toplegion.php to start whit becouse then i got the legion table

then i need to get $row[id] and [$row[synt_id] (if they match) to the $row[NAME] as prefix $legionname

i tryed differend things out but becouse i dont know php that good so i need help :S

here is a previeuw of the code i got working so far whit 1 error in it (so it doesnt work :S )

PHP Code:
$legions mysql_query("SELECT NAME,id,leader_name,money,amount FROM cq_syndicate ORDER by money desc limit 5"); //custom added 
    
$legio mysql_query("SELECT syn_id FROM cq_synattr ORDER by syn_id desc limit 5" ); //custom added             
    
$rank mysql_query("SELECT NAME,level,profession,emoney,money_saved FROM cq_user ORDER by emoney desc limit 100"); 
    
//$row = mysql_fetch_array($rank); 
    
$i=1;    
 while(
$row mysql_fetch_array($rank)){ 
 while(
$row1 mysql_fetch_array($legio)); //custom added
 
while($row2 mysql_fetch_array($legions)); // custom added
 
$legion = ($row2[id] == $row1[syn_id] = $row2[NAME]); //custom added
{
    if(
$row['profession']==20)
 {
    
$profession='warrior';
 }
    else if(
$row['profession']==30)
  {
    
$profession='Paladin';
  }
    else{
$profession='mage';
 
}
        echo 

    <td><font color="#FFFFFF"><div align="center">'
.$i.'</td>
    <td><font color="#FFFFFF"><div align="center">'
.$row['NAME'].'</td>
    <td><font color="#FFFFFF"><div align="center">'
.$row['level'].'</td>
    <td><font color="#FFFFFF"><div align="center">'
.$profession.'</td>
    <td><font color="#FFFFFF"><div align="center">'
.$row['emoney'].'</td> 
    <td><font color="#FFFFFF"><div align="center">'
.$row['money_saved'].'</td>
    <td><font color="#FFFFFF"><div align="center">'
.$legion.'</td> //custom added 
  </tr> '

  
$i=$i+1
    } 
and this is the error i get :S
Code:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in W:\www\test\moneybag.php on line 55
this error goes over the second
PHP Code:
while 
but its fixed now , it was a wrong table name



*edit*
i got it fixed so far , but now it shows only the number 1 instead of the legion names :S
*end of edit*
Thank you and Grees From The Crasher
PowerChaos is offline  
Old 10/05/2008, 20:30   #2

 
PowerChaos's Avatar
 
elite*gold: 90
Join Date: Feb 2008
Posts: 1,112
Received Thanks: 640
*bumping*

hmm , still no solution :S

do some1 know how to fix the problem , the problem is that it doesnt get the names of the legion from the matching numbers (so far i know) and i dont know what command i need to use for it to make it work :s

Greets from The Crasher
PowerChaos is offline  
Old 10/06/2008, 06:42   #3
 
funhacker's Avatar
 
elite*gold: 20
Join Date: Sep 2007
Posts: 1,767
Received Thanks: 1,741
might help if you explained in your code what your trying to do, along with a highlight of what line 55 is since there isnt any more then around 20lines there

Code:
SELECT syn_id FROM cq_synattr ORDER by syn_id desc limit 5
you didnt put a where clause in there I honestly dont know what your trying to do with this bit of code but if say you want to display the leader name of the top 5 you could just use the field in cq_syndicate or
Code:
SELECT syn_id FROM cq_synattr using cq_synattr inner join cq_syndicate where cq_synattr.syn_id = cq_syndicate.id and cq_synattr.player_id = cq_syndicate.leader_id and cq_synattr.rank = 1000 ORDER by syn_id desc limit 5
I cant say for sure all the fields are right or even the syntax tbh I dont use select at all when doing sql queries, I suggest though you say exactly what each query is spose to do and explain what your trying to do what is messing up etc
funhacker is offline  
Old 10/06/2008, 14:56   #4

 
PowerChaos's Avatar
 
elite*gold: 90
Join Date: Feb 2008
Posts: 1,112
Received Thanks: 640
i dont know mutch of coding so i try to edit the script whit the codes i got :S (maybe thats the problem)

ok here i goin explain what i try to do

on the legion script you can see the legion leaders , the thing i try is to show the legion members to

now the problem is that in that table are only numbers
so if the numbers match each othther then it need to show the name

row1 [id]= 1250
row2 [id]=1250
row2 [name] = Legion

this is the shortest way and probaly the most clean way of explaining :s what i try to do

and to explain it a little more of the goal i try to do
i try to make a huge info script page where you can see every rank on in 1 single page

the code work this far that it shows no errors anymore , exept that it doesnt check the data to each other :S

moneybag.php (original , exept where stand something of edit , thats my code)
PHP Code:
<?php 
$legions 
mysql_query("SELECT NAME,id,leader_name,money,amount FROM cq_syndicate ORDER by id desc limit 10"); //edit 
$guilds mysql_query("SELECT syn_id FROM cq_synattr ORDER by syn_id limit 10"); //edit
$rank mysql_query("SELECT NAME,level,profession,emoney,money_saved FROM cq_user ORDER by emoney desc limit 10"); 
//$row = mysql_fetch_array($rank); 
$i=1
while(
$row mysql_fetch_array($rank)){  // if i dete this { then it doesnt show anything anymore
while($row1 mysql_fetch_array($guilds)); //edit this was line 55 but was wrong table , so its fixed
while($row2 mysql_fetch_array($legions)); //edit 
//$legion = ($row2['id'] == $row1['syn_id'] = $row2['NAME']); // my edit 
$legion =($row2['id'] != $row1['syn_id']) ? $row2['NAME'] : 'no legion'//last solution from some1 els
the last solution works but not like it need to be , it only shows 'no Legion' instead of the legion name

Greets From The Crasher

@funhacker , i tryed out your code , but it give the same emty solution (it doesnt show anything :S )
PowerChaos is offline  
Old 10/06/2008, 17:15   #5
 
funhacker's Avatar
 
elite*gold: 20
Join Date: Sep 2007
Posts: 1,767
Received Thanks: 1,741
ok hope this helps it will select the legions and peoples names within that legion dependant by their gold, it will show you Deputys -> leaders only and is limited to 100 entries

Code:
SELECT cq_syndicate.NAME,cq_syndicate.money,cq_user.name FROM cq_syndicate,cq_synattr,cq_user WHERE cq_syndicate.id =  cq_synattr.syn_id AND cq_synattr.rank >=  900 AND cq_synattr.id =  cq_user.id ORDER BY cq_syndicate.money DESC LIMIT 100
funhacker is offline  
Old 10/12/2008, 11:35   #6
 
elite*gold: 0
Join Date: Feb 2006
Posts: 327
Received Thanks: 205
*edit* nvm
nooneatall is offline  
Old 10/12/2008, 19:29   #7

 
PowerChaos's Avatar
 
elite*gold: 90
Join Date: Feb 2008
Posts: 1,112
Received Thanks: 640
i gave up this script becouse it doesnt seems to work at all :S

its to difficult for me to figure the problem out , i got about 100 differend solutions and not even 1 works like it need to work :S

if some1 can bring out the script that show the legion members (name of player and legion of player and rank in legion ) on the top 10 page then i would be happy to have that script

Greets From The Crasher
PowerChaos is offline  
Old 10/12/2008, 23:28   #8
 
funhacker's Avatar
 
elite*gold: 20
Join Date: Sep 2007
Posts: 1,767
Received Thanks: 1,741
mine should show Legion Name PLayer Name and Total Gold in Legion, to show ranks would be slightly more complex, you could make another table named legion_ranks, have id = rank number and then name = the name of that rank, example 1000 - Leader 990 - Leader's Spouse, etc
then you would just have it also select that table matching the names with the rank number<->id from legion_ranks
funhacker is offline  
Old 10/13/2008, 16:18   #9

 
PowerChaos's Avatar
 
elite*gold: 90
Join Date: Feb 2008
Posts: 1,112
Received Thanks: 640
that kind is that way of how the tables of sync works

exept that it is splitted into 2 tables , 1 of your legion script (gold , members , name ) and 1 of the members only ( ranks , legion )

so i was thinking to get the 2 tables combined in 1 script but it seems to be verry hard to get that done

if i do it the other way like you say , putting it into 1 table then it doesnt automatic update itself and thats harder to manage (manuel updating )

so :S maybe thats a solution for it but it isnt the thing i wanted (it need a automatic update)

i dont know in what way it is posseble to do but it doesnt seems that it is easy to do (or maybe i just miss a few commands ^^ )

the last solution of you displayed something (i think it was numbers , or "$legion_name" , but not the thing it needed to do )

stil , Thank you for trying to help me and Greets From The Crasher
PowerChaos is offline  
Old 10/14/2008, 00:25   #10
 
funhacker's Avatar
 
elite*gold: 20
Join Date: Sep 2007
Posts: 1,767
Received Thanks: 1,741
Well I dont think you fully understand or tried my query.

Code:
SELECT 
cq_syndicate.NAME,cq_syndicate.money,cq_user.name 
FROM 
cq_syndicate,cq_synattr,cq_user 
WHERE 
cq_syndicate.id =  cq_synattr.syn_id 
AND 
cq_synattr.rank >=  900 
AND 
cq_synattr.id =  cq_user.id 
ORDER BY 
cq_syndicate.money 
DESC LIMIT 100
The output for acme database is like so

Code:
Legion Name - Legion Gold - Player Name
----------------------------------------
Death_Knights-66614767114-DEMONKILLER6969
Death_Knights-66614767114-Joshua
Death_Knights-66614767114-Lord_Pain
Death_Knights-66614767114-DeathsMistress
Death_Knights-66614767114-Squeeky
Death_Knights-66614767114-death-to-all
Death_Knights-66614767114-Murder-Me-16
Gr34T_SouL-63355847661-~*Al-prince*~
Gr34T_SouL-63355847661-+_MAILED_+
Gr34T_SouL-63355847661-AdzorpTion
Gr34T_SouL-63355847661-_LorD_
Gr34T_SouL-63355847661-~kræM~
~*We*R*JustiCe*-61030391618-###zoom###
~*We*R*JustiCe*-61030391618-*~ELAMER~*
~*We*R*JustiCe*-61030391618-FalCon
~*We*R*JustiCe*-61030391618-*&Dark&Hell&*
~*We*R*JustiCe*-61030391618-BeBoo
~*We*R*JustiCe*-61030391618-Elcomanda
~*We*R*JustiCe*-61030391618-*MaTReX*
.:!All-$tars!:.-57994688979-mtirx
.:!All-$tars!:.-57994688979-elzaem
.:!All-$tars!:.-57994688979-H.....A...AHMED
.:!All-$tars!:.-57994688979-necroshear
.:!All-$tars!:.-57994688979-Motherm
.:!All-$tars!:.-57994688979-***JM***
.:!All-$tars!:.-57994688979-spiderman2008
The_Masters-48282621125-kate.
The_Masters-48282621125-asklepius
The_Masters-48282621125-ZARATOR
The_Masters-48282621125-Kushumai
The_Masters-48282621125-l_Un4GiveN_l
The_Masters-48282621125-MEGUMI
The_Masters-48282621125-#24marley#24
HeartlessAngels-45567097486-~DeaTh~ScorpIon
HeartlessAngels-45567097486-~Fire*Man~
HeartlessAngels-45567097486-#90Andy#90
HeartlessAngels-45567097486-Tsubasa.
HeartlessAngels-45567097486-RavensAngel
The|Al|Che|Mist-45338446403-SARAY_SOYOP
The|Al|Che|Mist-45338446403-cristina
The|Al|Che|Mist-45338446403-IchigoBL
The|Al|Che|Mist-45338446403-3565413.1897
JuSt`CaVaLLi-44472622720-JuSt`CaVaLLi
JuSt`CaVaLLi-44472622720-~NOVA~
JuSt`CaVaLLi-44472622720-Sat-Thu
JuSt`CaVaLLi-44472622720-NightWalKer
JuSt`CaVaLLi-44472622720-neoplanet
JuSt`CaVaLLi-44472622720-zhai
Dark*Empire-43977705029-WarStar
Dark*Empire-43977705029-NarutoOFTheLeaf
Dark*Empire-43977705029-daRk^KiNgpLar
Dark*Empire-43977705029-hazzer
Dark*Empire-43977705029-masterlink
Dark*Empire-43977705029-Hell_Enma#71
Dark*Empire-43977705029-Pro_Mage
AtrumDeus-42621409603-Cagney
AtrumDeus-42621409603-.Gunner.
AtrumDeus-42621409603-Br0KeN~HeArT
AtrumDeus-42621409603-JechT
AtrumDeus-42621409603-jay
AtrumDeus-42621409603-memaloca
AtrumDeus-42621409603-.:NeutraL:.
Smith|Warrior-41006617958-*°::.Lobão.::°*
Smith|Warrior-41006617958-Secret_Love
Smith|Warrior-41006617958-Duplex_s2
Smith|Warrior-41006617958-sakura
Smith|Warrior-41006617958-lucifer_S2
Smith|Warrior-41006617958-Witch<OF>Hill
~.:Steels:.~-39840251839-Jensen94
~.:Steels:.~-39840251839-Mcoy2x
~.:Steels:.~-39840251839-SAIFE
~.:Steels:.~-39840251839-aaron99
UnholY__KnightS-36960822825-~Joan*Of*Arc~
UnholY__KnightS-36960822825-.:|_Mordrid_|:.
UnholY__KnightS-36960822825-~MERLIN~
UnholY__KnightS-36960822825-Tapitsgabs
UnholY__KnightS-36960822825-tapit_420
Rebles_Of_Love~-36292197935-hoop
Rebles_Of_Love~-36292197935--SeRiNiTy-
Rebles_Of_Love~-36292197935-hellrazor
Rebles_Of_Love~-36292197935-N0T~CHiiLDiiSH
Rebles_Of_Love~-36292197935-hellboy
Rebles_Of_Love~-36292197935-Banana
~*SuPeRnOvA*~-34311225287-)~(FLaRe)~(
~*SuPeRnOvA*~-34311225287-Justinbebustin
~*SuPeRnOvA*~-34311225287-~*Rogeris*~
~*SuPeRnOvA*~-34311225287--|chio_ram|-
~*SuPeRnOvA*~-34311225287-~~Cloud~~
~*SuPeRnOvA*~-34311225287--|ScottBakula|-
Alchemist-33441116016-TyrionLannister
Alchemist-33441116016-sweethoney
Alchemist-33441116016-King_Dragon
Alchemist-33441116016-Mr.Andrew
Alchemist-33441116016-Brandivio
Nicafe_Idiots!-31555358530-gago_ka?
^-^SpartanI^-^-30087091970-~Dan~
^-^SpartanI^-^-30087091970-*Dany*SMK*
Ar|a_51-29098259413-Plagu3
Ar|a_51-29098259413-killer_girl
Ar|a_51-29098259413-MooM
Now if you wanted to display the ranks of these guys you would have another table

Name: legion_rank_name
Design:
Code:
rank_number  -  rank_name
---------------------------
1000  -  Leader
990  -  Deputy
980  -  HonorDeputy
920  -  Leader'sSpouse
900  -  6-star
890  -  General
880  -  HonorGeneral
850  -  Captain
840  -  HonorCaptain
690  -  Lieutenant
680  -  HonorLieut.
620  -  Deputy'sSpouse
611  -  Deputy'sAide
610  -  LeadSpouseAide
603  -  Secretary
602  -  LeaderSecretary
600  -  3-star
590  -  Sergeant
521  -  Captain'sSpouse
520  -  General'sSpouse
511  -  Captain'sAide
510  -  General'sAide
500  -  2-star
490  -  SeniorMember
420  -  Lieut.'sSpouse
400  -  1-star
240  -  Level1Member
230  -  Level2Member
220  -  Level3Member
201  -  JuniorMember
200  -  CommonMember
100  -  Reservist
then you would change the above sql query to look like this to display legion rank next to their name

Code:
SELECT
cq_syndicate.NAME,
cq_syndicate.money,
cq_user.name,
legion_rank_name.rank_name
FROM
cq_syndicate ,
cq_user ,
cq_synattr
Inner Join legion_rank_name ON cq_synattr.rank = legion_rank_name.rank_number
WHERE 
cq_syndicate.id =  cq_synattr.syn_id 
AND 
cq_synattr.rank >=  900 
AND 
cq_synattr.id =  cq_user.id
ORDER BY
cq_syndicate.money DESC,
cq_synattr.rank DESC
LIMIT 100
and if you don't feel like making the table run this SQL code to create the table needed, I can assure you this works fine

Code:
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `legion_rank_name`;
CREATE TABLE `legion_rank_name` (
  `rank_number` int(4) NOT NULL default '0',
  `rank_name` char(50) default NULL,
  PRIMARY KEY  (`rank_number`)
) TYPE=MyISAM;

INSERT INTO `legion_rank_name` VALUES ('1000', 'Leader'),
('990', 'Deputy'),
('980', 'HonorDeputy'),
('920', 'Leader\'sSpouse'),
('900', '6-star'),
('890', 'General'),
('880', 'HonorGeneral'),
('850', 'Captain'),
('840', 'HonorCaptain'),
('690', 'Lieutenant'),
('680', 'HonorLieut.'),
('620', 'Deputy\'sSpouse'),
('611', 'Deputy\'sAide'),
('610', 'LeadSpouseAide'),
('603', 'Secretary'),
('602', 'LeaderSecretary'),
('600', '3-star'),
('590', 'Sergeant'),
('521', 'Captain\'sSpouse'),
('520', 'General\'sSpouse'),
('511', 'Captain\'sAide'),
('510', 'General\'sAide'),
('500', '2-star'),
('490', 'SeniorMember'),
('420', 'Lieut.\'sSpouse'),
('400', '1-star'),
('240', 'Level1Member'),
('230', 'Level2Member'),
('220', 'Level3Member'),
('201', 'JuniorMember'),
('200', 'CommonMember'),
('100', 'Reservist'),
('4', '0-star'),
('3', '4-star'),
('2', '5-star'),
('1', '7-star');


finaly the result of the new query with the new table is as follows for acme

Code:
Legion Name		Total Gold		Member Name		Member Rank
===========================================================================
Death_Knights		66614767114		Murder-Me-16		Leader
Death_Knights		66614767114		death-to-all		Deputy
Death_Knights		66614767114		DEMONKILLER6969		Deputy
Death_Knights		66614767114		Joshua			Deputy
Death_Knights		66614767114		Squeeky			Deputy
Death_Knights		66614767114		Lord_Pain		HonorDeputy
Death_Knights		66614767114		DeathsMistress		HonorDeputy
Gr34T_SouL		63355847661		+_MAILED_+		Leader
Gr34T_SouL		63355847661		_LorD_			Deputy
Gr34T_SouL		63355847661		~kræM~			Deputy
Gr34T_SouL		63355847661		AdzorpTion		HonorDeputy
Gr34T_SouL		63355847661		~*Al-prince*~		HonorDeputy
~*We*R*JustiCe*		61030391618		FalCon			Leader
~*We*R*JustiCe*		61030391618		*MaTReX*		Deputy
~*We*R*JustiCe*		61030391618		###zoom###		Deputy
~*We*R*JustiCe*		61030391618		*&Dark&Hell&*		Deputy
~*We*R*JustiCe*		61030391618		*~ELAMER~*		Deputy
~*We*R*JustiCe*		61030391618		BeBoo			HonorDeputy
.:!All-$tars!:.		57994688979		elzaem			Leader
.:!All-$tars!:.		57994688979		H.....A...AHMED		Deputy
.:!All-$tars!:.		57994688979		***JM***		Deputy
.:!All-$tars!:.		57994688979		mtirx			Deputy
.:!All-$tars!:.		57994688979		necroshear		Deputy
.:!All-$tars!:.		57994688979		spiderman2008		HonorDeputy
.:!All-$tars!:.		57994688979		Motherm			HonorDeputy
The_Masters		48282611125		asklepius		Leader
The_Masters		48282611125		MEGUMI			Deputy
The_Masters		48282611125		kate.			Deputy
The_Masters		48282611125		Kushumai		Deputy
The_Masters		48282611125		#24marley#24		Deputy
The_Masters		48282611125		l_Un4GiveN_l		HonorDeputy
The_Masters		48282611125		ZARATOR			HonorDeputy
HeartlessAngels		45567097486		Tsubasa.		Leader
HeartlessAngels		45567097486		~Fire*Man~		Deputy
HeartlessAngels		45567097486		RavensAngel		Deputy
HeartlessAngels		45567097486		~DeaTh~ScorpIon		Deputy
HeartlessAngels		45567097486		#90Andy#90		HonorDeputy
The|Al|Che|Mist		45338446403		IchigoBL		Leader
The|Al|Che|Mist		45338446403		SARAY_SOYOP		Deputy
The|Al|Che|Mist		45338446403		3565413.1897		Deputy
The|Al|Che|Mist		45338446403		cristina		HonorDeputy
JuSt`CaVaLLi		44472622720		~NOVA~			Leader
JuSt`CaVaLLi		44472622720		NightWalKer		Deputy
JuSt`CaVaLLi		44472622720		neoplanet		Deputy
JuSt`CaVaLLi		44472622720		Sat-Thu			Deputy	
JuSt`CaVaLLi		44472622720		JuSt`CaVaLLi		Deputy
JuSt`CaVaLLi		44472622720		zhai			HonorDeputy
Dark*Empire		43977705029		masterlink		Leader
Dark*Empire		43977705029		daRk^KiNgpLar		Deputy
Dark*Empire		43977705029		hazzer			Deputy
Dark*Empire		43977705029		Pro_Mage		Deputy
Dark*Empire		43977705029		NarutoOFTheLeaf		Deputy
Dark*Empire		43977705029		Hell_Enma#71		HonorDeputy
Dark*Empire		43977705029		WarStar			HonorDeputy
AtrumDeus		42621409603		Cagney			Leader
AtrumDeus		42621409603		Br0KeN~HeArT		Deputy
AtrumDeus		42621409603		JechT			Deputy
AtrumDeus		42621409603		.:NeutraL:.		Deputy
AtrumDeus		42621409603		jay			Deputy
AtrumDeus		42621409603		memaloca		HonorDeputy
AtrumDeus		42621409603		.Gunner.		HonorDeputy
Smith|Warrior		41006617958		Secret_Love		Leader
Smith|Warrior		41006617958		*°::.Lobão.::°*		Deputy
Smith|Warrior		41006617958		sakura			Deputy
Smith|Warrior		41006617958		lucifer_S2		Deputy
Smith|Warrior		41006617958		Duplex_s2		HonorDeputy
Smith|Warrior		41006617958		Witch<OF>Hill		HonorDeputy
~.:Steels:.~		39840251839		Jensen94		Leader
~.:Steels:.~		39840251839		aaron99			Deputy
~.:Steels:.~		39840251839		Mcoy2x			Deputy
~.:Steels:.~		39840251839		SAIFE			HonorDeputy
UnholY__KnightS		36960822825		.:|_Mordrid_|:.		Leader
UnholY__KnightS		36960822825		~MERLIN~		Deputy
UnholY__KnightS		36960822825		~Joan*Of*Arc~		Deputy
UnholY__KnightS		36960822825		Tapitsgabs		Deputy
UnholY__KnightS		36960822825		tapit_420		HonorDeputy
Rebles_Of_Love~		36292197935		hoop			Leader
Rebles_Of_Love~		36292197935		hellboy			Deputy
Rebles_Of_Love~		36292197935		Banana			Deputy
Rebles_Of_Love~		36292197935		N0T~CHiiLDiiSH		Deputy
Rebles_Of_Love~		36292197935		-SeRiNiTy-		HonorDeputy
Rebles_Of_Love~		36292197935		hellrazor		HonorDeputy
~*SuPeRnOvA*~		34691175287		)~(FLaRe)~(		Leader
~*SuPeRnOvA*~		34691175287		Justinbebustin		Deputy
~*SuPeRnOvA*~		34691175287		~~Cloud~~		Deputy
~*SuPeRnOvA*~		34691175287		~*Rogeris*~		Deputy
~*SuPeRnOvA*~		34691175287		-|chio_ram|-		Deputy
~*SuPeRnOvA*~		34691175287		-|ScottBakula|-		HonorDeputy
Alchemist		33441116016		sweethoney		Leader
Alchemist		33441116016		Brandivio		Deputy
Alchemist		33441116016		King_Dragon		Deputy
Alchemist		33441116016		TyrionLannister		Deputy
Alchemist		33441116016		Mr.Andrew		HonorDeputy
Nicafe_Idiots!		31555358530		gago_ka?		Leader
^-^SpartanI^-^		30087091970		*Dany*SMK*		Leader
^-^SpartanI^-^		30087091970		~Dan~			Deputy
Ar|a_51			29098259413		D3athKn|ght		Leader
Ar|a_51			29098259413		Plagu3			Deputy
Ar|a_51			29098259413		killer_girl		Deputy
Ar|a_51			29098259413		DangeR			Deputy
funhacker is offline  
Old 10/14/2008, 01:01   #11

 
PowerChaos's Avatar
 
elite*gold: 90
Join Date: Feb 2008
Posts: 1,112
Received Thanks: 640
wow , Thank you

i sure will try it out

-------
i tryed it out and i get this small error :S



it shows Resource id #4
this is the code how i inplented them
in case it can help
Code:
Rank Player Name Level Profession EPs Money Saved Legion
 
1 DragonTear 101 mage 1430 79500000 Resource id #4 
2 |haticzzz| 86 mage 1197 2071116 Resource id #4 
3 HolySacrifice 50 warrior 1188 0 Resource id #4 
4 PowerChaos[PM] 80 Paladin 970 270000 Resource id #4 
5 Avantage 66 mage 762 0 Resource id #4 
6 ~DaRK*MaGiCaN~ 46 mage 570 0 Resource id #4 
7 Shu 9 warrior 536 0 Resource id #4 
8 chibiidude 82 warrior 284 5000000 Resource id #4 
9 GoLDKnighT 5 warrior 270 0 Resource id #4 
10 Iceheart 49 mage 270 3750000 Resource id #4 
11 slayernr1 84 warrior 138 19305315 Resource id #4 
12 krigel 79 Paladin 93 400000 Resource id #4 
13 SpankThat 35 warrior 38 0 Resource id #4 
14 NightGirL 45 warrior 28 0 Resource id #4 
15 IIxSLAYERxII 33 warrior 24 0 Resource id #4 
16 Ma-jutsu 36 warrior 17 0 Resource id #4 
17 LuLu 50 warrior 16 0 Resource id #4 
18 ifuckyouall 86 warrior 15 0 Resource id #4 
19 TrashMan 65 warrior 15 300000 Resource id #4 
20 SoulReaper 40 mage 9 0 Resource id #4 
21 ThunderDragon 70 mage 8 0 Resource id #4 
22 XxTopsyKrettxX 29 warrior 6 0 Resource id #4 
23 Darksoul 92 mage 5 3000000 Resource id #4 
24 ~Utah~ 66 mage 4 2032701 Resource id #4 
25 Ieyasu 60 warrior 3 1371412 Resource id #4 
26 PlayBoy_x3 55 warrior 2 0 Resource id #4 
27 iZabuza 84 warrior 0 0 Resource id #4 
28 Tom 85 warrior 0 14769000 Resource id #4 
29 ThunderTimo 70 mage 0 0 Resource id #4 
30 Tobbeliten 70 mage 0 0 Resource id #4 
31 Xtremejumper 84 warrior 0 1550000 Resource id #4 
32 dfrgdsfdfg 1 warrior 0 0 Resource id #4 
33 Ogrr 10 mage 0 0 Resource id #4 
34 Neos 39 warrior 0 0 Resource id #4 
35 Meteru 14 warrior 0 0 Resource id #4 
36 [PM] 255 warrior 0 0 Resource id #4 
37 Lovely 21 warrior 0 0 Resource id #4 
38 Xtreme 1 mage 0 0 Resource id #4 
39 G-star 73 warrior 0 0 Resource id #4 
40 Nuupcake 59 mage 0 0 Resource id #4 
41 davidut 2 mage 0 0 Resource id #4 
42 Star-Lite 8 warrior 0 0 Resource id #4 
43 *Thalia* 70 mage 0 3080000 Resource id #4 
44 Angel 6 warrior 0 0 Resource id #4 
45 JeSy 7 mage 0 0 Resource id #4 
46 Lu 2 mage 0 0 Resource id #4 
47 Jess 2 mage 0 0 Resource id #4 
48 Germany+dream 3 mage 0 0 Resource id #4 
49 Darkness 1 warrior 0 0 Resource id #4 
50 Wat3v4 6 mage 0 0 Resource id #4 
51 *J*A*C*K* 2 warrior 0 0 Resource id #4 
52 Necroblade 7 warrior 0 0 Resource id #4 
53 Necrofire 1 mage 0 0 Resource id #4 
54 innaus 2 warrior 0 0 Resource id #4 
55 Blaken 1 mage 0 0 Resource id #4 
56 [BANNED] 80 mage 0 0 Resource id #4 
57 Soul_Crazy 1 warrior 0 0 Resource id #4 
58 zeph 8 mage 0 0 Resource id #4 
59 hentas 3 warrior 0 0 Resource id #4 
60 Optimus 2 warrior 0 0 Resource id #4 
61 Blood_Doll 14 warrior 0 0 Resource id #4 
62 IIxLEONARDOxII 33 mage 0 0 Resource id #4 
63 haha 1 mage 0 0 Resource id #4 
64 RyanSheckler69 2 mage 0 0 Resource id #4 
65 Rowhenna 1 warrior 0 0 Resource id #4 
66 DarKAnGeL 2 warrior 0 0 Resource id #4 
67 Scarlet 5 warrior 0 0 Resource id #4 
68 Konan 2 warrior 0 0 Resource id #4 
69 KingOf#59Hearts 1 warrior 0 0 Resource id #4 
70 SomeGuy 1 warrior 0 0 Resource id #4
sorry for all the trouble , but i aint good at coding stuff :S (scripting)

Greets From The Crasher
PowerChaos is offline  
Old 10/14/2008, 02:28   #12
 
funhacker's Avatar
 
elite*gold: 20
Join Date: Sep 2007
Posts: 1,767
Received Thanks: 1,741
now I see what you need use this as your ONLY query

Code:
SELECT
cq_user.name,
cq_user.level,
cq_user.profession,
cq_user.emoney,
cq_user.money_saved,
cq_syndicate.NAME,
cq_syndicate.money,
legion_rank_name.rank_name
FROM
cq_syndicate ,
cq_user ,
cq_synattr
Inner Join legion_rank_name ON cq_synattr.rank = legion_rank_name.rank_number
WHERE 
cq_syndicate.id =  cq_synattr.syn_id 
AND 
cq_synattr.id =  cq_user.id
ORDER BY
cq_user.emoney DESC
LIMIT 100



and here is the edited PHP

Code:
<body bgcolor="#202020">

 

<div align="center">

 

<font color="#202020">

<?php             

 

    $myhost="xxx";

    $mypass="xxx";

    $myuser="xxx";

    $mydb="xxx";

    mysql_connect($myhost,$myuser,$mypass);

    mysql_select_db($mydb);?></strong></font><b><font color="#FFFFFF" face="Andreas Pen MF" size="4"><marquee width="433" behavior="alternate">EPs Top 100 </marquee></font></b></p>

<p align="center">

 

                          <table width="50%" height="25" border="1" bgcolor="#800000" bordercolor="#FF00FF">

                            <tr>

                              <td width="57" bgcolor="#FF0000" bordercolor="#FF00FF">

                                                                <font color="#FFFFFF" face="Aniron" size="1">

                                                                <p align="center">

                                                                <strong style="font-weight: 400">Rank</strong></font></td>

                              <td width="129" bgcolor="#FF0000" bordercolor="#FF00FF">

                                                                <p align="center">

                                                                <font color="#FFFFFF" face="Aniron" size="1">

                                                                <strong style="font-weight: 400">Player Name</strong></font></p></td>

                              <td width="57" bgcolor="#FF0000" bordercolor="#FF00FF">

                                                                <font color="#FFFFFF" face="Aniron" size="1">

                                                                <p align="center">

                                                                <strong style="font-weight: 400">Level</strong></font></td>

                              <td width="108" bgcolor="#FF0000" bordercolor="#FF00FF">

                                                                <font color="#FFFFFF" face="Aniron" size="1">

                                                                <p style="padding-left: 11px;" align="center">

                                                                <strong style="font-weight: 400">Profession</strong></span></font></td> 

                              <td width="108" bgcolor="#FF0000" bordercolor="#FF00FF">

                                                                <p align="center">

                                                                <font color="#FFFFFF" face="Aniron" size="1">

                                                                <strong style="font-weight: 400">EPs</strong></font></td>

                              <td width="114" bgcolor="#FF0000" bordercolor="#FF00FF">

                                                                <p align="center">

                                                                <font color="#FFFFFF" face="Aniron" size="1">

                                                                <strong style="font-weight: 400">Money Saved</strong></font></td>

<td width="114" bgcolor="#FF0000" bordercolor="#FF00FF">

                                                                <p align="center">

                                                                <font color="#FFFFFF" face="Aniron" size="1">

                                                                <strong style="font-weight: 400">Legion</strong></font></td> 


<td width="114" bgcolor="#FF0000" bordercolor="#FF00FF">

                                                                <p align="center">

                                                                <font color="#FFFFFF" face="Aniron" size="1">

                                                                <strong style="font-weight: 400">Legion Gold</strong></font></td> 


<td width="114" bgcolor="#FF0000" bordercolor="#FF00FF">

                                                                <p align="center">

                                                                <font color="#FFFFFF" face="Aniron" size="1">

                                                                <strong style="font-weight: 400">Legion Rank</strong></font></td> 


</tr>

 

                              <?php     

 

    $rank = mysql_query("SELECT cq_user.name,cq_user.level,cq_user.profession,cq_user.emoney,cq_user.money_saved,cq_syndicate.NAME, cq_syndicate.money, legion_rank_name.rank_name FROM cq_syndicate ,cq_user ,cq_synattr Inner Join legion_rank_name ON cq_synattr.rank = legion_rank_name.rank_number WHERE cq_syndicate.id =  cq_synattr.syn_id AND cq_synattr.id =  cq_user.id ORDER BY cq_user.emoney DESC LIMIT 100");

 

//$row = mysql_fetch_array($rank);

    $i=1;


 while($row = mysql_fetch_array($rank))

{

        if($row['cq_user.profession']==20)

 {

        $profession='Warrior';

 }

        else if($row['cq_user.profession']==30)

  {

        $profession='Paladin';

  }

        else{$profession='Mage';

 

}

        echo '

    <td><font color="#FFFFFF"><div align="center">'.$i.'</td>

    <td><font color="#FFFFFF"><div align="center">'.$row['cq_user.NAME'].'</td>

    <td><font color="#FFFFFF"><div align="center">'.$row['cq_user.level'].'</td>

    <td><font color="#FFFFFF"><div align="center">'.$profession.'</td>

    <td><font color="#FFFFFF"><div align="center">'.$row['cq_user.emoney'].'</td>

    <td><font color="#FFFFFF"><div align="center">'.$row['cq_user.money_saved'].'</td>

    <td><font color="#FFFFFF"><div align="center">'.$row['cq_syndicate.name'].'</td> 

    <td><font color="#FFFFFF"><div align="center">'.$row['cq_syndicate.money'].'</td> 

    <td><font color="#FFFFFF"><div align="center">'.$row['legion_rank_name.rank_name'].'</td>

  </tr> ';

  $i=$i+1;

    }

 

?>

</div>
note I have NEVER edited or did any PHP so it might screw up but I doubt it will I followed the general rules
funhacker is offline  
Thanks
1 User
Old 10/14/2008, 15:16   #13

 
PowerChaos's Avatar
 
elite*gold: 90
Join Date: Feb 2008
Posts: 1,112
Received Thanks: 640
Thank you added

Thank you for trying to help me

it now looks strange :S
i know to less from php and mysql to find the error

the strange thing is that it works (so there isnt a error) but it doesnt show everything that is needed

it show now
rank 1 ........ mage
rank 100 ........ mage
and all the other are emty spaces :s


i still want to thank you for helping me and to be honnest , i dont get it why it doesnt works :S , it doesnt give errors so it loads from the db (otherwhise is it a mysql fetch error if i iam right :S )

still ,Thanky you for helping and Greets From The Crasher
PowerChaos is offline  
Old 10/14/2008, 17:36   #14

 
PowerChaos's Avatar
 
elite*gold: 90
Join Date: Feb 2008
Posts: 1,112
Received Thanks: 640
i got it to work now

Thank you , i founded the small bug you got and that was preventing it to work

instead that you need to use
Code:
ORDER BY cq_user.emoney
$row['cq_user.name']
do you need to use
Code:
ORDER BY emoney
$row['name']
and then it shows it what it need to do

Thank you

now i got a small request if posseble

if there are members that arent in a legion , then it need to show 'no legion'
otherhwise it just show only the members that got a legion

but so far , Thank you for Fixing this problem
PowerChaos is offline  
Old 10/14/2008, 18:18   #15
 
funhacker's Avatar
 
elite*gold: 20
Join Date: Sep 2007
Posts: 1,767
Received Thanks: 1,741
Glad I could help I am not entirely sure on how to put that out there, best guess would be to include another colum but dont display it, cq_user.syndicate_id say
Code:
if $row['syndicate_id'] == 0
{
$legion_name = 'No Legion'
$legion_rank = 'No rank'
}
else 
{
$legion_name = $row['cq_syndicate.name']
$legion_rank = $row['rank_name']
}
funhacker is offline  
Reply


Similar Threads Similar Threads
[Request]pvp script
08/17/2010 - Dekaron Private Server - 1 Replies
hi can some1 know script with who i can reset all char pvp point
[Request]//[Help]Legion
05/14/2010 - EO PServer Hosting - 0 Replies
Hey guys, quick question and help. me and my staff have been trying to fix a problem on moonlight. for some reason the legion just wont stay working. after creation and relogin they work fine. after maint or server shutdown they seem to be saved but they don't work. As in they all disappear. The legions stay in the table the table is not corrupt we have mysql version 4.0 exactly and the logs have no errors related to syndicate table so we are up sh$# creek without a paddle. help would be...
Legion sucht Member / Member sucht Legion
05/13/2009 - Aion - 3 Replies
Damit hier in nächster Zeit nicht alles vollgespammt wird mit Legionen könnt ihr hier Member bzw. eine Legion suchen. Ich fang dann mal an: http://www2.pic-upload.de/13.05.09/2vxfnj.png http://www2.pic-upload.de/13.05.09/s3zqz1.png http://www2.pic-upload.de/13.05.09/c7tay.png
Script Request
01/22/2009 - Lineage 2 - 1 Replies
could somone plz make a script to return to fightin spot in forsaken plains kinda this post http://www.elitepvpers.com/forum/lin2-exploits-hack s-bots-tools-macros/159515-l2walker-script-solo-re buff-restock-return-script.html where gets rebuffs, buy soe and healin pot plz
[REQUEST] Can i Request A Acc/Char PHP Script
09/27/2008 - CO2 Private Server - 6 Replies
hello i was wondering if anyone have made a acc/char creation page in one yet? is so can anyone release itplease?



All times are GMT +1. The time now is 15:59.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.