Hallo, hier eine Funktion um die Fischereiquests automatisch zu füllen.
function FishingQuest { quest=$($JQBIN '.updateblock.farmersmarket.fishing.quest.questid | tonumber' $FARMDATAFILE) if [ $quest -le 50 ]; then echo -n "Pruefe Angler-Quest Nr. $quest" secs=$($JQBIN '.updateblock.farmersmarket.fishing.quest.remain' $FARMDATAFILE) if [ $($JQBIN '.updateblock.farmersmarket.fishing.quest.finishdate' $FARMDATAFILE) == '"0"' ] || [ $secs -lt 0 ]; then aIDs=$($JQBIN '.updateblock.farmersmarket.fishing.quest.products | to_entries[] | .key | tonumber' $FARMDATAFILE) for iID in $aIDs; do Stock=$(getPIDAmountFromStock $iID 1) # Wenn man was im Regal behalten will # Stock=$((Stock - 3)) if [ $Stock -gt 0 ]; then Gived=$($JQBIN '.updateblock.farmersmarket.fishing.quest.data."'${iID}'"' $FARMDATAFILE) Need=$($JQBIN '.updateblock.farmersmarket.fishing.quest.products."'${iID}'" | tonumber' $FARMDATAFILE) Left=$((Need - Gived)) if [ $Left -gt 0 ]; then if [ $Stock -ge $Left ]; then echo -n " Gebe $iID : $Left von $Left" sendAJAXFarmRequest "&pid=${iID}&amount=${Left}&mode=fishing_quest_entry" else if [ $Left -ge $Stock ]; then echo -n " Gebe $iID : $Stock von $Left" sendAJAXFarmRequest "&pid=${iID}&amount=${Stock}&mode=fishing_quest_entry" fi fi fi fi done else # Wartezeit bis Quest freigeschaltet ist echo -n " $(($secs/86400)) Tage $(date -u -d @${secs} +"%T")" fi fi echo "..." }