SmartStasis -- a complex script for a simple CCS

Smart Stasis doesn't seem able to kill the ghosts in Dreadsylvania within 30 rounds. It doesn't go into attack mode until round 27 or 28 and exceeds the 30-round max. Has anyone else seen this?
 
Well, SmartStasis NEVER tries to kill the ghosts, since it's only there to stasis for you.

Is this possibly a WHAM request instead?
 
Recently I've had mafia forcing me continue in the relay browser for exactly 1 adventure a day, whenever I try to fire a Romantic Arrow. I set verbosity to 9 and this is the smartstasis output:

Round 2: fxer casts FIRE A BADLY ROMANTIC ARROW!
Round 3: Angel Dustin' fires a badly romantic arrow at your opponent. It roars an angry "RAAAH! RAAAH!" but it quickly turns into an "OOO LA LA!" It gazes at you, too stunned by your beauty to attack this round.
Happened: pickpocket
Happened: skill 7108
Parsed round number: 3
You snatched a floaty sand (2,600μ)!
floaty sand (15.0 @ +388.75): 2,600μ * 73.31% = 1,906.12
floaty sand (15.0 @ +388.75): 2,600μ * 73.31% = 1,906.12
Revised monster value: 3,812.25
Happened: stolen
Building options...
Creating event 'attack'...
Creating event ''...
Creating event ''...
Creating event 'use 2'...
Creating event 'use 8'...
Creating event 'use 27'...
Creating event 'use 28'...
Creating event 'use 145'...
Creating event 'use 181'...
Creating event 'use 185'...
Creating event 'use 208'...
Creating event 'use 231'...
Creating event 'use 232'...
Creating event 'use 233'...
Creating event 'use 234'...
Creating event 'use 270'...
Creating event 'use 344'...
Creating event 'use 345'...
Creating event 'use 347'...
Creating event 'use 353'...
Creating event 'use 357'...
Creating event 'use 452'...
Creating event 'use 464'...
Creating event 'use 466'...
Creating event 'use 469'...
Creating event 'use 474'...
Creating event 'use 546'...
Creating event 'use 547'...
Creating event 'use 548'...
Creating event 'use 549'...
Creating event 'use 550'...
Creating event 'use 551'...
Creating event 'use 559'...
Creating event 'use 563'...
Creating event 'use 610'...
Creating event 'use 624'...
Creating event 'use 630'...
Creating event 'use 747'...
Creating event 'use 779'...
Creating event 'use 819'...
Creating event 'use 820'...
Creating event 'use 821'...
Creating event 'use 822'...
Creating event 'use 823'...
Creating event 'use 824'...
Creating event 'use 825'...
Creating event 'use 826'...
Creating event 'use 827'...
Creating event 'use 829'...
Creating event 'use 910'...
Creating event 'use 1051'...
Creating event 'use 1055'...
Creating event 'use 1067'...
Creating event 'use 1071'...
Creating event 'use 1075'...
Creating event 'use 1079'...
Creating event 'use 1159'...
Creating event 'use 1316'...
Creating event 'use 1334'...
Creating event 'use 1335'...
Creating event 'use 1336'...
Creating event 'use 1389'...
Creating event 'use 1390'...
Creating event 'use 1391'...
Creating event 'use 1394'...
Creating event 'use 1510'...
Creating event 'use 1704'...
Creating event 'use 1705'...
Creating event 'use 1777'...
Creating event 'use 1907'...
Creating event 'use 1922'...
Creating event 'use 1939'...
Creating event 'use 1958'...
Creating event 'use 1960'...
Creating event 'use 1965'...
Creating event 'use 2040'...
Creating event 'use 2041'...
Creating event 'use 2042'...
Creating event 'use 2043'...
Creating event 'use 2067'...
Creating event 'use 2068'...
Creating event 'use 2091'...
Creating event 'use 2092'...
Creating event 'use 2129'...
Creating event 'use 2131'...
Creating event 'use 2133'...
Creating event 'use 2138'...
Creating event 'use 2237'...
Creating event 'use 2240'...
Creating event 'use 2341'...
Creating event 'use 2348'...
Creating event 'use 2349'...
Creating event 'use 2350'...
Creating event 'use 2351'...
Creating event 'use 2369'...
Creating event 'use 2371'...
Creating event 'use 2374'...
Creating event 'use 2378'...
Creating event 'use 2396'...
Creating event 'use 2397'...
Creating event 'use 2400'...
Creating event 'use 2402'...
Creating event 'use 2437'...
Creating event 'use 2438'...
Creating event 'use 2439'...
Creating event 'use 2492'...
Creating event 'use 2493'...
Creating event 'use 2537'...
Creating event 'use 2538'...
Creating event 'use 2575'...
Creating event 'use 2581'...
Creating event 'use 2582'...
Creating event 'use 2606'...
Creating event 'use 2608'...
Creating event 'use 2613'...
Creating event 'use 2617'...
Creating event 'use 2619'...
Creating event 'use 2644'...
Creating event 'use 2645'...
Creating event 'use 2646'...
Creating event 'use 2647'...
Creating event 'use 2648'...
Creating event 'use 2678'...
Creating event 'use 2687'...
Creating event 'use 2696'...
Creating event 'use 2704'...
Creating event 'use 2715'...
Creating event 'use 2947'...
Creating event 'use 2956'...
Creating event 'use 2966'...
Creating event 'use 2992'...
Creating event 'use 3020'...
Creating event 'use 3063'...
Creating event 'use 3065'...
Creating event 'use 3082'...
Creating event 'use 3099'...
Creating event 'use 3111'...
Creating event 'use 3112'...
Creating event 'use 3146'...
Creating event 'use 3147'...
Creating event 'use 3148'...
Creating event 'use 3149'...
Creating event 'use 3150'...
Creating event 'use 3151'...
Creating event 'use 3152'...
Creating event 'use 3153'...
Creating event 'use 3154'...
Creating event 'use 3155'...
Creating event 'use 3388'...
Creating event 'use 3403'...
Creating event 'use 3448'...
Creating event 'use 3462'...
Creating event 'use 3467'...
Creating event 'use 3480'...
Creating event 'use 3594'...
Creating event 'use 3597'...
Creating event 'use 3665'...
Creating event 'use 3726'...
Creating event 'use 3729'...
Creating event 'use 3730'...
Creating event 'use 3734'...
Creating event 'use 3754'...
Creating event 'use 3755'...
Creating event 'use 3756'...
Creating event 'use 3757'...
Creating event 'use 3758'...
Creating event 'use 3759'...
Creating event 'use 4045'...
Creating event 'use 4046'...
Creating event 'use 4084'...
Creating event 'use 4087'...
Creating event 'use 4116'...
Creating event 'use 4118'...
Creating event 'use 4119'...
Creating event 'use 4120'...
Creating event 'use 4121'...
Creating event 'use 4137'...
Creating event 'use 4210'...
Creating event 'use 4231'...
Creating event 'use 4236'...
Creating event 'use 4251'...
Creating event 'use 4256'...
Creating event 'use 4330'...
Creating event 'use 4331'...
Creating event 'use 4582'...
Creating event 'use 4628'...
Creating event 'use 4698'...
Creating event 'use 4699'...
Creating event 'use 4736'...
Creating event 'use 4867'...
Creating event 'use 5048'...
Creating event 'use 5105'...
Creating event 'use 5120'...
Creating event 'use 5308'...
Creating event 'use 5309'...
Creating event 'use 5327'...
Creating event 'use 5433'...
Creating event 'use 5557'...
Creating event 'use 5560'...
Creating event 'use 5561'...
Creating event 'use 5563'...
Creating event 'use 5678'...
Creating event 'use 5750'...
Creating event 'use 5907'...
Creating event 'use 5983'...
Creating event 'use 5988'...
Creating event 'use 5989'...
Creating event 'use 6278'...
Creating event 'use 6282'...
Creating event 'use 6284'...
Creating event 'skill 15'...
Creating event 'skill 55'...
Creating event 'skill 2022'...
Creating event 'skill 2023'...
Creating event 'skill 3019'...
Creating event 'skill 3022'...
Creating event 'skill 3004'...
Creating event 'skill 3005'...
Creating event 'skill 3007'...
Creating event 'skill 4009'...
Creating event 'skill 6025'...
Creating event 'skill 7010'...
Creating event 'skill 7011'...
Creating event 'skill 7012'...
Creating event 'skill 7013'...
Creating event 'skill 7014'...
Options built! (222 actions)
SmartStasis complete.
You're on your own, partner.
Click here to continue in the relay browser.
 
