SmartStasis -- a complex script for a simple CCS

fronobulax

Developer
Staff member
Oh Lord, Creator of the Universe and Ruler of All Things,

We ask that you look with favor upon those technicians engaged in the repair of Zarqon's laptop. We ask that you grant them the wisdom and skill to repair it quickly and with no loss of data. We ask that it be returned to him "as good as new" and as soon as possible.

Amen.

:)
 

Theraze

Active member
As good as new doesn't mean in a brand new form... it means that it works as well as it originally did. :) Data loss is not necessarily a requirement for it. So I vote in facor of no loss of data as well.
 

jwylot

Member
Hmmm......just noticed this with mafia r9350 and zlib r27/SS 3.3.
Code:
Evaluator syntax error: can't understand monsterlevel/6.66
Evaluator syntax error: can't understand monsterlevel/6.66
map_use_for_items.txt => 2009-12-31T23:06:36-06:00, checked 20110526
You have the latest use_for_items.txt. Will not check again today.
 

Winterbay

Active member
That would be because the variable "monsterlevel" isn't defined anywhere.
Adding a
Code:
fvars["monsterlevel"] = (m == last_monster() ? monster_attack() : monster_attack(m))
somewhere after the definiton of m should solve it I guess.
Unequipping the saccarine maple pendant will make the problem not visible so not a problem :)
 

Winterbay

Active member
The experimental BatBrain is definitely buggy. At the very least m_dpr(0,0) is not working properly. My batround says if hpbelow 258; abort "BatBrain abort: Danger, Will Robinson"

That's a problem because my max_hp() is only 99. ;)

Switching back to the released version I get if hpbelow 41; abort "BatBrain abort: Danger, Will Robinson" which works much better.

I know it is an experimental build, but consider this fair warning to anyone who wants to check it out now.

Comparing the released version (v1.0) and the experimental version (v1.1) the only difference between the two versions of m_dpr() is what slyz posted in post 1000, and an additon of something in the slimetube. I cannot see that this would make it this strange. I'll get back to you when I get to the macro bit because it could be there that the problem is...
 

zarqon

Well-known member
I already fixed jwylot's issue -- just changed the formulas to use monsterattack. Good enough for government business.

It'll be a while on the laptop -- the guy at the shop thought there was nothing wrong with it, but he tested it cold. I tried to explain that it was an overheating problem. Anyway, I found some tutorials on how to fix the issue, so I'm going to give it a shot myself, but I need to order some parts first. In the meantime I'll try to at least get a fully operational SS finished on my little netbook and post it. Thanks for your patience (and even prayers) everyone.
 

fronobulax

Developer
Staff member
Thanks for your patience (and even prayers) everyone.

You're welcome.

If it helps put the repair shop into perspective, I had an overheating problem with a Dell laptop that caused disk corruption in the boot sector. Dell's diagnostics pointed a finger at the disk. Dell said the disk needed to be replaced and it would cost me since it was one day after they claimed the warranty ended. (Nevermind that they dated the warranty from the ship date so it wasn't a warranty for a year of use/possession). In the process of attempting to recover the data (using a Linux Live CD) I replaced the MBR and the system would boot again. The overheating became manageable when I started using the computer on a lapboard (rather than directly in a lap. Seems baggy pants were blocking an air vent). The system worked until other factors led to its replacement by a non-Dell system.

Point being, your tech is probably just following a script.
 

Magus_Prime

Well-known member
I'm testing SmartStasis in BeeCore and whenever I enable it I receive a series of errors like this "Evaluator syntax error: expected ), found". It looks like there's a parenthesis missing somewhere but I haven't figured out where yet.

Here is what I get when I set zlib verbosity to 10:

Code:
[1508] Sleazy Back Alley
Encounter: rushing bum
Round 0: Arbos wins initiative!
Round 1: Lefty latches onto your opponent's face with his wriggling tentacles.
Round 1: rushing bum drops 12 attack power.
Round 1: rushing bum drops 12 defense.
Checking for updates (running BatBrain ver. 1.0)...
_version_batbrain => 1.0
You have a current version of BatBrain.
map_pluralMonsters.txt => 2011-02-28T13:05:11-06:00, checked 20110601
You have the latest pluralMonsters.txt. Will not check again today.
1 MP costs 4.6511626 μ.
1 HP costs 1.3953488 μ.
bum cheek (30.0 @ +45.0): 200μ * 43.5% = 87.0
Mad Train wine (30.0 @ +45.0): 29μ * 43.5% = 12.615
moxie weed (15.0 @ +45.0): 100μ * 21.75% = 21.75
dented harmonica (15.0 @ +45.0): 12μ * 21.75% = 2.61
Value of stat gain: 10μ
map_batfactors.txt => 2011-05-29T07:31:06-05:00, checked 20110601
You have the latest batfactors.txt. Will not check again today.
Checking for updates (running SmartStasis ver. 3.3)...
_version_SS => 3.3
You have a current version of SmartStasis.
bum cheek (30.0 @ +45.0): 200μ * 43.5% = 87.0
Mad Train wine (30.0 @ +45.0): 29μ * 43.5% = 12.615
moxie weed (15.0 @ +45.0): 100μ * 21.75% = 21.75
dented harmonica (15.0 @ +45.0): 12μ * 21.75% = 2.61
Value of stat gain: 10μ
Monster value: 133.98
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Profit per round: ActionProfitDamageOtherbase; Pair of Ragged Claws (0μ)0μ6.25 Actual: 1 (0 MPD)
Building options...
Evaluating '45*loc(chasm)'...
Evaluating '1.5*(5.5+min(0.07*171.0,15)+min(10.0,25)+0.0)'...
Evaluating '1.5*(12+min(0.15*171.0,20)+min(10.0,40)+0.0)'...
Evaluating '1.5*(28+min(0.25*171.0,30)+min(10.0,60)+0.0)'...
Evaluating '1.5*(2.5+min(10.0,5)+0.0)'...
Options built! (41 actions)
Building custom actions...
map_use_for_items.txt => 2009-12-31T23:06:36-06:00, checked 20110601
You have the latest use_for_items.txt. Will not check again today.
Custom actions built! (0 actions)
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
Stasis action chosen:
ActionProfitDamageOtherThrow 1316 (0μ)0μ--
Evaluating 'max(2,(25.0/2)'...
Evaluator syntax error: expected ), found
This monster is not your huckleberry.
Round 1: Arbos attacks!
Round 2: rushing bum takes 154 damage.
Round 2: Lefty snaps at your opponent with his sharp claws, dealing 11 (+7) damage.
Round 2: rushing bum takes 18 damage.
Round 2: Arbos wins the fight!
You acquire an item: moxie weed
You gain 1 Muscleboundness
You gain 3 Enchantedness
You gain 1 Sarcasm
 

