Take and eat all of it

PHP Code:
local msgs getnewmessages("Server Log"
local qtd msgs.count-
 
for i=0,qtd 
do 
    if (
msgs[qtd].text:find("Server is saving game in 5 minutes.")) 
    
then 
    gotolabel
("LeaveCave")
    
setsettings("cavebot/settings/opennextbp","no")
    
setlooting("no")
    
setsettings("targeting/monsters/MONSTER1/onlyiftrapped","yes")
    
setsettings("targeting/monsters/MONSTER2/onlyiftrapped","yes")
    
setsettings("targeting/monsters/MONSTER3/onlyiftrapped","yes")

    
end 
end