Well, I've been reading and reading, and trying to learn some steps, but I'm just not familiar enough with the syntax stuff to really figure out some of the things I need.
Here's what I've done so far:
-I'll send the command "Di Futures" to my game
-I Have a trigger set up to capture variables and send a command
^(.+) contracts in (.+) available at (.+)
send("c price " .. matches [3]])
and it does exactly what I want: the game says "Long contracts in fruit available at 525ig/ton." Client says c price fruit. brackets indicate my data collection I need
Long[2] contracts in fruit[3] available at 525[4]ig/ton.
+++ The exchange display shows the prices for Fruit +++
+++ Exchange will buy[5] 75 tons at 488[6]ig/ton +++
Here's the next step:
-I want to compare the output of c price [3] to some sort of logic. If [2] = Long and [5] = buy, or [2] = Short and [5] = sale then execute next step
-I want to set up a match formula where on true it creates a situation where the exchange price, divided by a number, is then subtracted from, or the [4] is subtracted from that number. ig:
Long contracts in fruit available at 525ig/ton.
+++ The exchange display shows the prices for Fruit +++
+++ Exchange will buy 75 tons at 488ig/ton +++
This contract is a long, and the exchange is buying. Therefore, (488/0.9) - 525 = a number I want displayed somehow. (Display [3] Spread = result)
The other thing about this, is that it's an array of results. When I type in "di futures" I get anywhere from 4 to 12 results, and the same number of "c price %var is entered:
>di futures
Laboratory Futures Exchange
Margin 4000ig/contract
(Minimum 2000ig/contract)
Min movement 1ig/ton
Max hourly movement 5ig/ton
Short contracts in controllers available at 879ig/ton.
c price controllers
Long contracts in fruit available at 522ig/ton.
c price fruit
Long contracts in musiks available at 355ig/ton.
c price musiks
Long contracts in nanos available at 412ig/ton.
c price nanos
Long contracts in sensamps available at 624ig/ton.
c price sensamps
Long contracts in soya available at 286ig/ton.
c price soya
Short contracts in tools available at 264ig/ton.
c price tools
Long contracts in vidicasters available at 287ig/ton.
c price vidicasters
Short contracts in woods available at 871ig/ton.
c price woods
and the result of the commands is:
>c price controllers
+++ The exchange display shows the prices for Controllers +++
+++ Exchange will buy 75 tons at 825ig/ton +++
>c price fruit
+++ The exchange display shows the prices for Fruit +++
+++ Exchange will buy 75 tons at 513ig/ton +++
>c price musiks
+++ The exchange display shows the prices for Musiks +++
+++ Exchange has 19900 tons for sale +++
+++ Offer price is 380ig/ton for first 75 tons +++
>c price nanos
+++ The exchange display shows the prices for Nanos +++
+++ Exchange has 19864 tons for sale +++
+++ Offer price is 427ig/ton for first 75 tons +++
>c price sensamps
+++ The exchange display shows the prices for Sensamps +++
+++ Exchange has 3278 tons for sale +++
+++ Offer price is 655ig/ton for first 75 tons +++
+++ Exchange will buy 75 tons at 592ig/ton +++
>c price soya
+++ The exchange display shows the prices for Soya +++
+++ Exchange will buy 75 tons at 277ig/ton +++
>c price tools
+++ The exchange display shows the prices for Tools +++
+++ Exchange has 19900 tons for sale +++
+++ Offer price is 277ig/ton for first 75 tons +++
>c price vidicasters
+++ The exchange display shows the prices for Vidicasters +++
+++ Exchange has 19900 tons for sale +++
+++ Offer price is 304ig/ton for first 75 tons +++
>c price woods
+++ The exchange display shows the prices for Woods +++
+++ Exchange will buy 75 tons at 805ig/ton +++
I know this is a complicated one, but I'd like to figure this one out to automate this part of the game. As of right now, I'm copying/pasting into a spreadsheet, and despite trying to be accurate and complete, I keep mistyping values. If I can script this, and make it automated I can search more areas of this particular game. Any help is appreciated.