viewing paste stats seller v2 | 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
prontera,155,181,5  script  Stats Mistress  757,{
    
    mes "[ Stats Mistress ]";
    .@i = select( .stat_menu$ ) - 1;
    input .@amount,0,( .max_stats - readparam( 13+.@i ) );
    if ( .@amount > 0 )
        callsub( __OnBuyStat,.@i,.@amount );
    close;
    
    
    __OnBuyStat:
        .@index= getarg(0);
        .@amount = getarg(1);
        .@cost = ( .cost_per_stat * .@amount );
        
        mes "Stats : "+.stat$[.@index]+" +"+F_InsertComma( .@amount );
        mes "Price : "F_InsertComma( .@cost )+"z";
        mes "Do you wish to continue ?";
        
        if ( Zeny >= .@cost )
            if ( select( "Buy "+F_InsertComma( .@amount )+" "+.stat$[.@index] ) ) {
                Zeny -= .@cost;
                statusup2 ( 13 + .@index ),.@amount;
            }
        return;
 
    OnInit:
        .max_stats = 100;
        
        .cost_per_stat = 400000;
        
        setarray .stat$,"STR","AGI","VIT","INT","DEX","LUK";
        .@stat_size = getarraysize( .stat$ );
        while ( .@i < .@stat_size ) {
            .stat_menu$ = .stat_menu$ + .stat$[.@i] + ":";
            .@i++;
        }
        end;
}
Viewed 1411 times, submitted by Emistry.