It's just an example, the actual code is in a onTimeout().
My mistake. I'll edit that in first post.
PHP Code:
function onTimeout() {
if(onwater(player.x,player.y) && this.waterTimer == 0) {
triggerserver("weapon",this.name,"board",player.x, player.y);
}
this.waterTimer += 1;
if(this.waterTimer >= 3)this.waterTimer = 0;
setTimer(0.05);
}