The Neo-Cow Farming Script

Already tried it with a fresh bounty.txt. And as I said, I get the same error using the original script and attendant files (I completely removed my versions from the KoLmafia directory while I tested that). And nope, that didn't help.

EDIT: It sounded like Morwen was getting the same response so maybe it's not just me :-/
 
And if you replace
PHP:
foreach i in bountymap
	{
	if(bountymap[i].bountyItem == wanted)
		return bountymap[i];
	}
with
PHP:
foreach i in bountymap
	{
	print( bountymap[i].bountyItem );
	print( wanted );
	if(bountymap[i].bountyItem == wanted)
		return bountymap[i];
	}
 
Code:
retrieving all BHH options...
Retrieving all BHH options...
grabbing info for wilted lettuce
CCS set to ncfbountyhunt
I wasn't able to match up a BHH object!
 
I'm too soft.

Known Issues
  • Currently OCD Inventory Control must be called via cli_execute() as it shares a variable with EatDrink ("make").
  • The script will not add meat made farming to meat made through OCD's actions (I could use some help with this one)

I've implemented both of these requests in my next release of OCD.

Also, as of the next release ocd_control() can be called with an optional second parameter that defines the name of the datafile. And ocd_control() returns an integer.

PHP:
int ocd_control(boolean StopForMissingItems) {
	return ocd_control(StopForMissingItems, vars["BaleOCD_DataFile"]);
}

void main() {
	if(can_interact()) {
		int todaysFarming = ocd_control(true);
		if(todaysFarming < 0)
			vprint("Something went wrong with OCD Control!", 0);
		else if(todaysFarming == 0)
			vprint("I forsee no meat in your future.", "olive", 3);
		else vprint("Antipated monetary gains: "+rnum(todaysFarming), "green", 3);
	} else vprint("Whoa! Don't run this until you break the prism!", -3);
}
 
Code:
retrieving all BHH options...
Retrieving all BHH options...
grabbing info for wilted lettuce
CCS set to ncfbountyhunt
I wasn't able to match up a BHH object!
It looks like bountymap is empty after doing file_to_map(). You can check by adding bountymap.count().print() after loading it.
 
Haha. Thought you'd be pleased. I think Theraze thought (s)he was being helpful :P

About the int {} bit at the start, is that defined in OCD, or do I need to put that in the script? And BaleOCD_DataFile can be anything I want can't it? I feel as though I should check these things :-)

@Slyz: Yeah, that's printing 0.
 
I did another test for confirmation.
PHP:
record BountyInfo
	{
	int bountyTarget;
	location bountyLocation;
	item bountyItem;
	boolean muscleSignSafe;
	
	// -1 means boost -combats, 0 means leave alone, 1 means boost +combats
	
	int combats;
	int [int] choiceAdventureChanges;
	};

BountyInfo [int] bountymap;

file_to_map("bounty.txt", bountymap);

bountymap.count().print();

It does indeed print 0. Maybe there's something wrong with bounty.txt?? But if it works for you...?!
 
OH FOR F***'* SAKE. I assumed you could leave data files inside folders within /KoLmafia/data. So before anyone else spends a few hours on that one: You can't do that. >_<
 
MacOSX. It was in /data/NCF Data/

But you know what? That didn't fix the problem. Still getting 0 from it. On the other hand, loading from a test file in a subfolder of /data/ gave me 0, while moving it into /data/ proper made it load perfectly.

EDIT: No, I lie again. That fixes the problem. I won't bore you with the details :-)

Halle-freaking-lujah
 
Version 1.5.1 released. Please make sure that your data files are in the right place as per my note in large red writing at the bottom of the first post.
 
Really?! I'll just be over here hitting my head into the wall.

Sorry. After a snarky post about who should change, I just verified and released Theraze's changes since, once the snark was let loose, it seemed reasonable to try for the Plays Nicely With Others trophy.
 
I'm all fixed up. I *WAS* trying to run NCF Combat- Meatfarm. Because... for some reason the new files confused my head and I didn't see the actual newcowfarm.ash file.

*edit*

I do love the message, though, to upgrade from 1.5.1. to 1.5.0.

*edit*

I'm also getting a message saying that there was no CCS when running the bountyhunting script, although the new bounty CCS script is in my CCS file
 
Last edited:
I do love the message, though, to upgrade from 1.5.1. to 1.5.0.
What? Really? That... Confuses me. Could you try updating to 1.5.2? If you still get that message could you open it up and copy/paste line 10 here (beginning "check_version")?

I'm also getting a message saying that there was no CCS when running the bountyhunting script
Ah. My bad! All fixed in 1.5.2. The trouble is that NCF is JUST close enough to KFC that I sometimes swap the F and the C around :D And it didn't help that I put a space where there should have been none.
 
Last edited:
Just upgraded to 1.5.2. Except for a break when running into these new "drunksgiving" monsters while bounty hunting, it's all good now.
 
Until it switched over to farming, that is. I got an error message because it failed to "invoke NeoLibram.ash" but I can't figure out which script is trying to summon that script instead of NCF Libram.

*edit*

still not sure, but I just renamed the file as a temporary solution. worked good enough!
 
That's very strange. Could you check to make sure you don't have an older version of any of the scripts in your KoLmafia folder anywhere?
 
Zlib's check_version() will only parse the thread once a day. If there are two updates in the same day, it won't know about it. It also compares strings, so it doesn't care if current_version > stored_version.
 
Back
Top