Lights Out scripting help needed

DoctorRotelle

Developer
Ok, so I wrote a routine in my BBS/abort script which is supposed to halt when I am due for a lights out turn, but it uses items before acknowledging the abort. Is there a way to script around this?
Code:
Turns til next Lights Out: 37
Elizabeth will next show up in The     Haunted Kitchen
Stephen will next show up in The Haunted Conservatory
Script     aborted.

[16775] Drum Machine
Encounter: giant sandworm
Strategy:     C:\Documents and Settings\Administrator\My     Documents\Mafia\ccs\stoppers.ccs [default]
Round 0: DoctorRotelle wins     initiative!
Click     here to continue in the relay browser.

The other half is I'd like a way to automate the lights out visits, but adventure(1, $location[]) will do the lights out quest AND then go on to another turn in the same zone. Additionally, if that zone was the bedroom, it hangs my scripts as it doesn't complete the free non-combat after doing the fight.

Any clues, ideas, hints, smack with a heavy object greatly appreciated!
-=DR
 

lostcalpolydude

Developer
Staff member
You can use adv1() instead of adventure() to not spend an actual turn.

I'm wondering how your script is using an item after it aborts, but that would possibly require seeing the script.
 

DoctorRotelle

Developer
I have a ton of abort() commands in a script called abort90.ash. I have it configured to fire from the betweenBattleScript preference. To recreate the issue, put an abort() in a script and use an item which takes an adventure (copied monsters, drum machine, spaaace maps, etc). You will see the same behavior.

BIG THANK YOU for the pointer to adv1(). I had no idea it wasn't an alias to adventure().

Here is the code snippet from my abort90.ash with the recommended change:
Code:
location next_lights_out()
{
	if(get_property("nextSpookyravenStephenRoom")!='none') return get_property("nextSpookyravenStephenRoom").to_location();
	if(get_property("nextSpookyravenElizabethRoom")!='none') return get_property("nextSpookyravenElizabethRoom").to_location();
	return $location[none];
}

if(get_property("questM21Dance")=='finished'
	&& ( get_property("nextSpookyravenStephenRoom")!='none' || get_property("nextSpookyravenElizabethRoom")!='none') 
	&& get_property("lastLightsOutTurn")!=total_turns_played( ))
{ 
	print("Turns til next Lights Out: "+(37 - (total_turns_played( ) % 37))); 
	if(total_turns_played( ) % 37 == 0)
	{
		cli_execute("spookyraven");
		if(!adv1(next_lights_out(), 1 , "")) abort();
	}
}

This code is NOT ready for primetime as it can still flail without Manor0 unlocked!!!
 
Top