Page 1 of 8 1 2 3 ... LastLast
Results 1 to 10 of 75

Thread: What's in your login/logout scripts?

  1. #1
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,163

    Default What's in your login/logout scripts?

    I'm curious what other people do in their login and logout scripts? Assuming that mafia's "breakfast" feature is not good enough for them, of course.

    One thing that I use login/logout for is to account for different characters having different tomes and librams.

    Then I want the libram available for manaburning during the run without having to spend all my mana on libram casting during breakfast. (The same option controls both behaviors.) To do that I set the breakfast option for libram casting during the login script (after breakfast has run) and then disable libram casting during the logout script.

    I have my login script remove the sword behind inappropriate prepositions and my logout script maximize adventures if I am overdrunk. That way I don't get stuck saying weird things in chat.

    Does anyone else have clever tricks like that to share? Here are my login and logout scripts:

    LoginScript:
    PHP Code:
    void improve_spirits() {
        if(
    stills_available() < 1)
            return;
        
    item [itemupgrade;
        
    upgrade[$item[bottle of gin]] = $item[bottle of Calcutta Emerald];
        
    upgrade[$item[bottle of rum]] = $item[bottle of Lieutenant Freeman];
        
    upgrade[$item[bottle of tequila]] = $item[bottle of Jorge Sinsonte];
        
    upgrade[$item[bottle of vodka]] = $item[bottle of Definit];
        
    upgrade[$item[bottle of whiskey]] = $item[bottle of Domesticated Turkey];
        
    upgrade[$item[boxed wine]] = $item[boxed champagne];
        
    upgrade[$item[grapefruit]] = $item[tangerine];
        
    upgrade[$item[lemon]] = $item[kiwi];
        
    upgrade[$item[olive]] = $item[cocktail onion];
        
    upgrade[$item[orange]] = $item[kumquat];
        
    upgrade[$item[soda water]] = $item[tonic water];
        
    upgrade[$item[strawberry]] = $item[raspberry];
        
    upgrade[$item[bottle of sewage schnapps]] = $item[bottle of Ooze-O];
        
    upgrade[$item[bottle of sake]] = $item[bottle of Pete Sake];

        
    item best;
        
    int profit 0;
        
    int test_profit;
        foreach 
    key in upgrade {
            if(
    historical_age(upgrade[key])>1mall_price(upgrade[key]);
            if(
    historical_age(key)>1mall_price(key);
            
    test_profit historical_price(upgrade[key]) - historical_price(key);
            if(
    test_profit profit) {
                
    best key;
                
    profit test_profit;
            }
        }

        print(
    "Creating " stills_available()+ " " +upgrade[best]+ " to sell @ "+historical_price(upgrade[best]), "blue");
        
    retrieve_item(stills_available(), best);
        
    create(stills_available(), upgrade[best]);
        
    put_shop(historical_price(upgrade[best]), 0,  upgrade[best]);
        
    #cli_execute("mallsell * "+ upgrade[best]+ " @ "+ historical_price(upgrade[best]));
    }

    void gravitate() {
        
    int rainbowLeft;
        
    boolean noSummonsLeft() {
            
    rainbowLeft get_property("prismaticSummons").to_int();
            return 
    rainbowLeft 1;
        }
        if(!
    have_skill($skill[Rainbow Gravitation]) || noSummonsLeft()) return;
        foreach 
    key in $items[twinkly wadhot wadcold wadspooky wadstench wadsleaze wad]
            
    retrieve_item(rainbowLeftkey);
        
    use_skill(rainbowLeft$skill[rainbow gravitation]);
    }

    void cast_tome() {
        
    string tome "";
        if(
    have_skill($skill[Summon Snowcones]))         tome "Summon Snowcones";
        else if(
    have_skill($skill[Summon Sugar Sheets])) tome "Summon Sugar Sheets";
        else if(
    have_skill($skill[Summon Stickers]))     tome "Summon Stickers";
        if(
    tome != ""cli_execute("cast * "+tome);
    }

    string libram "";
    if(
    have_skill($skill[Summon Party Favor]))       libram "Summon Party Favor";
    else if(
    have_skill($skill[Summon BRICKOs]))      libram "Summon BRICKOs";
    else if(
    have_skill($skill[Summon Candy Hearts])) libram "Summon Candy Hearts";
    else if(
    have_skill($skill[Summon Love Song]))    libram "Summon Love Song";

    if(
    get_property("_loginScript") != "dayStarted") {
        if(
    can_interact()) {
            
            
    cli_execute("chips radium, ennui, wintergreen");
            
    improve_spirits();
            
    gravitate();
            
    cast_tome();
        
        }
        
    set_property("_loginScript""dayStarted");
    }

    if(
    libram != "") {
        if(
    can_interact()) set_property("libramSkillsSoftcore"libram);
        else 
    set_property("libramSkillsHardcore"libram);
    }

    if(
    have_equipped($item[sword behind inappropriate prepositions])) {
        print(
    "Removing the pesky sword to save your prepositions.""blue");
        
    equip($slot[weapon], $item[none]);

    logout script:

    PHP Code:
    set_property("libramSkillsSoftcore""none");
    set_property("libramSkillsHardcore""none");

    if(
    my_inebriety() > inebriety_limit())
        
    cli_execute("maximize adv, switch disembodied hand"); 
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  2. #2
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    Here are mine. They are most likely not everything they could be but they are a work in progress so (any comments are very welcome)

    Login:
    PHP Code:
    import <bafh.ash>

    if (
    my_name() == "molman")
    {
        if(
    my_inebriety() <= inebriety_limit())
        {
            
    cli_execute("meat 100000");
            
    adv1(to_location("Giant's Castle"),-1,"");
            
    cli_execute("farm");
        }
        else
        {
            print(
    "You are way too drunk to farm. Come back tomorrow.");
        }
    }
    else if(
    my_name() == "Winterbay")
    {
        if(
    in_bad_moon() && in_hardcore())
        {
        }
        else
        {
            if(
    my_class() == to_class("Sauceror") && get_property("lastNemesisReset") == get_property("knownAscensions"))
            {
                if (
    user_confirm("Do you want to gather slimes?"))
                {
                    
    string test;
                    for 
    i from 1 to 10
                    
    {
                        
    test visit_url("volcanoisland.php?pwd&action=npc&subaction=getslime");
                        if (
    contains_text(test,"Maybe tomorrow"))
                        {
                            print(
    "You've already received your slimes for today, stopping");
                            exit;
                        }
                    }
                }
            }
            if(
    user_confirm("Do you want to jump to BAfH?"))
            {
                
    int origin origin_clan();
                
    goto_clan(90485);
                
    visit_vip("crimbotree get");
                
    visit_vip("glass");
                
    visit_vip("pool 3");
                
    visit_vip("pool 3");
                
    visit_vip("pool 3");
                
    visit_vip("ballpit");
                
    goto_clan(origin);
            }
        }

    Logout:
    PHP Code:
    # Logout script for Molman and Winterbay

    record itemprice
    {
        
    item name;
        
    int price;
        
    boolean highest;
    };

    void buy_wine()
    {
        
    itemprice[intwines;
        
    int[inthigh;
        
    high[0] = 0;
        
    high[1] = 0;
        
    high[2] = 0;
        for 
    i from 1575 to 1586
        
    {
            
    wines[i-1574].highest false;
            
    wines[i-1574].name to_item(i);
            
    wines[i-1574].price mall_price(to_item(i));
            
    high[1] = max(wines[i-1574].price,high[0]);

            if ( 
    high[0] < high[1])
            {
                
    wines[i-1574].highest true;
                
    high[0] = high[1];
                if ((
    high[2] != (i-1574)) && high[2] == 0)
                {
                    
    high[2] = i-1574;
                }
                else if (
    high[2] != (i-1574))
                {
                    
    wines[high[2]].highest false;
                    
    high[2] = i-1574;
                }
            }
        }
        foreach 
    index in wines
        
    {
            if(
    wines[index].highest)
            {
                print(
    "The most expensive drink is " wines[index].name " with a value of " wines[index].price);
                print(
    "Creating 1 " wines[index].name);
                if(
    create(1,wines[index].name))
                {
                    print(
    "Putting drink in store");
                    
    put_shop(0,0,wines[index].name);
                }
                else
                {
                    print(
    "That did not work as expected.");
                    
    wait(5);
                    
    //put_shop(0,0,wines[index].name);
                
    }
            }
        }
    }

    if(
    my_name() == "molman")
    {
        if(
    item_amount(to_item("pumpkin"))>0)
            
    put_shop(0,0,to_item("pumpkin"));
        if(
    item_amount(to_item("\"DRINK ME\" potion"))>0)
            
    put_shop(0,0,to_item("\"DRINK ME\" potion"));
        while (
    stills_available() > 1//Mix superdrinks
        
    {
            
    cli_execute("meat 1000");
            
    buy_wine();
        }
        
    cli_execute("undercut");
    }
    else if(
    my_name() == "winterbay")
    {
        if (
    my_class() == to_class("Sauceror") && can_interact())
        {
            
    string test;
            
    int i 1;
            while ((
    11) && (my_adventures() > 0))
            {
                
    test visit_url("volcanoisland.php?pwd&action=npc&subaction=getslime");
                
    1;
                if (
    contains_text(test,"Maybe tomorrow"))
                {
                    print(
    "You've already received your slimes for today, stopping");
                    
    11;
                }
            }
        }
        
    cli_execute("maximize adv");


  3. #3
    Senior Member
    Join Date
    Jan 2010
    Posts
    692

    Default

    This is my login script and it runs basically until I log out. Have fun figuring it out.
    PHP Code:
    import <mutex.ash>
    import <time.ash>

    set_property("mainbot","Ominous Buffer");
    set_property("selfname","TTang");
    set_property("admin","Almighty Sapling");
    int burnMinutes=20;
    int logMinutes=2;
    string botScript="chat.ash";

    void earlyOut(){ 
     
    unlockMutex("_break");
     
    print_html("<b><font color=000000>Entering runlevel: </font><font color=FF0000>0</font></b>");
     
    set_property("chatbotScript","");
     
    cli_execute("maximize adv -tie");
     if(!(
    mutexFree("_abortNow")))cli_execute("exit");
     exit;
    }

    record ticket {
        
    boolean[intnumbers;
        
    int meganumber;
        
    int player;
        
    int ticketId;
    };
    record bookst {
     
    int cJackpot;
     
    int nJackpot;
     
    int clanCut;
     
    int myCut;
     
    ticket lastWeek;
    };

    int jackpots(){
     
    bookst[intBOOKS;
     
    file_to_map("jbooks.txt",BOOKS,true);
     return 
    BOOKS[1].cJackpot+BOOKS[1].nJackpot+BOOKS[1].myCut+BOOKS[1].clanCut;
    }

    void cashMeat(){
     
    cli_execute("cleanup");
     
    item needle=$item[giant needle];
     
    string smashBot="csend "+to_string(item_amount(needle))+" "+to_string(needle);
     foreach 
    castle in $items[wolf maskrave whistletwinkly nugget]
     
    smashBot+=", "+to_string(item_amount(castle))+" "+to_string(castle);
     
    smashBot+=" to smashbot || wad";
     
    needle=$item[Warm Subject Gift Certificate];
     use(
    item_amount(needle),needle);
     
    cli_execute(smashBot);
     
    int meatGained=my_meat()-500000-jackpots();
     print(
    "Meat Gained: "+to_string(meatGained),"green");
     
    int donated=meatGained*0.2;
     
    meatGained-=donated;
     
    int pdon=meatGained%2000;
     
    meatGained-=pdon;
     
    donated+=pdon;
     print(
    "To Lotto: "+to_string(donated),"green");
     print(
    "Kept: "+to_string(meatGained),"green"); 
     
    cli_execute("csend "+to_string(donated)+" meat to TTang || donate");
     
    int totalDMS;
     if (
    meatGained<0){
    /*  totalDMS=min(floor((0-1)*meatGained/1000),closet_amount(to_item("dense meat stack")));
      if (totalDMS==0) return;
      take_closet(totalDMS,$item[dense meat stack]);
      autosell(totalDMS,$item[dense meat stack]);*/
     
    }else{
      
    totalDMS=floor(meatGained/2000);
      if (
    totalDMS==0) return;
      
    string exe="make "+to_string(totalDMS*2)+" dense meat stack";
      
    cli_execute(exe);
      
    //put_stash(totalDMS,$item[dense meat stack]);
      
    put_closet(totalDMS,$item[dense meat stack]);
     }
     if (
    my_meat()<300000chat_private(get_property("admin"),"Low Funds");
    }

    void main(){
     print(
    "Starting Bot","red");
     
    unlockMutex("_adventuring");
     
    lockMutex("_abortNow");
     
    string meatfarm_ccs "default";
     
    string meatfarm_fam "leprechaun";

     if (
    get_property("_breakfast")==""){
      
    string rumpus visit_url("clan_rumpus.php");
      
    int camp_mp_gain;
      
    int camp_mp;
      
    int[itemcampground get_campground();
      if (
    campground[$item[Frobozz Real-Estate Company Instant House (TM)]] == 1camp_mp 40;
      else if (
    campground[$item[Newbiesport&#8482; Tent]] == 1) camp_mp = 10;
      
    else if (campground[$item[Barskin Tent]] == 1camp_mp 20;
      else if (
    campground[$item[Cottage]] == 1camp_mp 30;
      else if (
    campground[$item[BRICKO pyramid]] == 1camp_mp 35;
      else if (
    campground[$item[Sandcastle]] == 1camp_mp 50;
      else if (
    campground[$item[House of Twigs and Spit]] == 1camp_mp 60;
      else if (
    campground[$item[Gingerbread House]] == 1camp_mp 70;
      else if (
    campground[$item[Hobo Fortress]] == 1camp_mp 85;
      
    camp_mp_gain camp_mp;
      if (
    campground[$item[pagoda plans]] == 1camp_mp_gain += camp_mp;
      if (
    stat_bonus_tomorrow() == $stat[mysticality]) camp_mp_gain += camp_mp;
      if (
    campground[$item[Beanbag chair]] == 1camp_mp_gain += 30;
      
    set_property("campmp",camp_mp_gain);
      
    int rollmp my_mp();
      
    set_property("rollmp",rollmp);
      if (
    contains_text(rumpus,"rump3_3")){
       
    visit_url("clan_rumpus.php?action=click&spot=3&furni=3");
       
    visit_url("clan_rumpus.php?action=click&spot=3&furni=3");
       
    visit_url("clan_rumpus.php?action=click&spot=3&furni=3");
      }
      if (
    contains_text(rumpus,"rump3_1")){
       
    visit_url("clan_rumpus.php?action=click&spot=3&furni=1");
       
    visit_url("clan_rumpus.php?action=click&spot=3&furni=1");
       
    visit_url("clan_rumpus.php?action=click&spot=3&furni=1");
      }
      if (
    contains_text(rumpus,"rump1_4")) visit_url("clan_rumpus.php?action=click&spot=1&furni=4");
      if (
    contains_text(rumpus,"rump4_2")) visit_url("clan_rumpus.php?action=click&spot=4&furni=2");
      if (
    contains_text(rumpus,"rump9_3")) visit_url("clan_rumpus.php?action=click&spot=9&furni=3");
      if (
    contains_text(rumpus,"rump4_1")) visit_url("clan_rumpus.php?action=click&spot=4&furni=1");
      if (
    contains_text(rumpus,"rump3_2")) visit_url("clan_rumpus.php?preaction=jukebox&whichsong=1");
      if (
    contains_text(rumpus,"rump9_2")){
       
    visit_url("clan_rumpus.php?preaction=buychips&whichbag=1");
       
    visit_url("clan_rumpus.php?preaction=buychips&whichbag=2");
       
    visit_url("clan_rumpus.php?preaction=buychips&whichbag=3");
      }
      if (
    contains_text(rumpus,"ballpit")) visit_url("clan_rumpus.php?action=click&spot=7");
      if (
    get_property("sidequestOrchardCompleted") != "none"visit_url("store.php?whichstore=h");
      if (
    get_property("sidequestArenaCompleted") != "none"visit_url("postwarisland.php?action=concert&pwd&option=2");
      
    retrieve_item(6,$item[supernova champagne]);
      
    drink(6,$item[supernova champagne]);
      
    retrieve_item(1,$item[can of swiller]);
      
    drink(1,$item[can of swiller]);  
      
    set_property("_breakfast""1");
     }
     if (
    mutexFree("_break")){
      
    cli_execute("maximize mp");
      
    cli_execute("maximize mp regen max -tie");
      
    lockMutex("_break");
     }
     
    lockMutex("_forcedOut");
     
    lockMutex("_logoutNow");
     
    int lastCheck=0;
     if (
    get_property("chatbotScript")!=botScript){
      
    waitq(3);
      
    set_property("chatbotScript",botScript);
     }
     print(
    "Initialization Complete","green");
     print(
    "Bot Started","blue");
     if (
    get_property("_autod")==""){
      while (!(
    mutexFree("_logoutNow"))){
       if (
    minutesToRollover()<burnMinutesunlockMutex("_logoutNow"); //requires time patch to reduce hits to server
       
    waitq(2);
       if (
    timeSeconds()-lastCheck>900){
        
    lastCheck=timeSeconds();
        
    cli_execute("call lottoh.ash");
       }
      }
      
    requestMutex("_adventuring");
      
    lockMutex("_logoutNow");
      if (
    mutexFree("_forcedOut")) earlyOut();
      
    cli_execute("maximize meat");
      
    cli_execute("familiar "+meatfarm_fam);
      print(
    "Daily Adventuring","red");
      while (
    my_adventures() > 130){
       
    adventure(1,$location[giant's castle]);
       while((my_mp()+get_property("campmp"))>get_property("rollmp")) use_skill(1,$skill[empathy of the newt]);
      }
      cli_execute("maximize mp");
      cli_execute("maximize mp regen max -tie");
      print("Daily Adventuring Complete","green");
      print("Handling Funds","red");
      cashMeat();
      print("Balance Met","green");
      print("Bot Resumed","blue");
      unlockMutex("_adventuring");
      set_property("_autod","1");
     }
     while (!(mutexFree("_logoutNow"))){
      if ((minutesToRollover()<logMinutes)&&(mutexFree("_adventuring"))) unlockMutex("_logoutNow");
      waitq(2);
      if (timeSeconds()-lastCheck>3600){
       lastCheck=timeSeconds();
       cli_execute("call lottoh.ash");
      }
     }
     earlyOut();

    Muahahaha.

  4. #4

    Default

    Mine were written way back before I knew ash at all, and hence too embarrassing to post. Basically, they just do my daily summoning on login & switch to Brimstone bludgeon & shield and maximize adventures on logout. Both check to make sure I'm aftercore and using my main, of course. But that's about it.
    Before you ask, please check the FAQ.
    Veracity: My "humble opinion" trumps your "humble opinion". IMHO.

  5. #5
    Senior Member Fluxxdog's Avatar
    Join Date
    Nov 2009
    Posts
    1,501

    Default

    My "login" script is my bBS. I have a section dedicated specifically for breakfast however...
    PHP Code:
    if(!to_boolean(get_property("breakfastCompleted"))) {
        if(
    can_interact()) set_property("_startingMeat",my_meat());
        else 
    set_property("_startingMeat",999999999);
        if(!
    in_aftercore()) cli_execute("call checklog");
        
    cli_execute("garden pick");
        if(!
    semirare_aware()) cli_execute("counters");
        
    cli_execute("breakfast");
        
    success_print("Ready for a brand new day!");} 
    This is twoards the end of my bBS and other stuff, like summoning ingredients, comes way before because I use hand-crafted casting scripts. In fact, the options I have enabled in preferences for breakfast are:
    *enable auto-recovery *honor path restrictions (In-Ronin) *clan rumpus & VIP
    *mushrooms *clovers *manual *once-a-day items
    My logout script, I think appropriately named dessert.ash, doesn't get executed at logout. My bBS has a conditional set up so if I'm done adventuring for the day, it calls that script. This way, I can finish up, then stick around and chat:
    PHP Code:
    void sweettooth(){
    cli_execute("call clutterclean.ash");
    # cli_execute("call snapshot.ash"); //Thanks bcc!

    if(possess_cheese()){
        
    gather_the_cheese();
        
    cli_execute("fold stinky cheese diaper");}
    if(
    possess_item("Crown of Thrones"))
        
    cli_execute("enthrone grue");

    if(
    get_property("sidequestNunsCompleted") == "fratboy"){
        
    cli_execute("maximize MP");
        while (
    prop_count("nunsVisits") < 3){
            
    cli_execute("nuns");
            
    summon_nom();}}

    cli_execute("maximize 10000 adventures, MP");

    if (
    can_interact() && didIlearn("Rainbow Gravitation")){
        
    string wad_order;
        foreach 
    flavor in $elements[hot,cold,spooky,stench,sleaze]{
            if(
    have_item(flavor+" wad")<&& have_item(flavor+" nuggets") >= 5){
                
    int ship_out=min(15-(have_item(flavor+" wad")*5),floor(have_item(flavor+" nuggets")/5)*5);
                
    wad_order+=ship_out+" "+flavor+" nuggets,";}}
        if(
    wad_order!=""cli_execute("kmail "+wad_order+" to wadbot || wads");}

    if(
    can_interact() && my_name()!="oldguardmeat"){
        
    good_print("kmailing OGM "+floor((my_meat()-get_property("_startingMeat").to_int())/10)+" meat");
        
    kmail("oldguardmeat","",floor((my_meat()-get_property("_startingMeat").to_int())/10));}
    print(
    "Whew! I'm exhausted!","green");} 
    --
    The worst crime you can commit against another human being is to make them think.

  6. #6
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,666

    Default

    Mine are pretty simple. For one character I pull items from the Display Case on login and return them on logout. This is because I use them in game but want them in the DC when JickenWings does their daily update. For one character I set and clear the property autoSatisfyWithStash because it is a global setting but screws up scripts for the character who cannot access the clan's stash. For all characters, I run a script that looks for their name on the leaderboards.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post
    There are 69 players more powerful than you.
    Originally Posted by Statistics Leaderboards

  7. #7
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,163

    Default

    This is my login script and it runs basically until I log out. Have fun figuring it out.
    Originally Posted by bordemstirs View Post
    Ick. And it is made even harder by the fact that I've never seen mutex.ash. What does your login script do anyway?

    PHP Code:
    int[itemcampground get_campground();
      if (
    campground[$item[Frobozz Real-Estate Company Instant House (TM)]] == 1camp_mp 40;
      else if (
    campground[$item[Newbiesport&#8482; Tent]] == 1) camp_mp = 10;
      
    else if (campground[$item[Barskin Tent]] == 1camp_mp 20;
      else if (
    campground[$item[Cottage]] == 1camp_mp 30;
      else if (
    campground[$item[BRICKO pyramid]] == 1camp_mp 35;
      else if (
    campground[$item[Sandcastle]] == 1camp_mp 50;
      else if (
    campground[$item[House of Twigs and Spit]] == 1camp_mp 60;
      else if (
    campground[$item[Gingerbread House]] == 1camp_mp 70;
      else if (
    campground[$item[Hobo Fortress]] == 1camp_mp 85;
      
    camp_mp_gain camp_mp;
      if (
    campground[$item[pagoda plans]] == 1camp_mp_gain += camp_mp;
      if (
    stat_bonus_tomorrow() == $stat[mysticality]) camp_mp_gain += camp_mp;
      if (
    campground[$item[Beanbag chair]] == 1camp_mp_gain += 30
    I think that what you really want is this single line:

    PHP Code:
    camp_mp_gain numeric_modifier("Base Resting MP") * (numeric_modifier("Resting MP Percent")+100) / 100 numeric_modifier("Bonus Resting MP"); 
    Edit: I don't think that your old code will work anymore anyway. Dwellings were recently taken out of get_campground() and put into get_dwelling() so you need to fix that code.
    Last edited by Bale; 12-10-2010 at 03:52 PM.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  8. #8
    Senior Member mredge73's Avatar
    Join Date
    Dec 2008
    Location
    Houston TX
    Posts
    519

    Default

    Do you guys have any idea on how to turn on and off options in the breakfast panel via script?
    I need some help on a workaround for a clan/cage bot, I would like to be able to run breakfast only if it is possible to run breakfast. Being stuck in the cage is very sensitive to Mafia.
    If I try to do something that cannot be done due to cage restrictions like breakfast, Mafia will get upset and usually abort my script.
    I need to write a breakfast script that can conditionally run Mafia's breakfast subroutines. It looks like there are some properties in the Global_prefs but I didn't think an ash script could modify these.
    If this cannot be done, I will probably do a combination of all of the above scripts.

  9. #9
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,163

    Default

    It looks like there are some properties in the Global_prefs but I didn't think an ash script could modify these.
    Originally Posted by mredge73 View Post
    set_property() will modify those just fine. Enjoy.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  10. #10
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,511

    Default

    My login script:
    • doesn't do anything in-run
    • clanhops to my main clan in case I spend the night in a clan with +advs furniture - thanks Bale
    • removes the sword behind inappropriate prepositions
    • uses stills based on advice by PriceAdvisor (although these days it's obviously always ooze-o, maybe I could remove that part for the time being) - thanks Aqualectrix
    • makes prismatic wads - thanks Bale
    • closets reagents
    • use free mining - thanks That FN Ninja


    My logout script:
    • checks the wand and zaps something if it has not been used today
    • uses Inigo casts to craft gatorskin umbrellas
    • makes prismatic wads
    • checks if the Nun's MP has been used, and summons BRICKOs with it if not.
    • puts on RO gear
    • malls a few items


    On top of this, I use Bale's clanhop to switch to a clan with +adv furniture when loging out.
    Attached Files
    Last edited by slyz; 12-10-2010 at 04:22 PM.
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

Similar Threads

  1. Replies: 6
    Last Post: 01-24-2013, 09:53 PM
  2. Feature - Rejected Separate on-login/logout scripts per character
    By wrldwzrd89 in forum Bug Reports
    Replies: 4
    Last Post: 07-23-2012, 11:31 PM
  3. Replies: 14
    Last Post: 12-12-2011, 06:07 AM
  4. Replies: 0
    Last Post: 11-25-2011, 05:22 AM
  5. Logout Scripts
    By bumcheekcity in forum Scripting Discussion
    Replies: 7
    Last Post: 03-01-2010, 06:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •