You could just use /set -u %var. Without a number after -u, it will unset after the script/event and will work throughout aliases.

Code:
alias SET_CONSTANTS {
  ; Modify these values as you see fit.
  set -u %bot.name MyGoatBot
  set -u %bot.owner MeMyselfI
}

; ...

; ...

On *:PART:#: {
  SET_CONSTANTS
  if ($me == %bot.name) && ($nick == %bot.owner) {
    part $chan wait for me!
  }
}


Invision Support
#Invision on irc.irchighway.net