[ default ]
consult FarmIt.ash
consult wham.ash

where i've imported main() from smartstatis into my farmit.ash script
 
With the smartstasis upgrades regarding extending combats until yellow rays and other killing combats can fire, do I need to update my macro to get the Nanobrawny buff somehow?

PHP:
	// Attempt to get Nanobrawny buff from nanorhino
	if( my_fam() == $familiar[nanorhino] && $familiar[nanorhino].image == "nanorhinoc.gif"){
		// Track the number of nanorhino uses today
		set_property("_nanorhinoUses", get_property("_nanorhinoUses").to_int() + 1);
		//custom[count(custom)] = to_event("skill " + get_combat_skill("muscle").to_int(),"",1);

		macro("skill " + get_combat_skill("muscle").to_int()); // Need to fire this to server before SS tries entangling noodles or some such
	}

Specifically to get Nanobrawny the first move you make in the combat, before entangling noodles etc, is to use a muscle combat move (in my case Toss will be the one selected). However SS/BatBrain are pickpocketing, then using indigo cup, then exiting and execution drops through to WHAM in my CCS posted above. Up until about a week ago Toss was always executed when I had the above code snipped placed right above build_custom() in the smartstasis main() function. Any idea what might have changed?
 
Is anyone else concerned about SmartStasis and the adding machine?

