Skip to content

Commit

Permalink
Update varo.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
simylein authored Oct 21, 2020
1 parent 21a0151 commit f21cfd8
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions varo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ fi

# collect all playernames
echo "Please put in all participating Varo Players"
read -p "playername1:" player1
read -p "playername2:" player2
read -p "playername3:" player3
read -p "playername4:" player4
read -p "playername5:" player5
read -p "playername6:" player6
read -p "playername7:" player7
read -p "playername8:" player8
read -p "playername1:" player01
read -p "playername2:" player02
read -p "playername3:" player03
read -p "playername4:" player04
read -p "playername5:" player05
read -p "playername6:" player06
read -p "playername7:" player07
read -p "playername8:" player08

# list all participating players
echo "All participating Varo Players:"
echo "${player1}"
echo "${player2}"
echo "${player3}"
echo "${player4}"
echo "${player5}"
echo "${player6}"
echo "${player7}"
echo "${player8}"
echo "${player01}"
echo "${player02}"
echo "${player03}"
echo "${player04}"
echo "${player05}"
echo "${player06}"
echo "${player07}"
echo "${player08}"

# wait for ingame start command
echo "waiting for ingame start command..."
Expand Down Expand Up @@ -73,59 +73,59 @@ screenlog="screenlog.0"
while true; do
tail -n1 ${screenlog} >> tmploglastline
if [[ ! -z $(grep -E "$death01|$death02|$death03|$death04|$death05|$death06|$death07|$death08|$death09|$death10|$death11|$death12|$death13|$death14|$death15|$death16|$death17|$death18|$death19|$death20|$death21|$death22|$death23|$death24|$death25|$death26|$death27|$death28|$death29|$death30|$death31|$death32|$death33|$death34|$death35|$death36|$death37" "tmploglastline") ]]; then
if [[ ! -z $(grep "$player1" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player1} has left varo due to death$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player1} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player1} died!"
if [[ ! -z $(grep "$player01" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player01} has left varo due to death$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player01} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player01} died!"
fi
fi
if [[ ! -z $(grep -E "$death01|$death02|$death03|$death04|$death05|$death06|$death07|$death08|$death09|$death10|$death11|$death12|$death13|$death14|$death15|$death16|$death17|$death18|$death19|$death20|$death21|$death22|$death23|$death24|$death25|$death26|$death27|$death28|$death29|$death30|$death31|$death32|$death33|$death34|$death35|$death36|$death37" "tmploglastline") ]]; then
if [[ ! -z $(grep "$player2" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player2} has left varo due to death${player2}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player2} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player2} died!"
if [[ ! -z $(grep "$player02" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player02} has left varo due to death${player2}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player02} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player02} died!"
fi
fi
if [[ ! -z $(grep -E "$death01|$death02|$death03|$death04|$death05|$death06|$death07|$death08|$death09|$death10|$death11|$death12|$death13|$death14|$death15|$death16|$death17|$death18|$death19|$death20|$death21|$death22|$death23|$death24|$death25|$death26|$death27|$death28|$death29|$death30|$death31|$death32|$death33|$death34|$death35|$death36|$death37" "tmploglastline") ]]; then
if [[ ! -z $(grep "$player3" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player3} has left varo due to death${player3}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player3} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player3} died!"
if [[ ! -z $(grep "$player03" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player03} has left varo due to death${player3}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player03} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player03} died!"
fi
fi
if [[ ! -z $(grep -E "$death01|$death02|$death03|$death04|$death05|$death06|$death07|$death08|$death09|$death10|$death11|$death12|$death13|$death14|$death15|$death16|$death17|$death18|$death19|$death20|$death21|$death22|$death23|$death24|$death25|$death26|$death27|$death28|$death29|$death30|$death31|$death32|$death33|$death34|$death35|$death36|$death37" "tmploglastline") ]]; then
if [[ ! -z $(grep "$player4" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player4} has left varo due to death${player4}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player4} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player4} died!"
if [[ ! -z $(grep "$player04" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player04} has left varo due to death${player4}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player04} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player04} died!"
fi
fi
if [[ ! -z $(grep -E "$death01|$death02|$death03|$death04|$death05|$death06|$death07|$death08|$death09|$death10|$death11|$death12|$death13|$death14|$death15|$death16|$death17|$death18|$death19|$death20|$death21|$death22|$death23|$death24|$death25|$death26|$death27|$death28|$death29|$death30|$death31|$death32|$death33|$death34|$death35|$death36|$death37" "tmploglastline") ]]; then
if [[ ! -z $(grep "$player5" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player5} has left varo due to death${player5}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player5} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player5} died!"
if [[ ! -z $(grep "$player05" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player05} has left varo due to death${player5}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player05} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player05} died!"
fi
fi
if [[ ! -z $(grep -E "$death01|$death02|$death03|$death04|$death05|$death06|$death07|$death08|$death09|$death10|$death11|$death12|$death13|$death14|$death15|$death16|$death17|$death18|$death19|$death20|$death21|$death22|$death23|$death24|$death25|$death26|$death27|$death28|$death29|$death30|$death31|$death32|$death33|$death34|$death35|$death36|$death37" "tmploglastline") ]]; then
if [[ ! -z $(grep "$player6" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player6} has left varo due to death${player6}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player6} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player6} died!"
if [[ ! -z $(grep "$player06" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player06} has left varo due to death${player6}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player06} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player06} died!"
fi
fi
if [[ ! -z $(grep -E "$death01|$death02|$death03|$death04|$death05|$death06|$death07|$death08|$death09|$death10|$death11|$death12|$death13|$death14|$death15|$death16|$death17|$death18|$death19|$death20|$death21|$death22|$death23|$death24|$death25|$death26|$death27|$death28|$death29|$death30|$death31|$death32|$death33|$death34|$death35|$death36|$death37" "tmploglastline") ]]; then
if [[ ! -z $(grep "$player7" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player7} has left varo due to death${player7}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player7} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player7} died!"
if [[ ! -z $(grep "$player07" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player07} has left varo due to death${player7}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player07} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player07} died!"
fi
fi
if [[ ! -z $(grep -E "$death01|$death02|$death03|$death04|$death05|$death06|$death07|$death08|$death09|$death10|$death11|$death12|$death13|$death14|$death15|$death16|$death17|$death18|$death19|$death20|$death21|$death22|$death23|$death24|$death25|$death26|$death27|$death28|$death29|$death30|$death31|$death32|$death33|$death34|$death35|$death36|$death37" "tmploglastline") ]]; then
if [[ ! -z $(grep "$player8" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player8} has left varo due to death${player8}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player8} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player8} died!"
if [[ ! -z $(grep "$player08" "tmploglastline") ]]; then
screen -Rd ${servername} -X stuff "say ${player08} has left varo due to death${player8}$(printf '\r')"
screen -Rd ${servername} -X stuff "ban ${player08} You died! Thank you for participating in Varo$(printf '\r')"
echo -e "${red}${player08} died!"
fi
fi
rm tmploglastline
Expand Down

0 comments on commit f21cfd8

Please sign in to comment.