I get by with a little help from this forum...

Alex9009

New member
Greetings! I am having trouble, being a beginning scripter, writing a certain line of code in one of my simply wimply cli scripts.

Is there a way to tell mafia to drink my nightcap but only once Ode is received?

The trouble is that I request ode from the buffbots from within the same script so drinking the nightcap with no check of this sort would probably end in THE LOSS OF A FEW ADVENTURES :eek: :eek: :eek: :eek: and I simply won't stand for that.
 

halfvoid

Member
is there a cli command to force mafia to "collect garbage" i've noticed a couple of my scripts i run act funky, freeze up, or crash, whenever the memory usage gets close to a full bar.
 

Alex9009

New member
Try this, after the buff request but before drinking:
while Ode to Booze == 0; wait 60; refresh effects

Cool, so basically that's just looping that command until Ode to Booze does not equal 0? Or is it simply waiting 60 seconds to drink?

Furthermore, could I wait less time? Typically Kolabuff is good about distributing buffs in a timely fashion.

Thanks for the prompt help, it is much appreciated.
 

Spiny

Member
is there a cli command to force mafia to "collect garbage" i've noticed a couple of my scripts i run act funky, freeze up, or crash, whenever the memory usage gets close to a full bar.

button in top right corner I believe.

-Spiny
 

jasonharper

Developer
halfvoid: Garbage collection happens automatically when needed. Forcing it to happen can't possibly make your scripts run any better, there's some other issue there.

Alex9009: It waits until the effect 'Ode to Booze' has other than zero turns remaining, waiting 60 seconds and then refreshing the side pane before each check.

Waiting less time would be a bad idea in the case that the buffbot ISN'T working in a timely fashion - you'd be generating a large number useless server hits. A one-minute check interval seems like a good compromise between getting on with your script, and being polite to other players.
 

Alex9009

New member
This seems as good a place as any to ask another silly question...

Does the * mean "all" when used with the mallsell command? Such as:

mallsell * not-a-pipe @ 6100 limit 0
 

Bale

Minion
Yes. * means ALL in every possible context where it can be used. It can be used anywhere that you can use a number:

autosell * moxie weed
adventure * ballroom

You also might want to know that a negative number means "all but this many". So if you want to keep 1 not-a-pipe for personal consumption...

mallsell -1 not-a-pipe @ 6100 limit 0
 
Last edited:

halfvoid

Member
halfvoid: Garbage collection happens automatically when needed. Forcing it to happen can't possibly make your scripts run any better, there's some other issue there.

that seems about the only time that it happens. i run mafia with my scanners off, typically nothing else but firefox running, and i've got a 3.33g motherboard and 2g or ram. can't see any other reason why it would chug or crash whenever the memory gets full, and it doesn't always auto collect, seems to fill right up to about 64000kb and hang there before crashing. but its not always a problem, but i usually have to restart at least once if i run my main and the two multis.
 

HippoKing

Member
You also might want to know that a negative number means "all but this many". So if you want to keep 1 not-a-pipe for personal consumption...

mallsell -1 not-a-pipe @ 6100 limit 0

This is awesome, how did I not know about this before?
 
Top