Login, breakfast, daily deeds and edge cases.

fronobulax

Developer
Staff member
A bunch of questions that are related in my mind.
1) Is there a philosophical or technical reason (as opposed to a lack of developer time) why getting chips from the snack machine is not part of Daily Deeds?
2) Same question but for the BallPit?
3) If I have a login script enabled is it executed before or after mafia does Breakfast? For example if my toaster is in my DC and my login script pulls it, will mafia get toast for breakfast or do I need to use the toaster after I pull it?
4) Suppose my login script contains things I want to do most of the time but not always. A poor example would be I want to visit the BallPit but once in a while I know I want to sewer dive first and so would rather delay visiting the Pit until after the sewer. How do I temporarily disable the login script before it actually gets executed? The safest way would seem to be to temporarily rename it or replace it with a modified version. My preferred solution would be to restrict the login script (when I write it) to things that I want done unconditionally and then use Daily Deeds for those things that are sometimes conditioned on circumstances.

I actually did remember to check the wiki. I liked the Setting Breakfast page but believe my questions are a bit too advanced to actually expect an answer there.

Thanks.
 

Winterbay

Active member
My login script appears to be run after Mafia has breakfasted for me. Cant' really say anything about the rest though :)
 

lostcalpolydude

Developer
Staff member
Not that my views necessarily mean much...

1) Is there a philosophical or technical reason (as opposed to a lack of developer time) why getting chips from the snack machine is not part of Daily Deeds?
Last time I saw it mentioned, Daily Deeds didn't exist, so it was an issue of whether to clutter up Breakfast settings with a setting for that. Mafia already has a server hit to use the klaw machines, so at least in theory it could know whether a chip machine is there without an extra server hit. Not that there needs to be a chip machine to show those buttons, as demonstrated by the pool buttons.

3) If I have a login script enabled is it executed before or after mafia does Breakfast? For example if my toaster is in my DC and my login script pulls it, will mafia get toast for breakfast or do I need to use the toaster after I pull it?
I'm not completely sure about this, but I think mafia would pull the toaster on its own to use it... oh, from your DC. Not that it answers your question, but you could check _toastSummons to see whether it's 0, and use it if so.

4) Suppose my login script contains things I want to do most of the time but not always. A poor example would be I want to visit the BallPit but once in a while I know I want to sewer dive first and so would rather delay visiting the Pit until after the sewer. How do I temporarily disable the login script before it actually gets executed? The safest way would seem to be to temporarily rename it or replace it with a modified version. My preferred solution would be to restrict the login script (when I write it) to things that I want done unconditionally and then use Daily Deeds for those things that are sometimes conditioned on circumstances.
Unchecking Breakfast at the login window doesn't prevent your login script from running?
 

morgad

Member
I wish we had seperate entries for login script (run every login) and breakfast script (run on first login after rollover only) in the breakfast preference tab
 

Bale

Minion
I wish we had seperate entries for login script (run every login) and breakfast script (run on first login after rollover only) in the breakfast preference tab

Hmm... It's a shame that breakfast is run before the login script. If it was reversed you could check get_property("breakfastCompleted") and run the breakfast entries if false. As it is, you'd have to create a preference to determine if the script was run yet today.
 

Veracity

Developer
Staff member
That setting is only set if breakfast runs to completion. If you do not allow MP restoration during breakfast and run out before casting all specified skills, it remains false. That's why you can run breakfast again later and it will cast more skills for you.
 

jasonharper

Developer
You can already do once-per-day things in your loginScript:
Code:
if (get_property("_myBreakfast") == "") {
    print("This message appears once per day, no matter how many times you log in!");
    set_property("_myBreakfast", "done");
}
 

StDoodle

Minion
You can also make use of user_confirm() to handle portions of your breakfast that you may or may not run every day, but would always like to have checked. My breakfast script uses a combination of a custom property, a user_confirm(), a check for my_name(), and a check for can_interact(), such that it only runs on my main, if I tell it to go ahead, and I'm post-prism when I log in. If you really want to fine-tune your control, I'd suggest doing the same, possibly leaving some parts of the script outside of certain checks (you may for example want to do KLAW uses no matter what, most summons on your main every time, Ball Pit only on user_confirm(), etc.).
 
Top