yuhsing

Untitled

Apr 4th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1.  
  2. - script Sample -1,{
  3. OnInit:
  4. bindatcmd "flag",strnpcinfo(3)+"::OnAtCommand";
  5. setarray .flag_list,48,49,50,51;
  6. .flag_list_size = getarraysize( .flag_list );
  7. end;
  8.  
  9. OnAtCommand:
  10. .@num = atoi( .@atcmd_parameters$[0] ) - 1;
  11. if( .@num >= 0 && .@num < .flag_list_size ){
  12. unitemote getcharid(3),.flag_list[ .@num ];
  13. }else{
  14. dispbottom "Only no. 1 ~ "+.flag_list_size;
  15. }
  16. end;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment