Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 31

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

  1. #11
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    212

    Default

    I wasn't aware that was an option. Thanks for the suggestion.

  2. #12
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,262

    Default

    Yup! You can string together any number of CLI commands as long as you put semi-colons between them.

    Note that there are a couple of commands that cannot be followed by another. Alias for instance, for very obvious reasons. There might be another few somewhere that I never use.

  3. #13
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    212

    Default

    But, if I wanted to use a number of items, I could tell it "use item1; use item2;" and so on? I have a number of single-use items that Mafia won't use during breakfast.

  4. #14
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,262

    Default

    Yup!

    Though for stuff you want during breakfast I'd suggest writing a loginScript. That way the item can check its preference to see if it has been used yet that day and use itself automatically if not. You won't have to remember a thing. At least, that's how I do it.

  5. #15
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    212

    Default

    For now, I'll stick to just consolidating most of my items to a button. Sometimes, I want to wait for a while, then load up on my bonuses. Not waste the good stuff on some small-fry baddies. Then, go forth and kick tougher baddies' butts with said bonuses. No sense in jacking my stats up, just to fight some badguys I could kill with a stern look. No, those bonuses come in more handy when I'm done goofing around and ready to get to some serious fighting. But, I'm considering making a script that would handle these items that I could just select from the script list when I'm ready for them.

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

    Default

    I'm glad you're thinking about what you want for yourself. This is just me informing you about some of the options you might not know.

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

    Default

    And I thank you for that. Now that I've pulled a proverbial thorn out of my side, and worked up a between battle frankenscript, it's nice to have some suggestions on where to go from here.

  8. #18
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    212

    Lightbulb

    Alright. I've worked up a basic little script for handling my "second breakfast" by overhauling my familiar script to handle items, instead. I've left out card cheating and mayosoaking on purpose. I haven't been able to figure out yet how to check if items have already been used. But, Mafia's nice enough to just say "(usable quantity of [item name] is limited to 0 by daily limit)", instead of breaking the script.

    Code:
    print("Reticulating Splines!", "Green");
    
    void main() {
    	Item it;
    		foreach it in $items[red face paint, green face paint, jackass plumber home game, all-year sucker, heart of dark chocolate, eternal car battery, stabonic scroll, circle drum, red and green rain stick]
    		if (it.item_amount() > 0)
    			use(1, it);
    			print("Splines Reticulated!", "Green"); 
    	}
    In KOL: VladYvhuce (#1798867)

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

    Default

    I haven't been able to figure out yet how to check if items have already been used.
    Originally Posted by VladYvhuce View Post
    Every item has its own preference to determine the answer to that. Unfortunately there isn't a rule for attributing a preference to an item, so it needs to be done on a case-by-case basis. Your way is brute force, but it does work quite well. You might not want to do it my way, but if anyone is curious there is a portion of my loginScript that looks like this...


    Code:
    void gyrocopter() {
    	if(get_property("_warbearGyrocopterUsed") == "false" && can_interact() &&  price($item[warbear gyrocopter]) * .3 < price($item[broken warbear gyrocopter]) + price($item[warbear gyro])) {
    		int max_price = 225000;
    		if(item_amount($item[warbear gyrocopter]) > 0 || (price($item[warbear gyrocopter]) <= max_price && buy(1, $item[warbear gyrocopter], min(max_price, my_meat() * .75 )) > 0)) {
    			print("Sending myself a Gyro!", "blue");
    			#visit_url("curse.php?action=use&pwd&whichitem=7038&targetplayer="+my_name()+"&curse=0");
    			cli_execute("throw warbear gyrocopter at " + my_name());
    			cli_execute("refresh inventory");
    			put_shop(mall_price($item[warbear gyro]), 0,  $item[warbear gyro]);
    		}
    	}
    }
    
    // These are normally controlled by "once a day items" preference: useCrimboToysHardcore & useCrimboToysSoftcore
    void useToys() {
    	gyrocopter();
    	
    	boolean get(item toy) {
    		return item_amount(toy) > 0 
    			|| (closet_amount(toy) > 0 && take_closet(1, toy))
    			|| (can_interact() && storage_amount(toy) > 0 && take_storage(1, toy))
    			|| (available_amount(toy) > 0 && retrieve_item(1, toy))  // Stupid free pulls (pony keg and microwave) don't follow the same runes as other storage items.
    			|| (can_interact() && historical_price(toy) > 0 && my_meat() > 1002003 && historical_price(toy) < to_int(get_property("autoBuyPriceLimit")) && retrieve_item(1, toy));
    	}
    	
    	boolean playwith(item toy, string prop) {
    		if(get(toy) && (get_property(prop) == "" || get_property(prop) == "false"))
    			return use(1, toy);
    		return false;
    	}
    	
    	while(get($item[cheap toaster]) && get_property("_toastSummons").to_int() < 3)
    		use(1, $item[cheap toaster]);
    	
    	foreach car in $items[BittyCar MeatCar, BittyCar SoulCar, BittyCar HotCar]
    		if(playwith(car, "_bittycar")) break;
    	playwith($item[handmade hobby horse], "_hobbyHorseUsed");
    	playwith($item[ball-in-a-cup], "_ballInACupUsed");
    	playwith($item[set of jacks], "_setOfJacksUsed");
    	playwith($item[Chester's bag of candy], "_bagOfCandyUsed");
    	playwith($item[Emblem of Ak'gyxoth], "_akgyxothUsed");
    	playwith($item[Idol of Ak'gyxoth], "_akgyxothUsed");
    	playwith($item[burrowgrub hive], "burrowgrubHiveUsed");
    	playwith($item[glass gnoll eye], "_gnollEyeUsed");
    	playwith($item[KoL Con Six Pack], "_kolConSixPackUsed");
    	playwith($item[Trivial Avocations board game], "_trivialAvocationsGame");
    	playwith($item[creepy voodoo doll], "_creepyVoodooDollUsed");
    	playwith($item[Taco Dan's Taco Stand Flier], "_tacoFlierUsed");
    	playwith($item[cursed microwave], "_cursedMicrowaveUsed");
    	playwith($item[cursed pony keg], "_cursedKegUsed");
    	playwith($item[warbear soda machine], "_warbearSodaMachineUsed");
    	playwith($item[warbear breakfast machine], "_warbearBreakfastMachineUsed");
    	playwith($item[festive warbear bank], "_warbearBankUsed");
    	playwith($item[Chroner trigger], "_chronerTriggerUsed");
    	playwith($item[Chroner cross], "_chronerCrossUsed");
    	playwith($item[picky tweezers], "_pickyTweezersUsed");
    	playwith($item[The Cocktail Shaker], "_cocktailShakerUsed");
    	playwith($item[infinite BACON machine], "_baconMachineUsed");
    }
    I've got my own reasons for disabling those items in breakfast. It's not really important to get into though, just assume I'm not entirely crazy to do it.

    For face paint, I have this interesting function that uses 0, 1 or both face paints once a day. It is set up to automatically adjust the number of items it might use if there is eventually another item of that class...

    Code:
    	if(get_property("_loginAvatarPaint") == "") {
    		item [int] paint;
    		foreach it in $items[green face paint, red face paint]
    			if(available_amount(it) > 0)
    				paint[ count(paint) ] = it;
    		if(count(paint) > 0) {
    			print("Randomly choosing face paint for color.", "blue");
    			foreach x, it in paint
    				if(random(max(count(paint), 2)) == 0)
    					use(1, it);
    			set_property("_loginAvatarPaint", "painted");
    		}
    	}
    Last edited by Bale; 05-22-2016 at 08:00 AM.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  10. #20
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    212

    Default

    Ah. I still have a copy of my original "check each familiar" BB script. If that would work better than the "elegant familiar BB script" format for items, then I'll just modify a copy of it for items. Do I check for "can_interact()" or "_itemnameUsed"? Or both? Or something else?

Posting Permissions

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