Theraze

Active member
Well, the issue is with... probably your familiar. This is the line in batfactors.txt:
Code:
fam 103 Pair of Ragged Claws max(2,({2,fweight/2,fweight}) physical rate 0.5
Notice how many left parenthesis there are... 2... and right parenthesis.. 1. Put another right parenthesis after the }) and it should run fine again. :)
 

zarqon

Well-known member
Fixed.

Theraze, if you find errors in batfactors.txt, you could help the problem get resoved sooner by uploading the fix to the Map Manager yourself.

@slyz: No, the computer with the car around it is back in the States. :)
 

Theraze

Active member
Theraze, if you find errors in batfactors.txt, you could help the problem get resoved sooner by uploading the fix to the Map Manager yourself.

Yeah, one of these days I'll actually remember to, well, remember how to do that. :)
 

Magus_Prime

Well-known member
Theraze: That was the problem alright. What pointed you towards the familiar entry in batfactors.txt as the issue? I was looking in SmartStasis.ash and Batbrain.ash.

Thank you!
 
Last edited:

Winterbay

Active member
Because all the "evaluating...." lines are basically interpreting what is in batfactors.txt and so an error is most likely to be caused by an error in said file.
 

zarqon

Well-known member
3.4 Updates!

Two big things to talk about here. One is a feature and one is an excuse. First, the excuse:

(A Cautionary Tale.)

It took me longer than I expected to spin this release because I ran into a nasty bug that was very hard to track down. For moxie classes which got the jump, and their pickpocket attempt(s) failed, and SS took no further actions, suddenly it was "You're on your own, partner." No other information provided, even at verbosity 9.

Huh? I clicked to show the fight in the relay browser, but that never actually works for me -- it showed the page where I got the jump on the monster, despite having already submitted a pickpocket macro. So I tried various things, and finally after adding some more debug statements I discovered that the error evidently happened after SS was done -- the print statement which was the last line of code in SS printed just fine, and then the mysterious error -- but only under those specific circumstances! What?! Does that mean the problem is after SS or not?

The following action in my CCS was simply "consult spamattack.ash" -- so I tried changing that to regular "attack" but the problem persisted. Finally I had another clue - in cases where an action was queued up after pickpocketing, if the pickpocket attempts failed, that action would not get performed! So the problem was in the macro. I'd read somewhere that you could submit "pickpocket" in BALLS without even having it available, and it would be automatically skipped -- but evidently it caused the macro to abort, which must have then caused mafia to abort when the script was finished and it saw KoL's abort message on the page.

So the upshot is that the macro wised up -- pickpocketing is never attempted unless it's actually available. No more mysterious aborts, and no more post-pickpocket skill/item failure. Also, it looks a little cleaner.

An error message explaining why automation halted would have been nice -- perhaps I'll request that if I run into a similar problem later.

A Feature

SS now includes some support for summoning mayflies. Right now it's only sensitive to location:

  • Treasury, Slime Tube, Town Square: always summons for meat/goodies
  • Degrassi Knoll: summon if any of the items you may get are a goal (or part of a goal).
  • South of the Border: summon if any of the chewing gums you may get are goals.
  • Fantasy Airship: summon for stats if your level is less than 13.
  • Hole in the Sky: summon for free stars/lines if you have any star items as goals.
  • Pantry and Kitchens: summon for extra food drops if the monster drops food items which are goals (or contain goals, or are parts of goals).

Regardless of all of the above logic, SS will always summon if you're running out of turns to be able to use all your daily summonses.

Enjoy this update! I'm very relieved to have the first-post script not contain known evil anymore.
 

lostcalpolydude

Developer
Staff member
I'd read somewhere that you could submit "pickpocket" in BALLS without even having it available, and it would be automatically skipped -- but evidently it caused the macro to abort, which must have then caused mafia to abort when the script was finished and it saw KoL's abort message on the page.
Strange, since I have a farming macro where the first line is "pickpocket" that I use even when I'm not a moxie class (and unable to pickpocket any other way), and it runs just fine.
 
Top