Dastgir 1246 Posted March 17, 2014 File Name: Ultimate Guild Ranker File Submitter: Dastgir File Submitted: 17 Mar 2014 File Category: PvP, WoE, GvG, & Battleground Script By Request : http://herc.ws/board/topic/4756-ultimate-guild-ranking Percentage Changes:AgitCount= 20%Emp Break = 50%Active Participants = 20%KDR = 10% Features: Guild Ranking Previous Month Guild Ranking Rewards based on previous month Edits to made after installing the Script: Open npc/guild/agit_main.txt Add Following Line doevent "UltimateRanker#00::OnEmpBreak"; Before // Adjust Economy Invest Level for Castle set .@Economy,getcastledata(strnpcinfo(2),2) - 5; Have a Custom WoE? And its not triggering the Script?? Solution: add the following line on EmperiumBreaking Label. doevent "UltimateRanker#00::OnEmpBreak"; Please report any bugs/suggestions. Click here to download this file 10 quesoph, Nagad, Danzon and 7 others reacted to this Quote Share this post Link to post Share on other sites
quesoph 105 Posted March 17, 2014 (edited) Awesome release. Thank you! Edited March 17, 2014 by quesoph Quote Share this post Link to post Share on other sites
quesoph 105 Posted March 18, 2014 (edited) [Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: getcharid (1 parameter):[Debug]: Data: number value=2[Debug]: Source (NPC): UltimateRanker#00 (invisible/not on a map) change this donpcevent "UltimateRanker#00::OnEmpBreak"; to this doevent "UltimateRanker#00::OnEmpBreak"; to get rid of this error Edited March 18, 2014 by quesoph Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted March 18, 2014 [Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: getcharid (1 parameter):[Debug]: Data: number value=2[Debug]: Source (NPC): UltimateRanker#00 (invisible/not on a map) change this donpcevent "UltimateRanker#00::OnEmpBreak"; to this doevent "UltimateRanker#00::OnEmpBreak"; to get rid of this error Seems like I bymistakely diffed a wrong folder.... Anyways,Uploaded a fixed version. Quote Share this post Link to post Share on other sites
Danzon 4 Posted March 19, 2014 (edited) very nice , thank you sir Question : Percentage Changes:AgitCount= 20%Emp Break = 50%Active Participants = 20%KDR = 10% Can i change this to : Percentage Changes:AgitCount= 20%Emp Break = 50%Active Participants = 10%KDR = 20% From OnInit ? Edited March 19, 2014 by Max Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted March 19, 2014 very nice , thank you sir Question : Percentage Changes:AgitCount= 20%Emp Break = 50%Active Participants = 20%KDR = 10% Can i change this to : Percentage Changes:AgitCount= 20%Emp Break = 50%Active Participants = 10%KDR = 20% From OnInit ? Yes, that's the reason I have included those variables in OnInit: You can change those to any values you want. Quote Share this post Link to post Share on other sites
Shatowolf 9 Posted March 20, 2014 Got this error [SQL]: DB error - Table 'hercules.ugr_guild_infoV' doesn't exist[Debug]: at script.c:14613 - INSERT INTO `ugr_guild_infoV` (`date`,`HighEmpBreak`) VALUES (201403,1) ON DUPLICATE KEY UPDATE `HighEmpBreak`=1[Debug]: Source (NPC): UltimateGuildRanker at amatsu (128,161) Quote Share this post Link to post Share on other sites
quesoph 105 Posted March 20, 2014 ^ create these tables ---- Table structure for table `ugr_guild_info`--CREATE TABLE IF NOT EXISTS `ugr_guild_info` ( `guild_id` mediumint(6) NOT NULL DEFAULT '0', `breaks` smallint(5) NOT NULL DEFAULT '0', `kills` smallint(5) NOT NULL DEFAULT '0', `deaths` smallint(5) NOT NULL DEFAULT '0', `APart` mediumint(6) NOT NULL DEFAULT '0', `percent` SMALLINT(4) NOT NULL DEFAULT '0', `date` MEDIUMINT(7) NOT NULL DEFAULT '0', `claim` tinyint(1) NOT NULL DEFAULT '1', UNIQUE KEY `guild_id` (`guild_id`,`date`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;---- Table structure for table `ugr_guild_infov`--CREATE TABLE IF NOT EXISTS `ugr_guild_infov` ( `date` MEDIUMINT(7) NOT NULL DEFAULT '0', `AgitCount` mediumint(6) NOT NULL DEFAULT '1', `HighEmpBreak` MEDIUMINT(6) NOT NULL DEFAULT '0', UNIQUE KEY `date` (`date`,`AgitCount`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; Quote Share this post Link to post Share on other sites
Shatowolf 9 Posted March 20, 2014 (edited) ^ create these tables ---- Table structure for table `ugr_guild_info`--CREATE TABLE IF NOT EXISTS `ugr_guild_info` ( `guild_id` mediumint(6) NOT NULL DEFAULT '0', `breaks` smallint(5) NOT NULL DEFAULT '0', `kills` smallint(5) NOT NULL DEFAULT '0', `deaths` smallint(5) NOT NULL DEFAULT '0', `APart` mediumint(6) NOT NULL DEFAULT '0', `percent` SMALLINT(4) NOT NULL DEFAULT '0', `date` MEDIUMINT(7) NOT NULL DEFAULT '0', `claim` tinyint(1) NOT NULL DEFAULT '1', UNIQUE KEY `guild_id` (`guild_id`,`date`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;---- Table structure for table `ugr_guild_infov`--CREATE TABLE IF NOT EXISTS `ugr_guild_infov` ( `date` MEDIUMINT(7) NOT NULL DEFAULT '0', `AgitCount` mediumint(6) NOT NULL DEFAULT '1', `HighEmpBreak` MEDIUMINT(6) NOT NULL DEFAULT '0', UNIQUE KEY `date` (`date`,`AgitCount`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; Yea i already run it on my sql, still getting that error. Edited : FIXED. thanks to Dastgir Edited October 21, 2014 by Dastgir Quote Share this post Link to post Share on other sites
quesoph 105 Posted March 28, 2014 (edited) 1. Whenever I @agitstart & @agitstop and @reloadnpc this executes set $AgitCount, $AgitCount + 1;. and may high percentage / guild points bug. 2. [SQL]: DB error - Column 'percent' cannot be null[Debug]: at c:testsrcmapscript.c:14582 - UPDATE `ugr_guild_info` SET `percent`=( ((1/3*100)*20/100)+((`kills`/(`deaths`+1)*100)*10/100)+((`breaks`/1*100)*50/100)+((`APart`/(select count(*) FROM `guild` WHERE `guild`.`guild_id`=`ugr_guild_info`.`guild_id`)*100)*20/100)) WHERE `date`=201403[Debug]: Source (NPC): UltimateGuildRanker at prontera (153,181) break emperium and use @breakguild then check UGR npc. These are the problems I've encountered so far.. ^^ Edited March 28, 2014 by quesoph Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted March 28, 2014 (edited) 1. Whenever I @agitstart & @agitstop and @reloadnpc this executes set $AgitCount, $AgitCount + 1;. and may high percentage / guild points bug. 2. [SQL]: DB error - Column 'percent' cannot be null[Debug]: at c:testsrcmapscript.c:14582 - UPDATE `ugr_guild_info` SET `percent`=( ((1/3*100)*20/100)+((`kills`/(`deaths`+1)*100)*10/100)+((`breaks`/1*100)*50/100)+((`APart`/(select count(*) FROM `guild` WHERE `guild`.`guild_id`=`ugr_guild_info`.`guild_id`)*100)*20/100)) WHERE `date`=201403[Debug]: Source (NPC): UltimateGuildRanker at prontera (153,181) break emperium and use @breakguild then check UGR npc. These are the problems I've encountered so far.. ^^ 1) & 2) I will fix it in next update. (you could have lowered the percent of agitcount too, but anyways, included some options to prevent unnecessary increment of AgitCount) Added a new configuration .Config_UGR[4](set seconds here), if WoE Starts again within x seconds, then AgitCount will not increase. (you were using v1.0b, while v1.0c was out, anyways new version will be v1.0d, and will have these problems fixed.) Edited March 28, 2014 by Dastgir Pojee Quote Share this post Link to post Share on other sites
quesoph 105 Posted March 28, 2014 (you were using v1.0b, while v1.0c was out, anyways new version will be v1.0d, and will have these problems fixed.) lol I didn't notice that there was a new version. Thank you btw! Quote Share this post Link to post Share on other sites
quesoph 105 Posted March 30, 2014 (edited) @Suggestion Use bc_self so that output will be clearer.. and if ( getguildname( .guild_id[.i] ) == "null" ) requestguildinfo .guild_id[.i]; Other guild names become NULL when you restart your server. mes "Sending data..."; announce "Format: Data Based on "+gettime(5)+"Days/"+$AgitCount+" Castles",bc_self,0xff6622; announce "[GuildName] - Breaks - Kills - Death - GuildPoints "+((getgmlevel()>=getvariableofnpc(.Config_UGR[4],"UltimateRanker#00"))?"- Active Partrticipant":"")+" ",bc_self,0xff6622; announce "----------------------",bc_self,0xff6622; for (.i=0; .i<getarraysize(.guild_id); .i++){ if ( getguildname( .guild_id[.i] ) == "null" ) requestguildinfo .guild_id[.i]; announce (.i+1) +". [ "+getguildname(.guild_id[.i])+" ] - "+.breaks[.i]+" - ^66D729"+.kills[.i]+" - "+.deaths[.i]+"0 - "+.percent[.i]+" "+((getgmlevel()>=getvariableofnpc(.Config_UGR[4],"UltimateRanker#00"))?"- "+.apart[.i]+"":"")+"",bc_self,0xff6622; } announce "----------------------",bc_self,0xff6622; @question What is this for? ((getgmlevel()>=getvariableofnpc(.Config_UGR[4],"UltimateRanker#00"))?" - Active Partrticipant":"")+" " if gm level is greater than or equals 3600 show "- Active Partrticipant" ? correct me if i am wrong. Edited March 30, 2014 by quesoph Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted March 30, 2014 @Suggestion Use bc_self so that output will be clearer.. and if ( getguildname( .guild_id[.i] ) == "null" ) requestguildinfo .guild_id[.i]; Other guild names become NULL when you restart your server. mes "Sending data..."; announce "Format: Data Based on "+gettime(5)+"Days/"+$AgitCount+" Castles",bc_self,0xff6622; announce "[GuildName] - Breaks - Kills - Death - GuildPoints "+((getgmlevel()>=getvariableofnpc(.Config_UGR[4],"UltimateRanker#00"))?"- Active Partrticipant":"")+" ",bc_self,0xff6622; announce "----------------------",bc_self,0xff6622; for (.i=0; .i<getarraysize(.guild_id); .i++){ if ( getguildname( .guild_id[.i] ) == "null" ) requestguildinfo .guild_id[.i]; announce (.i+1) +". [ "+getguildname(.guild_id[.i])+" ] - "+.breaks[.i]+" - ^66D729"+.kills[.i]+" - "+.deaths[.i]+"0 - "+.percent[.i]+" "+((getgmlevel()>=getvariableofnpc(.Config_UGR[4],"UltimateRanker#00"))?"- "+.apart[.i]+"":"")+"",bc_self,0xff6622; } announce "----------------------",bc_self,0xff6622; @question What is this for? ((getgmlevel()>=getvariableofnpc(.Config_UGR[4],"UltimateRanker#00"))?" - Active Partrticipant":"")+" " if gm level is greater than or equals 3600 show "- Active Partrticipant" ? correct me if i am wrong. Seems like i messed away the getgmlevel Part, First i implemented these, than after seeing your comment here, i used [4] for time, and it messed away. Other guild names become NULL when you restart your server. Never experienced this, but yet, i will implement your way. About bc_self,(I don't like announce, that's why i have chosen npc dialog...) Quote Share this post Link to post Share on other sites
WalkingBad 0 Posted April 23, 2014 is this fine?? when i try to check the "Previous Month Top 10 Guilds" that Warning & Debug appears... hmmm and if you're open for suggestion.. can you add a Reward when WOE Ends is it possible? Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted May 1, 2014 is this fine?? when i try to check the "Previous Month Top 10 Guilds" that Warning & Debug appears... hmmm and if you're open for suggestion.. can you add a Reward when WOE Ends is it possible? Fixed the warning, Reward Claim by npc or auto? and reward given to GuildMaster or each member? Quote Share this post Link to post Share on other sites
WalkingBad 0 Posted May 2, 2014 auto reward when woe ends.. and each member who participated the woe for 1 hour will get the reward.. Quote Share this post Link to post Share on other sites
GrumpyPanda 0 Posted May 9, 2014 Is this currently counting all player kills and not only the ones that happen in woe? Not sure if this is meant to be a woe ranking or more of a general guild ranking, in which case you could have stuff like mvps killed by guild affect ranking too (suggestion)? Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted May 10, 2014 Is this currently counting all player kills and not only the ones that happen in woe? Not sure if this is meant to be a woe ranking or more of a general guild ranking, in which case you could have stuff like mvps killed by guild affect ranking too (suggestion)? Its Guild Ranking, so all kills are currently counted.. Quote Share this post Link to post Share on other sites
dungpt8782 0 Posted June 17, 2014 How can i make only 1st guild claim reward? Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted June 18, 2014 How can i make only 1st guild claim reward? Its only 1st guild claim.(found any bugs ?) Quote Share this post Link to post Share on other sites
Shatowolf 9 Posted July 17, 2014 How about woe se castle count? where should i add this : doevent "UltimateRanker#00::OnEmpBreak"; Quote Share this post Link to post Share on other sites
quesoph 105 Posted August 2, 2014 I am using 1.1b and I am having a trouble with duplicate guild ids. Quote Share this post Link to post Share on other sites
Ink 1 Posted October 15, 2014 How can i make only 1st guild claim reward? Its only 1st guild claim.(found any bugs ?) How can i disable my staff guilds from beeing displayed in the ranking? :| Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted October 21, 2014 How about woe se castle count? where should i add this : doevent "UltimateRanker#00::OnEmpBreak"; Below OnStartArena: npc/guild2/agit_main_se.txt I am using 1.1b and I am having a trouble with duplicate guild ids. sorry for extremely late reply, what is trouble? How can i make only 1st guild claim reward? Its only 1st guild claim.(found any bugs ?) How can i disable my staff guilds from beeing displayed in the ranking? :| I will update it to add exceptions 1 Ink reacted to this Quote Share this post Link to post Share on other sites