Freya Jorgenson Posted July 27, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 146 Reputation: 1 Joined: 11/22/11 Last Seen: April 13 Share Posted July 27, 2013 Hi All, May I ask for any tips on how to enable the @order command? Thank you. Quote Link to comment Share on other sites More sharing options...
Emistry Posted July 28, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted July 28, 2013 - script Sample -1,{ OnInit: bindatcmd "order",strnpcinfo(3)+"::OnAtCommand"; end; OnAtCommand: .@guild_id = getcharid(2); if( .@guild_id && getcharid(0) == getguildmasterid( .@guild_id ) ){ .@name$ = strcharinfo(0); .@message$ = implode( .@atcmd_parameters$," " ); .@size = query_sql( "SELECT `account_id`,`char_id` FROM `guild_member` WHERE `guild_id` = "+.@guild_id+" AND `online` = 1 ORDER BY `position` ASC",.@aid,.@cid ); while( .@i < .@size ){ if( isloggedin( .@aid[.@i],.@cid[.@i] ) ) if( attachrid( .@aid[.@i] ) ){ announce .@name$+": "+.@message$,bc_self; .@received++; } .@i++; } attachrid( .@aid[0] ); dispbottom "Message sent.."+.@received+" received"; } end; } @order <messages> Quote Link to comment Share on other sites More sharing options...
1 Capuche Posted July 28, 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 28, 2013 There was a mistake in this version, I forgot to re-attach the aid of the leader in the loop (@variable is attached to the character, so @variable of the member attached was null) - 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); .@myaid = 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 .@myaid; } .@i++; } } 1 Quote Link to comment Share on other sites More sharing options...
Emistry Posted July 27, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted July 27, 2013 what will the @order command do... Quote Link to comment Share on other sites More sharing options...
Jasc Posted July 27, 2013 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 270 Reputation: 20 Joined: 12/10/11 Last Seen: June 28, 2022 Share Posted July 27, 2013 Probably a custom command a server used using bindatcmd Quote Link to comment Share on other sites More sharing options...
Freya Jorgenson Posted July 27, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 146 Reputation: 1 Joined: 11/22/11 Last Seen: April 13 Author Share Posted July 27, 2013 Honestly, the first time I have heard of the command. A player asked me if I can do it, I believe it's a custom command where a Guild Leader can broadcast to his guild members via the @order command, and the only people that can read the broadcasted message are the guild members. Thanks. Quote Link to comment Share on other sites More sharing options...
Patskie Posted July 27, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 11 hours ago Share Posted July 27, 2013 This have been made by @Capuche recently : - 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++; } } Quote Link to comment Share on other sites More sharing options...
Freya Jorgenson Posted July 28, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 146 Reputation: 1 Joined: 11/22/11 Last Seen: April 13 Author Share Posted July 28, 2013 I have to whisper someone? Sorry, how to use? is this the @order? Quote Link to comment Share on other sites More sharing options...
Patskie Posted July 28, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 11 hours ago Share Posted July 28, 2013 I have to whisper someone? Sorry, how to use? is this the @order? whisper npc:guild_announce and write your message that you want to broadcast Quote Link to comment Share on other sites More sharing options...
Freya Jorgenson Posted July 28, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 146 Reputation: 1 Joined: 11/22/11 Last Seen: April 13 Author Share Posted July 28, 2013 Thank you! =) Quote Link to comment Share on other sites More sharing options...
Freya Jorgenson Posted July 31, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 146 Reputation: 1 Joined: 11/22/11 Last Seen: April 13 Author Share Posted July 31, 2013 thank you emistry, patskie and capuche for taking time on this one .. really appreciated. Quote Link to comment Share on other sites More sharing options...
Question
Freya Jorgenson
Hi All,
May I ask for any tips on how to enable the @order command?
Thank you.
Link to comment
Share on other sites
10 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.