Harvest – A highly customisable farming script

Ima Felyn

Member
Sorry for the late reply, but I wanted to update my findings and let you know that this case can be closed, and that I found out what the problem was with not all my combos going off. It's because my characters were all to high of level (37+) and they ended up killing the giants before they could finish doing all the disco moves to complete the combo.

Only solution I found was to either limit the combos to 2 either combo Rave Steal / Rave Nirvana or Rave Nirvana / Disco Nirvana or just ascend and reset the level.
 

icon315

Member
I ran into a problem, since first checks if you do semirares, sets the Cookie fullness, THEN it checks if there is a counter already. It seems that later when it runs EatDrink that it doesn't eat that one extra fullness so the script aborts.
[/php]
 

Winterbay

Active member
Change
Code:
    foreach item in $items[]
        if(item_type(item) == "hat" && available_amount(item) > 0 && length(replace_string(item, " ", "")) == chars_needed)
            return item;
            
    return $item[none];
    }

to
Code:
    foreach it in $items[]
        if(item_type(it) == "hat" && available_amount(it) > 0 && length(replace_string(it, " ", "")) == chars_needed)
            return it;
            
    return $item[none];
    }

in the hatter_hat-function.
 

unwanted

New member
Hi, I'm having the same problem, but after applying the above fix I'm then getting:

Reserved word 'effect' cannot be a key variable name (Harvest.ash, line 593)

I had a look at the script to see if I could apply a similar fix to the one for item, but my skills just aren't up to the job.
 

Winterbay

Active member
Code:
    foreach ef in effects_to_remove
        if(have_effect(ef.to_effect()) > 0)
            cli_execute("shrug "+ef);

Put that at the end of the remove_unwanted_effects()-function.
 

Tom Sawyer

Member
Code:
    foreach ef in effects_to_remove
        if(have_effect(ef.to_effect()) > 0)
            cli_execute("shrug "+ef);

Put that at the end of the remove_unwanted_effects()-function.

Winterbay can you remind me how to open the ash file so it shows the LINE number 593. I used notepad and found 2 instances of the remove_unwanted_effects(). I tried putting the code snippet behind the first, then the second, and then both but keep seeing the Reserved word 'effect' cannot be a key variable name (Harvest.ash, line 593)

Thanks!
 

Winterbay

Active member
Well, I would recommend getting notepad++ in that case since that shows the line number and allows you to press ctrl+g to enter in any line number you want to go to.
You could also do a search for "foreach effect" in the script and you will find the place where you will need to do teh replacement.
 

Theraze

Active member
Your problem is that you're ADDING Winterbay's code to the existing code, instead of using it to REPLACE the existing bad code. :)

Basically, anyplace in any script with "foreach effect" needs "foreach ef" instead. Then wherever it talked about "effect" following immediately inside the forloop needs to be replace with "ef" instead.

Same goes for foreach item, foreach skill, etc... :)

Specifically though, those 3 lines replace the 3 lines where you first find "foreach effect" (instead of being pasted in above/below the existing line).
 

Tom Sawyer

Member
Your problem is that you're ADDING Winterbay's code to the existing code, instead of using it to REPLACE the existing bad code. :)

Basically, anyplace in any script with "foreach effect" needs "foreach ef" instead. Then wherever it talked about "effect" following immediately inside the forloop needs to be replace with "ef" instead.

Same goes for foreach item, foreach skill, etc... :)

Specifically though, those 3 lines replace the 3 lines where you first find "foreach effect" (instead of being pasted in above/below the existing line).

Thanks guys, let me do so some digging and pruning then
 

Banana Lord

Member
Ran into the "Reserved word" error myself today, so I thought I'd just check in again to prove that I'm still alive and interested in Harvest :) I'm still logging into KoL regularlyish and the small pile of new registrations in my inbox always makes me smile. Big thanks to everyone who's been helping out in the thread, I really don't have the time anymore (maybe after I've finished getting educated? :p) If any of the people with more current knowledge of the script and mafia than me feel like posting an updated version of Harvest and it's supporting scripts I'll update the first post.

As a side note, I've spent the last month and a half learning some C to go with my Python and during that time I kept discovering things which made ash make so much more sense :D Also, dear God. C.
 

jamfan14

New member
Ran into the "Reserved word" error myself today, so I thought I'd just check in again to prove that I'm still alive and interested in Harvest :) I'm still logging into KoL regularlyish and the small pile of new registrations in my inbox always makes me smile. Big thanks to everyone who's been helping out in the thread, I really don't have the time anymore (maybe after I've finished getting educated? :p) If any of the people with more current knowledge of the script and mafia than me feel like posting an updated version of Harvest and it's supporting scripts I'll update the first post.

As a side note, I've spent the last month and a half learning some C to go with my Python and during that time I kept discovering things which made ash make so much more sense :D Also, dear God. C.

I ran into the same problems referenced in the last 2 pages. Couldn't implement the fix properly. So I'd be all in favor of an updated version of the script.
 

Banana Lord

Member
I've uploaded a new version of Harvest. The only thing I've changed is the usage of the words "item" and "effect" as variable names. That should fix the "reserved word" error. I've scanned back through the thread briefly, but are there any bugs I should know about? I might have a little bit of time to do some touch ups.
 

Theraze

Active member
Since eegee's bugfixed 419 post (which, admittedly, I didn't check for what exactly it changed), the other reported bugs were the 441 failed retrieve_item on the Rock and Roll Legend, if the user has really bad autoretrieval settings or no meat, and the 462 cookie fullness issue, which was never fully explained. Otherwise, the other 60 threads were all usage, not bugs. :)
 
Top