yuhsing

Untitled

Feb 28th, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1.  
  2. - script Sample -1,{
  3. function GetString;
  4.  
  5. OnPCLoginEvent:
  6. if( checkidle() >= 300 ){
  7. mes "You have been AFK for "+checkidle()+" seconds.";
  8. }else{
  9. set .@String$,GetString( 15,rand(5,10) );
  10. mes "Input the ^FF0000RED COLOUR^000000 part";
  11. mes "^0000FF"+GetString( 15,rand(5,10) )+"^FF0000"+.@String$+"^0000FF"+GetString( 15,rand(3,10) )+"^000000";
  12. input .@Input$;
  13. if( .@Input$ != .@String$ ){
  14. mes "Wrong..";
  15. sleep2 3000;
  16. atcommand "@kick "+strcharinfo(0);
  17. }else if( @online ){
  18. mes "Online for 30 minutes ..gain prize.";
  19. getitem 14003, 1;
  20. getitem 673, 1;
  21. getitem 29003, 1;
  22.  
  23. }else{
  24. @online = 1;
  25. }
  26. }
  27. addtimer ( 30 * 60000 ),strnpcinfo(0)+"::OnPCLoginEvent";
  28. close;
  29.  
  30. function GetString {
  31. if( getarg(0) & 1 ) setarray .@List$[ getarraysize( .@List$ ) ],"1","2","3","4","5","6","7","8","9";
  32. if( getarg(0) & 2 ) setarray .@List$[ getarraysize( .@List$ ) ],"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z";
  33. if( getarg(0) & 4 ) setarray .@List$[ getarraysize( .@List$ ) ],"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z";
  34. if( getarg(0) & 8 ) setarray .@List$[ getarraysize( .@List$ ) ],"!","@","#","$","%","^","&","*","(",")","-","=","/","+";
  35.  
  36. set .@Str$,"";
  37. while( getstrlen( .@Str$ ) < getarg(1) )
  38. set .@Str$,.@Str$ + .@List$[ rand( getarraysize( .@List$ ) ) ];
  39. return .@Str$;
  40. }
  41.  
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment