aliases

Nice to know! I have been using the google search bar for so long to calculate how many substats left, then I found out we could access the amount of substats in Mafia, and THEN I learn it was under my nose the whole time =)
 
I think it's also in the output of the "status" command, if you preffer CLI (or is that just "to next stat"?).
 
I think it's also in the output of the "status" command, if you preffer CLI (or is that just "to next stat"?).

You should try the status command sometime. It does not contain that information, although it is useful by informing about substats to next stat point.
 
You should try the status command sometime. It does not contain that information, although it is useful by informing about substats to next stat point.

I did try, but I generally don't run mafia at the same time I am on forums.
I also tried earlier, which is how I knew it has some "stats to the next ..."- but forgot to *what*.
 
A couple other handy ones I saw in my aliases that might be worth sharing:

Easily get all your marbles (possibly for the trophy):
marbles => use * tiny cyst; ash for i from 4105 downto 4095 if (item_amount(to_item(i)) == 0 && creatable_amount(to_item(i)) > 0) create(1,to_item(i)); print("Marble Report:","blue"); for i from 4105 downto 4095 if (item_amount(to_item(i)) > 0) print((i-4094)+": "+to_item(i)+" - "+item_amount(to_item(i)));

See what gear you have that restores MP:
restoregear => ash foreach i in get_inventory() if (can_equip(i) && numeric_modifier(i,"MP Regen Min") > 0) print(i+" - "+numeric_modifier(i,"MP Regen Min")+" - "+to_slot(i))

Put X meat in your clan stash:
stashmeat => ash if (contains_text(visit_url("clan_stash.php?pwd&action=contribute&howmuch=%%"),"You contributed")) print(%%+" meat added to the stash."); else print("There was a problem adding meat to the Clan Coffer.","red");
 
marbles? Really? You only need to do that once, right? As for restoregear, I'd just use the modifier maximizer. You're pretty alias-happy!
 
Yeah, except when I'm consuming, I spend most of my time in the CLI or relay browser, weighted towards relay if in HC/Ronin, or towards CLI otherwise. Bots are almost 100% CLI. So, I like having whatever info I need available under my fingertips.

Lists are more useful to me for certain things than the modifier maximizer, because the maximizer chooses the best for each slot, and doesn't show the rest. Sometimes I want whatever enchantment the other (inferior) item has, but don't know it until I see the list.
 
A little alias to help remember how many stars/lines you need in the HiTS:

