Jump to content
  • 0

Zeny Ladder


cahadeyelo

Question


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  11/13/14
  • Last Seen:  

Can someone help me with this script
 

function	script	ZENYLADDER	{
	query_sql("SELECT `c`.`name`, `c`.`class`, `c`.`base_level`, `c`.`job_level`, `c`.`zeny`, `g`.`name` FROM `char` c LEFT JOIN (`guild` g) ON (`c`.`guild_id` = `g`.`guild_id`) ORDER BY `c`.`zeny` DESC LIMIT 100", .@name$, .@class, .@blvl, .@jlvl, .@zeny, .@guild$);	

	mes "[ INFORMATION ]";
	for( set .@x,0; .@x<=99; set .@x,.@x+1 ) {
	mes "^0000FF"+(.@x+1)+".^000000 "+.@name$[.@x]+" - ^FF0000"+.@zeny[.@x]+"^000000z";
	}
	close;
}

This shows the zeny ranking on my server, the problem is the value of the zeny isn't separated by place value it just shows like this 100000 not like this 100,000.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  234
  • Reputation:   87
  • Joined:  06/30/18
  • Last Seen:  

function	script	ZENYLADDER	{
	query_sql("SELECT `c`.`name`, `c`.`class`, `c`.`base_level`, `c`.`job_level`, `c`.`zeny`, `g`.`name` FROM `char` c LEFT JOIN (`guild` g) ON (`c`.`guild_id` = `g`.`guild_id`) ORDER BY `c`.`zeny` DESC LIMIT 100", .@names$, .@classes, .@blvls, .@jlvls, .@zeny, .@guilds$);	

	mes "[ INFORMATION ]";
	for(.@i = 0; .@i < 100; .@i++)
	    mes "^0000FF" + (.@i + 1) + ".^000000 " + .@names$[.@i] + " - ^FF0000" + callfunc("F_InsertComma", .@zeny[.@i]) + "^000000z";
	close;
}

 

Edited by Winterfox
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  11/13/14
  • Last Seen:  

35 minutes ago, Winterfox said:
function	script	ZENYLADDER	{
	query_sql("SELECT `c`.`name`, `c`.`class`, `c`.`base_level`, `c`.`job_level`, `c`.`zeny`, `g`.`name` FROM `char` c LEFT JOIN (`guild` g) ON (`c`.`guild_id` = `g`.`guild_id`) ORDER BY `c`.`zeny` DESC LIMIT 100", .@names$, .@classes, .@blvls, .@jlvls, .@zeny, .@guilds$);	

	mes "[ INFORMATION ]";
	for(.@i = 0; .@i < 100; .@i++)
	    mes "^0000FF" + (.@i + 1) + ".^000000 " + .@names$[.@i] + " - ^FF0000" + callfunc("F_InsertComma", .@zeny[.@i]) + "^000000z";
	close;
}

 

it does what i wanted to do thanks but now all the names of the players that own the zeny are gone.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  11/13/14
  • Last Seen:  

i've fixed it..THANKS
 

mes "^0000FF"+(.@x+1)+".^000000 "+.@name$[.@x]+" - ^FF0000"+ callfunc("F_InsertComma",.@zeny[.@x])+"^000000z";

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...