This is quite tricky because the state of the game after the script is the same as the state before. I think ideally we would have a general bitset or a "stop other triggered scripts" command for this.
What I would do is to have a short period of immunity at the beginning of the game, just one or two ticks.
Code: global variable (1, is immune)
plotscript, monster1, begin
if (is immune) then (exit script)
# rest of script follows...
end
script, end immunity, begin
is immune := false
end
script, restart, begin
# ...rest of script; add this to the end:
is immune := true
# this triggers the end immunity script after one tick
set timer(0, 0, 1, @end immunity)
# if you want to wait X ticks, use set timer(0, X -- 1, 1, @end immunity)
end
BTW, writing "run script by id (@restart)" is identical to just "restart"