Basic Profit Calculating Program

Discussion in 'RuneScape 3 General' started by Y0u_G0t_Pwn3d, Oct 17, 2009.

Basic Profit Calculating Program
  1. Unread #1 - Oct 17, 2009 at 12:03 AM
  2. Y0u_G0t_Pwn3d
    Joined:
    Feb 11, 2007
    Posts:
    1,478
    Referrals:
    0
    Sythe Gold:
    0

    Y0u_G0t_Pwn3d Guru

    Basic Profit Calculating Program

    I know that its simple math, but this streamlines the process into 4 simply entry fields. This is wrote in BASIC, not VB, just simply basic. I wrote it in a program called Just BASIC, you can try it in any other but i havent so no guarantees. This code is for anyone who wants to improve and add on. I would like fancy it up and possibly add some other features.

    Code:
        nomainwin
    
        WindowWidth = 300
        WindowHeight = 230
        UpperLeftX = 200
        UpperLeftY = 150
        button #profit.calc, "Calculate", [calcClicked], LR, 60, 10
        textbox #profit.field1, 40, 15, 200, 25
        textbox #profit.field2, 40, 50, 200, 25
        textbox #profit.field3, 40, 85, 200, 25
        textbox #profit.field4, 40, 120, 200, 25
        open "Profit" for window as #profit
    
        print #profit, "trapclose [quit]"
    
    [start]
    
        print #profit.field1, "Total Money"
        print #profit.field2, "Number Of Items Bought"
        print #profit.field3, "Price Bought For"
        print #profit.field4, "Price Sold For"
    
        wait
    
    [calcClicked]
    
        print #profit.field1, "!contents? tmoney"
        print #profit.field2, "!contents? ibought"
        print #profit.field3, "!contents? pbought"
        print #profit.field4, "!contents? psold"
    
            let totalpaid = ibought * pbought
            let endmoney = psold * ibought
            let profit = endmoney - totalpaid
            let profitpercent = (profit / tmoney) * 100
            goto [profitNotice]
    
    [profitNotice]
    
        notice "Your Profit In Gold is: "; profit
        notice "Your Percentage Of Profit is: "; profitpercent; "%"
    
    
        confirm "Calculate Another? (Y/N)?"; play$
        if instr("YESyes", play$) then goto [start]
    
    
    [quit]
    
        close #profit
    
    end
    
    
    
    
     
< 26k/76K~Economy Effect? | Give away free mil-quitting >

Users viewing this thread
1 guest


 
 
Adblock breaks this site