Auto-translated
Don't create a trigger. But you can implement a check in an infinite loop. Your code looks fine, but you need to wrap your `if` statement in the following structure:
```
while 1 do
if...
sleep(4);
end;
```
Don't forget about `sleep`, otherwise everything will freeze...