Help with creating a buy script using 'cheapest' CLI cmd

I wanted to create a script to buy the cheapest perfect drink. Using the CLI reference, it says that I can replace the subsequent commands with "it" after using the cheapest command. However when I tried it with the below code, I ran into issues.

PHP:
cli_execute("cheapest perfect cosmopolitan, perfect old-fashioned, perfect mimosa, perfect dark and stormy, perfect paloma, perfect negroni");
cli_execute("acquire 7 it");

When it comes to the 2nd line, it returns this error on the CLI
PHP:
do-it-yourself laser eye surgery kit
hell and how i bent it
item #13
pimonkey item

[it] has too many matches.

Would appreciate if someone could point me in the right direction :) or perhaps suggest a better way to do this than use CLI commands.
 

ckb

Minion
Staff member
per the CLI 'help cheapest':
cheapest[?] [+]item [,[-]item]... [; cmds] - compare prices, do cmds with "it" replaced with best.

So this:
PHP:
cheapest perfect cosmopolitan, perfect old-fashioned, perfect mimosa, perfect dark and stormy, perfect paloma, perfect negroni; acquire 7 it
 
Putting it all in a single command should work, instead of splitting it up.

per the CLI 'help cheapest':
cheapest[?] [+]item [,[-]item]... [; cmds] - compare prices, do cmds with "it" replaced with best.

So this:
PHP:
cheapest perfect cosmopolitan, perfect old-fashioned, perfect mimosa, perfect dark and stormy, perfect paloma, perfect negroni; acquire 7 it

Ahh okay will try that out thank you!
 
Top