diff options
-rw-r--r-- | README.md | 3 | ||||
-rwxr-xr-x | tmw-info | 6 |
2 files changed, 6 insertions, 3 deletions
@@ -64,3 +64,6 @@ e.g. tmw-info gm-asearch @item phylactery (no results? check item ID) If you get an error while searching, it may contain special characters and needs to be quoted' + +2020-08-15 - fixed gm-show (wasn't showing GUI) and removed trailing comma in mob drops + @@ -41,7 +41,7 @@ help(){ echo " gm-search TERM1 TERM2 TERM3 ... (results contain any of the terms)" echo " gm-asearch TERM1 TERM2 TERM3 ... (results contain all of the terms)" echo " gm-esearch TERM1 TERM2 TERM3 ... (results contain the exact term)" - echo " gm-show (if zenity is installed, displays a GUI pop-up of the last 10 issued GM CMDs, otherwise in terminal)" + echo " gm-show (if zenity is installed, displays a GUI pop-up of the last 10 issued GM CMDs), otherwise in terminal" echo " item-update (downloads item DB. Must be run before searching)" echo " item-search TERM1 TERM2 TERM3 ... (items: results contain all of the terms)" echo " mob-update (downloads monster DB. Must be run before searching)" @@ -209,7 +209,7 @@ elif [ "$1" == 'gm-show' ]; then fi fi fi - if [[ $(dpkg -l 'zenity' | awk '{print $1}') == 'ii' ]]; then + if [[ $(dpkg -l 'zenity' | grep -Eo '^ii') == 'ii' ]]; then zenity --text-info 'tmw-gmlog' --width '600' --height '300' --filename "$GM_REPORT" else cat < "$GM_REPORT" @@ -329,7 +329,7 @@ elif [ "$1" == "mob-search" ]; then mv "$TMW_INFO/mob-drops-$MOB_ID.tmp.tmp" "$TMW_INFO/mob-drops-$MOB_ID.tmp" DROP_COUNT=$(( DROP_COUNT + 1 )) done - DROPS=$(cat < "$TMW_INFO/mob-drops-$MOB_ID.tmp" | sed 's/^$//g') + DROPS=$(cat < "$TMW_INFO/mob-drops-$MOB_ID.tmp" | sed 's/^$//g' | sed -E 's/,\s*$//g') echo -e "\ ID: $(echo "$LINE" | awk '{print $1}') NAME: $(echo "$LINE" | awk '{print $2 $3}') LVL: $(echo "$LINE" | awk '{print $4}')\n\ HP: $(echo "$LINE" | awk '{print $5}') SP: $(echo "$LINE" | awk '{print $6}') \ |