FreeCopies.ash Spooty putty, rain-doh, and romantic arrow/wink consult script

zekaonar

Member
I've seen a few different people switching css to turn putty on/off. I think this is an easier solution when you want to burn all your free copies farming a single mob. It's a mini consult scriptlet that uses mafias internal counters to tell when it's time to stop using putty/rain-doh. I don't think it's worthy of going into SVN but I thought it's useful enough to others post or to modify to your own uses.

freeCopies.ash
Code:
void main(int initround, monster foe, string page) {
	
	// Reanimator / Obtuse Angel support
	if (have_skill($skill[Wink at])) {
		use_skill(1,$skill[Wink at]);
	} else if (have_skill($skill[Fire a badly romantic arrow])) {
		use_skill(1,$skill[Fire a badly romantic arrow]);
	}
	
	// Spooky Putty / Rain-doh copy support
	int totalCopiesMade = to_int(get_property("_raindohCopiesMade")) + to_int(get_property("spookyPuttyCopiesMade"));
	if (available_amount($item[Spooky Putty sheet]) > 0 
	  && available_amount($item[Spooky Putty monster]) == 0 
	  && get_property("spookyPuttyCopiesMade") < 5
	  && totalCopiesMade < 6) {
		throw_item($item[Spooky Putty sheet]);
	} else if (available_amount($item[Rain-Doh black box]) > 0 
		&& available_amount($item[Rain-Doh box full of monster]) == 0 
		&& get_property("_raindohCopiesMade") < 5
		&& totalCopiesMade < 6) {
			throw_item($item[Rain-Doh black box]);
	}
}

Then to use it, Add the following to your CCS to the mob of your choice:

Code:
[ clod hopper ]
consult freeCopies.ash
... kill it ....

And then using a CLI script, you can kill repeatedly using the following:
Code:
faxbot clod hopper;
familiar reanimator;
equip Mayflower bouquet;
use photocopied monster;
familiar hound dog;
equip snow suit;
use spooky putty monster;
use spooky putty monster;
use spooky putty monster;
use spooky putty monster;
use spooky putty monster;
use Rain-Doh box full of monster;

Tested with spooky putty, rain-doh and reanimator. Angel should work, but I don't have one.
 

digitrev

Member
I added support for cameras, ice sculptures, and taffy. It's been tested for the first two, but not the taffy.
Code:
void main(int initround, monster foe, string pg) {
	// Reanimator / Obtuse Angel support
	if (have_skill($skill[Wink at])) {
		use_skill(1,$skill[Wink at]);
	} else if (have_skill($skill[Fire a badly romantic arrow])) {
		use_skill(1,$skill[Fire a badly romantic arrow]);
	}

	// Spooky Putty / Rain-doh copy support
	int totalCopiesMade = to_int(get_property("_raindohCopiesMade")) + to_int(get_property("spookyPuttyCopiesMade"));
	if (available_amount($item[Spooky Putty sheet]) > 0 
	    && available_amount($item[Spooky Putty monster]) == 0 
	    && get_property("spookyPuttyCopiesMade") < 5
	    && totalCopiesMade < 6) {
		throw_item($item[Spooky Putty sheet]);
	} else if (available_amount($item[Rain-Doh black box]) > 0 
	    && available_amount($item[Rain-Doh box full of monster]) == 0 
	    && get_property("_raindohCopiesMade") < 5
	    && totalCopiesMade < 6) {
		throw_item($item[Rain-Doh black box]);
	}
	
	//camera & sculpture support
	if (available_amount($item[crappy camera]) > 0
	    && available_amount($item[shaking crappy camera]) == 0
	    && get_property("_crappyCameraUsed") == false) {
		throw_item($item[crappy camera]);
	}
	if (available_amount($item[4-d camera]) > 0
	    && available_amount($item[shaking 4-d camera]) == 0
	    && get_property("_cameraUsed") == false) {
		throw_item($item[4-d camera]);
	}
	if (available_amount($item[unfinished ice sculpture]) > 0
	    && available_amount($item[ice sculpture]) == 0
	    && get_property("_iceSculptureUsed") == false) {
		throw_item($item[unfinished ice sculpture]);
	}
	
	//green taffy support
	if (available_amount($item[pulled green taffy]) > 0
	    && available_amount($item[envyfish egg]) == 0
	    && get_property("_envyfishEggUsed") == false
	    && my_location().environment.to_string() == "underwater") {
		throw_item($item[pulled green taffy]);
	}
}
 

mstieler

Member
Possibly dumb question, but I've got two accounts I'm running this on: one has Putty & Rain-Doh, the other just rain-doh. The "only rain-doh" account runs this fine, but the account with putty keeps giving me an error whenever it gets to using the putty:

[spooky use spooky putty monster monster] has no matches.

I'm just not entirely certain how it's coming up with that. I've got FreeCopies.ash in my Scripts folder, my CCS has:

[ adventurer echo ]
consult FreeCopies.ash
attack with weapon

And I have a .txt that I run with the following:
acquire 4-d camera;
familiar reanimator;
use photocopied monster;
familiar jung man;
use rain-doh box full of monster;
use rain-doh box full of monster;
use rain-doh box full of monster;
use rain-doh box full of monster;
use rain-doh box full of monster;
use spooky putty monster;
use shaking 4-d camera;

Any idea what the issue could be?
 

Veracity

Developer
Staff member
Aside from the fact that you are using the rain-doh item five times and the spooky putty item one time, rather than the other way around, that kind of error is a tell-tale sign that you have an alias that is expanding in an unexpected way. In particular, it looks like "putty" expands to "use spooky putty monster" and therefore "use spooky PUTTY monster" expands to "use spooky USE SPOOKY PUTTY MONSTER monster" and the "use command is unable to figure out what "spooky USE SPOOKY PUTTY MONSTER monster" is.
 

mstieler

Member
Aha. Yeah, I had made aliases for Rain-Doh, Putty & the Camera when I had no idea what a CLI script was (then realized it would be a .txt file with CLI prompts as opposed to a .ash like I had it in the beginning.

I'll get those fixed now.
 
Top