Since you are using a Mac, I assume you have Ruby installed.
What you are talking about sounds like you want a thread to sleep for 30 seconds and then execute a script in the background.
You should put … do some stuff
in a script named dostuff.scpt and place it in your Desktop.
Then change your current script to the following code:
using terms from application "iChat"
on logout finished
do shell script "ruby -e 'Thread.new {`sleep 30 && osascript ~/Desktop/dostuff.scpt`}' &> /dev/null"
end logout finished
end using terms from
A code breakdown:
do shell script (executes something from the command line)
ruby -e (executes ruby code from the command line)
Thread.new (makes a new thread to hide in the background)
` (Everything in the backtick is a shell command in ruby)
osascript (Executes an applescript from the command line)
~/Desktop/dostuff.scpt (Points the pathname to your file, the tilde substitutes to your home directory, and I assume you put dostuff.scpt on the Desktop)
&> /dev/null (Tells Applescript to not look for output and immediately go to the next code line)
I tried doing this without Ruby, however, I had no luck. Let me know if this works for you!