Harvest – A highly customisable farming script

lostcalpolydude

Developer
Staff member
The only way I can see for that to happen is if you don't have any accordion to cast AT songs and retrieve_item(1, $item[rock and roll legend]); fails (it looks like the script just assumes that will work).
 

Theraze

Active member
When the script moves on to har_current_activity: farm, I get
Error: Division by zero (harvest.ash, line 780)
Code:
int casts_needed = ceil(turns_needed / turns_per_cast(the_skill).to_float());
turns_per_cast is returning as 0 for some skill(s?).

I patched it with
Code:
int casts_needed;
if(turns_per_cast(the_skill)==0){
     casts_needed = 0;
}else{
     casts_needed = ceil(turns_needed / turns_per_cast(the_skill).to_float());
}

An explanation/fix would be appreciated.

That probably means that the accordion and buff fix never happened... Check post 326. Or get the other starter items you're missing.
 

Ima Felyn

Member
Hey guys, I need a little help with something and I'm to dumb to figure it out on my own. What I would like to do is use harvest to olfact gaints and all but to use my custom macro instead of what harvest does, you see when I go into my in game options > combat > auto-attack drop box > custom combat macro, then run harvest it will (disabled) it every time : (

Is there something I need to add to my custom combat in mafia for this to work? currently it looks like this

[ default ]
consult Harvest Combat.ash
special action
attack with weapon

and my custom macro is this

pickpocket
skill run like the wind
skill pop and lock it
skill break it on down
skill disco dance of doom
skill disco dance II: electric boogaloo
attack
repeat

I know there is that check box in harvest that says use disco moves, but that one causes me to run out of mana and for whatever reason nets me less cash then mine. Hope I was clear in what I'm trying to do if not I'll try and explain better.
 

Winterbay

Active member
Just a tips: Instead of listing the individual skills used for the combo you can use "combo". So, "combo Rave Concentration" or "combo Rave Steal".
 

Theraze

Active member
Also, the last line is automatically repeated, so if you want it to just end with attacking with weapon, you don't need to put in 'repeat' at the ending...
 

slyz

Developer
He posted his actual KoL macro, where those tips don't work.

Ima Felyn: you have to turn your KoL macro into a Mafia Custom Combat Script.

Since consult scripts like Harvest Combat.ash and KoL macro language can't be mixed in a CCS, you have to use CCS language instead of KoL Macro language.

Simply replace
Code:
[ default ]
consult Harvest Combat.ash
special action
attack with weapon
with
Code:
[ default ]
pickpocket
consult Harvest Combat.ash
combo rave steal
combo Disco Nirvana
attack with weapon
 

Ima Felyn

Member
Thanks guys for the tips, and slyz got what I'm trying to achieve. Only problem is I can't get it to work, I copy paste that in exactly as slyz has and in the combat logs from mafia it looks something like steal > steal > olfact > attack > dead giant, with no combos or skills like "pop and lock it" going off. Any thoughts?
 

Theraze

Active member
Doesn't the "Custom combat script" in Harvest mean to use a setting with that name rather than the default? So... what's your "Meat Farming.ccs" script?
 

slyz

Developer
At the end of Harvest Combat.ash, change
PHP:
// Finish the fight
mac.append('while !pastround 25; attack; endwhile;');
to
PHP:
// Finish the fight
// mac.append('while !pastround 25; attack; endwhile;');
 

Ima Felyn

Member
At the end of Harvest Combat.ash, change
PHP:
// Finish the fight
mac.append('while !pastround 25; attack; endwhile;');
to
PHP:
// Finish the fight
// mac.append('while !pastround 25; attack; endwhile;');


Okay so I made that change to Harvest Combat.ash and its doing the skills now (RUN LIKE THE WIND!, BREAK IT ON DOWN!, etc.), but if I'm reading the logs right the only disco combo going off is Rave Nirvana?

combat log
http://pastebin.com/ij3zdFXB

EDIT
But if I change my combos to skills in mafia to do the disco combos manually that way it looks like everything works, but this isn't an ideal way of doing it though since disco combos are random between characters because disco skill orderings are different.

http://i.imgur.com/5zu1Q.jpg
http://pastebin.com/vH4R0qYA

EDIT 2 ( lol I'm bad at this)
But no biggie if I can't get the general combos to work like "combo Rave Nirvana" and "combo Rave Nirvana", because I could just make a whole bunch of different combat.ccs for each different characters like Meat Farming Char1, Meat Farming Char2, etc. and list the skills manually like I did in here http://i.imgur.com/5zu1Q.jpg then tell harvest to just use the right ccs for each character.
 
Last edited:

Winterbay

Active member
Do you happen to have the anapest effect active? That makes detection of some things not work well and may break detection that the combo has finished.
 

Winterbay

Active member
Yeah, it's the effect you get from one the of the spleen items, the one from this years 2-mr-A-familiars. I quite often manage to get that by using eatdrink so it's not impossible that that's your problem. It turns all combats into anapests (poem type) and not everything that Mafia needs or wants is directly transferred in a readable way when that happens.
 

eegee

Member
It looks like "Harvest Combat.ash" isn't constructing a usable macro. Set the verbosity to level 3 and try a combat again.
 
Top