Mabuhay Posted July 20, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Share Posted July 20, 2013 the title says it. a script that will make a broadcast announcement for guild mem on a guild only. thanks :3 Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 21, 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 21, 2013 - script guild_announce -1,{ OnWhisperGlobal: .@guild_id = getcharid(2); if ( getguildmasterid( .@guild_id ) != getcharid(0) ) end; if ( @accountid_member == 0 ) @total_guild_member = query_sql( "select `account_id`, `char_id` from `guild_member` where `guild_id` = "+ .@guild_id, @accountid_member, @charid_member ); .@mes$ = @whispervar0$; .@name$ = strcharinfo(0); .@origin = getcharid(3); while( .@i < @total_guild_member ) { if ( isloggedin( @accountid_member[.@i], @charid_member[.@i] ) ) { attachrid @accountid_member[.@i]; announce "[ "+ .@name$ +" ]: "+ .@mes$, bc_self; attachrid .@origin; } .@i++; } } I tested it, should work now Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 20, 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 20, 2013 There is already a guild chat.. I don't get the benefit of this npc Quote Link to comment Share on other sites More sharing options...
Patskie Posted July 20, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 19 hours ago Share Posted July 20, 2013 Or if you want -> http://rathena.org/board/topic/66721-inds-handy-guild-commands-ea-ra-port/ 1 Quote Link to comment Share on other sites More sharing options...
Mabuhay Posted July 21, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Author Share Posted July 21, 2013 There is already a guild chat.. I don't get the benefit of this npc with this function, the guild leader can announce/broadcast to the members and members will read the guild leader's command easily. Or if you want -> http://rathena.org/board/topic/66721-inds-handy-guild-commands-ea-ra-port/ Thanks patskie! will try this soon. Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 21, 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 21, 2013 Alright ! well I made one for fun but it's less efficient than source mod - script guild_announce -1,{ OnWhisperGlobal: .@guild_id = getcharid(2); if ( getguildmasterid( .@guild_id ) != getcharid(0) ) end; if ( @accountid_member == 0 ) @total_guild_member = query_sql( "select `account_id`, `char_id` from `guild_member` where `guild_id` = "+ .@guild_id, @accountid_member, @charid_member ); .@mes$ = @whispervar0$; .@name$ = strcharinfo(0); while( .@i < @total_guild_member ) { if ( isloggedin( @accountid_member[.@i], @charid_member[.@i] ) ) { attachrid @accountid_member[.@i]; announce "[ "+ .@name$ +" ]: "+ .@mes$, bc_self; } .@i++; } } The guild leader need to whisper the npc guild_announce and put his message. The npc display the announce to all guild member online without delay EDIT : fix a mistake 1 Quote Link to comment Share on other sites More sharing options...
Mabuhay Posted July 21, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Author Share Posted July 21, 2013 (edited) Alright ! well I made one for fun but it's less efficient than source mod - script guild_announce -1,{ OnWhisperGlobal: .@guild_id = getcharid(2); if ( getguildmasterid( .@guild_id ) == 0 ) end; if ( @accountid_member == 0 ) @total_guild_member = query_sql( "select `account_id`, `char_id` from `guild_member` where `guild_id` = "+ .@guild_id, @accountid_member, @charid_member ); .@mes$ = @whispervar0$; .@name$ = strcharinfo(0); while( .@i < @total_guild_member ) { if ( isloggedin( @accountid_member[.@i], @charid_member[.@i] ) ) { attachrid @accountid_member[.@i]; announce "[ "+ .@name$ +" ]: "+ .@mes$, 0; } .@i++; } } The guild leader need to whisper the npc guild_announce and put his message. The npc display the announce to all guild member online This is what im looking for!! weeeeeee no src mod. THanks Capuche! PS: Bugged, it announce to all, not exclusive on guild mems only Edited July 21, 2013 by MrVandalBus Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 21, 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 21, 2013 oops replace the 0 by bc_self in the announce Quote Link to comment Share on other sites More sharing options...
Mabuhay Posted July 21, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Author Share Posted July 21, 2013 (edited) Fixed Edited July 21, 2013 by MrVandalBus Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 21, 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 21, 2013 oO alright but replace the getguildmasterid line by if ( getguildmasterid( .@guild_id ) != getcharid(0) ) end; otherwise other member can broadcast too Quote Link to comment Share on other sites More sharing options...
Mabuhay Posted July 21, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Author Share Posted July 21, 2013 woopsies. some more problems. only one member can see the announcement, the rest cant @_@ event the leader himself cant see his msg. Quote Link to comment Share on other sites More sharing options...
uDe Posted July 22, 2013 Group: Members Topic Count: 43 Topics Per Day: 0.01 Content Count: 400 Reputation: 5 Joined: 12/05/11 Last Seen: September 27, 2015 Share Posted July 22, 2013 (edited) Hello, I found this was very useful. But when I'm test the script form post #11 , I'll just announce to my self.. Other guild member can't receive any message. Here's the screen shot : Thanks for the idea. EDIT : It's working after server restart. Thank you very much for this. Edited July 22, 2013 by uDe Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 22, 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 22, 2013 I guess you tested with a new guild member. The new member must relog to save the data in guild member database (otherwise he doesn't exist yet) and the guild leader must relog too to update his guild member temporary variables. resume when you invite a new member : new guild member must relog guild leader relog Quote Link to comment Share on other sites More sharing options...
uDe Posted July 22, 2013 Group: Members Topic Count: 43 Topics Per Day: 0.01 Content Count: 400 Reputation: 5 Joined: 12/05/11 Last Seen: September 27, 2015 Share Posted July 22, 2013 I guess you tested with a new guild member. The new member must relog to save the data in guild member database (otherwise he doesn't exist yet) and the guild leader must relog too to update his guild member temporary variables. resume when you invite a new member : new guild member must relog guild leader relog Yes, I've tried it using a new member. But, I've relog too. Still can't view the message. It's working after server restart. Thank you very much for this. Edited by uDe, Today, 11:25 AM. Quote Link to comment Share on other sites More sharing options...
Question
Mabuhay
the title says it. a script that will make a broadcast announcement for guild mem on a guild only.
thanks :3
Link to comment
Share on other sites
13 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.