Help with CCS Script

bumcheekcity

Active member
Code:
void main(int initround, monster foe, string html) 
{
	if (contains_text(html, "yellow eye"))
	{
		use_skill(1, $skill[Point at your Opponent]);
	}
	print(html, "blue");
	print(initround, "yellow");
	throw_item($item[turtle totem]);
	abort();
}

Basically, I just want a script to run and fight one booze giant and yellow ray him. I've got my CCS being:

[ booze giant ]
1: consult bcc3.ash

[ default ]
1: try to steal an item
2: attack with weapon

And then I call:

cli_execute("f he-");
add_item_condition(1, $item[boxed wine]);
adventure(10, $location[Menagerie 3]);

From my main script. But it just uses a turtle totem once, (at which point the He-Boulder showed a red ray) then aborts.
 

Winterbay

Active member
Add a
Code:
while !contains_text(html, "yellow eye")
somewhere as well? (I'm just pulling this out of my ass since I have no experience in ash-programming...)
 

slyz

Developer
Your consult script is called, checks for the yellow ray, zaps or uses the totem accordingly... and aborts.
Try simply removing the abort, I guess the consult script will be called each round. Or add a while loop inside the consult script as Winterbay says.
 

Rinn

Developer
Or rather, move the abort inside your if check after you use the skill. The abort shouldn't be necessary since the yellow ray should satisfy your item condition.
 

zarqon

Well-known member
This is a good idea. I'll be adding Yellow Ray support to FTF/SS in the upcoming update. You'll be able to specify (a) monster(s) in the "ftf_yellow" setting which will be yellow ray'd if possible.

You should also check that the recharge counter is not currently in effect:

Code:
if (get_counters("Major Yellow Recharge",1,149) != "") exit;
while (!contains_text(html, " yellow eye")) 
   html = throw_item($item[turtle totem]);
use_skill(1, $skill[Point at your Opponent]);

should do what your above script wanted to do, assuming you have something after this script to kill the monster afterward.
 
Top