ffc script bankDownSize{
        void run ( int percentage, int giveItem, int type, int bit, int infoString, int unlocker, int divBy ){
                int origData = this->Data;
                int currentMoney = Game->Counter[CR_RUPEES];
                

                while( (type < 4 && !GetScreenDBit(type, bit)) ){ //Until item purchased                        
                       // Screen->DrawInteger( 6, this->X, this->Y-4, FONT_S, COLOR_TEXT, COLOR_BG, -1, -1, price, 0, 128); //Draw the price
                        
                        if ( DistanceLink(this->X+8,this->Y+8) < 14 && Link->PressL ){ //If press L, display info
                                if(infoString) Screen->Message(infoString); //Display item info if any
                                Link->InputL = false;
                        }
                        
                        else if ( DistanceLink(this->X+8,this->Y+8) < 14 && Link->PressR ){ //If press R, buy it
                                
                               if ( divBy == 0 ) {
                                            divBy = 20;
                                        }
                                if ( percentage == 0 ) {
                                            percentage = .95;
                                        }
                                        totalReturned = ( currentMoney * percentage );
                                        Game->Counter[CR_RUPEES] -= totalReturned;
                                        noFreeSpace == false;
                                            walletSpaceUsed = 1;
                                            if ( pocketSpaceUsed > 5 ) {
                                                pocketSpaceUsed = 5;
                                            }
                                        Game->PlaySound(SFX_PICKUP); //Play fanfare
										
										item givenitem = Screen->CreateItem(giveItem);
										givenitem->X = Link->X; //Added this myself, as the original code does not seem to actually give me the item.
										givenitem->Y = Link->Y; //Added this myself, as the original code does not seem to actually give me the item.
										givenitem->Z = Link->Z; //Added this myself, as the original code does not seem to actually give me the item.
										Link->Action = LA_HOLD2LAND; //Added this myself, to hold item over head.
										Link->HeldItem = giveItem; //Added this myself, to hold item over head.
                                        SetScreenDBit(type, bit, true); //Mark item purchased
                                        Screen->Message(S_BOUGHT); //Display "Item purchased" string
										this->Data = 0;
                                
                                //Link->InputR = false; //I disabled this because the item FFC cannot be repurchased on exit, and some FFC items should be able to be purchased more than once in a shop.
                        }
                        Waitframe();
                } //Loop exits when item (or all upgrades) is bought
        }
}