Feature Supporting Combat Macros in CCS

bumcheekcity

Active member
I'd like to be able to do something like this:

Code:
[ default ]
pickpocket
item turtle totem
attack

[ some other monster ]
macro mymacronameinkol

I really should make my bug reports and feature requests more interesting. Here's an interesting fact. A duck's quack DOES echo, and anyone telling you otherwise is a berk.
 
Last edited:

Veracity

Developer
Staff member
I'd like KoLmafia to be able to turn a CCS entry into a temporary combat macro and run the whole fight as one server hit to execute the macro...
 

StDoodle

Minion
That's where I figured you guys would take it eventually, but this is certainly a major enough change that I had no expectations of seeing it done for a good bit yet. But I do look forward to it!

However, I don't even want to try and wrap my head around how consult scripts will end up....
 

jasonharper

Developer
It looks like we're going to be able to specify a script on the initial redirect to fight.php, so all automated fights should be possible to do in 3 pageloads total (assuming that no consult scripts are involved) - adventure.php, fight.php, charpane.php. And it will no longer be necessary for mafia to ever touch your autoattack settings, so all those complaints go away.
 

lostcalpolydude

Developer
Staff member
I don't think most consult scrips can be turned into macros. If they do anything with the monster's current HP, the 2^16 - 1 character limit is probably too prohibitive for the huge number of match statements you would need. It might be possible with some of them, but is it worth the effort for mafia to be able to distinguish when it can be done?
 

slyz

Developer
Regarding consult scripts, I would approach it the other way around: a way to allow a consult script to build and execute a KoL combat macro would be great.
 

bumcheekcity

Active member
I'd like KoLmafia to be able to turn a CCS entry into a temporary combat macro and run the whole fight as one server hit to execute the macro...

I'd have to say that I'd prefer Mafia NOT to do that. Mafia's CCS's can be aborted halfway through, the combat macros can't. Plus, this could be an arse with consult scripts.

slyz's suggestion seems the best :D
 

slyz

Developer
Mafia's CCS's can be aborted halfway through, the combat macros can't.

From the little I read in the kol forum thread, you can abort a combat macro. You can even check for your current HP and MP, so that would be transparent with Mafia's "stop automation if health at X%" settings.
 

lostcalpolydude

Developer
Staff member
Actually, I can't abort a CCS midway through anyway (maybe this should be a bug report of its own). The script button (with the CAB bar on) still says script, and clicking it does nothing. I'm assuming the HP restore/abort settings would be incorporated into the macro. I think it would be disappointing if mafia doesn't make all the lazy castle farmers use fewer server hits.
 
Just checking in that the mafia dev team is on the same page as I that the cost savings in server hits are worth tying mafia into the new macro system.

Cheers!
 

slyz

Developer
Actually, I can't abort a CCS midway through anyway (maybe this should be a bug report of its own).

I thought you meant using 'abort' in a CCS... did you mean frenetically hitting escape when you realized something went wrong? =)
I agree that this is a small price to pay for such a reduction in server hits.
 

StDoodle

Minion
The best aborting you can do with consult scripts is, to the best of my knowledge, aborting to a CCS (which of course could itself abort if needed). What I'd really like to see is a way to "resume" after an abort from a KoLmafia-generated macro. Ie consult script creates macro, macro runs to an abort, then you have the option to run your script again (more like a "pause for confirmation" than a full abort, I guess...).
 

Stardock

Member
Is there a way to call a macro by name in the latest version through an ash script using visit_url or something? Might work as a temporary fix until it's fully implemented.
 

heeheehee

Developer
Staff member
Executing a custom macro ("test") visited:

fight.php?action=macro&macrotext=&whichmacro=1706&macro=Execute+Macro

Presumably you'd change 1706 to reflect your macro's number (visible via view source of Manage Combat Macros). macrotext, I believe, is the option to write macros right on the spot. I'd love a textfield that writes to this value here -- perhaps a simple relay override script?
 

Bale

Minion
Or else you can just not use the macro system until there is some more implementation. Right now it works fine just the way it always has so I'll wait.
 

Bale

Minion
Yeah, I agree. I'm still willing to wait until it's ready for primetime since I'm sure Veracity and jason are not dilly-dallying.
 

slyz

Developer
The best aborting you can do with consult scripts is, to the best of my knowledge, aborting to a CCS (which of course could itself abort if needed). What I'd really like to see is a way to "resume" after an abort from a KoLmafia-generated macro. Ie consult script creates macro, macro runs to an abort, then you have the option to run your script again (more like a "pause for confirmation" than a full abort, I guess...).

When you say "aborting to a CCS", you mean that the consult script simply ends? An abort() would stop Mafia.

I guess that, after a KoL combat macro abort, Mafia would simply pick up the fight just like after any regular round (be it in a consult script or a CCS).

I haven't checked yet what info can be logged after a couple of macro'd rounds, but if you can track monster HP and all the stuff Mafia tracks, we could maybe have Mafia submit CCSs as combat macros up to the round a consult script is called, then consults like SmartStasis
would pick up and build a macro that waits for your familiar to act and aborts, then end to let Mafia submit the next patch of non consult CCS etc...

A simple example:
Code:
1: try to steal an item
2: summon ghost
3: skill entangling noodles
4: item meat vortex
5: consult stasis.ash
6: attack
Mafia would submit a combat macro for actions 1-4, then stasis.ash would call a pre-made combat macro that aborts on a certain condition (or build one on the fly depending on your familiar) and return the hand to Mafia once the combat macro aborts, and Mafia would finish up with a simple "attack;repeat;" combat macro in this case.

I don't know if this is the kind of behavior Jason and Veracity are thinking about, and I have absolutely no idea if it's even remotely possible, so I guess all we can do now is wait and see what nice surprises they have in store for us.

Some more time of round per round combat after years of server abuse won't hurt anyone =)
 
Top