flazzid

flazzid

Joined
Jan 28, 2014
Interests
life under my interestests

Activity Stream

flazzid commented on a Page, Random Insult Bot  -  Feb 01, 2014

i am making one of these right now for twitch and heres my idea of it

 on *:TEXT:!insult*:#: {

  ;check for != not equal, if anyone else but you they get flood.
  if ($nick != botownernamehere) {
    if ((%flood!insult) || ($($+(%,flood!insult.,$nick),2))) { return }
    set -u5 %flood!insult On
    set -u15 %flood!insult. $+ $nick On
  }

  if ($0 < 2) {
    msg $chan The proper way to use this bot is !insult <#> <user>
  }
  else {
    if ($2 <= $lines(insults.txt))  {

      ; this is checking to see if request is not less than 0
      if ($2 > 0 ) {

        set %user $3
        set %messsageline $2
        set %message $read(insults.txt, n, %messsageline)
        set %spot $calc($pos(%message, *) - 1 )

        if (%spot = -1) {
          ;no * found so full message is ok. and no need to check vs white list.
          set %message $read(insults.txt, n, %messsageline)
        }
        else {
          set %leftmessage $left(%message, %spot)
          set %rightmessage $right(%message, $calc($len(%message) - $calc(%spot + 1)))

          if ($3 = $ulist(%user,whitelist,1)) { 
            ;user on white list fix message to $nick not what they wanted.
            set %message %leftmessage $nick %rightmessage
          }
          else {
            ;name not on white list ok to display as requested.
            set %message %leftmessage $3 %rightmessage
          }
        }
        ; send message to chat.
        msg $chan %message

      }
      else {
        msg $chan You cannot input negative numbers
      }
    }
    ; this is if they pick a request larger than the total number of insults.
    else {
      msg $chan You exceeded the total number of insults of $lines(insults.txt) $+ .
    }
  }
}  
 Respond  
flazzid created a Page  -  Jan 28, 2014

this is a simple make you bot say command with many examples to use this snippet u need to change On :TEXT:1 *:#: { you will need to change the wildcard # command also looking for any ways to optimize it

flazzid   -  Jan 28, 2014

Hello All, I'm new to mIRC scripting and have picked up on it from watching youtube videos , im currently trying to make a twitch chatbot and i know the sections of my code works but i was wondering if anyone could optimize it

here it is currently

On *:TEXT:*1 *:#: {
  if ((%flood*1) || ($($+(%,flood*1.,$nick),2))) { return }
  set -u5 %flood*1 On
  set -u10 %flood*1. $+ $nick On 
  if ($0 > 2) { msg $chan Your to stupid to even insult anybody. | return }
  msg $chan $2 If I wanted to kill myself I'd climb your ego and jump to your IQ.   
  $+ .
}

On *:TEXT:*2 *:#: {
  if ((%flood*2) || ($($+(%,flood*2.,$nick),2))) { return }
  set -u5 %flood*2 On
  set -u10 %flood*2. $+ $nick On 
  if ($0 > 2) { msg $chan Your to stupid to even insult anybody. | return }
  msg $chan $2 It looks like your face caught on fire and someone tried to put it out with a hammer.    
  $+ .
}

On *:TEXT:*3 *:#: {
  if ((%flood*3) || ($($+(%,flood*3.,$nick),2))) { return }
  set -u5 %flood*3 On
  set -u10 %flood*3. $+ $nick On 
  if ($0 > 2) { msg $chan Your to stupid to even insult anybody. | return }
  msg $chan $2 It's kinda sad watching you attempt to fit your entire vocabulary into a sentence.   
  $+ .
}

On *:TEXT:*4 *:#: {
  if ((%flood*4) || ($($+(%,flood*4.,$nick),2))) { return }
  set -u5 %flood*4 On
  set -u10 %flood*4. $+ $nick On 
  if ($0 > 2) { msg $chan Your to stupid to even insult anybody. | return  }
  msg $chan $2 You must have been born on a highway because that's where most accidents happen. 
  $+ .
}

On *:TEXT:*5 *:#: {
  if ((%flood*5) || ($($+(%,flood*5.,$nick),2))) { return }
  set -u5 %flood*5 On
  set -u10 %flood*5. $+ $nick On 
  if ($0 > 2) { msg $chan Your to stupid to even insult anybody. | return }
  msg $chan $2 I'd like to see things from your point of view but I can't seem to get my head that far up my ĀŠŠ..  
  $+ .
}

On *:TEXT:*6 *:#: {
  if ((%flood*6) || ($($+(%,flood*6.,$nick),2))) { return }
  set -u5 %flood*6 On
  set -u10 %flood*6. $+ $nick On 
  if ($0 > 2) { msg $chan Your to stupid to even insult anybody. | return }
  msg $chan $2 Is your a$$ jealous of the amount of shit that just came out of your mouth?      
  $+ .
}

On *:TEXT:*7 *:#: {
  if ((%flood*7) || ($($+(%,flood*7.,$nick),2))) { return }
  set -u5 %flood*7 On
  set -u10 %flood*7. $+ $nick On 
  if ($0 > 2) { msg $chan Your to stupid to even insult anybody. | return }
  msg $chan $2 I don't exactly hate you, but if you were on fire and I had water, I'd pour the water out.       
  $+ .
}

On *:TEXT:*8 *:#: {
  if ((%flood*8) || ($($+(%,flood*8.,$nick),2))) { return }
  set -u5 %flood*8 On
  set -u10 %flood*8. $+ $nick On 
  if ($0 > 2) { msg $chan Your to stupid to even insult anybody. | return }
  msg $chan $2 Your family tree must be a cactus because everybody on it is a prick.        
  $+ .
}

On *:TEXT:*9 *:#: {
  if ((%flood*9) || ($($+(%,flood*9.,$nick),2))) { return }
  set -u5 %flood*9 On
  set -u10 %flood*9. $+ $nick On 
  if ($0 > 2) { msg $chan Your to stupid to even insult anybody. | return }
  msg $chan $2 I just found out your birth certificate is an apology letter from the condom factory.        
  $+ .
}

On *:TEXT:*10 *:#: {
  if ((%flood*10) || ($($+(%,flood*10.,$nick),2))) { return }
  set -u5 %flood*10 On
  set -u10 %flood*10. $+ $nick On 
  if ($0 > 2) { msg $chan Your to stupid to even insult anybody. | return }
  msg $chan So, a thought crossed your mind? Must have been a long and lonely journey for you $2        
  $+ .
}

and yes i know its a wildcardthen number i am just using it for the example
i have about another 150 insults to add to it and i think there has got to be a quicker way of doing it then doing it this fashion,
any and all help is greatly appreciated

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.