viewing paste Key In Code after Loading | Athena

Posted on the | Last edited on
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
-       script  Sample  -1,{
function GenerateCode;
 
OnPCLoadMapEvent:
for( set .@i,0; .@i < getarraysize( .Map$ ); set .@i,.@i + 1 )
        if( strcharinfo(3) == .Map$[.@i] ){
                //set .@GeneratedCode$,GenerateCode( <Bitmask>,<Length> );
                set .@GeneratedCode$,GenerateCode( 7,5 );
                mes "Please input the ^FF0000RED COLOR^000000 words.";
                mes GenerateCode( 7,rand(1,10) )+"^FF0000"+.@GeneratedCode$+"^000000"+GenerateCode( 7,rand(1,10) );
                input .@Input$;
                if( .@Input$ != .@GeneratedCode$ ){
                        mes "You entered Wrong Code.";
                        close2;
                        warp "prontera",155,181;
                        end;
                }
                break;
        }
 
 
OnInit:
// List Of Maps
setarray .Map$,"prontera","payon","izlude","aldebaran";
 
for( set .@i,0; .@i < getarraysize( .Map$ ); set .@i,.@i + 1 )
        setmapflag .Map$[.@i],mf_loadevent;
 
 
 
function        GenerateCode    {
if( getarg(0) & 1 ) setarray .@Word$[ getarraysize( .@Word$ ) ],"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";
if( getarg(0) & 2 ) setarray .@Word$[ getarraysize( .@Word$ ) ],"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";
if( getarg(0) & 4 ) setarray .@Word$[ getarraysize( .@Word$ ) ],"0","1","2","3","4","5","6","7","8","9";
if( getarg(0) & 8 ) setarray .@Word$[ getarraysize( .@Word$ ) ],"~","!","@","#","$","%","^","&","*","*","(",")","_","+","-","?",">","<";
        do{
                set .@Random$,.@Random$ + .@Word$[ rand( getarraysize( .@Word$ ) ) ];
        }while( getstrlen( .@Random$ ) < getarg(1) );
return .@GeneratedCode$;
}
 
}
Viewed 913 times, submitted by Emistry.