Hi i've been using this script and it is really good :)
However, I have noticed some Issues.
Issue 1 (Not an issue but a recommendation): Instead of 'dismantling' the trap, RS3 has a rebuild option so it just clicks once and it should auto rebuild on that tile however yes this may not be viable...