Jump to content
  • 0

@order command, how to enable


Freya Jorgenson

Question


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  146
  • Reputation:   1
  • Joined:  11/22/11
  • Last Seen:  

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


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


- 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>

Link to comment
Share on other sites

  • 1

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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++;
    }
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

what will the @order command do...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  270
  • Reputation:   20
  • Joined:  12/10/11
  • Last Seen:  

Probably a custom command a server used using bindatcmd

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  146
  • Reputation:   1
  • Joined:  11/22/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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++;
    }
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  146
  • Reputation:   1
  • Joined:  11/22/11
  • Last Seen:  

I have to whisper someone? Sorry, how to use? is this the @order? 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  146
  • Reputation:   1
  • Joined:  11/22/11
  • Last Seen:  

thank you emistry, patskie and capuche for taking time on this one .. really appreciated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...