viewing paste npc sell unidentified item | Athena

Posted on the
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
 
prontera,155,181,5  script  Sample  757,{
getinventorylist;
.@overcharge_lv = getskilllv( "MC_OVERCHARGE" );
if( .@overcharge_lv )
    .@overcharge_rate = 105 + ( 2  * .@overcharge_lv ) - ( ( .@overcharge_lv >= 10 )? 1:0 );
while( .@i < @inventorylist_count ){
    if( !@inventorylist_identify[.@i] ){
        .@item_sell_price = getiteminfo( @inventorylist_id[.@i],1 );
        if( .@overcharge_lv )
            .@item_sell_price = ( ( .@item_sell_price * .@overcharge_rate ) / 100 );
        mes " > "+getitemname( @inventorylist_id[.@i] )+" : "+.@item_sell_price+"z";
        .@cost += .@item_sell_price;
    }
    .@i++;
}
if( .@cost ){
    if( select( "Sell all unidentified item for "+.@cost+" zeny ?","Cancel" ) == 1 ){
        .@i = 0;
        while( .@i < @inventorylist_count ){
            if( !@inventorylist_identify[.@i] )
                delitem @inventorylist_id[.@i],@inventorylist_amount[.@i];
            .@i++;
        }
        Zeny += .@cost;
        mes "Gained "+.@cost+" zeny.";
    }
}else{
    mes "You dont have any unidentified items.";
}
close;
}
Viewed 1385 times, submitted by Emistry.