Jump to content
  • 0
nuna

Can some one convert this script to hercules

Question

query_sql "SELECT `char`.char_id,`char`.`name`,	global_acc_reg_num_db.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='brokeemp' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;

i already tried to change it to char_reg_num_db but still its having error.

 

im trying to remake a ladder with this script

for( set .@x,0; .@x<=9; set .@x,.@x+1 )
    {
        mes "^0000FF"+(.@x+1)+".^000000 "+.@name$[.@x]+" - ^FF0000"+.@count[.@x]+"^000000 Point(s)";
    } // .@x starts at 0, but you want to start with '1st', so use (.@x+1)

 

Thank you in advance!

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0


.@count = query_sql("SELECT c.name, r.value AS points "

"FROM `char_reg_num_db` r "

"JOIN `char` c ON r.char_id = c.char_id "

"WHERE `key`='brokeemp' AND `index`='0' "

"ORDER BY `value` DESC "

"LIMIT 10;",

.@char$[0], .@points[0]);

 

for (.@i = 0; .@i < .@count; .@i++) {

mes(sprintf("%d. %s — %d points.", .@i + 1, .@char$[.@i], .@points[.@i]));

}

 

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.