Question on batch-Mode

oska

New member
Hi there,

I hope this is the right Forum to ask, didn't find an answer yet.

Is batch_open(), batch_close() only intended to work on loops like foreach $item or does it also help single CLI/ash functions?

I try like use(100,$item[stick of "gum"]); where the gum could also be a volleyball or anything that has no "use multiple" button, could also happen with discard() (I don't see a "discard multiple" either). Should I run such calls in batch-mode or is this something that is handled in use() internal if at all?
 

slyz

Developer
batch_open() and batch_close() allows you to group together commands that benefit from being grouped together.

For example, when you put items in your clan stash or in your mall store, you can put up to 11 different items with only one page load (because KoL's interface allows you to). If you batch several put_stash() or several put_shop() commands, Mafia will group them so they take less requests than if you were adding them one by one.

In the case of discarding or using, there's no benefit from using a batch.
 

oska

New member
Ok, thanks, that was the part missing. So batch only helps on actions that KoL interface itself allows multiple actions. I know the "add another item you want to action" to the number of 11, but didn't combine those two.
 

oska

New member
I already did, but it says "The functions that benefit from being batched include [...]", so I thought, maybe there are other functions, too. ;)

I really would like to fasten up calls like use() or "acquire worthless item", and thought, decreasing server hits might help with that. But as there is no built-in functionality for that, I guess, I'm on the wrong path to look for.

Thanks anyway.

Oska (<- not a Japanese City)
 

Bale

Minion
That's because there is no way to save server hits to "fasten up" those calls. KoL does not support that, so it is impossible for KoLmafia to support it.
 
Top