iubantot Posted March 31, 2014 Group: Members Topic Count: 118 Topics Per Day: 0.03 Content Count: 313 Reputation: 34 Joined: 10/15/12 Last Seen: Yesterday at 11:36 AM Share 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 Link to comment Share on other sites More sharing options...
Patskie Posted March 31, 2014 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 7 hours ago Share 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 Link to comment Share on other sites More sharing options...
iubantot Posted March 31, 2014 Group: Members Topic Count: 118 Topics Per Day: 0.03 Content Count: 313 Reputation: 34 Joined: 10/15/12 Last Seen: Yesterday at 11:36 AM Author Share 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 Link to comment Share on other sites More sharing options...
Patskie Posted April 1, 2014 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 7 hours ago Share 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 Link to comment Share on other sites More sharing options...
iubantot Posted April 1, 2014 Group: Members Topic Count: 118 Topics Per Day: 0.03 Content Count: 313 Reputation: 34 Joined: 10/15/12 Last Seen: Yesterday at 11:36 AM Author Share 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 Link to comment Share on other sites More sharing options...
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.
Link 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.