hendra814 Posted October 26, 2016 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 1281 Reputation: 170 Joined: 06/12/12 Last Seen: 8 hours ago Share Posted October 26, 2016 (edited) Need Help, my script for looking cash ladder showing error at Map server. and here my script prontera,147,168,5 script [[G]]Ladder 990,{ switch(select("Zeny:Cash")){ case 1: 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 10", .@name$, .@class, .@blvl, .@jlvl, .@zeny, .@guild$); for (.@i = 0; .@i < getarraysize(.@name$); .@i++) { .@menu$ = (("" == .@menu$) ? "Top " + (.@i + 1) + " - " + .@name$[.@i] : .@menu$ + ":Top " + (.@i + 1) + " - " + .@name$[.@i]); } mes "[Zeny Ranking]"; mes "Which character do you want to see details about?"; .@selected = select(.@menu$); next; mes "Name: " + .@name$[.@selected - 1]; mes "Class: " + jobname(.@class[.@selected - 1]); mes "Base level: " + .@blvl[.@selected - 1]; mes "Job level: " + .@jlvl[.@selected - 1]; mes "Guild: " + ((.@guild$[.@selected - 1]) ? .@guild$[.@selected - 1] : "none"); mes "Zeny: " + .@zeny[.@selected - 1]; end; case 2: query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM global_reg_value " + "LEFT JOIN `char` ON global_reg_value.account_id=`char`.account_id " + "WHERE global_reg_value.`str`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", .@name$, .@cash; mes "[Top "+getarraysize(.@name$)+" Cash Points]"; for (set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) mes (.@i+1) +". "+ .@name$[.@i] +" cash "+ .@cash[.@i]; close; } } How to Fix this problem. Thanks Edited October 26, 2016 by hendra814 Quote Link to comment Share on other sites More sharing options...
0 Lelouch vi Britannia Posted October 27, 2016 Group: Members Topic Count: 45 Topics Per Day: 0.01 Content Count: 715 Reputation: 84 Joined: 01/05/12 Last Seen: April 10, 2023 Share Posted October 27, 2016 Try changing this... query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM global_reg_value " + "LEFT JOIN `char` ON global_reg_value.account_id=`char`.account_id " + "WHERE global_reg_value.`str`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", to this... query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM acc_reg_num " + "LEFT JOIN `char` ON acc_reg_num.account_id=`char`.account_id " + "WHERE acc_reg_num.`key`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", PS. This is just a test and i havent tested it also Quote Link to comment Share on other sites More sharing options...
0 Azeroth Posted October 26, 2016 Group: Members Topic Count: 36 Topics Per Day: 0.01 Content Count: 383 Reputation: 121 Joined: 03/31/12 Last Seen: January 29, 2023 Share Posted October 26, 2016 (edited) Need Help, my script for looking cash ladder showing error at Map server. 2016-10-25_171914.jpg and here my script prontera,147,168,5 script [[G]]Ladder 990,{ switch(select("Zeny:Cash")){ case 1: 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 10", .@name$, .@class, .@blvl, .@jlvl, .@zeny, .@guild$); for (.@i = 0; .@i < getarraysize(.@name$); .@i++) { .@menu$ = (("" == .@menu$) ? "Top " + (.@i + 1) + " - " + .@name$[.@i] : .@menu$ + ":Top " + (.@i + 1) + " - " + .@name$[.@i]); } mes "[Zeny Ranking]"; mes "Which character do you want to see details about?"; .@selected = select(.@menu$); next; mes "Name: " + .@name$[.@selected - 1]; mes "Class: " + jobname(.@class[.@selected - 1]); mes "Base level: " + .@blvl[.@selected - 1]; mes "Job level: " + .@jlvl[.@selected - 1]; mes "Guild: " + ((.@guild$[.@selected - 1]) ? .@guild$[.@selected - 1] : "none"); mes "Zeny: " + .@zeny[.@selected - 1]; end; case 2: query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM global_reg_value " + "LEFT JOIN `char` ON global_reg_value.account_id=`char`.account_id " + "WHERE global_reg_value.`str`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", .@name$, .@cash; mes "[Top "+getarraysize(.@name$)+" Cash Points]"; for (set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) mes (.@i+1) +". "+ .@name$[.@i] +" cash "+ .@cash[.@i]; close; } } How to Fix this problem. Thanks So based on your error, ur no longer use the old emulator which it has 'global_reg_value' Edited October 26, 2016 by Azeroth Quote Link to comment Share on other sites More sharing options...
0 hendra814 Posted October 26, 2016 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 1281 Reputation: 170 Joined: 06/12/12 Last Seen: 8 hours ago Author Share Posted October 26, 2016 Need Help, my script for looking cash ladder showing error at Map server. 2016-10-25_171914.jpg and here my script prontera,147,168,5 script [[G]]Ladder 990,{ switch(select("Zeny:Cash")){ case 1: 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 10", .@name$, .@class, .@blvl, .@jlvl, .@zeny, .@guild$); for (.@i = 0; .@i < getarraysize(.@name$); .@i++) { .@menu$ = (("" == .@menu$) ? "Top " + (.@i + 1) + " - " + .@name$[.@i] : .@menu$ + ":Top " + (.@i + 1) + " - " + .@name$[.@i]); } mes "[Zeny Ranking]"; mes "Which character do you want to see details about?"; .@selected = select(.@menu$); next; mes "Name: " + .@name$[.@selected - 1]; mes "Class: " + jobname(.@class[.@selected - 1]); mes "Base level: " + .@blvl[.@selected - 1]; mes "Job level: " + .@jlvl[.@selected - 1]; mes "Guild: " + ((.@guild$[.@selected - 1]) ? .@guild$[.@selected - 1] : "none"); mes "Zeny: " + .@zeny[.@selected - 1]; end; case 2: query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM global_reg_value " + "LEFT JOIN `char` ON global_reg_value.account_id=`char`.account_id " + "WHERE global_reg_value.`str`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", .@name$, .@cash; mes "[Top "+getarraysize(.@name$)+" Cash Points]"; for (set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) mes (.@i+1) +". "+ .@name$[.@i] +" cash "+ .@cash[.@i]; close; } } How to Fix this problem. Thanks So based on your error, ur no longer use the old emulator which it has 'global_reg_value' yes, i'm used lastest rathena Quote Link to comment Share on other sites More sharing options...
0 hendra814 Posted November 4, 2016 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 1281 Reputation: 170 Joined: 06/12/12 Last Seen: 8 hours ago Author Share Posted November 4, 2016 Try changing this... query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM global_reg_value " + "LEFT JOIN `char` ON global_reg_value.account_id=`char`.account_id " + "WHERE global_reg_value.`str`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", to this... query_sql "SELECT `char`.`name`, CAST(`value` AS UNSIGNED) FROM acc_reg_num " + "LEFT JOIN `char` ON acc_reg_num.account_id=`char`.account_id " + "WHERE acc_reg_num.`key`='#CASHPOINTS' GROUP BY `char`.account_id " + "ORDER BY CAST(`value` AS UNSIGNED) DESC LIMIT 128", PS. This is just a test and i havent tested it also Thank you very much Lelouch vi Britannia Quote Link to comment Share on other sites More sharing options...
Question
hendra814
Need Help, my script for looking cash ladder showing error at Map server.
and here my script
How to Fix this problem.
Thanks
Edited by hendra814Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.