viewing paste topic/4421- bst_delay | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
-   script  bst_atcommand   -1,{
OnInit:
    bindatcmd "bst",strnpcinfo(0)+"::OnCommand";
    end;
OnCommand:
    if ( !.@atcmd_numparameters ) {
        message strcharinfo(0), "Please, enter a message (usage: @bst <message>).";
        end;
    }
    .@symbol$ = substr( .@atcmd_parameters$, 0,1 );
    if ( .@symbol$ != "B>" && .@symbol$ != "S>" && .@symbol$ != "T>" ) {
        message strcharinfo(0), "Market Symbol is Needed when using this command ( B> S> T> )";
        end;
    }
    if ( @bst_delay + 60 > gettimetick(2) ) {
        message strcharinfo(0), "There is a 60 seconds delay of using this command again";
        end;
    }
    @bst_delay = gettimetick(2);
    .@name$ = strcharinfo(0);
    .@message$ = implode( .@atcmd_parameters$," " );
    getmemberaid ALL_CLIENT;
    for ( .@i = 0; .@i < $@onlinecount; .@i++ ) {
        attachrid $@onlineaid[.@i];
        dispbottom "[Market] "+ .@name$ +" : "+ .@message$;
    }
    end;
}
Viewed 1573 times, submitted by AnnieRuru.