Code:
[588] The Valley of Rof L'm Fao
Encounter: rampaging adding machine
Round 0: cafebabe loses initiative!
Round 1: rampaging adding machine takes 3 damage.
Round 1: rampaging adding machine takes 4 damage.
You lose 8 hit points
 > WHAM: Running SmartStasis
Round 1: cafebabe executes a macro!
Round 1: cafebabe uses the 334 scroll!
Round 2: rampaging adding machine takes 1 damage.
Round 2: rampaging adding machine takes 5 damage.
You lose 8 hit points
Round 2: cafebabe uses the 334 scroll and uses the 30669 scroll!
You acquire an item: 668 scroll
Round 3: rampaging adding machine takes 3 damage.
Round 3: rampaging adding machine takes 4 damage.
You lose 8 hit points
Round 3: cafebabe uses the 33398 scroll!
Round 4: rampaging adding machine takes 3 damage.
Round 4: rampaging adding machine takes 4 damage.
You lose 9 hit points
 > WHAM: Starting evaluation and performing of attack
 > WHAM: We are going to Saucesplash with Wave of Sauce and Saucegeyser
Round 4: cafebabe executes a macro!
Round 4: cafebabe casts WAVE OF SAUCE!
Round 5: rampaging adding machine takes 90 damage.
You gain 19 hit points
You gain 4 Mana Points
You acquire an effect: Burning Soul (duration: 1 Adventure)
Round 5: rampaging adding machine takes 3 damage.
Round 5: rampaging adding machine takes 3 damage.
You lose 9 hit points
Round 5: cafebabe casts SAUCEGEYSER!
Round 6: rampaging adding machine takes 404 damage.
You gain 34 hit points
You gain 8 Mana Points
Round 6: cafebabe wins the fight!

