Don't use recursive, do it the old fashioned way and add a check before it loops itself!
Bind to whatever.
Use /asminterval to set the automapsave interval. Use /autosavemap 1 to save/enable the script, use /autosavemap 0 to disable. Never tested :P
[SELECT ALL] Code:
asmable = ""
if (checkalias asminterval_) [] [ asminterval_ = 60000 ]
asminterval = [ asminterval_ = $arg1 ]
autosavemap = [ if (= $arg1 1) [ asmable = 1; savemap; sleep $asminterval_ [ if $asmable [ autosavemap ] ] ] [ asmable = 0 ] ]
Use /asminterval to set the automapsave interval. Use /autosavemap 1 to save/enable the script, use /autosavemap 0 to disable. Never tested :P