Help with Simple Script

skateboard34

New member
Hello, I am kind of new to scripting and slowly getting the hang of it. I am trying to make a simple CLI script that will adventure in the Guano Junction until I have obtained 10 briefcases. I am not quite sure what to do with the conditions add thing. Do I put it before "adventure guano junction" or after? Please help! When I try anything, and use it, it says "Nothing more to do here.", and it hasn't even adventured once.
 

Bale

Minion
You list conditions before you adventure.

I suspect the reason it says that you're done is because you already have 10 briefcases. If you want 10 briefcases in addition to the ones you already have then say "+10" for the quantity.
 

skateboard34

New member
Thanks, but now it says,"[+5 briefcase has no matches] this is my code.

conditions add +5 briefcase
adventure 20 Guano Junction
 

zarqon

Well-known member
I don't know why that's not working... but a way around it would be to put all your briefcases in your closet before adventuring:

closet put * briefcase
conditions add 5 briefcase
adventure 20 guano junction
closet take * briefcase
 

Bale

Minion
[quote author=zarqon link=topic=2107.msg10693#msg10693 date=1230151947]
I don't know why that's not working... but a way around it would be to put all your briefcases in your closet before adventuring:
[/quote]

Dang. Just tried it out. It's not working for me either. This used to work, right? Is something buggy?
 

Veracity

Developer
Staff member
I just looked at the code and it works like this:

condition set 5 briefcase

... means get 5 briefcases including ones you already have.

condition add 5 briefcase

... means get 5 more briefcases

It doesn't look like "+" was ever usable in the conditions command. That is the syntax you use in the Goals field on the Adventure Frame. If you say "+5 x", it turns into "add 5 x". If you simply say "5 x", it turns into "set 5 x".

The following should do what you asked for:

condition add 5 briefcase
adventure 20 Guano Junction
 

skateboard34

New member
Yeah, I figured it all out. But since you need the air freshener to adventure in the Guano Junction, i added equpping that into my script. There's one problem. How do I make it so if you already have it equipped, it goes to the next instruction? Here is my current script.

acquire Pine-Fresh air freshener
equip Pine-Fresh air freshener
conditions add 5 briefcase
adventure 20 Guano Junction
 
Top