If I am analyzing the fight right the state is:

empty (+334)
334 (+334, +30669, -688)
30669

and when the 33398 is added I should get a 64067 but don't.

Is this a misunderstanding of the mechanics? Is SS being suboptimal because I do have double handed funkslinging?

Later
Code:
[622] The Valley of Rof L'm Fao
Encounter: rampaging adding machine
Round 0: cafebabe loses initiative!
Round 1: rampaging adding machine takes 3 damage.
Round 1: rampaging adding machine takes 5 damage.
You lose 18 hit points
 > WHAM: Running SmartStasis
Round 1: cafebabe executes a macro!
Round 1: cafebabe casts ENTANGLING NOODLES!
Round 2: cafebabe uses the 30669 scroll and uses the 33398 scroll!
You acquire an item: 64067 scroll
Round 3: cafebabe uses the 668 scroll!
 > WHAM: Starting evaluation and performing of attack

Shouldn't it have recognized the 64067 dropped and sling both the 64067 and the 688 to finish the quest? Or is there some operator confusion or a setting I probably have wrong?
 
I thought it was impossible to get a consult script to fight the RAM without Mafia intervening. At least I've never managed without Mafia taking over, and thus the code in WHAM (which I think may have been what fired here) is somewhat untested.
 
@Raven: I've kind of been waiting for the information on this page to get fleshed out more before adding Dread monster knowledge to BatBrain. I'd like to make this information programmatic if possible rather than adding 180 individual monsters to batfactors (6 monsters x 5 elements x 6 kiss levels), since it seems that's what KoL itself does, but I haven't been able to figure out working formulas based on the information available.

