What's in your login/logout scripts?

As you did it, it would balance Adventures vs PvP on a 1:1 scale. Since both give +3 I'm not sure which one it would choose. If you want to prefer PvP to Adventures I'd recommend "Adventures, 1.1 PvP Fights" or if you only care about the jacket, not other PvP gear then use "Adventures +equip Lonely Clubs Club Jacket" to guarantee the jacket will be equipped if you have it.
 
Last edited:
@Bale Lovely... seems bizarre to me that it uses the tiebreaker with the tiebreaker disabled, but I suppose that's part of the way things work.
 
So, the last time I won the raffle, I didn't actually find out until the 3rd day when a friend of mine asked me what I had won. o.O
Haven't had the chance to see if this *actually* works but I added this to my login
Code:
if (contains_text(visit_url("raffle.php"), my_name() )) print("You won the raffle!");

The other thing I've done recently is to add a bountyreport() function that parses the Oblesse Noblige calendar page and prints out today's bounty choices. Now, I realize that should NO go down again, it won't update properly, and there is probably a way to grab the data straight from the BHH page, but I'm not smart enough to figure it out, so what I have works for me.

Code:
void bountyreport() {
	string today = today_to_string();
	string domain   = "http://www.noblesse-oblige.org/calendar/";
	string daily = "daily_"+today+".html";

	string page = visit_url(domain+daily);

	int begin = last_index_of(page,"Bounty Hunter Hunter")+25;
	int end   = index_of(page, "Chez Snoot")-5;

	string scrape = substring(page,begin,end);
	// print ( scrape) ;
	string [int] bounties = split_string( scrape, "<br>" );
	print ("Today's Bounties");
	for i from 0 to 2
		print ( bounties[i] ); }
 
@Bale Lovely... seems bizarre to me that it uses the tiebreaker with the tiebreaker disabled, but I suppose that's part of the way things work.

It only uses the tiebreaker when the slot is empty. I'm not sure if that's a feature or a bug, but it is good to know.
 
I'd like to do some adventures at various places and then use the rest at the gym. I'm just using a text file to run commands through the CLI and adv * gym does not work. Is there an easy way to do that?
 
I'd like to do some adventures at various places and then use the rest at the gym. I'm just using a text file to run commands through the CLI and adv * gym does not work. Is there an easy way to do that?

Mafia doesn't know what zone you want. In the Adventure tab, these zones show up as possibilities:
Gyms: Pump Up Muscle
Gyms: Pump Up Mysticality
Gyms: Pump Up Moxie

Be more specific with the location name.
 
Here are a couple more things I've added to my logout script lately:

1) I added default shower handling, to be used at the end of the day if I forgot or didn't need it.

PHP:
// which shower you should take today
string which_shower() {
   int i = 5*to_int(available_amount($item[double-ice cap]) == 0);     // want hat for MP regen
   if (can_interact() || (in_hardcore() && my_primestat() == $stat[mysticality]))
      i += 7*to_int(available_amount($item[double-ice box]) == 0);     // only want box for HC myst
   if (can_interact()) i += 10 + 7*to_int(available_amount($item[double-ice britches]) == 0);  // pants for tattoo + 10 throwable in aftercore
   if (i - item_amount($item[shard of double-ice]) > 0) return "cold";
   if (can_interact()) return "hot";                                   // in aftercore: get recipes and MP
   switch (my_primestat()) {
      case $stat[muscle]: return "warm";                               // in a run and have desired ice gear: stats!
      case $stat[mysticality]: return "lukewarm";
   }
   return "cool";
}

My mana-burndown section now checks the shower as a possible free restore, in addition to Nuns, PYEC, and free rests. Then later, in the daily buffs section, it makes sure the shower is visited:

PHP:
if (item_amount($item[vip key]) > 0) {
   while (get_property("_poolGames") != "3") cli_execute("pool moxie");
   if (get_property("_aprilShower") == "false") cli_execute("shower "+which_shower());
}

2) I also added a few lines to maintain my Alice's Army cards. It uses all available packs of cards and basically just tries to get one of each card, including foils. Beware: if you use this, all non-unique cards will be turned in for credit.

PHP:
void handle_alice() {   // hahahaha
   boolean needfoil() { for i from 4988 to 5007 if (item_amount(to_item(i)) == 0) return true; return false; }
   if (to_int(get_property("availableStoreCredits")) >= 750 && needfoil())
      visit_url("gamestore.php?action=redeem&whichitem=4987&quantity=1");
   cli_execute("use * Pack of Alice's Army Cards; use * Pack of Alice's Army foil Cards");
   for i from 4967 to 5007 if (item_amount(to_item(i)) > 1)
      visit_url("gamestore.php?action=tradein&whichitem="+i+"&quantity="+(item_amount(to_item(i)) - 1));
}
 
Last edited:
Here's a quick little bit to automatically delete kmails from that neato guy, your pen pal:

