The Neo-Cow Farming Script

icon315

Member
Variable USE_PUTTY is already defined (NCF Combat - Bountyhunt.ash, line 3)

Since you imported NCF Bountyhunting.ash (which also contains that variable) there is no need to restate it
Another thing is that mafia doesn't seem to detect "NFCputtyfarm.CCS", that is until i create a new CCS named that; after that it finds the things and adds it automatically


=====================================================

Also, in NFC_Bountyhunting.ash, shoudln't
PHP:
set_property("customCombatScript", "bountyhunting");
be
PHP:
set_property("customCombatScript", "ncfbountyhunt");


=====================================================

Also you could change these lines
PHP:
if(loc == $location[ laboratory ])
		{
		USE_PUTTY = false;
		}
		else
		if(loc == $location[ ninja snowmen ])
			{
			USE_PUTTY = false;
			}
			else
			if(loc == $location[ frat house ])
				{
				USE_PUTTY = false;
				}
				else
				if(loc == $location[ goatlet ])
				{
				USE_PUTTY = false;
				}
To
PHP:
	if(loc == $location[ laboratory ] || loc == $location[ ninja snowmen ] || loc == $location[ frat house ] || loc == $location[ goatlet ])
		{
		USE_PUTTY = false;
		}

=====================================================

Why doesn't it do a putty loop? It uses the spooky putty sheet on the spooky putty monster, then repeats until it is out of putties.
 
Last edited:

morwen

New member
I'm pretty sure he tells you in digits.

Also, is there a way to tell the script to NOT automatically get buffs? I have plenty and often run the script late at night when most of the bots are inactive.
 

Banana Lord

Member
Variable USE_PUTTY is already defined (NCF Combat - Bountyhunt.ash, line 3)
Fixed.

Another thing is that mafia doesn't seem to detect "NFCputtyfarm.CCS"
That's because the script is looking for ncfputtyfarm. Thanks for pointing that out!

Also, in NFC_Bountyhunting.ash, shoudln't...
Already fixed in 1.5.3.

Also you could change these lines
Already fixed in 1.5.3. I thought of doing it your way, but I decided to do it like this instead.
PHP:
	foreach area in $locations[laboratory, ninja snowmen, frat house, goatlet]
		{
		if(loc == area)
			USE_PUTTY = false;
		}
No problems with that are there?

Why doesn't it do a putty loop? It uses the spooky putty sheet on the spooky putty monster, then repeats until it is out of putties.
I'm not sure I understand your question. Could you rephrase it?
EDIT: You mean why does it putty a monster, fight it, then go and look for another one to putty and so on, rather than puttying the copies? Because it should be doing that. It's working perfectly for me in that sense. If that is your problem, wait until I roll 1.5.3 (later tonight) and see if it's fixed or not.

@Morwen: Yeah that bugs me too. When I have time, I'll fix the way buffing (and a lot of other stuff) works. For now you just need to edit the appropriate data file. Open up your data folder and find bounty_buffs.txt and farm_buffs.txt. Delete everything inside them.
 
Last edited:

Banana Lord

Member
Baring some strange issue with NCF Combat - Bountyhunt.ash that I can't replicate we're good to go! Script updated to 1.5.3! Yay bug fixes and minor improvements!
 

icon315

Member
You mean why does it putty a monster, fight it, then go and look for another one to putty and so on, rather than puttying the copies? Because it should be doing that. It's working perfectly for me in that sense. If that is your problem, wait until I roll 1.5.3 (later tonight) and see if it's fixed or not.

Yes, it should do this:
1.Adventure til it gets the bounty monster
2.once it has it putty and kill
3.use the puttied monster
4.putty that puttied monster
5.kill the puttied monster
6.rinse and repeat from #3 til you are out of putties for the day.
 

Banana Lord

Member
Yes, I agree. It should do that. There is, in fact, a while loop in the script for that purpose. Is it not looping as it should? Could you update to 1.5.3, run the script (when you can) and post the relevant CLI output?
 

icon315

Member
Code:
> call scripts\NCF\NCF Bountyhunting.ash

you already have a bounty hunt active...
grabbing info for shredded can label
Making sure putty is useful here: Haunted Pantry
CCS set to ncfbountyhunt
Using 1 Spooky Putty monster...

[2404] Spooky Putty Monster
Encounter: possessed can of tomatoes
Strategy: C:\Users\Noe Canales\Desktop\Kol\ccs\ncfbountyhunt.ccs [default]
Round 0: icon315 wins initiative!
grabbing info for shredded can label
Using spooky putty
Round 1: icon315 executes a macro!
Round 1: icon315 uses the Spooky Putty sheet!
You acquire an item: Spooky Putty monster
You lose 1 hit point
Round 2: icon315 attacks!
Round 3: possessed can of tomatoes takes 238 damage.
Round 3: icon315 wins the fight!
You gain 2 Meat
You acquire an item: razor-sharp can lid
You acquire an item: tomato
You acquire an item: shredded can label
You gain 2 Muscleboundness
You gain 1 Magicalness
Finished using 1 Spooky Putty monster.
Using 1 Spooky Putty monster...

[2405] Spooky Putty Monster
Encounter: possessed can of tomatoes
Strategy: C:\Users\Noe Canales\Desktop\Kol\ccs\ncfbountyhunt.ccs [default]
Round 0: icon315 wins initiative!
grabbing info for shredded can label
Using spooky putty
Round 1: icon315 executes a macro!
Round 1: icon315 uses the Spooky Putty sheet!
You acquire an item: Spooky Putty monster
You lose 1 hit point
Round 2: icon315 attacks!
Round 3: possessed can of tomatoes takes 241 damage.
Round 3: icon315 wins the fight!
You gain 3 Meat
You acquire an item: razor-sharp can lid
You acquire an item: tomato
You acquire an item: shredded can label
You gain 4 Strongness
Finished using 1 Spooky Putty monster.
Conditions list cleared.
Condition added: shredded can label (4)
shredded can label (4)
CCS set to ncfbountyhunt

Request 1 of 165 (Manor1: Haunted Pantry) in progress...

[2406] Haunted Pantry
Encounter: possessed can of tomatoes
Strategy: C:\Users\Noe Canales\Desktop\Kol\ccs\ncfbountyhunt.ccs [default]
Round 0: icon315 wins initiative!
grabbing info for shredded can label
No putty!
You're on your own, partner.
Click here to continue in the relay browser.
It worked for a while, then it stopped using the putty monster
 

icon315

Member
Your script should really do a is_online() before asking for buffs

FIGURED IT OUT!!!!
PHP:
	if(USE_PUTTY && item_amount($item[spooky putty sheet]) > 0 && to_int(get_property("spookyPuttyCopiesMade")) < 5)
		{
		print("Using putty to speed up bounty.", "blue");
		if(item_amount($item[spooky putty sheet]) == 0)
			abort("You don't have a putty sheet!");
		cli_execute("conditions clear");
		add_item_condition(1, $item[Spooky Putty monster]);
		set_property("battleAction", "custom combat script");
		set_property("customCombatScript", BOUNTY_COMBAT_SCRIPT);
		adventure(my_adventures(), currentBounty.bountyLocation);
		cli_execute("conditions clear");
		set_property("battleAction", "custom combat script");
		set_property("customCombatScript", BOUNTY_PUTTY_CSCRIPT);
		
		// Not much error checking here but I'm not sure that much is needed in this case
		while(item_amount($item[Spooky Putty monster]) > 0 && item_amount($item[filthy lucre]) == start_lucre && item_amount(currentBounty.bountyItem) < currentBounty.bountyTarget)
			{
			use(1, $item[Spooky Putty monster]);
			visit_url("bhh.php"); // Mafia doesn't notice when you finish a bounty with a putty monster
			}
		}
should be
PHP:
	if(USE_PUTTY && item_amount($item[spooky putty sheet]) > 0 && to_int(get_property("spookyPuttyCopiesMade")) < 5)
		{
		print("Using putty to speed up bounty.", "blue");
		if(item_amount($item[spooky putty sheet]) == 0)
			abort("You don't have a putty sheet!");
		cli_execute("conditions clear");
		add_item_condition(1, $item[Spooky Putty monster]);
		set_property("battleAction", "custom combat script");
		set_property("customCombatScript", BOUNTY_COMBAT_SCRIPT);
		adventure(my_adventures(), currentBounty.bountyLocation);
		cli_execute("conditions clear");
		set_property("battleAction", "custom combat script");
		set_property("customCombatScript", BOUNTY_PUTTY_CSCRIPT);
		
		}
		// Not much error checking here but I'm not sure that much is needed in this case
		while(item_amount($item[Spooky Putty monster]) > 0 && item_amount($item[filthy lucre]) == start_lucre && item_amount(currentBounty.bountyItem) < currentBounty.bountyTarget)
			{
			use(1, $item[Spooky Putty monster]);
			visit_url("bhh.php"); // Mafia doesn't notice when you finish a bounty with a putty monster
			}
 
