yuhsing

Untitled

Jun 12th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. prontera,155,171,5 script Sample 757,{
  2.  
  3. .@max_number = 20;
  4.  
  5. for( .@i = 0; .@i < 10; .@i++ ){
  6. .@array_one[.@i] = rand( .@max_number );
  7. .@show_array_one$ = .@show_array_one$ + ".."+.@array_one[.@i];
  8. }
  9.  
  10. for( .@i = 0; .@i < 10; .@i++ ){
  11. .@array_two[.@i] = rand( .@max_number );
  12. .@show_array_two$ = .@show_array_two$ + ".."+.@array_two[.@i];
  13. }
  14.  
  15. // show same number from both array
  16. for( .@x = 0; .@x < 10; .@x++ )
  17. for( .@y = 0; .@y < 10; .@y++ )
  18. if( .@array_one[.@x] == .@array_two[.@y] ){
  19. .@show_array_three$ = .@show_array_three$ + ".."+.@array_two[.@y];
  20. break;
  21. }
  22.  
  23. mes "Array One : ";
  24. mes "^777777"+.@show_array_one$+"^000000";
  25. mes "Array Two : ";
  26. mes "^777777"+.@show_array_two$+"^000000";
  27. mes "Same Value : ";
  28. mes "^777777"+.@show_array_three$+"^000000";
  29. close;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment