New to scripting
Posted: Wed Sep 25, 2019 3:54 am
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
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:
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
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:
and the result of the commands is:
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.