sandbox Posted March 2, 2014 Posted March 2, 2014 File Name: @empladder File Submitter: sandbox File Submitted: 2 Mar 2014 File Category: Utilities Content Author: sandbox Script details and usage It's a script that will show the top 10 Emperium breakers of your server. Suggestions for the improvement of this very simple script would be appreciated. Installation Enable the script on your NPC folder Find this line in npc/guild/agit_main.txt // The Emperium has been broken. OnAgitBreak: Add below set empladder,empladder+1; If your script support WoE SE, you will have to edit this file too > npc/guild2/agit_main_se.txtFind OnStartArena: set .@GID,getcharid(2); Add below set empladder,empladder+1; Terms & Conditions You are not allowed to reproduce or make profit of this script You are not allowed to take credit for this script. Though you can modify/edit it to your liking. I can give you support, but please, do not message me. It is your own responsibility to create a backup before implementing anything new. Pastebin: http://rathena.org/board/pastebin/73thwenhsb2a/ at_empladder.txt Quote
Santafe Posted March 7, 2014 Posted March 7, 2014 Hey sandycould u make this an npc too? Thx alot Quote
sandbox Posted March 10, 2014 Author Posted March 10, 2014 Thank u Almost forgot about you, here's your NPC! //======Name======================================== // Emperium Ladder //======Version===================================== // 1.0 //======Author(s)=================================== // Sandbox //======Comments==================================== // It's a script that will show the top 10 Emperium breakers of your server. //================================================== prontera,123,123,4 script empladder 78,{ mes "Here are our top 10 breakers!"; query_sql ("SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='empladder' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count); for( set .@x,0; .@x<10; set .@x,.@x+1 ) { mes "^880000"+(.@x+1)+"^000000) ^0000FF"+.@name$[.@x]+"^000000 - ^008800"+.@count[.@x]+"^000000 Point(s)"; } // .@x starts at 0, but you want to start with '1st', so use (.@x+1) close; } 1 Quote
Santafe Posted March 10, 2014 Posted March 10, 2014 Thank u Almost forgot about you, here's your NPC! //======Name======================================== // Emperium Ladder //======Version===================================== // 1.0 //======Author(s)=================================== // Sandbox //======Comments==================================== // It's a script that will show the top 10 Emperium breakers of your server. //================================================== prontera,123,123,4 script empladder 78,{ mes "Here are our top 10 breakers!"; query_sql ("SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='empladder' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count); for( set .@x,0; .@x<10; set .@x,.@x+1 ) { mes "^880000"+(.@x+1)+"^000000) ^0000FF"+.@name$[.@x]+"^000000 - ^008800"+.@count[.@x]+"^000000 Point(s)"; } // .@x starts at 0, but you want to start with '1st', so use (.@x+1) close; } *hails sandbox for this* Quote
sandbox Posted April 16, 2014 Author Posted April 16, 2014 It already works like that, unless you mean something else? Quote
Stolao Posted April 16, 2014 Posted April 16, 2014 It already works like that, unless you mean something else? lol so it does, i was reading the quotes sorry Quote
Onairda Posted November 3, 2017 Posted November 3, 2017 hi can someone convert this @empladder in present database because now the database has don't have global_reg_value table anymore thankyou query_sql ("SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='empladder' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count); Quote
Onairda Posted November 3, 2017 Posted November 3, 2017 On 4/16/2014 at 11:37 AM, sandbox said: It already works like that, unless you mean something else? On 4/16/2014 at 12:50 PM, Stolao said: lol so it does, i was reading the quotes sorry hi can someone convert this @empladder in present database because now the database has don't have global_reg_value table anymore thankyou query_sql ("SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='empladder' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count); thankyou Quote
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.