@fxer: Hmmm, looks like the enqueue function needs to be aware of Nano-buff acquisition. I'll try to get to that soon -- it's a basically week-long national holiday in Korea this next week (and I've got no trip planned) so I'm hoping to get a lot of the things on my scripting todo list accomplished. I've also added testing the romantic arrow to that list.

@fronobulax: SS does not include any special handling for the adding machine, assuming that you'll just let mafia handle it -- or in Kittycore, that you'll suffer through it manually (though BatMan RE can lessen that suffering). So I'm not sure what happened to you above, but it was not due to SS (despite the "running SmartStasis" message). Based on Winterbay's post, I'd guess this should be taken to the WHAM thread.
 
@fxer: Hmmm, looks like the enqueue function needs to be aware of Nano-buff acquisition. I'll try to get to that soon -- it's a basically week-long national holiday in Korea this next week (and I've got no trip planned) so I'm hoping to get a lot of the things on my scripting todo list accomplished. I've also added testing the romantic arrow to that list.

Thanks a ton as always zarqon, let me know if you need me to experiment with anything to narrow it down
 
Why? Ponder this:

[87220] The Castle in the Clouds in the Sky (Top Floor)
Encounter: Steampunk Giant
Round 0: <player> wins initiative!
Round 1: <player> tries to steal an item!
Round 2: <player> casts STEAL ACCORDION!
You acquire an item: autocalliope
You HAVE to pickpocket on the first round.
You do not have to steal an accordion on the first round. You can steal it on any round.
Success or failure of pickpocket does not prevent you from stealing an accordion on a later round.

When the skill first came out, the WIki was full of bogus misconceptions about it, but, fortunately, it seems to have corrected them.
 
You do not have to steal an accordion on the first round. You can steal it on any round.
Success or failure of pickpocket does not prevent you from stealing an accordion on a later round.

I did not know that! Thanks for correcting me.

Steal Accordion still needs to be added to this script, but it should be added as the first thing AFTER pickpocketing. :D
 
Just wanted to chime in that Pocket Crumbs from the Pantsgiving might make a good stasis move...it costs 0 MP and gives a chance of dropping a nifty item. It delevels, which isn't always desirable, though.
 
Just wanted to chime in that Pocket Crumbs from the Pantsgiving might make a good stasis move...it costs 0 MP and gives a chance of dropping a nifty item. It delevels, which isn't always desirable, though.
Once setup, it's very likely to be chosen often, being cheaper than free. There's so many new skills to setup these days.
 
Doesn't appear that SmartStasis is using flyers for me anymore. Are there special conditions necessary for flyering? (i.e. a stun) Playing as an AT without Accordion Bash could cause this if that's the case.

Code:
[570] The Haunted Wine Cellar (Southwest)
Encounter: skeletal sommelier
Round 0: y2kspy wins initiative!
1 HP costs 0.467μ. ( 158 / 198 )
1 MP costs 3.448μ. ( 273 / 278 )
dusty bottle of Marsala (20.0 @ +187.62): 225μ * 57.52% = 129.43
dusty bottle of Merlot (20.0 @ +187.62): 237μ * 57.52% = 136.33
dusty bottle of Muscat (20.0 @ +187.62): 240μ * 57.52% = 138.06
dusty bottle of Pinot Noir (20.0 @ +187.62): 230μ * 57.52% = 132.31
dusty bottle of Port (20.0 @ +187.62): 200μ * 57.52% = 115.05
dusty bottle of Zinfandel (20.0 @ +187.62): 220μ * 57.52% = 126.55
ATT: 300 (6% × 16.69, death in 158)
DEF: 292 (8.59% × 84 (48), win in 39)
HP: 317, Value: 1,674.6 μ, RES: 0 (-1) (1) (-1)
Parsed round number: 1
Attack action chosen: skill 3005 (round 1, profit: -21.16)
Stun action chosen: skill 3004 (round 1, profit: -10.34)
Stasis action chosen: skill 6025 (round 1, profit: -0.47)
Attack action chosen: skill 3005 (round 1, profit: -21.16)
dusty bottle of Marsala (20.0 @ +187.62): 225μ * 57.52% = 129.43
dusty bottle of Merlot (20.0 @ +187.62): 237μ * 57.52% = 136.33
dusty bottle of Muscat (20.0 @ +187.62): 240μ * 57.52% = 138.06
dusty bottle of Pinot Noir (20.0 @ +187.62): 230μ * 57.52% = 132.31
dusty bottle of Port (20.0 @ +187.62): 200μ * 57.52% = 115.05
dusty bottle of Zinfandel (20.0 @ +187.62): 220μ * 57.52% = 126.55
1 HP costs 0.467μ. ( 158 / 198 )
1 MP costs 3.448μ. ( 273 / 278 )
WHAM: Checking to see if WHAM sould adjust the unknown_ml for skeletal sommelier.
WHAM: No need to do anything with skeletal sommelier.
WHAM: Setting up variables via BatBrain
dusty bottle of Marsala (20.0 @ +187.62): 225μ * 57.52% = 129.43
dusty bottle of Merlot (20.0 @ +187.62): 237μ * 57.52% = 136.33
dusty bottle of Muscat (20.0 @ +187.62): 240μ * 57.52% = 138.06
dusty bottle of Pinot Noir (20.0 @ +187.62): 230μ * 57.52% = 132.31
dusty bottle of Port (20.0 @ +187.62): 200μ * 57.52% = 115.05
dusty bottle of Zinfandel (20.0 @ +187.62): 220μ * 57.52% = 126.55
ATT: 300 (6% × 16.69, death in 158)
DEF: 292 (8.59% × 84 (48), win in 39)
HP: 317, Value: 1,674.6 μ, RES: 0 (-1) (1) (-1)
Parsed round number: 1
WHAM: You have no profitable MP restoratives.
WHAM: You have no profitable HP restoratives.
WHAM: Monster HP is 317.0.
WHAM: Attack option chosen: skill 3005 (round 1, profit: -21.16)
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase; Fancypants Scarecrow (0μ)0μ--
WHAM: Stasis option chosen: skill 6025 (round 1, profit: -0.47)
WHAM: Attack option chosen: skill 3005 (round 1, profit: -21.16)
WHAM: SmartStasis complete.
WHAM: SS did not finish the fight, continuing with script execution. 
WHAM: Starting evaluation and performing of attack
WHAM: Attack option chosen: skill 3005 (round 1, profit: -21.16)
WHAM: No need to stun this monster
WHAM: We can't Saucesplash.
Queued: skill 3005
WHAM: Attack option chosen: skill 3005 (round 2, profit: -21.16)
Queued: skill 3005
Queued: skill 3005
Parsed round number: 1
WHAM: We can't Saucesplash.
WHAM: Enqueueing Cannelloni Cannon (macroid skill 3005). Estimated damage: 134.0.
Queued: skill 3005
WHAM: Successfully enqueued Cannelloni Cannon.
WHAM: We can't Saucesplash.
WHAM: Enqueueing Cannelloni Cannon (macroid skill 3005). Estimated damage: 134.0.
Queued: skill 3005
WHAM: Successfully enqueued Cannelloni Cannon.
WHAM: We can't Saucesplash.
WHAM: Enqueueing Cannelloni Cannon (macroid skill 3005). Estimated damage: 49.0.
Queued: skill 3005
WHAM: Successfully enqueued Cannelloni Cannon.
WHAM: We are going to 3-shot with Cannelloni Cannon, Cannelloni Cannon and Cannelloni Cannon.
Constructed macro: scrollwhendone; sub batround; if pastround 29; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; endsub; skill 3005; call batround; skill 3005; call batround; skill 3005; call batround; 
Round 1: y2kspy executes a macro!
Round 1: y2kspy casts CANNELLONI CANNON!
Round 2: skeletal sommelier takes 128 damage.
Round 2: y2kspy casts CANNELLONI CANNON!
Round 3: skeletal sommelier takes 138 damage.
Round 3: "Ah yes, fencing!" Tobert says, drawing a foil from... somewhere. "En garde, ye varlet!" he shouts, and starts poking at your opponent, who backs away cautiously.
Round 3: y2kspy casts CANNELLONI CANNON!
Round 4: skeletal sommelier takes 130 damage.
Round 4: y2kspy wins the fight!
You gain 94 Meat
After Battle: "Did I ever tell you of my years spent aboard a pirate ship? Father thought I should learn proper business ethics before I went to work for his firm, you know. I must say I learned a lot about looting booty!" Tobert looks around for hidden treasure, to illustrate his point.
You acquire an item: dusty bottle of average Merlot
You acquire an item: dusty bottle of bad Muscat
You acquire an item: disintegrating cork
You gain 16 Strengthliness
You gain 15 Wizardliness
You gain 49 Smarm
Happened: skill 3005
Happened: skill 3005
Happened: skill 3005
Parsed round number: 0
Look! You found 1 disintegrating cork (50μ)!
Look! You found 1 dusty bottle of Merlot (237μ)!
Look! You found 1 dusty bottle of Muscat (240μ)!
 
Appears that the bug is that the line flyering is:
Code:
      (to_boolean(vars["flyereverything"]) || m.base_attack.to_int() >= 10000 - get_property("flyeredML").to_int()) && !happened(flyer) &&
but the value is
Code:
setvar("BatMan_flyereverything",true);
As such, the vars check should have the BatMan_ prefix added. :)
 
Nevermind, I was confusing -ML with deleveling. It's never a bad thing.

I'd say 99.44% of the time a free delevel is a good thing. The other 56/100ths of the time it's probably because you can't soak a hit (or the hit would cost a lot to heal) or you're fighting something that you shouldn't be using that skill against at the moment. ;)
 
Back
Top