Mirc twitch.tv bot

By flazzid on 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

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 shoot 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        
  $+ .
}

Comments

Sign in to comment.
Vegito   -  Feb 23, 2014

You can do it like this.
!insult[nr] [nick]

On *:TEXT:!insult*:#: {
  if (%flood [ $+ [ $nick ] $+ [ $right($1,-1) ] ] > 0) { notice $nick You must wait $duration($v1) in order to insult someone again. | halt }
  set -z %flood [ $+ [ $nick ] $+ [ $right($1,-1) ] ] 10
  var %x $mid($1,8)
  if ($3-) { msg # Your to stupid to even insult anybody. | return }
  if (%x == 1) msg # $2 If I wanted to kill myself I'd climb your ego and jump to your IQ. 
  elseif (%x == 2) msg # $2 It looks like your face caught on fire and someone tried to put it out with a hammer.
  elseif (%x == 3) msg # $2 It's kinda sad watching you attempt to fit your entire vocabulary into a sentence.
  elseif (%x == 4) msg # $2 You must have been born on a highway because that's where most accidents happen.    
  elseif (%x == 5) msg # $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 ĀŠŠ.. 
  elseif (%x == 6) msg # $2 Is your a$$ jealous of the amount of shoot that just came out of your mouth?    
  elseif (%x == 7) msg # $2 I don't exactly hate you, but if you were on fire and I had water, I'd pour the water out.      
  elseif (%x == 8) msg # $2 Your family tree must be a cactus because everybody on it is a prick.   
  elseif (%x == 9) msg # $2 I just found out your birth certificate is an apology letter from the condom factory.   
  elseif (%x == 10) msg # So, a thought crossed your mind? Must have been a long and lonely journey for you $2
  else msg # Invalid Insult 
}

But I think your beter off using textfile.

 Respond  
rebel9   -  Jan 29, 2014
on *:TEXT:!insult *:#: {
  set -u3 %insult $rand(1,10)
  if (%insult == 1) msg $chan You're gay
  if (%insult == 2) msg $chan You're dads gay.
  if (%insult == 3) msg $chan You're brothers gay
  if (%insult == 4) msg $chan You have 2 gay dads.
  if (%insult == 5) msg $chan You're brother has a new boyfriend
  if (%insult == 6) msg $chan You're dad has a diff love affair with another man, cheating on the one hes currently dating.
  if (%insult == 7) msg $chan Dick loves this family.
  if (%insult == 8) msg $chan This family loves dick
  if (%insult == 9) msg $chan How much dick does it take to satisfy this family?
  if (%insult == 10) msg $chan HUGGEEEEEEE faggot.
}

Just keep adding those if statements with the next following number, and change the last parameter to however many insults you have. I can optimize this however you want, I just don't have a grasp on exactly what it is you're trying to do. Let me know if there is anything here you'd like me to change, wont take but a few seconds.

flazzid  -  Jan 29, 2014

ok what i am doing is making a chat bot that has a bunch of preloaded insults and i want uses on twitch to be able to type !insult23 (username) and it display the msg like today was a good day for (username), his mouth didnt override his rectum also after looking at the code where would %insult be set

anthonydfurr  -  Feb 18, 2014

Create a txt file or ini file and read from it. I am seeing way too many snippets with no opening and closing brackets (WILL CAUSE PROBLEMS).

on :TEXT:!insult :#: {
msg $active $read(*.txt)
}

~Where *.txt is the name of the file. (If file is stored somewhere else other than your mIRC directory, add the directory location in front of the name.

rebel9  -  Feb 20, 2014

Why create a txt when you can just put it in the code right there, it's not that big of a code snippet and if he wants to add more, its very easy to do so in scripts editor. That script does NOT cause problems and I've written a couple of scripts without brackets like that before, it works fine. There are no missing brackets, check mSLdev. I know exactly where you are talking about, right after the if statements. I have 3 different snippets running and have been for years just like that, and I've never had issues. Had that same folder copied onto several different boxes, has worked on every single one of them with several different versions of mIRC.

anthonydfurr  -  Feb 20, 2014

The reason to use a text file: You use 3 maybe 4 lines to write a loop to populate all insults instead of N plus lines to do the same thing. It is more efficient through a text file (less code to read through, less processes/memory/cpu usage, etc). Also, doing it the way you are doing it will cause the script to exponentially grow when added to. Doing it my way, the size of the script doesn't change.

Also, I didn't say the script causes problems. I said WILL cause problems. I was not talking specifically about your snippet, but just in general. I like using brackets (easier to read, easier to troubleshoot, more efficient, and common programming practice).

I was attempting to rub my programming practices on you, just trying to shed some light on issues I had with the script.

Have a great day :)

anthonydfurr  -  Feb 20, 2014

on 1:TEXT:!insult:*: {
msg $chan $read(insults.txt)
}

Text file saved in mIRC directory (insults.txt):
You're gay
You're dads gay.
You're brothers gay
You have 2 gay dads.
You're brother has a new boyfriend
You're dad has a diff love affair with another man, cheating on the one hes currently dating.
!@#$ loves this family.
This family loves !@#$
How much !@#$ does it take to satisfy this family?
HUGGEEEEEEE faggot.

That is all of the code :) Add 20,000 more insults and the code doesn't change. How is your way more efficient? I would understand if you have other conditional formatting going on, but even then you could accomplish same results with my code, just minor tweaks.

Sign in to comment

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.