Jump to content
  • 0
ZelosAvalon

Event Ranking

Question

I have an event that when a player kills a monster he gains 1 Event_Point.
How can I create a top 10 ranking of the players who have more Event_Point?

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0
OnRanking:	mes "[Ranking System]";	query_sql "SELECT `char_reg_num_db`.`value`,`char`.`name` FROM `char` INNER JOIN `char_reg_num_db` ON `char_reg_num_db`.`char_id`=`char`.`char_id` WHERE `char_reg_num_db`.`key`='Event_Point' ORDER BY `char_reg_num_db`.`value` DESC LIMIT 10",.@value,.@name$;	for (.@i=0; .@i<getarraysize(.@value); .@i++){		mes (.@i+1)+".) ["+ .@name$[.@i] +"] - "+ .@value[.@i];	}	deletearray .@name$[0],10;		deletearray .@value$[0],10;	close;

if the variable is Event_Point, this would work.

Share this post


Link to post
Share on other sites
  • 0

don't work =/

 

how i'll add this SQL ?

 

i need to add :

"SELECT `char_reg_num_db`.`value`,`char`.`name` FROM `char` INNER JOIN `char_reg_num_db` ON `char_reg_num_db`.`char_id`=`char`.`char_id` WHERE `char_reg_num_db`.`key`='Event_Point' ORDER BY `char_reg_num_db`.`value` DESC LIMIT 10" or i need to put .@value,.@name$; too ?

 

i dont undestand much about SQL tables can u help me ?

 

i dont have a sql table for my #Event_Points, maybe can you help me to make one! i need two var: T_Event_Point = for count total Event Points and use in ranking/ Event_Point = the points for use to buy items on game!

Edited by ZelosAvalon

Share this post


Link to post
Share on other sites
  • 0

don't work =/

 

how i'll add this SQL ?

 

i need to add :

"SELECT `char_reg_num_db`.`value`,`char`.`name` FROM `char` INNER JOIN `char_reg_num_db` ON `char_reg_num_db`.`char_id`=`char`.`char_id` WHERE `char_reg_num_db`.`key`='Event_Point' ORDER BY `char_reg_num_db`.`value` DESC LIMIT 10" or i need to put .@value,.@name$; too ?

 

i dont undestand much about SQL tables can u help me ?

 

i dont have a sql table for my #Event_Points, maybe can you help me to make one! i need two var: T_Event_Point = for count total Event Points and use in ranking/ Event_Point = the points for use to buy items on game!

first of all, I posted the script part,

2) can you tell exact variable, you told #Event_Points on first line and Event_Point on second line.

Share this post


Link to post
Share on other sites
  • 0

when i told i have two var: 

 

#Event_Point - this var u get on kill monsters in a event ( this var u use for buy items on game )

#T_Event_Point - this var its just for count ur event points acquired at all events ( this var u don't use for nothing just for count )

 

I would like to add these two variables in a sql table for safety, but idk how, can you help me ? 

Share this post


Link to post
Share on other sites
  • 0

when i told i have two var: 

 

#Event_Point - this var u get on kill monsters in a event ( this var u use for buy items on game )

#T_Event_Point - this var its just for count ur event points acquired at all events ( this var u don't use for nothing just for count )

 

I would like to add these two variables in a sql table for safety, but idk how, can you help me ? 

#Event_point and #T_Event_Point are account variables, so what should be displayed on ranking along with those variables values?

Share this post


Link to post
Share on other sites
  • 0

should be displayed the 10 players (TOP 10) which contains more Event Points, which are contained in variable #T_Event_Point.

 

#T_Event_Point contains all points earned in all events

 

I would like to see in a npc the list of 10 players that contains more points. 
 
example: 
 
mes "Event Ranking" 
mes "Top 10 Event players" 
 
1st - Player Name - [Number of T_Event_Point #] 
2nd - Player Name - [Number of T_Event_Point #] 
... 
10th - Player Name - [Number of T_Event_Point #]

Share this post


Link to post
Share on other sites
  • 0

should be displayed the 10 players (TOP 10) which contains more Event Points, which are contained in variable #T_Event_Point.

 

#T_Event_Point contains all points earned in all events

 

I would like to see in a npc the list of 10 players that contains more points.

 

example:

 

mes "Event Ranking"

mes "Top 10 Event players"

 

1st - Player Name - [Number of T_Event_Point #]

2nd - Player Name - [Number of T_Event_Point #]

...

10th - Player Name - [Number of T_Event_Point #]

#Event_Points are the variables that are Account Bounded and not Character bounded. and a Account contains minimum 9 characters.. So how can I display a specific player name? Or get any chracter name from that account?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.