Most comperhensive farmer yet! (operational! see bottomost post)

itamaram

Member
Or not. I am quite sure my current script is a nifty farmer.
After a quick setup it should do all of your day's work.
It does not support ode to booze. Waiting is not my thing.
the main thing about it is that it is easily costumized, and is good for several characters.
Not that I see why would you like to farm the peak with several different characters...

Anyway, here is my script, which have about as much comments as script.
ManaRestore is simply illarion's script renamed.
tell me what you think!
 

Attachments

  • ManaRestore.ash
    1.8 KB · Views: 160
  • farm.ash
    9.1 KB · Views: 284
Re: Most comperhensive farmer yet!

3 comments:

1) My goodness you have a dizzying programming format! (This is not a bad thing... Just... Wow...)
2) You could actually add in a check to see if the current character has the Liver of Steel or Stomach of Steel skills. ie:
Code:
liver = false; stomach = false;
if( have_skill( $skill[liver of steel]))
{
   liver = true;
}
if( have_skill( $skill[stomach of steel]))
{
   stomach = true;
}
3) I commend your use of comments. It is not my style... But anyone who takes the time can figure out exactly what you were thinking when you wrote a particular code block.

And between this script and Riffs so called "puzzles." My brain is mush and I am off to let it heal some...
 

itamaram

Member
Re: Most comperhensive farmer yet!

Thanks Ragu!
Very nice of you.

just one thing...
My script is broken!!!
whats wrong with the line:
int SAUCESPHERE,PHATLOOT,EMPATHY,POLKA; #current prices for 6000 turns worth of buff

I am getting the message:
';' Expected at line 10 in file scripts\farm.ash which is the line above by the way.
anyone?
 

macman104

Member
Re: Most comperhensive farmer yet!

I'm pretty sure for now, you can only declare one variable per line, and likewise, until the new release (or if your downloading from the SVN) you have ot declare and assign a variable a value on two separate lines.
 
Re: Most comperhensive farmer yet!

[quote author=itamaram link=topic=106.msg415#msg415 date=1145691671]
Thanks Ragu!
Very nice of you.

just one thing...
My script is broken!!!
whats wrong with the line:
int SAUCESPHERE,PHATLOOT,EMPATHY,POLKA; #current prices for 6000 turns worth of buff

I am getting the message:
';' Expected at line 10 in file scripts\farm.ash which is the line above by the way.
anyone?
[/quote]

The easiest way to diagnose a line that does multiple things is to break it up.

I believe int SAUCESPHERE,PHATLOOT,EMPATHY,POLKA; needs to be int SAUCESPHERE; int PHATLOOT; int EMPATHY; int POLKA;

Question: Does kolmafia's ash engine now have global variables and I don't know about it?

Question 2: Do you use some other language? Pascal? C? VB? or any of the numerous other ones? I had to wipe just about everything I know about Pascal programming from my memory, and start from scratch using ash.
 

itamaram

Member
Re: Most comperhensive farmer yet!

[quote author=efilnikufecin link=topic=106.msg417#msg417 date=1145695858]
Question: Does kolmafia's ash engine now have global variables and I don't know about it?

Question 2: Do you use some other language? Pascal? C? VB? or any of the numerous other ones? I had to wipe just about everything I know about Pascal programming from my memory, and start from scratch using ash.
[/quote]

Answer: Whats global variables?
Answer 2:Java. I assumed the 2 would be identical... What did I do wrong this time?
 

itamaram

Member
Re: Most comperhensive farmer yet!

Debugging sucks. I am quite a careless programmer.
deubgging should be done by tomorrow, and hopefully I will be able to test my script tomorrow on a new batch of turns.

Done!
the script is now operational. Note I do not guarentee anything about the actual algorithm. I am just saying I've stopped getting error messages pre-runnig the script.

So attached to this message is version 2.0, up and working!
(remember you still need Illarion's renamed script.)
 

Attachments

  • farm.ash
    9.6 KB · Views: 93
Re: Most comperhensive farmer yet!

[quote author=itamaram link=topic=106.msg419#msg419 date=1145701020]
Answer: Whats global variables?[/quote]

A global variable is a variable that is used through out a program / script. Its counterpart is a local variable which is used only in a function.

It all depends on where you define them, which goes back to your formatting that had me confused last night. You defined several variable before your functions which had me confused since I (and others) are used to ASH only having local variables.
 

itamaram

Member
Re: Most comperhensive farmer yet!

[quote author=Presto Ragu link=topic=106.msg424#msg424 date=1145730224]
ASH only having local variables.
[/quote]
WHAT?!!!
Thats a pretty limiting thing there... So how does ASH respond to the declaration of global variables?

The script was tested. I don't know about you, but on my computer global variables are allowed and recognized.

Excpet for a small mistake about the non-liver drinking (which was fixed) the script is fully operational!

I present to you ItaFarm v2.1! (you still need Illarion's script though. I might add it next time to my own script).
 

Attachments

  • farm.ash
    9.7 KB · Views: 170

itamaram

Member
My script doesn't send any meat to testudinata even when it recognizes the need.

Can anyone help me please?
 
[quote author=itamaram link=topic=106.msg443#msg443 date=1145840507]
My script doesn't send any meat to testudinata even when it recognizes the need.

Can anyone help me please?
[/quote]
Mine did. It doesn't anymore.
 
Top