Make.meat.fast

Winterbay

Active member
Once again, this isn't a problem so much with canadv as it is with farm -- pickpocket drop rates are now in the database, which basically makes the item_drops_array() function necessary. I guess the easiest way to solve all these problems would be to use an older build (possibly just the last version release, 14.0). Of course, this means that you won't be able to use some scripts that require functionality that has been implemented since then, and you'll encounter a bunch of the bugs that have been fixed since then.

Yes I know. The problem is I've tried to make heads and tails of the new array-function and failed utterly. If someone could point me in a good direction for a function that uses this array that I could study I would be very grateful.
 

Winterbay

Active member
Ahh, yes. I seem to recall having looked at that and not getting anywhere. I wonder if that was before the examples were added, I'll take a new look.
 

Bazaaretw

Member
Replace lines 129-163 of farm.ash with this:
PHP:
  //Remove any familiars who are inferior in both meat & item mods to another 
  //familiar
  boolean[familiar]familiars_to_remove;
  foreach f in familiars
  {
    foreach g in familiars
    {
      if (!familiars_to_remove[f] && !familiars_to_remove[g])
      {
		if (f != g) //don't compare one to itself :)
		{
		  print("Considering "+f+" versus "+g);
		  //if f is worse in all respects, remove it
		  if ((familiars[f].meatmod <= familiars[g].meatmod) && 
			  (familiars[f].itemmod <= familiars[g].itemmod))
		  {
			if (!include(f)) //exception if it's on the include list
			{
			  //remove familiars[f];
			  familiars_to_remove[f] = true;
			  print("Removing "+f+" which is inferior to "+g+".");
			}
		  }
		  else if ((familiars[g].meatmod <= familiars[f].meatmod) && 
			   (familiars[g].itemmod <= familiars[f].itemmod))
		  {
			if (!include(g))
			{
			  familiars_to_remove[g] = true;
			  print("Removing "+g+" which is inferior to "+f+".");
			}
		  }
		  else print ("Keeping both "+f+" and "+g+".");
		}
      }
    }
  }
  foreach f in familiars_to_remove
	if ( familiars_to_remove[f] ) remove familiars[f] ;

So when I do this I get this error Script parsing error (farm.ash, line 169)

Fixed, there were two extra brackets I just removed. now it works perfectly.
 
Last edited:

fronobulax

Developer
Staff member
I'm using the newest version from the support thread. I had been using a build of mafia that's probably around a month old.

Which support thread? The problem you note was fixed in EatDrink a while ago although it is difficult to figure that out since EatDrink has its own thread and is discussed in both the Official and Unofficial Ascend threads. It's not your problem that it is so hard to find (and I am trying to undo my own contribution to the confusion) but you probably want the latest version as noted by Theraze above or just recently reposted by me here. If that version errors then it will be easier to try and help you.
 

LordOfDorkness

New member
Code:
	}
	//shirts dogn't drop ugnless you have awaregness of them
hahahhahhahhahaha!!

Sorry. Is this agn old joke for everyogne else?
 

Theraze

Active member
Because the tavern hasn't existed like that for... eh, how long? I think it's been over a month now.
 

dragonslayere

New member
anyone still working on this?
i keep getting aborts

Code:
Location 49/92: Menagerie 1
An error has occurred, aborting
KoLmafia declares world peace.
 

Winterbay

Active member
What version of Mafia are you running? IIRC that error is for when it falls through the entire item_drops array without finding anything to match the drop against and that shouldn't happen, at least it doesn't in my copy...
 
Ok, so when I run farm.ash the script complains with various messages along the lines of:
PHP:
The string "good" is not a float; returning 0.0 (EatDrink.ash, line 303)
The string "crappy" is not a float; returning 0.0 (EatDrink.ash, line 303)
The string "decent" is not a float; returning 0.0 (EatDrink.ash, line 303)

Any thoughts?
 
Top