hits => ashq if(!have_familiar($familiar[star starfish]))print("Starfish: 6s 4l");print("Key ("+item_amount($item[Richard's star key])+"): 8s 7l");print("Hat ("+item_amount($item[star hat])+"): 5s 3l");print("Crossbow ("+item_amount($item[star crossbow])+"): 5s 6l");print("Staff ("+item_amount($item[star staff])+"): 6s 5l");print("Sword ("+item_amount($item[star sword])+"): 7s 4l");print("Currently: "+item_amount($item[star])+"s "+item_amount($item[line])+"l");

Code:
> hits

Key (0): 8s 7l
Hat (5): 5s 3l
Crossbow (4): 5s 6l
Staff (1): 6s 5l
Sword (0): 7s 4l
Currently: 0s 0l
 
What a nice idea! That's almost what I need. However I only care about items I don't have and I don't care about quantity, so...

hits => ashq string [item] hits; hits[$item[Richard's star key]]="8s 7l";hits[$item[star hat]]="5s 3l";hits[$item[star crossbow]]="5s 6l";hits[$item[star staff]]="6s 5l";hits[$item[star sword]]="7s 4l";if(!have_familiar($familiar[star starfish]))print("Starfish: 6s 4l");foreach it in hits if(item_amount(it)<1)print(it+": "+hits[it]);print("Currently: "+item_amount($item[star])+"s "+item_amount($item[line])+"l","blue");
 
You guys are my heroes. Hole in the Sky is one of the few places that I *always* hit the wiki, every damn run. Thanks!
 
In that case, since you only want one of the weapons:

hits => ashq string [int] hits1;string [int] hits2;hits1[665]="8s 7l";hits1[661]="5s 3l";hits2[657]="7s 4l";hits2[658]="5s 6l";hits2[659]="6s 5l";if(!have_familiar($familiar[star starfish]))print("Starfish: 6s 4l");foreach i in hits1 if(item_amount(to_item(i))<1)print(to_item(i)+": "+hits1);boolean sw;foreach i in hits2 if(item_amount(to_item(i))>0)sw=true;if(!sw) foreach i in hits2 print(to_item(i)+": "+hits2);print("Currently: "+item_amount($item[star])+"s "+item_amount($item[line])+"l","blue");

I hope I didn't mess up the $item -> item n° conversion =)

For people who closet their star items, or who pull them, item_amount() can be replaced with available_amount(), but the quantities in storage should probably be differentiated.
 
Last edited:
A small alias I use in order to make sure I have a certain amount of meat on my hand before I do anything, or for that matter not more than a certain amount:

meat => ash int have = my_meat(); int closet = my_closet_meat(); int want = %%; int take = (want - have); int put = take * -1; if(want>have) { if(want>closet) { print("You do not have that much meat, removing all meat from closet"); take_closet(closet); } else take_closet(take); } else if(want<have) put_closet(put); else print("You already have exactly that much meat.");

i.e. given a 0 will closet all your meat and given a large number will just remove all your meat from the closet.
 
hits => ashq string [int] hits1;string [int] hits2;hits1[665]="8s 7l";hits1[661]="5s 3l";hits2[657]="7s 4l";hits2[658]="5s 6l";hits2[659]="6s 5l";if(!have_familiar($familiar[star starfish]))print("Starfish: 6s 4l");foreach i in hits1 if(item_amount(to_item(i))<1)print(to_item(i)+": "+hits1);boolean sw;foreach i in hits2 if(item_amount(to_item(i))>0)sw=true;if(!sw) foreach i in hits2 print(to_item(i)+": "+hits2);print("Currently: "+item_amount($item[star])+"s "+item_amount($item[line])+"l","blue");


Today, this alias informed me:

> hits

star sword: 7s 4l
star crossbow: 5s 6l
star staff: 6s 5l
Currently: 7s 4l

That was very useful. I made a star sword instead of a star crossbow due to an unusual surplus of stars. Thanks sylz.
 
If it does that, it probably means that it detected you already had one... Since for me, it displays the star key and hat and the like, since I don't have them constructed yet.
 
A little bricking alias:

alias sbrick => ashq if(item_amount($item[brick])==0)abort("You don't have a brick to throw");string s="%%";string trim(string str){matcher m=create_matcher("[\\s]*(.+?)[\\s]*$",str);if (m.find())str=m.group(1);return str;}int i=index_of(s,",");if(i<0)abort("You need to add a message!");string n=substring(s,0,i).trim();string m=substring(s,i+1).trim();print("Throwing a brick at "+n+" with the following message: "+m,"purple");string r=visit_url("curse.php?action=used&whichitem=1649&targetplayer="+n+"&curse=0&message="+m);matcher ma=create_matcher("<td>(.+?)</td>",r);if (ma.find())print(ma.group(1));

Simply use the alias like this, separating the player name from the message with a comma:
Code:
> sbrick sham , Une brique dans la tete\nVaut mieux que deux dans les couilles\nOuille, quel desespoir!

Throwing a brick at sham with the following message: Une brique dans la teteVaut mieux que deux dans les couillesOuille, quel desespoir!
You arc the brick through the window of sham's Frobozz Instant House™, shattering it. Then you get back in your Bronco and take off like O.J. Simpson.

EDIT: it now prints the result of the throw.
 
Last edited:
Time for another one of my aliases!

Ever find that the "hatter" command doesn't do as much as you want? Ever think it should tell you if you've already had tea with the hatter? Ever feel that it should take the name of a hat as a parameter and simply get the buff for you? I added a "tea" command that works just like the hatter command PLUS that! Now I don't ever use hatter anymore since "tea" will call it for me.

PHP:
[B]alias tea[/B] => ashq string h = $string[%%]; boolean tea = get_property("_madTeaParty").to_boolean(); if(h == ""){cli_execute("hatter"); if(tea) print("You've already partied today!"); else print("Tea + Parties = Teh Win! Go party today."); exit;} void out(string p){print(p, "red"); exit;} if(tea) out("You've already drunk tea today. Do some adventuring!"); item hat = h.to_item(); if(hat.to_slot() != $slot[hat]) out(h+" is not a hat!"); if(item_amount(hat) < 1) out("You don't have a "+hat); if(have_effect($effect[Down the Rabbit Hole])< 1){if(item_amount($item["DRINK ME" potion ]) < 1) out("You need a \"Drink Me\" Potion to drink tea!"); else use(1, $item["DRINK ME" potion ]);} item old_hat = equipped_item($slot[hat]); equip(hat); visit_url("rabbithole.php?action=teaparty"); visit_url("choice.php?pwd&whichchoice=441&option=1&choiceform2=Try+to+get+a+seat"); equip(old_hat);

Code:
[COLOR="#808000"]> tea stainless steel skull[/COLOR]

Using 1 "DRINK ME" potion...
You acquire an effect: Down the Rabbit Hole (duration: 20 Adventures)
Finished using 1 "DRINK ME" potion.
Putting on stainless steel skullcap...
Equipment changed.
You acquire an effect: Dances with Tweedles (duration: 30 Adventures)
Putting on beer helmet...
Equipment changed.

There are 4 or 5 steps to getting my tea on. It's nice to have a simple alias that takes care of that for me.
 
Last edited:
Back
Top