Linkin Park Posted January 30, 2013 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 227 Reputation: 11 Joined: 11/16/11 Last Seen: November 7, 2015 Share Posted January 30, 2013 (edited) Hi, I would like to request a script that will give a point to whoever has the castle on a specific time Example: I have set a 2hours WoE time (7pm to 9pm) Whoever guild has the castle during 7:30pm scores 1point, at 8:00pm, scores another 1 point.. Every 30minutes until end of WoE (9pm) Every break of the Emperium will also give the guild 1 point. and there will be an NPC Ladder to show the Top 3 Guilds with most points.. I'm using Euphy's WoE Controller: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/custom/woe_controller.txt Thank you in advance to whoever will make this.. Edited January 30, 2013 by MikzDawson Quote Link to comment Share on other sites More sharing options...
0 MusiLiciouS Posted July 24, 2017 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 109 Reputation: 2 Joined: 06/04/13 Last Seen: July 19, 2024 Share Posted July 24, 2017 How to make this woe points for the guild who owns the castle at the end of WOE? Quote Link to comment Share on other sites More sharing options...
0 Han25 Posted December 10, 2017 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 67 Reputation: 2 Joined: 08/09/13 Last Seen: June 8, 2023 Share Posted December 10, 2017 @Capuche hello sir? would you please check this post again, i'm kinda interested on having this kind of script but with more options like, if its possible if only the active castle will be registered during woe time? like we can have the rest of maps in the arrays but it wont count except the active one. TIA Quote Link to comment Share on other sites More sharing options...
0 Sikdope Posted October 12, 2020 Group: Members Topic Count: 9 Topics Per Day: 0.01 Content Count: 51 Reputation: 0 Joined: 08/28/20 Last Seen: January 24, 2021 Share Posted October 12, 2020 (edited) Hello, is that working script? and how to add woe points shop? thanks godblesss Edited October 12, 2020 by Sikdope Quote Link to comment Share on other sites More sharing options...
Pink Guy Posted January 30, 2013 Group: Members Topic Count: 131 Topics Per Day: 0.03 Content Count: 371 Reputation: 3 Joined: 11/14/11 Last Seen: December 9, 2023 Share Posted January 30, 2013 I believe there's already a script similar to this one.. I just don't know where I saw it. Also, I would also like to have this script. Quote Link to comment Share on other sites More sharing options...
Linkin Park Posted January 31, 2013 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 227 Reputation: 11 Joined: 11/16/11 Last Seen: November 7, 2015 Author Share Posted January 31, 2013 If the information on my post isn't enough or is lacking something you can ask me. Please help with this Quote Link to comment Share on other sites More sharing options...
Linkin Park Posted February 1, 2013 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 227 Reputation: 11 Joined: 11/16/11 Last Seen: November 7, 2015 Author Share Posted February 1, 2013 bumps for my topic.. Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 2, 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 2, 2013 Whoever guild has the castle during 7:30pm scores 1point, at 8:00pm, scores another 1 point.. Every 30minutes until end of WoE (9pm) Every break of the Emperium will also give the guild 1 point. and there will be an NPC Ladder to show the Top 3 Guilds with most points.. Like you asked. Every time a guild break the emp, gains 1 point. Every 30 min atfer woe start, the guild who owns the castle get 1 point. You must load the table in your sql. If your woe have just 1 castle, delete other castle map in OnInit. In guild/agit_main.txt add // Add one points in rank guild // ---------------------------- callfunc( "gpoints_woe", .@GID, 1 ); //----------------------------- after OnAgitBreak: set .@GID,getcharid(2); /* CREATE TABLE IF NOT EXISTS `guild_points` ( `guild_id` int(11) unsigned NOT NULL default '0', `guild_name` varchar(255) NOT NULL DEFAULT 'NULL', `total_points` int(11) unsigned NOT NULL default '0', `woe_points` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`guild_id`) ) ENGINE=MyISAM; */ prontera,160,164,5 script Guild Points 90,{ // Configurations // -------------- function displaypoints; .@guild_cID = getcharid(2); .@npc$ = "[^7600CC Guild Points ^000000]"; .@GM = getgmlevel(); L_main: // Unavailable during WOE // ---------------------- if( ( agitcheck() || agitcheck2() ) && !.@GM ) { mes .@npc$; mes "Hello,", "I'm busy there is a WOE now, can you come back later ?."; close; } // Main menu // --------- mes .@npc$; mes "Hello "+ ( .@GM ? "^FF0000[ GM ] "+ strcharinfo(0) +"^000000," : strcharinfo(0) +"," ); mes " "; mes "What can I do for you ?"; next; switch( select( "^777777~ Top 3 Guild^000000", "^777777~ Last WOE statistics^000000", ( !.@guild_cID ? "" : "^777777~ My Guild Points^000000" ), "^777777~ Leave^000000" ) ) { case 1: case 2: if( !displaypoints( ( @menu -1 ? 0 : 1 ), 1 ) ) { mes .@npc$; mes " "; mes "There is no result sorry."; emotion e_swt; next; } break; case 3: query_sql( "SELECT `total_points` FROM `guild_points` WHERE `guild_id` = '"+ .@guild_cID +"'", .@total_points ); mes .@npc$; mes " "; mes "Your guild have "+ .@total_points +" total points."; next; break; case 4: mes .@npc$, " ", "Then Goodbye !"; close; } goto L_main; OnAgitStart: initnpctimer; .timetick = gettimetick(2) + 1500; // display an announce every 1500 secs ~ 25 min query_sql( "UPDATE `guild_points` SET `woe_points` = '0'" ); end; // give points every 30 min // ------------------------ OnTimer1799000: if( gettimetick(2) > .timetick ) { .timetick = gettimetick(2) + 1500; displaypoints( 0,0 ); } for( .@i = 0; .@i < .size_c; .@i++ ) { .@owned_by = getcastledata( .castle$[ .@i ],1 ); if( .@owned_by ) callfunc( "gpoints_woe", .@owned_by, 1 ); } initnpctimer; end; OnAgitEnd: displaypoints( 0,0 ); stopnpctimer; sleep 5000; displaypoints( 1,0 ); end; // Display guild point to all / self // --------------------------------- function displaypoints { if( getarg(0) ) .@nb = query_sql( "SELECT `guild_name`, `total_points` FROM `guild_points` WHERE `total_points` > 0 ORDER BY `total_points` DESC LIMIT 10", .@guild_name$, .@points ); else .@nb = query_sql( "SELECT `guild_name`, `woe_points` FROM `guild_points` WHERE `woe_points` > 0 ORDER BY `woe_points` DESC LIMIT 10", .@guild_name$, .@points ); if( !.@nb ) return 0; announce ( getarg(0) ? "~~~~~ Guild POINTS ~~~~~" : "~~~~~ Woe POINTS ~~~~~" ), ( getarg(1) ? bc_self : bc_all ); for( .@i = 0; .@i < .@nb; .@i++ ) announce .@points[ .@i ] +" points : "+ .@guild_name$[ .@i ], ( getarg(1,0) ? bc_self : bc_all ); return 1; } OnInit: // Castle list - 1 point for each castle owned // ------------------------------------------- setarray .castle$, "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05", "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05", "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05", "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05", "nguild_alde", "nguild_gef", "nguild_pay", "nguild_prt", "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05", "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05"; .size_c = getarraysize( .castle$ ); end; } // Update guild_points table // ------------------------- function script gpoints_woe { .@guild_id = getarg(0); if( !query_sql( "SELECT `guild_id` FROM `guild_points` WHERE `guild_id` = '"+ .@guild_id +"' ", .@guild_id ) ) query_sql( "INSERT INTO `guild_points` (`guild_id`, `guild_name`, `total_points`, `woe_points`) VALUE ('"+ .@guild_id +"', '"+ getguildname( .@guild_id ) +"', '0', '0')" ); .@value = getarg(1); query_sql( "UPDATE `guild_points` SET `total_points` = ( total_points + ("+ .@value +") ), `woe_points` = ( woe_points + ("+ .@value +") ) WHERE `guild_id` = '" + .@guild_id + "'" ); return; } Quote Link to comment Share on other sites More sharing options...
Linkin Park Posted February 2, 2013 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 227 Reputation: 11 Joined: 11/16/11 Last Seen: November 7, 2015 Author Share Posted February 2, 2013 This will only add points to the castle that is active on that day? I mean, it should not add points to those guild that owns a castle that is not active during the WoE on that day. Example Monday = Kriemhild and Fad Guild A owns Hohen, the points will be added only to the guild that owns Kriemhild and Fad. Quote Link to comment Share on other sites More sharing options...
Capuche Posted February 2, 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 2, 2013 (edited) This will only add points to the castle that is active on that day? I mean, it should not add points to those guild that owns a castle that is not active during the WoE on that day. Example Monday = Kriemhild and Fad Guild A owns Hohen, the points will be added only to the guild that owns Kriemhild and Fad. No you didn't specify this I will make an edit... wait Edited February 2, 2013 by Capuche Quote Link to comment Share on other sites More sharing options...
Linkin Park Posted February 2, 2013 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 227 Reputation: 11 Joined: 11/16/11 Last Seen: November 7, 2015 Author Share Posted February 2, 2013 Thanks Capuche, I'll wait for the edit ^^ Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted February 2, 2013 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 February 2, 2013 (edited) prontera,155,181,5 script Woe Points 100,{ .@nb = query_sql( "select * from woe_point order by points desc limit 3", .@guild_id, .@points ); if ( !.@nb ) { mes "no record yet"; close; } for ( .@i = 0; .@i < .@nb; .@i++ ) mes ( .@i +1 )+". "+ getguildname( .@guild_id[.@i] ) +" -> "+ .@points[.@i]; close; OnClock1930: OnClock2000: OnClock2030: OnClock2100: for ( .@i = 0; .@i < 30; .@i++ ) { .@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 ); if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id ) query_sql "insert into woe_point values ( "+ .@castle_guild_id +", 1 ) on duplicate key update points = points +1"; } end; OnBreakEmp: // put doevent under OnAgitBreak ... query_sql "insert into woe_point values ( "+ getcharid(2) +", 1 ) on duplicate key update points = points +1"; end; } why make things so hard ? EDIT: ops, forgot the SQL create create table woe_point ( guild_id int(11) unsigned primary key, points int(11) ) engine = myisam; EDIT2 ... wait a moment, I change the layout ok here, I think better use existing table because if the guild gets deleted, the row will also be deleted from the source itself alter table guild add column woe_points int(11) default 0 after emblem_data, add index (woe_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; OnClock1930: OnClock2000: OnClock2030: OnClock2100: for ( .@i = 0; .@i < 30; .@i++ ) { .@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 ); if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ .@castle_guild_id; } end; OnBreakEmp: // put doevent under OnAgitBreak ... query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); end; } Edited February 2, 2013 by AnnieRuru 1 Quote Link to comment Share on other sites More sharing options...
Linkin Park Posted February 2, 2013 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 227 Reputation: 11 Joined: 11/16/11 Last Seen: November 7, 2015 Author Share Posted February 2, 2013 prontera,155,181,5 script Woe Points 100,{ .@nb = query_sql( "select * from woe_point order by points desc limit 3", .@guild_id, .@points ); if ( !.@nb ) { mes "no record yet"; close; } for ( .@i = 0; .@i < .@nb; .@i++ ) mes ( .@i +1 )+". "+ getguildname( .@guild_id[.@i] ) +" -> "+ .@points[.@i]; close; OnClock1930: OnClock2000: OnClock2030: OnClock2100: for ( .@i = 0; .@i < 30; .@i++ ) { .@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 ); if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id ) query_sql "insert into woe_point values ( "+ .@castle_guild_id +", 1 ) on duplicate key update points = points +1"; } end; OnBreakEmp: // put doevent under OnAgitBreak ... query_sql "insert into woe_point values ( "+ getcharid(2) +", 1 ) on duplicate key update points = points +1"; end; } why make things so hard ? EDIT: ops, forgot the SQL create create table woe_point ( guild_id int(11) unsigned primary key, points int(11) ) engine = myisam; EDIT2 ... wait a moment, I change the layout ok here, I think better use existing table because if the guild gets deleted, the row will also be deleted from the source itself alter table guild add column woe_points int(11) default 0 after emblem_data, add index (woe_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; OnClock1930: OnClock2000: OnClock2030: OnClock2100: for ( .@i = 0; .@i < 30; .@i++ ) { .@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 ); if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ .@castle_guild_id; } end; OnBreakEmp: // put doevent under OnAgitBreak ... query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); end; } Hi Annie, This will work even if on the same day there's 2 castles active on WoE? Example: Sunday (7-9pm) prtg_cas01 and prtg_cas02 are active.. then Monday to Friday I have 1 castle enabled which is Second Edition castle Thank you for the script Annie <3 Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted February 2, 2013 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 February 2, 2013 .@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 ); if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ .@castle_guild_id; yes it will, can't read these 3 lines ? in euphy's woe controller script, many variables are already preset there I just have to use some getvariableofnpc retrieve the value directly from there 1 Quote Link to comment Share on other sites More sharing options...
Linkin Park Posted February 3, 2013 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 227 Reputation: 11 Joined: 11/16/11 Last Seen: November 7, 2015 Author Share Posted February 3, 2013 Thank you very much <3 Quote Link to comment Share on other sites More sharing options...
Erba Posted March 4, 2013 Group: Members Topic Count: 84 Topics Per Day: 0.02 Content Count: 550 Reputation: 9 Joined: 11/06/12 Last Seen: August 14, 2014 Share Posted March 4, 2013 .@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 ); if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ .@castle_guild_id;yes it will, can't read these 3 lines ?in euphy's woe controller script, many variables are already preset there I just have to use some getvariableofnpc retrieve the value directly from there OnBreakEmp: // put doevent under OnAgitBreak ... query_sql "insert into woe_point values ( "+ getcharid(2) +", 1 ) on duplicate key update points = points +1"; end; where to add this one? or will i just let this inside the script? sorry for a newbie question Quote Link to comment Share on other sites More sharing options...
Erba Posted April 3, 2013 Group: Members Topic Count: 84 Topics Per Day: 0.02 Content Count: 550 Reputation: 9 Joined: 11/06/12 Last Seen: August 14, 2014 Share Posted April 3, 2013 bump Quote Link to comment Share on other sites More sharing options...
Capuche Posted April 3, 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 April 3, 2013 where to add this one? or will i just let this inside the script? sorry for a newbie question OnBreakEmp: // put doevent under OnAgitBreak ... query_sql "insert into woe_point values ( "+ getcharid(2) +", 1 ) on duplicate key update points = points +1"; end; Leave this alone in the script In guild/agit_main.txt add after OnAgitBreak: doevent "Woe Points::OnBreakEmp"; 1 Quote Link to comment Share on other sites More sharing options...
Erba Posted April 4, 2013 Group: Members Topic Count: 84 Topics Per Day: 0.02 Content Count: 550 Reputation: 9 Joined: 11/06/12 Last Seen: August 14, 2014 Share Posted April 4, 2013 thanks sir^^ Quote Link to comment Share on other sites More sharing options...
Erba Posted March 31, 2014 Group: Members Topic Count: 84 Topics Per Day: 0.02 Content Count: 550 Reputation: 9 Joined: 11/06/12 Last Seen: August 14, 2014 Share Posted March 31, 2014 How can i make a shop for this script that will make WOE Points as the currency and it is a shop for the guild master only? where to add this one? or will i just let this inside the script? sorry for a newbie question OnBreakEmp: // put doevent under OnAgitBreak ... query_sql "insert into woe_point values ( "+ getcharid(2) +", 1 ) on duplicate key update points = points +1"; end; Leave this alone in the script In guild/agit_main.txt add after OnAgitBreak: doevent "Woe Points::OnBreakEmp"; Bump Quote Link to comment Share on other sites More sharing options...
Erba Posted April 2, 2014 Group: Members Topic Count: 84 Topics Per Day: 0.02 Content Count: 550 Reputation: 9 Joined: 11/06/12 Last Seen: August 14, 2014 Share Posted April 2, 2014 bump Quote Link to comment Share on other sites More sharing options...
Question
Linkin Park
Hi,
I would like to request a script that will give a point to whoever has the castle on a specific time
Example:
I have set a 2hours WoE time (7pm to 9pm)
Whoever guild has the castle during 7:30pm scores 1point, at 8:00pm, scores another 1 point.. Every 30minutes until end of WoE (9pm)
Every break of the Emperium will also give the guild 1 point.
and there will be an NPC Ladder to show the Top 3 Guilds with most points..
I'm using Euphy's WoE Controller: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/custom/woe_controller.txt
Thank you in advance to whoever will make this..
Edited by MikzDawsonLink to comment
Share on other sites
20 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.