Bot Help?

By heckaber2 on Dec 03, 2014

Any Suggestions you would make to add on? I would appreciate if someone could add on a timer that repeats the !ctt command over and over on a 15 minute loop, and a !raid command. I tried coding my own, but the mIRC client didn't do anything when I actually tried to execute the command. Also, I don't know why, but so far the only commands that have worked are on:TEXT: commands, no clue why. Here's the code from my bot so far.

on *:TEXT:!ctt:#: { 
  if ((%floodctt) || ($($+(%,floodctt.,$nick),2))) { return }
  set -u10 %floodctt On
  set -u30 %floodctt. $+ $nick On
  msg $chan Be sure to click this link to post to your friends on twitter and help grow the channel! It's Much appreciated! http://ctt.ec/adc2V
}

on *:TEXT:!fish:#: { 
  if ((%floodfish) || ($($+(%,floodfish.,$nick),2))) { return }
  set -u10 %floodfish On
  set -u30 %floodfish. $+ $nick On
  msg $chan /me slaps $nick with a large bass
}

on *:TEXT:!server:#: { 
  if ((%floodserver) || ($($+(%,floodserver.,$nick),2))) { return }
  set -u10 %floodserver On
  set -u30 %floodserver. $+ $nick On
  msg $chan Heckaber2 does not share his server info to prevent stream trolling. On some days he may play with his followers but most days he will be playing by himself
}

on *:TEXT:!gear:#: { 
  if ((%floodgear) || ($($+(%,floodgear.,$nick),2))) { return }
  set -u10 %floodgear On
  set -u30 %floodgear. $+ $nick On
  msg $chan http://pcpartpicker.com/user/heckaber2/saved/TdLbt6 Here is a list of all of my PC Spec's, this will give you a detail list of all my PC parts. 
}

on *:TEXT:!rules:#: { 
  if ((%floodrules) || ($($+(%,floodrules.,$nick),2))) { return }
  set -u10 %floodrules On
  set -u30 %floodrules. $+ $nick On
  msg $chan The rules of the stream are this: 1. Refrain from spoilers and/or backseating 2. Negativity/insults directed at myself or other members in chat will be tolerated, please respect the moderators! 3. We may get lewd in here, but try to keep it classy! 4. No racism, sexism, or homophobic comments. 5. All links require mod approval
}

on *:TEXT:!music:#: { 
  if ((%floodmusic) || ($($+(%,floodmusic.,$nick),2))) { return }
  set -u10 %floodmusic On
  set -u30 %floodmusic. $+ $nick On
  msg $chan Heckaber2's Stream Playlis can be found here! https://soundcloud.com/heckaber2/sets/stream-music Please go look up the artists because they are simply amazing!
}

on *:TEXT:!song:#: {
  if ((%floodsong) || ($($+(%,floodsong.,$nick),2))) { return }
  set -u10 %floodsong On
  set -u30 %floodsong. $+ $nick On
  if (!$play(#)) {
    .play # C:\Users\heckaber2\Documents\Twitch Stuff\Music\
  }
}

on *:TEXT:!button:#: { 
  if ((%floodbutton) || ($($+(%,floodbutton.,$nick),2))) { return }
  set -u10 %floodbutton On
  set -u30 %floodbutton. $+ $nick On
  msg $chan http://inception.davepedu.com
}

on *:TEXT:!end:#: { 
  if ((%floodend) || ($($+(%,floodend.,$nick),2))) { return }
  set -u10 %floodend On
  set -u30 %floodend. $+ $nick On
  msg $chan This is the end of the cast everyone! If you had a good time be sure to leave a follow and to also follow me at www.twitter.com/heckaber2 to keep up to date with streams! :D 
}

on *:TEXT:!raid:#: {
  if ($nick isop #){
  if (!$2) msg $chan Must specify a streamer to raid
  elseif ($2) && (!$3) msg $chan This is the end of the stream everyone! Its raid time! PogChamp Go to http://www.twitch.tv/ $+ $2 and once you see the sign say "Holy Heck! Its a Heckaber2 Raid"
}

Comments

Sign in to comment.
iSleepless   -  Jan 20, 2015

Do you mean to repeat a message every 15 minutes? If so try
on *:text:COMMAND HERE:#:{ if ($nick == YOURNAMEHERE) .timer (Number of times message is stated) (interval in which statement is repeated(seconds) msg $chan MESSAGE HERE }

Try this:
on *:text:!ctt:#:{ if($nick == YourNameHere) .timer 99999999999 900 msg $chan Be sure to click this link to post to your friends on twitter and help grow the channel! It's Much appreciated! http://ctt.ec/adc2V
}

 Respond  
Afterburn1000   -  Dec 03, 2014

Mayhaps you could add a points system, custom commands, a welcome system, link blocker and regulars system? It really depends on what you want the bot to do. Hopefully that'll give you a couple of ideas though.

apologies for the lack of code windows, have yet to learn how to do them, however for the sake of easier reading/copying of the script I put it in a pastebin http://pastebin.com/3KNw3iYH

Timers are very simple in mIRC, all you need to use is .timer(reference) [repeats] [interval] (action)

So for your command every 15 minutes it would be:

on *:TEXT:!ctt:#: {
if ((%floodctt) || ($($+(%,floodctt.,$nick),2))) { return }
set -u10 %floodctt On
set -u30 %floodctt. $+ $nick On
.timerctt 0 900 msg $chan Be sure to click this link to post to your friends on twitter and help grow the channel! It's Much appreciated! http://ctt.ec/adc2V
}

however if you want to use timers you may want to turn it off at some point, all you need to do for that is make a seperate command which uses .timer(reference) off.

Your !raid command doesn't work because you didn't include the brackets. Here is the command with the correct brackets, it should now work.

on *:TEXT:!raid:#: {
if ($nick isop #){
if (!$2) { msg $chan Must specify a streamer to raid }
elseif ($2) && (!$3) { msg $chan This is the end of the stream everyone! Its raid time! PogChamp Go to http://www.twitch.tv/ $+ $2 and once you see the sign say "Holy Heck! Its a Heckaber2 Raid" }
}

I cannot help you on why only on text triggers seem to be working for you, although it is possible you have a wildcard trigger (i.e. on :text::#: { ) Which "blocks" commands underneath it in the script window from being activated. When in doubt open a new script file and try the command in there.

ovelayer  -  Dec 04, 2014

sounds about right ..
maybe use on :text:!ctt::
also if your running the script on yourself you might wanna use some
on *:input:

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.