Last edited:

Banana Lord

Member
Yep, that's the one I was thinking of :). But I think we ought to include a check for USE_PUTTY before using a spooky putty monster.

EDIT: Script updated.
 

Banana Lord

Member
Oh in NCF Puttyfarm.ash? I haven't been too fussed about that as I don't use it, and have more important things to test before I worry about updating it. Basically if you're using that you're on your own until v2.0, but I'll do my best not to interfere with it. Anyway, that change'll be included in the next update, whenever that is.
 

Banana Lord

Member
I'm encountering a strange bountyhunting issue. Once the script has collected my lucre it tries to go to my bounty location and hunt for more bounty items, this results in an error in the first combat it encounters as NCF Bountyhunting.ash returns an error because it "wasn't able to match up a BHH object!". I can only assume that the issue is occurring here, but everything looks fine to me.
PHP:
	// Done trying to putty the monsters, but if the bounty is not done we need to keep hunting
	if(item_amount($item[filthy lucre]) == start_lucre && have_bountyhunt())
		{
		cli_execute("conditions clear");
		add_item_condition(currentBounty.bountyTarget - item_amount(currentBounty.bountyItem), currentBounty.bountyItem);
		set_property("battleAction", "custom combat script");
		set_property("customCombatScript", BOUNTY_COMBAT_SCRIPT);
		
		adventure(my_adventures(), currentBounty.bountyLocation);
		
		set_property("battleAction", bounty_default_battle_action);
		set_property("customCombatScript", bounty_default_custom_combat_script);
		}
 

slyz

Developer
Try replacing
PHP:
add_item_condition(currentBounty.bountyTarget - item_amount(currentBounty.bountyItem), currentBounty.bountyItem);
by
PHP:
cli_execute( "condition set " + currentBounty.bountyTarget + " " + currentBounty.bountyItem );
and make sure you are using r9167 or higher.
 

morwen

New member
I know that there's a move NOT to add more variables to the vars file, but do you think you could work in an option to choose whether or not the script gets buffs? I would prefer to get my own, and for the life of me can't figure out how to get it to not do that.

*EDIT*

As well, I noticed it was mentioned that a who's online should be performed first before messaging the bot, which should make it look and work a lot nicer. I second that motion.
 
Last edited:

Banana Lord

Member
Thanks Slyz, I'll test that after rollover.

Morwen said:
Do you think you could work in an option to choose whether or not the script gets buffs? I would prefer to get my own, and for the life of me can't figure out how to get it to not do that.
@Morwen: Yeah that bugs me too. When I have time, I'll fix the way buffing (and a lot of other stuff) works. For now you just need to edit the appropriate data file. Open up your data folder and find bounty_buffs.txt and farm_buffs.txt. Delete everything inside them.



As for revamping buffing, as I have already said, it WILL happen, but at the moment I simply do not have the time. If someone would like to do a rewrite themselves, test it, then post it here I'll look over it and include it in an update if it works as it should.
 

morwen

New member
Haha, I totally missed the response you posted and that's why I said it again >.< Sorry!! I think I tried that before... OH! I forgot I just updated all the files with the new version so they'd be back and that's why it's doing it again.
 

Banana Lord

Member
You're unlikely to need to update the data files, in fact, unless I state otherwise in a post or in the changelog, then it's safe to assume you don't need to.
 

icon315

Member
Could you add an option to remove the auto buffup there seems to be some error occuring:
Code:
2 of 3 AT buffs active.
Chalky Hand (4)
Yuletide Sappiness (9)
Flashing Eyes (10)
Chalked Weapon (14)
Form of...Bird! (14)
Elemental Saucesphere (14)
Down the Rabbit Hole (19)
Sugar Rush (20)
Spooky Demeanor (150)
Hustlin' (179)
♫ Fat Leon's Phat Loot Lyric (300)
Jingle Jangle Jingle (1,319)
♫ Carlweather's Cantata of Confrontation (1,361)
Empathy (1,741)
Failed to get Fat Leon's Phat Loot Lyric from 537858.
I already had fat leon's.
 
Top