Bug - Fixed Some zoneless encounters skip 1st entry in CCS

Malibu Stacey

Active member
I have been mostly just letting Winterbay's WHAM script run my combats for me (with a handful of exceptions in my CCS) because I'm lazy and it does a pretty good job.
However I decided to write a consult script to run before WHAM to automate a few things.

It didn't seem to be working when fighting certain monsters like 5 free Witchess pieces or faxed monsters.
So I created a new script called consult_test.ash to test this containing the following:

Code:
void main(int round, monster mob, string page_text)
{
  print("===== CONSULT TEST =====", "fuchsia");
  print("monster = " + to_string(mob), "fuchsia");
}

and created a new CCS called "consult test" containing only the following:

Code:
[ default ]
consult consult_test.ash
consult WHAM.ash

Attempting to fight a Witchess Monster with this setup yields the following:

Code:
[19228] Your Witchess Set
Preference lastEncounter changed from L.O.V. Emporium to Play against the Witchess Pieces
Encounter: Play against the Witchess Pieces
Preference lastEncounter changed from Play against the Witchess Pieces to Witchess Bishop
Encounter: Witchess Bishop
Preference _lastCombatStarted changed from 20181218055352 to 20181218055452
Preference _witchessFights changed from 2 to 3
Round 0: Malibu Stacey wins initiative!
You have the latest batfactors.txt. Will not check again today.
WHAM: Running SmartStasis
Round 1: Malibu Stacey executes a macro!

Fighting a faxed monster with this setup yields the following:

Code:
[19228] photocopied monster
Preference lastEncounter changed from Witchess Bishop to Black Crayon Crimbo Elf
Encounter: Black Crayon Crimbo Elf
Preference _lastCombatStarted changed from 20181218055452 to 20181218060503
Round 0: Malibu Stacey wins initiative!
WHAM: Running SmartStasis
Round 1: Malibu Stacey executes a macro!

Fighting a monster in the Neverending Party yields the following:

Code:
[19228] The Neverending Party
Preference lastEncounter changed from Black Crayon Crimbo Elf to jock
Encounter: jock
Preference _lastCombatStarted changed from 20181218060503 to 20181218061609
Round 0: Malibu Stacey wins initiative!
===== CONSULT TEST =====
monster = jock
WHAM: Running SmartStasis
Round 1: Malibu Stacey executes a macro!

which is finally executing the script. The Neverending Party is however an adventure.php location (but still a free fight as the previous 2 tested encounters were).

If I add a single line to the CCS so it looks like this:

Code:
[ default ]
twiddle
consult consult_test.ash
consult WHAM.ash

