iubantot Posted March 31, 2014 Posted March 31, 2014 schg_cas 01 = 3 points arug_cas01 = 2 points prtg_cas01 = 1 point The guild will gain points whenever their guild conquered the castle. There will also be a npc that will show the rankings of the guild. max of 10 guild will be displayer in the top 10 guild ranking. Quote
Patskie Posted March 31, 2014 Posted March 31, 2014 Put under npc/guild/agit_main.txt#L102 : if ( getcharid( 2 ) ) { if ( strcharinfo( 3 ) == "prtg_cas01" ) setd "$grank_" + getcharid( 2 ), getd( "$grank_" + getcharid( 2 ) ) + 1; else if ( strcharinfo( 3 ) == "arug_cas01" ) setd "$grank_" + getcharid( 2 ), getd( "$grank_" + getcharid( 2 ) ) + 2; else if ( strcharinfo( 3 ) == "schg_cas01" ) setd "$grank_" + getcharid( 2 ), getd( "$grank_" + getcharid( 2 ) ) + 3; } Then ladder : prontera,150,150,0 script Sample 100,{ set .@top, 10; query_sql "SELECT `varname`, `value` FROM `mapreg` WHERE `varname` LIKE '$grank_%' ORDER BY CONVERT( `value`, UNSIGNED INTEGER ) DESC LIMIT " + .@top, .@n$, .@p; mes "[ TOP " + .@top + " ]"; for ( .@i = 0; .@i < getarraysize( .@n$ ); .@i++ ) { explode( .@arr$, .@n$[ .@i ], "_" ); dispbottom .@arr$[1]; mes ( .@i + 1 ) + ". " + getguildname( atoi( .@arr$[ 1 ] ) ) + " with " + .@p[ .@i ] + " points"; } close; } Not tested. Not instant because we use sql. 1 Quote
iubantot Posted March 31, 2014 Author Posted March 31, 2014 (edited) it's working but how do i reset the points? and another thing can the point be added after the WOE ended? Edited March 31, 2014 by ivantuting Quote
Patskie Posted April 1, 2014 Posted April 1, 2014 Reset the ladder by executing this : DELETE FROM `mapreg` WHERE `varname` LIKE '$grank_%'; If you want it to add after the woe, Please refer to OnAgitEnd event label and getcastledata script command. Quote
iubantot Posted April 1, 2014 Author Posted April 1, 2014 Reset the ladder by executing this : DELETE FROM `mapreg` WHERE `varname` LIKE '$grank_%'; If you want it to add after the woe, Please refer to OnAgitEnd event label and getcastledata script command. >>guildpoints(getcastledata(prtg_cas01) = guildpoints(1) + 1; ? how am i supposed to make a variable like guildpoints ? I get the flow but i dont know what commands to use Quote
Question
iubantot
schg_cas 01 = 3 points
arug_cas01 = 2 points
prtg_cas01 = 1 point
The guild will gain points whenever their guild conquered the castle.
There will also be a npc that will show the rankings of the guild.
max of 10 guild will be displayer in the top 10 guild ranking.
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.