I'm surprised Wims didn't look at the fact that the variable is not dynamic, meaning if person A triggers the script, his or her offense will be counted as one warning. There comes the person B masking the forbidden word, it'll cause the script to increase the count as another warning. That just doesn't add up, does it? This script should have been perfected as such:
Code:
on @*:text:*word*:#mychan:{
  inc $+(%,derek,$network,$chan,$wildsite)
  if ($(,$+(%,derek,$network,$chan,$wildsite)) > 2) {
    msg $chan 4Goodbye $nick $+ . You have been warned. Your ban will lift in approximately 5 minutes.
    ban -ku300 $chan $nick 2
    unset $+(%,derek,$network,$chan,$wildsite)
  }
  elseif ($(,$+(%,derek,$network,$chan,$wildsite)) == 2) {
    msg $chan 4Please $nick $+ , do not use such language. This is the channel's final warning before someone gets kicked.
  }
  else {
    msg $chan 4Please $nick $+ , do not use such language in here.
  }
}
Of course, last but not least, we need to unset the variable when the offender is kicked and banned.