hackerharry / mffbashbot Goto Github PK
View Code? Open in Web Editor NEWMy Free Farm Bash Bot
License: GNU General Public License v3.0
My Free Farm Bash Bot
License: GNU General Public License v3.0
this concerns transport off farm 7.
say one wants to transport canola oil off farm 7.
since getProductCountFittingOnField()
returns 120 for that item, the bot will hold back 120 x [farm 7 field count].
this is an undesired result.
this needs checking whether the item is plantable or not and probably have getProductCountFittingOnField()
return 1 for non-planable items....
those should be deleted after each iteration.
can't put my finger on this one yet, still it's been established, that the bot buys too many goods from time to time.
this feature needs a review
i was asked to enhance the transport logic when it comes to transporting stuff off farms > 4.
when for example someone plants 5 different crops on farm 5, the transport might occupy all the slots without using all of the vehicles capacity - even if the vehicle could be filled to the brim.
sometimes the bot just stops without user intervention.
could have something to do with the newly added form of JSON handling.
failures look like this
Checking if stock needs a refill...
2021-06-26 20:11:20 checkStockRefill: refusing to buy 20000 items of item #276
../functions.sh: Zeile 2685: [: Zu viele Argumente.
../functions.sh: Zeile 2690: 36143 36143: Syntaxfehler im Ausdruck. (Fehlerverursachendes Zeichen ist \"36143\").
---
You have already signed up for the PvP cow race
Transport vehicle for route 1 is on farm 5
Calculating transport count for route 1.............../functions.sh: Zeile 1871: 90 90: Syntaxfehler im Ausdruck. (Fehlerverursachendes Zeichen ist \"90\").
---
Calculating transport count for route 2............/functions.sh: Zeile 1871: 580 340: Syntaxfehler im Ausdruck. (Fehlerverursachendes Zeichen ist \"340\").
title says it all. (german 'Biosprit-Anlage')
title says it all...
this was reported in the forum
this is most likely caused by the check in like 3661 in functions.sh
.
a >=0
should do it.
its not up to date.. so...
also, a FAQ section would be nice...:)
title says it all
it might be cool to make use of the contents of the in-game variables produkt_name and produkt_name_forestry and perhaps even formulas.
the product lists could be created dynamically, and we would have three files less to bother with.
the files would have to be language specific and could be recreated on request - in case the game designers change something.
What is causing this? How to fix this? Using region pl server 1
given these conditions:
debug log provides this
++ /usr/bin/jq '.datablock[4].running == 1' farmdata.txt
+ RUNCHK=false
++ /usr/bin/jq '.datablock[4].ready == 1' farmdata.txt
+ WINDMILLREADY=false
+ '[' false = true ']'
+ '[' false = true ']'
the work on non-premium fields produces uneven distribution of seeds every so often.
this is probably caused by the back-end servers inability to cope with the speed the requests coming in. incorporating a short delay might mitigate this issue.
Could we please get an example of how to set up the config.ini to make ./mffbashbot.sh work? How is it supposed to be formatted?
thanks to several bug reporters on the forum.
this concerns v2.76.
browser throws
TypeError: document.getElementById(...) is null
showfarm.php:2061:71
this has happened before.
no idea why lighty would throw a opening /dev/null failed: Too many levels of symbolic links
error,
but this is getting annoying.
i'll try and re-spawn the static installation package.
this is potentially dangerous and needs fixing.
this still needs confirmation
say a scout task needs 80 energy and 3 scouts.
it looks like not every scout needs 80 energy in that case.
looking at the level definition in .updateblock.farmersmarket.scouts.config.levels
one might conclude the energy distribution must be applied accordingly
[...]
"6": {
"points": 3916,
"points_base": 28,
"tasks": 5,
"scouts": {
"1": 0.8,
"2": 0.1,
"3": 0.1
}
},
"7": {
"points": 5752,
"points_base": 30,
"tasks": 6,
"scouts": {
"1": 0.6,
"2": 0.3,
"3": 0.1
}
},
[...]
so in level 6, one scout would have to contribute 80%, the other two 10% each of the total energy.
level 7 would require a 60/30/10 % distribution.
however, this still needs investigation.
just for completeness...
example reported by Niknak
Remove Head in Slot 2
Remove Body in Slot 2
Remove Foot in Slot 2
Set Equipment 51918 in Slot 2
Set Equipment 52190 in Slot 2
Set Equipment 52188 in Slot 2
Starting cow race in slot 2...
Remove Head in Slot 7
Remove Body in Slot 7
Remove Foot in Slot 7
Set Equipment 51918 in Slot 7
Set Equipment 52190 in Slot 7
Set Equipment 52188 in Slot 7
Starting cow race in slot 7...
+ wget -nv -a mffbot.log --output-document=/dev/null '--user-agent=Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0b) Gecko/20100101 Firefox/57.0b' --load-cookies mffcookies.txt 'http://sxx.myfreefarm.com/ajax/city.php?rid=[RID]&city=2&mode=windmillcrop&slot=1'
+ start_WindMillNP city2 windmill 1
../functions.sh: line 98: start_WindMillNP: command not found
+ update_queue city2 windmill 1
+ local iFarm=city2
when did this happen? ;)
the user might need this information...
it doesn't release butterflies as it's suppposed to
firing 66 gardeninit requests (i.e. on farm 5 with 6 fields) is a bit much.
the total number of gardeninit requests should be reduced.
using removeCowEquipment() prior to a PvP race results in the bot being unable to find proper equipment to put on the PvP cow.
using a tiny bit of debugging
for sBodyPart in head body foot; do
iEquipmentID=$(getCowEquipmentID $sBodyPart $sEnvironment)
if [ "$iEquipmentID" = "-1" ]; then
echo "Could not get equipment for your cow's $sBodyPart, aborting" | tee -a $LOGFILE
return 1
continue
fi
sendAJAXFarmRequest "id=${iEquipmentID}&slot=${iCowSlot}&mode=cowracing_equipitem"
it results in
2020-06-16 10:02:33 URL:http://mffserver/ajax/farm.php?rid=[RID]&type=head&slot=7&mode=cowracing_unequipitem [65359/65359] -> "farmdata.txt" [1]
2020-06-16 10:02:34 URL:http://mffserver/ajax/farm.php?rid=[RID]&type=body&slot=7&mode=cowracing_unequipitem [65354/65354] -> "farmdata.txt" [1]
2020-06-16 10:02:36 URL:http://mffserver/ajax/farm.php?rid=[RID]&type=foot&slot=7&mode=cowracing_unequipitem [65349/65349] -> "farmdata.txt" [1]
Could not get equipment for your cow's head, aborting
this might need some investigation
this happens because not the proper key but the item id is used.
if the player sells the cow in slot one, getCowEquipment()
cannot buy equipment since it's tied to slot one.
that's where it belongs IMHO :)
if a player has multiple farms, it'd be helpful to wait for running iterations to finish.
while this still isn't a perfect soloution, it helps minimise trouble while updating.
i've received a report that if not enough goods are available to work on the megafield, none of the other positions get served.
this is to be seen as a fundamental flaw, as the bot should continue working if a single position fails.
as suggested here.
this might be helpful in some situations.
unfortunately, obstacles also have a phase == 4 as ripe plots do.
needs fixing...
LCONV variable is empty.
thanks to Regina for the bug report!
the removed farm won't be removed from the start script.
this causes mayhem when starting the bot.
i've learnt thath a farms logon name can have spaces. since word splitting isn't dealt with everywhere, this causes problems.
This needs some bug hunting...
that's a bit careless ;)
getFilledFieldCount() is a real SD-card killer; it produces many writes in each bot iteration.
can we use internal memory to hold the data?
they do get created in update.sh, but not in addfarm.sh.
title says it all :)
it's this line in mffbashbot.sh
if ! grep -q "autobuybutterflies = 0[...]
error is
jq: error (at farmdata.txt:0): Cannot index number with string "data"
this is by design but needs to be taken into account when putting equipment on the cow. don't put on equipment if the cow's level is 1
it has been reported, that the bot crashes completely if no feed is available for the fuel station.
the last logged event in that case is
mode=fuelstation_harvest
jq returns Cannot index array with string "1"
when a sushi bar farmie gets collected.
and it's obvious why... :/
updating the update.sh itself can have unwanted results.
it's better to copy and execute it from outside the mffbashbot folder.
adding white spaces in JQ commands that have pipes ('|') in'em might improve readabilty
when it really should be using getInnerInfoData()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.