First Things First -- a multipurpose pre-combat consult script

Status
Not open for further replies.
I must have some setting wrong somewhere. With the latest daily build of mafia and latest versions of FTF and BBB scripts, with the one-time putty disabled, monsters are not being puttied while getting a bounty.

I have searched all 34 pages in this forum and still can't get it to work. Maybe I am using a different version of bounty.ash? :confused:

Edit: It was the CCS. Once I got that straighted out it worked.
 
Last edited:
I have been getting an error while trying to do the tavern. When I go to fight a rat things get confuzzled and mafia ends up stopping even though combat is still going on.

Code:
[126] Tavern Cellar (row 3, col 4)
Encounter: drunken rat
Round 0: fleegle wins initiative!
(unable to macrofy due to action: consult FirstThingsFirst.ash)
Checking for updates (running ZLib ver. : 21)...
_version_zlib => : 21
You have a current version of ZLib.
Checking for updates (running First Things First ver. 4.0)...
_version_FTF => 4.0
You have a current version of First Things First.
map_use_for_items.txt => 2009-12-31T23:06:36-06:00, checked 20110109
You have the latest use_for_items.txt. Will not check again today.
Round 1: fleegle tries to steal an item!
You acquire an item: rat whisker
You lose 2 hit points
KoLmafia thinks it is round 3 but KoL thinks it is round 2
KoLmafia thinks it is round 4 but KoL thinks it is round 2
KoLmafia thinks it is round 5 but KoL thinks it is round 2
KoLmafia thinks it is round 6 but KoL thinks it is round 2
KoLmafia thinks it is round 7 but KoL thinks it is round 2
KoLmafia thinks it is round 8 but KoL thinks it is round 2
KoLmafia thinks it is round 9 but KoL thinks it is round 2
KoLmafia thinks it is round 10 but KoL thinks it is round 2

[126] Tavern Cellar
KoLmafia thinks it is round 11 but KoL thinks it is round 2
Can't find faucet or dark squares in the tavern.

I then have to manually fight the current rat and then continue on.
I am using bumcheeky's ascend script when this happens.

Just having mafia adventure in the tavern creates a loop
Code:
Request 1 of 41 (Woods: Tavern Cellar) in progress...

[127] Tavern Cellar
Encounter: The Tavern Cellar

Request 1 of 41 (Woods: Tavern Cellar) in progress...

[127] Tavern Cellar
Encounter: The Tavern Cellar

Request 1 of 41 (Woods: Tavern Cellar) in progress...

[127] Tavern Cellar
Encounter: The Tavern Cellar
 
Last edited:
When it gets stuck, try doing run_combat instead of adventuring again... the combat has to be finished, you don't need to start a new one when it's still fighting.
 
The run-combat works for finishing the current combat just fine.
I ran that command twice then mafia was happy again for a few combats against the rats. Mafia then did what I described earlier. then it was fine for a a bit again and I would do the run-combat once again.
I think this lasted for about 5 combats, but I am not sure about the exact number.
 
Last edited:
I think something may have changed in mafia's handling of CCS recently in non-adventured combats (where the combat is started with visit_url instead), in that only one line of the CCS will run per run_combat. If line one is consult FTF and line two is attack with weapon, it will consult FTF and abort. If you do a run_combat again, it will finish.

My workaround was putting this as the replacement for my main function in Smart Stasis (which runs FTF automatically, so I don't need to consult both):
PHP:
buffer spamact(string whattodo) {
   return visit_url("fight.php?action=macro&macrotext=mark mafiafinal\n"+whattodo+"\ngoto mafiafinal");
}
check_version("SmartStasis","SS","2.6",1715);
void main(int initround, monster foe, string url) {
   round = initround - 1; act(url);
   url = ftf(url);
   if (can_combo()) url = best_combos(url);
   if (intheclear() || is_our_huckleberry()) url = stasis(url);
   else url = spamact("attack");
}
 
I'm currently trying to run hiddencity.ash, have current versions of both zlib and firstthingsfirst, but keep getting this error...help?

Value expected (zlib.ash, line 90)
Consult script 'firstthingsfirst.ash' not found.
You're on your own, partner.
 
Bad location value: "king's chamber" (zlib.ash, line 419)
Consult script 'firstthingsfirst.ash' not found.
You're on your own, partner.
An unexpected error has occurred.

I have an up to date version of zlib, first things first, and mafia. Whatever error is occurring, it's hanging up mafia. My previous post you were correct, I had an old version of mafia. Today though, it's all shiny and new!
 
Change king's chamber to throne room. Or, just get the latest zlib... you don't have an up to date zlib, as that was actually released just after the latest rollover to fix that very issue. :)
 
Unless a new zlib was posted in the past half hour, I do indeed have the latest version. Oddly enough, I'm not even doing anything remotely related to the knob, I was trying to run hiddencity.ash! I'll try the change you suggested and see if that helps. Thanks!

ETA: I must have misclicked when grabbing zlib a little while ago, I just opened it to search for king's chamber and saw "Zlib : 22" brazenly mocking me *cough*. Sorry to waste everyone's time!
 
Last edited:
The current version definitely has this taken care of. Perhaps an older version is lurking elsewhere in your mafia directory; perhaps in a subdirectory (and not only in /scripts). This has been known to happen before.
 
Oddly enough, I'm not even doing anything remotely related to the knob,

Doesn't matter. mafia reads all of zlib and checks it for errors before anything runs. So an error anywhere in the file will get caught, even if it is in a part of the library that you are not calling or using.
 
The new areas are also interfering with macguffin.ash itself. I managed to fix those on my own, 3 location errors for Cobb's Knob just so it's out there :)
 
At last, the last First Things First. As of today's release of SmartStasis 3.0, this script is obsoleted. I will no longer support or update it.

I updated the first post, primarily to alert visitors of this fact, and also to remove version checking since there will be no further updates. The script will remain available here for anyone who (for some reason) prefers to keep using it.

You've had a good run, FTF. And, though it's the closing bracket for you, many of your functions live on in the next generation. You pointed the way towards a brighter tomorrow. You will not be forgotten.
 
Status
Not open for further replies.
Back
Top