caspa Posted February 4, 2013 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Share Posted February 4, 2013 (edited) Is it possible to make a Guild based on how many times you have conquered a castle? like if guild A conquered alde_cas01 then they gained + 1 guild rank then after 10 minutes the Guild B conquered the castle so the Guild B gains + 1 Guild Rank and after 10 minutes again the Guild A conquers the Castle so they gained + 1 again .... so the total would be 2............. something like this...... but if Guild A Break the guild then the rank of the guild would also be deleted on the rank page....... Edited February 4, 2013 by caspa Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 4, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted February 4, 2013 (edited) SQL alter table guild add column woe_points int(11) default 0 after emblem_data, add index (woe_points); In npc/guild/agit_main.txt under OnAgitBreak: add query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); Ref this post *If you want to display guild points prontera,155,181,5 script Woe Points 100,{ .@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points ); for ( .@i = 0; .@i < .@nb; .@i++ ) { if ( !.@points[.@i] ) break; mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i]; } close; } Edited February 5, 2013 by Capuche 1 Quote Link to comment Share on other sites More sharing options...
caspa Posted February 4, 2013 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Author Share Posted February 4, 2013 (edited) thank you capuche!! i have not tested it yet since im not on my house yet...... but this script is not something attach to the breaker right? i mean if juanito from the demigodz guild breaks the emp!! then that guild gains the +1 so theyre part of the rank now....... but then the player suddenly decides to leave the guild!! the +1 that the guild earned will stay right there right? and not disappear and would only disappear unless the guild is being /breakguild...... Edited February 4, 2013 by caspa Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 4, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted February 4, 2013 the +1 that the guild earned will stay right there right? and not disappear and would only disappear unless the guild is being /breakguild...... Yeah it's attached to the guild not to players. Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted February 4, 2013 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Share Posted February 4, 2013 How qbout in the npc if you want to reset the rankings? Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 4, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted February 4, 2013 (edited) It's easy to reset by sql no need this option I guess. prontera,155,181,5 script Woe Points 100,{ if( getgmlevel() > 1 ) { if( select( "Reset ?", "Continue" ) == 1 ) { query_sql "UPDATE `guild` SET `woe_points` = '0' WHERE `woe_points` > 0"; close; } } .@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points ); for ( .@i = 0; .@i < .@nb; .@i++ ) { if ( !.@points[.@i] ) break; mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i]; } close; } Edited February 4, 2013 by Capuche Quote Link to comment Share on other sites More sharing options...
caspa Posted February 5, 2013 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Author Share Posted February 5, 2013 Thank you.... [ PROBLEM SOLVED ] Quote Link to comment Share on other sites More sharing options...
nazdecoco Posted March 24, 2013 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 18 Reputation: 0 Joined: 01/10/13 Last Seen: August 22, 2017 Share Posted March 24, 2013 (edited) how can i see the rankings ofthe guild? [EDIT]... i already saw it,, thx Edited March 24, 2013 by nazdecoco Quote Link to comment Share on other sites More sharing options...
heartfilia Posted June 12, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 8 Reputation: 0 Joined: 04/02/12 Last Seen: July 27, 2016 Share Posted June 12, 2013 (edited) @Capuche - I want to use the script in a certain map only. How? And there is no agit_main.txt in npc/guild/ Thanks! Edited June 12, 2013 by heartfilia Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 12, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 12, 2013 @Capuche - I want to use the script in a certain map only. How? And there is no agit_main.txt in npc/guild/ Thanks! The file's name is agit_template on eathena. Under OnAgitBreak: add if ( strcharinfo(3) == "Your Castle Map Name" ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); and replace "Your Castle Map Name" by the map name of the castle Quote Link to comment Share on other sites More sharing options...
heartfilia Posted July 14, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 8 Reputation: 0 Joined: 04/02/12 Last Seen: July 27, 2016 Share Posted July 14, 2013 (edited) @Capuche - I want to use the script in a certain map only. How? And there is no agit_main.txt in npc/guild/ Thanks! The file's name is agit_template on eathena. Under OnAgitBreak: add if ( strcharinfo(3) == "Your Castle Map Name" ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); and replace "Your Castle Map Name" by the map name of the castle Thanks for that. BTW I tried this on eathena It's easy to reset by sql no need this option I guess. prontera,155,181,5 script Woe Points 100,{ if( getgmlevel() > 1 ) { if( select( "Reset ?", "Continue" ) == 1 ) { query_sql "UPDATE `guild` SET `woe_points` = '0' WHERE `woe_points` > 0"; close; } } .@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points ); for ( .@i = 0; .@i < .@nb; .@i++ ) { if ( !.@points[.@i] ) break; mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i]; } close; } But there is an error in Line 8. Not working in eathena/3CeAM? Edited July 15, 2013 by heartfilia Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 16, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 16, 2013 - .@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points ); - for ( .@i = 0; .@i < .@nb; .@i++ ) { + set .@nb, query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points ); + for ( set .@i, 0; .@i < .@nb; set .@i, .@i +1 ) { Not working in eathena/3CeAM? these emu don't support direct variable assignment like in C Quote Link to comment Share on other sites More sharing options...
xienne15 Posted September 7, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 226 Reputation: 11 Joined: 01/09/12 Last Seen: March 15, 2018 Share Posted September 7, 2013 SQL alter table guild add column woe_points int(11) default 0 after emblem_data, add index (woe_points); In npc/guild/agit_main.txt under OnAgitBreak: add query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); Ref this post*If you want to display guild points prontera,155,181,5 script Woe Points 100,{ .@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points ); for ( .@i = 0; .@i < .@nb; .@i++ ) { if ( !.@points[.@i] ) break; mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i]; } close; } How about on guild2/agit_main_se.txt? nothing to change? just the guild/agit_main.txt? Quote Link to comment Share on other sites More sharing options...
Capuche Posted September 7, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted September 7, 2013 About woe 2, in agit_main_se add the sql update under OnStartArena OnStartArena: query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); 1 Quote Link to comment Share on other sites More sharing options...
xienne15 Posted September 8, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 226 Reputation: 11 Joined: 01/09/12 Last Seen: March 15, 2018 Share Posted September 8, 2013 About woe 2, in agit_main_se add the sql update under OnStartArena OnStartArena: query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); Thank you Capuche Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted January 15, 2014 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Share Posted January 15, 2014 (edited) alter table guild add column woe_points int(11) default 0 after emblem_data, add index (woe_points); Should i run this on the mysql database? Edited January 16, 2014 by Fresh prince Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted January 16, 2014 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted January 16, 2014 Yes, you only have to do it once, Fresh Prince. 1 Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted January 18, 2014 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Share Posted January 18, 2014 Thanks very much for answering my question! Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted January 27, 2014 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Share Posted January 27, 2014 Im sorry to ask again, but how can I exclude 1 castle on breaks being counted? Say i do not want for prtg_cas01 to be included? Thanks!! Under OnAgitBreak: if (!strcharinfo(3) == "prtg_cas01" ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); -is this correct? Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 28, 2014 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 28, 2014 OnAgitBreak: if ( strcharinfo(3) != "prtg_cas01" ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); 1 Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted January 28, 2014 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Share Posted January 28, 2014 Thanks very much! Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted May 8, 2014 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Share Posted May 8, 2014 Hello, what about if i want to exclude 3 castles? Should i do = "prtg_cas01", "prtg_cas02", "prtg_cas03") ? Quote Link to comment Share on other sites More sharing options...
Capuche Posted May 8, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted May 8, 2014 if ( preg_match( "prtg_cas0[123]",strcharinfo(3) ) ) Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted May 8, 2014 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Share Posted May 8, 2014 Thanks Mr. Capuche, these are prontera castles. What if i want to include payg_cas04? payg_cas04,prtg_cas05, and aldeg_cas02? Thank you so much! Quote Link to comment Share on other sites More sharing options...
Capuche Posted May 9, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted May 9, 2014 I misread, you want to exclude the castle.. in the previous post it should be if ( preg_match( "prtg_cas0[123]",strcharinfo(3) ) == 0 ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); .@map$ = strcharinfo(3); if ( preg_match( "prtg_cas0[123]",.@map$ ) == 0 && preg_match( "payg_cas0[45]",.@map$ ) == 0 && preg_match( "aldeg_cas0[2]",.@map$ ) == 0 ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); prtg_cas0[123] to exclude prtg_cas01, prtg_cas02, prtg_cas03 payg_cas0[45] to exclude castle 4, 5 etc.. Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted May 9, 2014 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Share Posted May 9, 2014 Thank you Sir! Quote Link to comment Share on other sites More sharing options...
Question
caspa
Is it possible to make a Guild based on how many times you have conquered a castle?
like if guild A conquered alde_cas01 then they gained + 1 guild rank
then after 10 minutes the Guild B conquered the castle so the Guild B gains + 1 Guild Rank
and after 10 minutes again the Guild A conquers the Castle so they gained + 1 again .... so the total would be 2.............
something like this......
but if Guild A Break the guild then the rank of the guild would also be deleted on the rank page.......
Edited by caspaLink to comment
Share on other sites
28 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.