PHP:
  // delete penpal messages
   load_kmail();
   string del = "messages.php?the_action=delete&box=Inbox&pwd";
   foreach i,m in mail if (m.fromname == "Your Pen Pal") del += "&sel"+m.id+"=checked";
   if (del.length() > 44) visit_url(del);

Note that you need to be importing ZLib for that to work. Yay load_kmail()!
 
I added something similar to your registry script which runs automatically when I log on. I turned it into a complete mail processing program. Though I only delete Pen Pal (and kBay) messages older than 2 days so that I can read the most recent ones without older messages cluttering my inbox. You'll probably (sorta) recognize the following code:

PHP:
   int lastmess = get_property("Bale_LastMessage").to_int();
   int [int] newmail;
  // process any registry requests
   foreach i,m in mail {
      if (contains_text(m.message,"I have opted to let you know that I have chosen to run ")) {
         if (register_user(m,i+1)) processed[m.id] = true;
      } else {
         if(m.azunixtime > lastmess) newmail[count(newmail)] = i;
         // Remove messages from KBay and Your Pen Pal that are more than 2 days older than the newest message
         else if(m.azunixtime < (mail[0].azunixtime > lastmess? mail[0].azunixtime: lastmess) - 172800
          && (m.fromname == "Your Pen Pal" || (m.fromname == "kBay" && !m.message.contains_text("cashout")))) {
            vprint("Deleting an old message from "+m.fromname, 3);
            processed[m.id] = true;
         }
 
Here's a new entry to my login script. In the interest of improving mall values for all clip art I'm posting it here. Everyone with Summon Clip Art should use this in aftercore:

PHP:
boolean clip_mall() {
	int tomeLeft = 3- get_property("tomeSummons").to_int();
	if(tomeLeft < 1) return false;
	item [int] clip;
	for i from 5224 to 5283
		clip[count(clip)] = i.to_item();
	sort clip by -mall_price(value);
	for i from 0 to tomeLeft - 1 {
		create(1, clip[i]);
		print("Sell "+clip[i]+" for "+mall_price(clip[i]), "blue");
		put_shop(mall_price(clip[i]), 0,  clip[i]);
	}
}

That will create and mall the three highest priced clip arts. For profit and great justice.
 
Last edited:
Nice! That ought to help prevent situations like the one just reported in the BatBrain thread.

I added this little bit to my login script (admittedly for more casual playing, but helps me not forget to get this much-needed Fistcore meat):

PHP:
   if (my_path() == "Way of the Surprising Fist" && have_outfit("harem") && my_adventures() > 0) {
      outfit("harem");
      adventure(1,$location[treasury]);
   }
 
Here's a new entry to my login script. In the interest of improving mall values for all clip art I'm posting it here. Everyone with Summon Clip Art should use this in aftercore:
Funny thing is, if a thousand people use this script the mall price for an item never goes down. I just added a 0.95 multiplier to make sure that I actually help lower prices.
 
*BASIC SCRIPT I WROTE AGES AGO WARNING*


PHP:
buy 4 milk of m
use 4 milk of m
cheapest +hot hi mein; buy 3 it; eat 3 it 
uneffect Ur-Kel's Aria of Annoyance
wait 5

csend 1 meat to sevenlances_com
csend 6 meat to sevenlances_com
csend 7 meat to sevenlances_com
csend 8 meat to sevenlances_com


csend 8 meat to Testudinata
csend 6 meat to Testudinata
csend 7 meat to Testudinata




wait 15

equip tuxedo

buy 5 olive
buy 5 coconut shell
buy 5 bottle of vodka
create 5 cocktail onion
create 5 bottle of Definit
create 5 vodka gibson
drink 4 vodka stratocaster


buy 3 hot wad
buy 3 cold wad
buy 3 twinkly wad
buy 3 stench wad 
buy 3 spooky wad
buy 3 sleaze wad
rest 1 campground
skill 3 rainbow grav

set betweenBattleScript=BetweenBattle.ash
outfit meat
ccs bounty
call bounty.ash 10000




call Nextstep.ash


outfit time
if hot hi mein   > 1; mallsell * hot hi mein 

if prismatic wad  > 1; mallsell * prismatic wad
if coconut shell  > 1; mallsell * coconut shell 
if polka pop  > 1; mallsell * polka pop
if piddles  > 1; mallsell * piddles 
if BitterSweetTarts  > 1; mallsell * BitterSweetTarts 
if disassembled clover  > 1; mallsell * disassembled clover 
if magical ice cubes > 1; mallsell * magical ice cubes
if little paper umbrella  > 1; mallsell * little paper umbrella 
if twinkly wad  > 1; mallsell * twinkly wad  @ 800
if Angry Farmer candy  > 1; mallsell * Angry Farmer candy  @ 400
if Mick's IcyVapoHotness Inhaler  > 1; mallsell * Mick's IcyVapoHotness Inhaler


autosell * thin black candle
autosell * furry fur
autosell * rave whistle
autosell * heavy D
autosell * disturbing fanfic
autosell * original G
autosell * procrastination potion
send * wolf mask to smashbot
send * rave whistle to smashbot
send * Giant needle to smashbot
use * warm subject gift certificate
autosell * plot hole
autosell * probability potion
autosell * Awful poetry journal
autosell * chaos butterfly
autosell * Mick's IcyVapoHotness Rub

wait 20
send * twinkly nuggets to smashbot

Undercut
equip tuxedo
drink 1 vodka gibson
cheapest +vodka stratocaster; buy 1 it; overdrink 1 it 
wait 300

outfit time

exit

Where nextstep is

PHP:
visit_url("clan_viplounge.php?action=crimbotree");
visit_url("clan_viplounge.php?action=pooltable");
visit_url("clan_viplounge.php?preaction=poolgame&stance=3");
visit_url("clan_viplounge.php?preaction=poolgame&stance=3");
visit_url("clan_viplounge.php?preaction=poolgame&stance=3");
cli_execute("equip filthy knitted dread sack");
int doodad = to_int($item[DRINK ME" potion]);
cli_execute("use 1 \u00B6" + doodad);
visit_url("rabbithole.php?action=teaparty ");
visit_url("choice.php?pwd&whichchoice=441&option=1 &choiceform1=Try+to+get+a+seat ");
print("Thanks Slyz", "black");
print ("Bye bye ode", "green");
cli_execute("uneffect ode");
print ("Using that funky funky beat", "green");
cli_execute("use The Legendary Beat");
print ("Hello +ML", "green");
cli_execute("csend 5 meat to zonkttc");
cli_execute("csend 25 meat to KolaBuff");
cli_execute("csend 3 meat to Binary");
print ("Buying raffle tickets", "green");
cli_execute("raffle 4 inventory");
print ("Balls!", "green");
cli_execute("ballpit");
print ("Getting concert buff", "green");
cli_execute("outfit Frat Warrior Fatigues");
visit_url("bigisland.php?place=concert");
visit_url("bigisland.php?action=concert&pwd&option=2");
visit_url("bigisland.php?place=orchard&action=stand&pwd");
visit_url("bigisland.php?place=lighthouse&action=pyro&pwd2");
print ("Friars food blessing", "green");
cli_execute("friars blessing food");
cli_execute("outfit Meat");
//print ("...visiting the Hippy Store...", "green");
//visit_url("store.php?whichstore=h");
print ("Aquiring preternatual greed", "green");
cli_execute ("buy 3 thin black");
cli_execute("summon Bub Bobbobgar");
cli_execute("rest 1 campground");
cli_execute("ccs fight");

print ("Now for the main stuff", "green");
void cast_buff()
{
   outfit( "cast" );
   use_skill( ( ( my_mp() - ( my_maxmp() / 10 ) ) / mp_cost( $skill[Jingle Bells] ) ) , $skill[Jingle Bells] );
   outfit( "meat" );
}

void main()
{
   while( my_adventures() > 0 )
   {
      adventure( 1 , $location[giants castle] );
      if( my_mp() > (my_maxmp() * 0.15 ) )
         cast_buff();
   }
}

I've left this on for about 4ish months
As a result Jingle Jangle Jingle (8,388,571)
Leash of Linguini (985,496)
(I use a stocking mimic for farming)
Now that I have a bit more free time, I may start optimizing this.






*edit*
I'm surprised I haven't seen a "if spectral pickle factory exists, adventure in it" in here.
Or for that sake "if traveling trader shows up buy whatever the hell he has"
*cough* Bale *cough*
 
Last edited:
I'm surprised I haven't seen a "if spectral pickle factory exists, adventure in it" in here.
Or for that sake "if traveling trader shows up buy whatever the hell he has"
*cough* Bale *cough*

Because I only script the stuff that I would always definitely want done under every condition. Your suggestion wouldn't be hard to script, but I wouldn't want it. I probably wouldn't want to adventure in the spectral pickle factory more than a little bit and I would have to look at the TT's item to decide if I want to purchase it and how many I'd want to purchase.
 
just to make sure I always have a buckut of wine available if I can make use of it ...
Code:
void getNightcap() {
// if I have skills summon clip art and ode, am not drunk, and have not got a bucket of wine then create one

	item bucket = $item[bucket of wine];
	if ((have_skill($skill[Summon Clip Art])) 
	&& (have_skill($skill[The Ode to Booze])) 
	&& (inebriety_limit() >= my_inebriety()) 
	&& (item_amount(bucket) == 0)) {
		create(1,bucket);
	} 
}

best regards
Dave
 
That's kinda nice!~ I think I'll borrow it.

I guess you figure that a check for my_level() >= 5 is meaningless since you get there fast enough? I would tuck in a check for my_mp() being greater than 2, just in case.
 
Go wild with adding extra checks if you want to.

For me my first login of a run is on 'day 2', when I am already level 6
The first three bits of clip art per run are done by newlife-local.ash (feature request to come at a later date in that thread :) )

Compared to the version I posted ages back on this thread, my login/logout scripts are now nearly empty,
the mall/display case stuff is now in my pre-ascend.ash with the discard karma code.

best regards
Dave
 
Back
Top