Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 31

Thread: -Request- Breakfast functionality/collecting "free" items

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    5

    Default -Request- Breakfast functionality/collecting "free" items

    Hi,

    I'm not sure if this is the right section for this, but there are four things that I'd really like scripted or included in KoLMafia.

    1) Shake tea tree on login/breakfast. Or ideally have a breakfast preference for shaking/picking a tea.
    2) Select my three aftercore clip-art summons during breakfast.
    3) Collect my three free gene tonics during breakfast.
    4) Select my 3 favoured deck of every card cards on login/breakfast.

    If anyone can script this (or include it in KoLMafia) I'll pay 5 million meat per thing. (I realise this isn't much, but I'm quite meat-light right now. If need be I'm sure I can sort out a better reward!)

    Thanks in advance, and apologies if this is inappropriate for this forum.

  2. #2
    Developer
    Join Date
    Aug 2009
    Posts
    2,598

    Default

    Save the following as a .txt in your scripts folder (modifying individual parts as needed), where Mafia is located (assuming Windows; Linux and OS X "install" to specific directories):
    Code:
    teatree shake
    create borrowed time, potion of the field gar, potion of punctual companionship
    camp dnapotion 3
    cheat spades
    cheat laboratory
    cheat wands
    Then set it as your loginScript: General -> Preferences -> Automation -> On Login: whateverTheScriptIsCalled.txt
    (Mafia will look for said script in its search path)

    edit: if you instead wanted to pick a specific tea, you could use "teatree royal". If you wanted to do anything fancier than this, you'd probably want to switch over to an ASH script, but there's typically no need when you simply need to perform a sequence of actions.

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

    Default

    2) and 4) will probably never be mafia options. They require some kind of user choice - your favored choices might not be mine, and my choices may differ based on path, for example - so just hardwiring something is not going to work. Making the choices configurable is a lot harder than creating a script as the obvious choice for a Dev is to let a script do it. I think there are ash commands for 1, 2 & 4 so scripting should not be too hard. Bale wrote a script that decided what to summon based upon mall prices. That could be adapted.
    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

  4. #4
    Junior Member
    Join Date
    Jan 2010
    Posts
    5

    Default

    Save the following as a .txt in your scripts folder (modifying individual parts as needed), where Mafia is located (assuming Windows; Linux and OS X "install" to specific directories):
    Code:
    teatree shake
    create borrowed time, potion of the field gar, potion of punctual companionship
    camp dnapotion 3
    cheat spades
    cheat laboratory
    cheat wands
    Then set it as your loginScript: General -> Preferences -> Automation -> On Login: whateverTheScriptIsCalled.txt
    (Mafia will look for said script in its search path)

    edit: if you instead wanted to pick a specific tea, you could use "teatree royal". If you wanted to do anything fancier than this, you'd probably want to switch over to an ASH script, but there's typically no need when you simply need to perform a sequence of actions.
    Originally Posted by heeheehee View Post
    Hey, thanks a lot!

    I'll give this a try. Is your in-game name the same as your forum name?

  5. #5
    Developer
    Join Date
    Aug 2009
    Posts
    2,598

    Default

    Hey, thanks a lot!

    I'll give this a try. Is your in-game name the same as your forum name?
    Originally Posted by Vandire View Post
    Yup. Feel free to ping me in-game if you have any questions.

  6. #6
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,164

    Default

    Hi,

    I'm not sure if this is the right section for this, but there are four things that I'd really like scripted or included in KoLMafia.

    1) Shake tea tree on login/breakfast. Or ideally have a breakfast preference for shaking/picking a tea.
    2) Select my three aftercore clip-art summons during breakfast.
    3) Collect my three free gene tonics during breakfast.
    4) Select my 3 favoured deck of every card cards on login/breakfast.

    If anyone can script this (or include it in KoLMafia) I'll pay 5 million meat per thing. (I realise this isn't much, but I'm quite meat-light right now. If need be I'm sure I can sort out a better reward!)

    Thanks in advance, and apologies if this is inappropriate for this forum.
    Originally Posted by Vandire View Post
    Or if you want it to select your teatree, and clip-art summons based on current mall prices, I've already got code for that in my own logoutScript. Here's some sharing:

    Code:
    int price(item it) { return historical_age(it) > .8? mall_price(it): historical_price(it); }
    
    // Original version by darkcodelagsniper at http://kolmafia.us/showthread.php?19211-potted-tea-tree&p=128971&viewfull=1#post128971
    void mallcuppa() {
    	if(get_property("_pottedTeaTreeUsed") == "false" && get_campground() contains $item[potted tea tree]) {
    		string cup;
    		item [int] cuppas;
    		float pricetotal;
    		for i from 8601 to 8637 {
    			cuppas[ count(cuppas) ] = to_item(i);
    			pricetotal += price(to_item(i));
    		}
    		sort cuppas by -price(value);
    		int shaketree = pricetotal / 37 * 3;
    		print("Average value from shaking the tea tree is " + shaketree + " meat","blue");
    		print("Single most expensive cuppa tea is " + cuppas[0] + " at " + historical_price(cuppas[0]) + " meat","blue");
    		if(shaketree > historical_price(cuppas[0]))
    			cup = "shake";
    		else cup = cuppas[0].to_string();
    		cli_execute("teatree " + cup);
    		# if(cup != "shake")
    		#	put_shop(mall_price(to_item(cup)), 0,  to_item(cup));
    	}
    }
    
    void clip_mall() {
    	int tomeLeft = 3- get_property("_clipartSummons").to_int();
    	if(!have_skill($skill[Summon Clip Art]) || tomeLeft < 1 || !can_interact()) return;
    	item [int] clip;
    	for i from 5224 to 5283
    		clip[count(clip)] = to_item(i);
    	sort clip by -(price(value));print(clip[0]);
    	create(tomeLeft, clip[0]);
    	print("Sell "+tomeLeft+" "+(tomeLeft > 1? to_plural(clip[0]):clip[0])+" @ "+historical_price(clip[0]), "blue");
    	# put_shop(historical_price(clip[0]), 0, tomeLeft,  clip[0]);
    }
    
    // This is a much less sophisticated function because I simply assumed that blue mana and the 1952 Mickey Mantle card will always be best
    // Some day I should rewrite this to always check the mall
    void cheating() {
    	string picks = visit_url("inv_use.php?cheat=1&whichitem=8382&pwd="+my_hash());
    	run_choice(2);
    	foreach card in $strings[Island, Ancestral Recall, 1952 Mickey Mantle]
    		if(get_property("_deckCardsDrawn").to_int() < 11 && picks.contains_text(card + "</option>"))
    			cli_execute("cheat " + card);
    }
    
    void main() {
    	if(can_interact()) {
    		mallcuppa();
    		clip_mall();
    		cheating();
    		cli_execute("camp dnapotion 3");
    	}
    }
    Save it with the extension .ash and otherwise follow the previous directions to make it your loginScript...
    General -> Preferences -> Automation -> On Login: whateverTheScriptIsCalled.ash
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  7. #7
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    153

    Default

    I just put each of the things that Mafia doesn't handle in breakfast as Daily Deeds custom buttons. To do this for whatever cards you want: Go to Preferences and then select Daily Deeds. Next, select Add Custom. For cards and stuff like soaking in the mayo vat, you can use the Simple setup. Add a button name, set the max uses (1 for cards and single-use skills), and then type in the command. For a 1952 Mickey Mantle card, you'll want to use "play 1952 mickey mantle", without the quotes, of course. For variable cards, you'll want something like "play X of diamonds" or whatever variable card you want. Personally, I prefer this method over scripted automation, because it lets me choose something from Mafia's deck of every card selector, if I'm doing alright on meat and want some other benefit. For items, you can do the same basic thing, but use the Item setup.

  8. #8
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,164

    Default

    For cards and stuff like soaking in the mayo vat, you can use the Simple setup. Add a button name, set the max uses (1 for cards and single-use skills), and then type in the command. For a 1952 Mickey Mantle card, you'll want to use "play 1952 mickey mantle", without the quotes, of course. For variable cards, you'll want something like "play X of diamonds" or whatever variable card you want.
    Originally Posted by VladYvhuce View Post
    Hate to mention this, but "Deck of Every Card" is a Built-In Deed. If you add that to your list you get a drop-down menu with all the cards and a hover tool-tip for each to explain what they do.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  9. #9
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    153

    Default

    Hate to mention this, but "Deck of Every Card" is a Built-In Deed. If you add that to your list you get a drop-down menu with all the cards and a hover tool-tip for each to explain what they do.
    Originally Posted by Bale View Post
    Yes, but you have to wait for Mafia to process the card request each time you pick a card to cheat with. You have to select your card, hit "draw", wait, then repeat the process. Most typically, I just want the 1952 card, the diamonds card, and the coins card. So, I made buttons for those. It's just a little convenient shortcut. Just click, click, click and then wait.
    In KOL: VladYvhuce (#1798867)

  10. #10
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,164

    Default

    Gotcha! Did you consider making one button that does all three cards? "cheat mickey; cheat diamond; cheat coins;" Then you'll only have to click once before you wait.

Posting Permissions

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