Giter Site home page Giter Site logo

mffbashbot's People

Contributors

fauster avatar hackerharry avatar jbond47 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mffbashbot's Issues

`checkSendGoodsToMainFarm()` uses improper values if chosen product is not plantable

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....

stock management buys too many goods

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

better transport logic

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.

strange bot failures

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\").

dynamic product data

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.

Windmill slot 1 doesn't get served under certain conditions

given these conditions:

  • slot 1 is ready to be collected
  • slot 2 is locked and holds a recipe which can't be collected

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 ']'

planting on non-premium fields is unreliable

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.

config.ini

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?

bot seemingly overfeds scouts when working multi-scout tasks

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.

cow racing equipment not bought correctly in case two or more cows have the same start time

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...

windmill doesn't start on non-premium farms

+ 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? ;)

removeCowEquipment() blocks selection of cow equipment

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

allow farm name with spaces

i've learnt thath a farms logon name can have spaces. since word splitting isn't dealt with everywhere, this causes problems.

cow level 1 cannot use equipment

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.