I'm sorry to say it.
But the script doesn't work as it supposed to do.

When I type !give %gift. This is the message from my bot.
Code:
iFabber gave 2 a %gift. This is 2's 2nd cookie.


And when I type !give love. This is the message.
Code:
iFabber gave $nick a beer. This is $nick's 1st beer.


Also when you type !treat the last sentence doesn't appear.
So Bot is thinking, Who should I give a treat to? I know it! %nick-receiver! And then nothing.
But what should happen is that the bot gives the treat via !give %gift.

I don't know what's wrong...

This is the edited script. I edited some things because there were some typing errors.

Code:
on *:TEXT:*:#: {
  tokenize 32 $strip($1-)
  if ($1 == !give) && (!$4) {
    if ($2 ison $chan) { var %nick-receiver = $2, %gift = $3 }
    elseif ($3 ison $chan) { var %nick-receiver = $3, %gift = $2 }
    else { var %nick-receiver = $0, %gift = $2 }
    if (%nick-receiver == $me) { .timer 1 2 msg # Thank you $nick :) }
    givegift %nick-receiver %gift
  }
  elseif ($1 == !treat) {
    if (!%f) {
      set -u12 %f On
      var %nick = $nick(#,$r(1,$nick(#,0))), %treat = beer|pie|cookie|pluspoint|ban|pizza|love
      while (%nick == $me || %nick == $nick) { var %nick = $nick(#,$r(1,$nick(#,0))) }
      describe # is thinking...
      .timertreat1 1 3 msg # Who should I give a treat to?
      .timertreat2 1 6 msg # I know it!
      .timertreat3 1 8 msg # %nick $+ !
      .timertreat4 1 10 givegift %nick $gettok(%treat,$r(1,$numtok(%treat,124)),124)
    }
  }
}

alias givegift {
  if ($istok(cookie pie beer pluspoint ban pizza love,$2,32)) {
    var %count = $readini(gifts.ini,$1,$2)
    inc %count
    writeini -n gifts.ini $1 $2 %count
    var %gift = $replace(beer,pie,cookie,pluspoint,ban,pizza,love)
    if (%gift = love) { msg $chan $nick gave $1 love. This is the $ord(%count) one who loves $1 $+ . }
    else { msg $chan $nick gave $1 %gift $+ .  This is $1 $+ 's $ord(%count) %gift $+ . }
  }
}