I get the following when fighting a Witchess Monster (can't test another fax until tomorrow unfortunately).

Code:
[19228] Your Witchess Set
Preference lastEncounter changed from jock to Play against the Witchess Pieces
Encounter: Play against the Witchess Pieces
Preference lastEncounter changed from Play against the Witchess Pieces to Witchess Bishop
Encounter: Witchess Bishop
Preference _lastCombatStarted changed from 20181218061609 to 20181218062025
Preference _witchessFights changed from 3 to 4
Round 0: Malibu Stacey wins initiative!
===== CONSULT TEST =====
monster = Witchess Bishop
WHAM: Running SmartStasis
Round 1: Malibu Stacey executes a macro!

which is now also executing the script. I can remove that single line & it stops working again.

So it looks like some encounters in non-adventure.php locations are for some reason ignoring the first line in the CCS. Other things which might be similarly affected which I haven't tested yet is fighting Time-Spinner monsters from the Adventure Way Back in Time option, Deck of Every Card encounters, Tentacles (skill summoned or Dr. Gordon Stuart), the God Lobster, Genie wishes and monsters fought using copiers other than the fax.

Also I stripped the combat logs down as WHAM finishing the fight isn't really relevant to this bug but if required I can provide the full fight logs.
 
Last edited:

fronobulax

Developer
Staff member
Perhaps related. I am occasionally getting a message about an invalid (or is it an empty?) macro generated. However the CCS does continue. I will pay attention and see whether my experience is related to location or not.
 

Malibu Stacey

Active member
I think it might be caused by the last adventure being specific things.
Today I went to the The Tunnel of L.O.V and hit the cancel option so I didn't run the fights and NC's.
Then I fought a Witchess piece

Code:
[19816] Your Witchess Set
Preference lastEncounter changed from The Tunnel of L.O.V.E. to Play against the Witchess Pieces
Encounter: Play against the Witchess Pieces
Preference lastEncounter changed from Play against the Witchess Pieces to Witchess Bishop
Encounter: Witchess Bishop
Preference _lastCombatStarted changed from to 20181219041930
Preference _witchessFights changed from 0 to 1
Round 0: Malibu Stacey wins initiative!
===== CONSULT TEST =====
monster = Witchess Bishop
You have the latest batfactors.txt. Will not check again today.
WHAM: Running SmartStasis
Round 1: Malibu Stacey executes a macro!

That's with the CCS just being

Code:
[ default ]
consult consult_test.ash
consult WHAM.ash

Next I cleared the Tunnel of L.O.V. Then I fought a faxed monster

Code:
[19816] photocopied monster
Preference lastEncounter changed from L.O.V. Emporium to Black Crayon Penguin
Encounter: Black Crayon Penguin
Preference _lastCombatStarted changed from 20181219042102 to 20181219042329
Round 0: Malibu Stacey wins initiative!
WHAM: Running SmartStasis
Round 1: Malibu Stacey executes a macro!

Most days in aftercore I clear the Tunnel of L.O.V, then fight a Witchess Piece (to Digitize) then fight a faxed Black Crimbo monster (for the Robortender drop).

[edit] more info, the next thing I fought was a time prank in Barf Mountain as that was the first adventure.php location I'd clicked.

Code:
[19816] Barf Mountain
Preference lastEncounter changed from Black Crayon Penguin to Triffels
Encounter: Triffels
Preference relayCounters changed from 19820:Vote Monster:absballot.gif to 19820:Vote Monster:absballot.gif:19822:Digitize Monster loc=* type=wander:watch.gif
Preference _tempRelayCounters changed from 7:Digitize Monster loc=* type=wander:watch.gif| to 
Preference _lastCombatStarted changed from 20181219043252 to 20181219043500
Round 0: Triffels says: "Crimbo is here!"
Round 0: Malibu Stacey wins initiative!
WHAM: Running SmartStasis
Round 1: Malibu Stacey executes a macro!
 
Last edited:

Veracity

Developer
Staff member
I have been mostly just letting Winterbay's WHAM script run my combats for me (with a handful of exceptions in my CCS) because I'm lazy and it does a pretty good job.
What do you mean "run my combats for me"?

You set up a CCS.
Presumably, you have your battleAction set to "custom combat script"
(that's the property set in the Custom Combat pane of the Adventure panel for the "Action" input.)
If you automate, that is what gets used.
In the Relay Browser, that is supposed to be what you get when you press the "script" button.

Is that what you are doing? Using the "script" button in the Relay Browser?
 

Veracity

Developer
Staff member
That must be it. I set up my CCS with your test consult script and fought a lynyrd - and I noticed it used my Barf Mountain CCS section, since that was the last place I'd adventured.

Turns out, looking up CCS scripts goes to "lastAdventure", not "nextAdventure". Which is fair, since you look up the script after we've started a fight, not in preparation for fighting, which is what you want for a before battle script, say.

I made the places where we set nextAdventure to "None" also set lastAdventure to "None". I fought another lynyrd and it went to my default section and started with your test consult script, as expected.

Revision 19564
 

Malibu Stacey

Active member
Thanks Veracity and to answer the earlier question, yes I was using the "auto" or script button in the relay browser.

You're on fire recently, so many bugs squashed!
 
Top