TICK Script Help

Use case is: I need to check whether a queue has ‘Approximate Number of Messages Visible’ > 0. If it is then I need to evaluate the ‘Number of Messaged Deleted’. Based on these two I have to deliver the health of the queue wherein:

Number of messages visible | Number of messages deleted | State
> 0 | > 0 | Display according to threshold
= 0 | > 0 | Display according to threshold
= 0 | = 0 | Normal State
> 0 | = 0 | Display according to threshold

Wherein warning threshold is NumberofMessagesDeleted > 100 but < 1000
and Critical threshold is NumberofMessagedDeleted<100 but > 0