Project

General

Profile

 

Also available in: PDF

Creating a Buy Order and Accessing/Modifying EVEMarketActionWindow Data

function main()
{
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; EXAMPLE: Open a "Buy Order" window for a particular Item TypeID, spew
    ;;          the information available on the window, set the price and
    ;;          then send the order to the server.
    ;;;;;;;
    
    if (${EVEWindow[MarketAction](exists)} && !${EVEWindow[MarketAction].IsReady})
    {
        do
        {
            waitframe
        }
        while !${EVEWindow[MarketAction].IsReady}
    }
    if (!${EVEWindow[MarketAction](exists)})
    {
        ;; For testing purposes, we will use the Item TypeID for "Holoreels", which is 3647
        EVE:CreateMarketBuyOrder[3647]    
        do
        {
            waitframe
        }
        while !${EVEWindow[MarketAction](exists)}
        wait 15
    }
          
     echo "Bid Price:                            ${EVEWindow[MarketAction].BidPrice.Value}"
     echo "Bid Price Percentage Comparison:      '${EVEWindow[MarketAction].BidPricePercentageComparison.Text}'"
     echo "Regional Average:                     ${EVEWindow[MarketAction].RegionalAverage.Precision[2]}"
     echo "Best Regional:                        '${EVEWindow[MarketAction].BestRegional.Text}'"
     echo "Best Matchable:                       '${EVEWindow[MarketAction].BestMatchable.Text}'"
     echo "Quantity:                             ${EVEWindow[MarketAction].Quantity.Value}"
     echo "Min. Quantity:                        ${EVEWindow[MarketAction].QuantityMin.Value}"
     echo "Duration:                             '${EVEWindow[MarketAction].Duration.Key}' (Value: ${EVEWindow[MarketAction].Duration.Value})"
     echo "Range:                                '${EVEWindow[MarketAction].Range.Key}' (Value: ${EVEWindow[MarketAction].Range.Value})"
     echo "Fee:                                  '${EVEWindow[MarketAction].Fee.Text}'"
     echo "Total:                                '${EVEWindow[MarketAction].Total.Text}'"
          
          
     ;; To set the Bid Price, Quantity, or Min. Quantity     
     ;  EVEWindow[MarketAction].BidPrice:SetValue[234]
     ;  EVEWindow[MarketAction].Quantity:SetValue[35]
     ;  EVEWindow[MarketAction].QuantityMin:SetValue[32]    
     
     ;; To set the Duration or Range (use any of the following)
     ;  EVEWindow[MarketAction].Range:SelectByLabel["4 Jumps"]
     ;  EVEWindow[MarketAction].Range:SelectByIndex[2]
     ;  EVEWindow[MarketAction].Duration:SelectByLabel["Week"]
     ;  EVEWindow[MarketAction].Duration:SelectByIndex[0]
     
     ;; To Complete the Buy order:
     ;  EVEWindow[MarketAction]:Buy
     
     ;; To Cancel:
     ;  EVEWindow[MarketAction]:Cancel
          
    ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
}