RavenBot

By Gemster on Aug 29, 2009

Updated....

A fully functional socketbot made in dialog. This is a great socketbot that has quite a few functions.

Fully remote control bot that runs straight from your own mirc.
This script is for your main client(mirc) not for a bot.

Well this is my first script useing sockets and as always its dialog :D

A must try :D

I made this because ive seen many socketbots but none that was in dialog and none that had more than 3 commands

A special thanks to jonesy44 for helping with parts of this script :D

Thanks
Gemster

[Updated]

  • Dialog has been re-made using tabs thus allowing a lot more commands to be added
  • Settings tab to allow you to store info like nickname, server, port and nickserv pass
  • code rewriten by jonesy44, thanks mate.
  • many more little things too :D
Menu channel,status {
  RavenBot:sockbot
}
alias sockbot dialog $iif(!$dialog(sockbot),-md sockbot,-v) sockbot
dialog sockbot {
  title RavenBot [Version 2.2.1 ]
  size -1 -1 264 273
  option dbu
  text "RavenBot System by Gemster", 5, 99 5 66 15, center
  button "Say", 11, 8 148 37 10
  edit "-Enter Text Here-", 14, 48 148 206 10, autohs
  edit "", 49, 1 159 261 98, read multi autovs vsbar
  button "Clear", 50, 118 259 37 12
  tab "Connection", 55, 0 17 262 125
  button "Connect Bot", 7, 148 36 53 10, tab 55
  button "Join", 9, 31 53 37 10, tab 55
  button "Part", 10, 135 53 37 10, tab 55
  edit "#channel", 12, 71 53 56 10, tab 55 autohs
  edit "#channel", 13, 175 53 56 10, tab 55 autohs
  button "Change Nick", 6, 31 69 37 10, tab 55
  edit "New-Nick-here", 8, 71 69 56 10, tab 55 autohs
  button "Register Nick", 41, 31 85 37 10, tab 55
  button "Identify Nick", 45, 135 69 37 10, tab 55
  edit "Password", 46, 71 85 56 10, tab 55 autohs
  edit "Your.email@address.com", 47, 135 85 97 10, tab 55 autohs
  edit "Password", 48, 175 69 56 10, tab 55 autohs
  button "Disconnect Bot", 51, 204 36 56 10, tab 55
  text "Server:", 2, 4 37 18 8, tab 55
  edit "%tmp1.var", 1, 22 36 81 10, tab 55 autohs
  edit "6667", 4, 120 36 27 10, tab 55 autohs
  text "Port:", 3, 108 37 13 8, tab 55
  button "Group Nick", 86, 31 101 37 10, tab 55
  edit "Target Nick", 87, 71 101 56 10, tab 55 autohs
  edit "Target Password", 88, 135 101 62 10, tab 55 autohs
  button "Drop Nick", 89, 31 117 37 10, tab 55
  text "To Drop Your Nick You Must Be Identified First", 90, 71 118 112 8, tab 55
  tab "Op Controls", 56
  box "Op Control", 27, 8 34 195 44, tab 56
  button "+q", 15, 15 45 12 12, tab 56
  button "-q", 16, 15 61 12 12, tab 56
  button "+a", 17, 31 45 12 12, tab 56
  button "-a", 18, 31 61 12 12, tab 56
  button "+o", 19, 47 45 12 12, tab 56
  button "-o", 20, 47 61 12 12, tab 56
  button "+h", 21, 63 45 12 12, tab 56
  button "-h", 22, 63 61 12 12, tab 56
  button "+v", 23, 79 45 12 12, tab 56
  button "-v", 24, 79 61 12 12, tab 56
  edit "%tmp.var", 25, 143 45 56 12, tab 56 autohs
  edit "Nickname", 26, 143 61 56 12, tab 56 autohs
  button "+b", 29, 127 61 12 12, tab 56
  button "Kick", 28, 127 45 12 12, tab 56
  button "+e", 82, 95 45 12 12, tab 56
  button "-e", 83, 95 61 12 12, tab 56
  button "+I", 84, 111 45 12 12, tab 56
  button "-I", 85, 111 61 12 12, tab 56
  tab "Channel Modes", 57
  box "Channel Modes", 30, 8 34 249 76, tab 57
  button "-t", 31, 15 61 12 12, tab 57
  button "+n", 32, 31 45 12 12, tab 57
  button "-n", 33, 31 61 12 12, tab 57
  button "+i", 34, 47 45 12 12, tab 57
  button "-i", 35, 47 61 12 12, tab 57
  button "+m", 36, 63 45 12 12, tab 57
  button "-m", 37, 63 61 12 12, tab 57
  button "+s", 38, 79 45 12 12, tab 57
  button "-s", 39, 79 61 12 12, tab 57
  edit "%tmp.var", 40, 159 69 56 12, tab 57 autohs
  button "+G", 42, 95 45 12 12, tab 57
  button "-G", 43, 95 61 12 12, tab 57
  button "+t", 44, 15 45 12 12, tab 57
  button "-V", 78, 143 93 12 12, tab 57
  button "+V", 77, 143 77 12 12, tab 57
  button "+T", 75, 127 77 12 12, tab 57
  button "-T", 76, 127 93 12 12, tab 57
  button "-S", 74, 111 93 12 12, tab 57
  button "+S", 79, 111 77 12 12, tab 57
  button "+R", 72, 95 77 12 12, tab 57
  button "-R", 73, 95 93 12 12, tab 57
  button "-Q", 71, 79 93 12 12, tab 57
  button "+Q", 70, 79 77 12 12, tab 57
  button "+N", 81, 63 77 12 12, tab 57
  button "-N", 80, 63 93 12 12, tab 57
  button "-K", 66, 47 93 12 12, tab 57
  button "+K", 65, 47 77 12 12, tab 57
  button "+M", 63, 31 77 12 12, tab 57
  button "-M", 64, 31 93 12 12, tab 57
  button "-C", 62, 15 93 12 12, tab 57
  button "+C", 67, 15 77 12 12, tab 57
  button "+c", 69, 111 45 12 12, tab 57
  button "-c", 68, 111 61 12 12, tab 57
  button "-p", 59, 127 61 12 12, tab 57
  button "+p", 58, 127 45 12 12, tab 57
  button "+z", 60, 143 45 12 12, tab 57
  button "-z", 61, 143 61 12 12, tab 57
  text "For more info on channel modes please type  /helpop ?chmodes", 91, 51 112 157 8, tab 57 center
  tab "Settings", 94
  box "Bot Settings", 95, 8 34 248 80, tab 94
  text "Bot's main Nickname:", 96, 15 47 66 8, tab 94
  edit "", 97, 82 46 82 10, tab 94 autohs
  text "Password To Identify With Nickserv:", 98, 15 58 88 8, tab 94
  edit "", 99, 104 57 82 10, tab 94 autohs
  text "Main Server:", 100, 15 69 31 8, tab 94
  edit "", 101, 48 69 106 10, tab 94 autohs
  text "Port:", 102, 159 70 14 8, tab 94
  edit "", 103, 175 69 36 10, tab 94 autohs
  text "Auto Join Channel(s):", 104, 15 81 53 8, tab 94
  edit "", 105, 69 80 178 10, tab 94 autohs
  text "To add more that 1 channel use commas. Example:   #channel,#channel1,#channel2,#channel3,#channel4   and so on. ", 106, 50 95 165 15, tab 94 center
  button "Save", 107, 113 116 37 12, tab 94
  text "NOTE: This dialog will close and reopen for the new setting to take affect.", 54, 8 130 249 8, tab 94 center
  menu "Help", 52
  item "About", 53, 52
}
on *:dialog:sockbot:*:*: {
  if $devent == init {
    if %rbnick { did -ra sockbot 97 $v1 }
    if %rbpass { did -ra sockbot 99 $v1 }
    if %rbserv { did -ra sockbot 101 $v1 }
    if %rbport { did -ra sockbot 103 $v1 }
    if %rbchans { did -ra sockbot 105 $v1 }
    did -ra sockbot 25,40 $active
    if !%rbserv { did -ra sockbot 1 $server }
    else did -ra sockbot 1 %rbserv
    if !%rbport { did -ra sockbot 4 $port }
    else did -ra sockbot 4 %rbport
  }
  elseif $devent == sclick {
    if $did == 6 { sockwrite -nt sockbot NICK $did(8) }
    elseif $did == 7 {
      if $sock(sockbot) && !$input(A socketbot is already connected. Would you like to disconnect it?,qy,Socket bot) { return }
      else .sockclose sockbot | sockopen sockbot $did(1) $did(4) | .timer 1 3 noop $input(Bot has been connected,oi,Socket bot) 
    }
    elseif $did == 9 { sockwrite -nt sockbot JOIN $did(12) }
    elseif $did == 10 { sockwrite -nt sockbot PART $did(13) }
    elseif $did == 11 { sockwrite -nt sockbot PRIVMSG $active $+(:,$did(14)) }
    elseif $did isnum 15-24 || $did == 29 || $did isnum 82-85 { sockwrite -nt sockbot MODE $did(25) $did($did) $did(26) }
    elseif $did == 28 { sockwrite -nt sockbot KICK $did(25) $did(26) }
    elseif $did isnum 31-44 && $did != 41 { sockwrite -nt sockbot MODE $did(40) $did($did) }
    elseif $did == 41 { sockwrite -nt sockbot nickserv register $did(46) $did(47) }
    elseif $did == 45 { sockwrite -nt sockbot nickserv identify $did(48) }
    elseif $did == 50 { did -r sockbot 49 }
    elseif $did == 51 && $sock(sockbot) { .sockclose sockbot | noop $input(Bot has been disconnected,oh,Socket bot) }
    elseif $did isnum 58-81 { sockwrite -nt sockbot MODE $did(40) $did($did) }
    elseif $did == 86 { sockwrite -nt sockbot nickserv GROUP $did(87) $did(88) }
    elseif $did == 89 { sockwrite -nt sockbot nickserv drop }
    elseif $did == 107 {
      set %rbnick $did(97)
      set %rbpass $did(99)
      set %rbserv $did(101)
      set %rbport $did(103)
      set %rbchans $did(105)
      dialog -x $dname
      dialog -m sockbot sockbot
    }
  }
  elseif $devent == menu && $did == 53 { dialog $iif(!$dialog(sockbot_about),-m sockbot_about,-v) sockbot_about }
}
on *:sockopen:sockbot: {
  if !%rbnick { sockwrite -nt $sockname nick RavenBot }
  else sockwrite -nt $sockname nick %rbnick
  sockwrite -nt $sockname user SockBot SockBot gemhosting.info :Sock@Bot.com
  if %rbchans { sockwrite -nt sockbot join $v1 }
  if %rbpass { sockwrite -nt sockbot nickserv identify $v1 }
}
on *:sockread:sockbot: {
  sockread -f %temp | tokenize 32 %temp
  if $sockerr > 0 { echo *** ERROR $+([,$sock($sockname).wsmsg,].) }
  else {
    if $1 == PING { sockwrite -nt $sockname PONG $2 }
    if $dialog(sockbot) { did -a sockbot 49 $+($crlf,%temp) } 
  }
}
dialog sockbot_about {
  title "RavenBot -- About"
  size -1 -1 125 141
  option dbu
  text "Quite a few commands such as channel operator commands, Nickname commands, a few channel mode commands and a speak command. There is a edit box at the bottom of the dialog that displays all output from channels and the server.", 1, 8 8 114 49
  text "Script made by Gemster. admin@gemhosting.info", 2, 8 63 115 15
  text "A special thanks to Jonesy44 for helping with parts of this script.", 3, 8 83 116 16
  button "Close", 4, 49 118 29 10, cancel
  link "Great, reliable, cheap website hosting at  http://www.gemhosting.info", 5, 14 101 99 13
}
on *:dialog:sockbot_about:sclick:5:run http://www.gemhosting.info

Comments

Sign in to comment.
Shinybot   -  Nov 09, 2009

Can you add Botserv ?

 Respond  
Stump   -  Nov 09, 2009

Ty for the help. Have a great day all.

 Respond  
Shinybot   -  Nov 05, 2009

Verry Nice

 Respond  
sunslayer   -  Nov 04, 2009

hit alt+r and click on the remote tab then paste the code and click OK

 Respond  
Stump   -  Nov 04, 2009

I'm new to MIRC and would just like to know which section i paste this code into after i grab it? Thank you for helping the "new" guy.

 Respond  
Ghost-writer   -  Sep 19, 2009

YES! NOW GO DO IT SO I CAN MAKE AN ELITER BOT ;]

 Respond  
Jonesy44   -  Sep 18, 2009

Sounds good, i look forward to it :)

 Respond  
Gemster   -  Sep 18, 2009

Ok thanks jonesy44, ill add something like that soon.

Gemster

 Respond  
Jonesy44   -  Sep 18, 2009

Whatever you chose:) Probably an alias preferable and people can add their own !triggers to do the alias:)

 Respond  
Gemster   -  Sep 17, 2009

Ok jonesy44

You forgot to answer this:

yeah i remeber u asking about this befor.

Was it for other users to use commands like !command on user lvls or just for u(owner) to use lik !command or /command.

or both ?

Gemster

 Respond  
Jonesy44   -  Sep 17, 2009

All that regex does it remove a "/" if there's one before the cmd, cos the socket doesnt need a "/" before the cmd

 Respond  
Gemster   -  Sep 16, 2009

yeah i remeber u asking about this befor.

Was it for other users to use commands like !command on user lvls or just for u(owner) to use lik !command or /command.

or both ?

Gemster

P.S - regex hmm, I hate regex as I dont understand it lol. Have tryed to figure it out but too big of a head ache.

 Respond  
Jonesy44   -  Sep 16, 2009

Make a conversion alias? This is what i suggested a while back but forgot to link up the data lol.

something like;

alias ravencmd noop $regex($1-,^\/?(.*)$) | sockwrite -nt sockbot $regml(1)

 Respond  
Gemster   -  Sep 16, 2009

I mean like games etc. cookie scripts, basic stuff :). Put a spot were i could put all those so it could be a bot and less of a mode setting dialog sort of thing :D. Now that would be sexy and a first to the bot making society :O, tbh if i knew how i would do it myself :3 but il let you :D.

Well for it to be used with a socketbot all commands on the "games" script ect would have to be changed as the docket only read socket commands.

ie:

sockwrite -nt sockbot <command goes here>

But if any1 knows how to do this without recoding the extra games script ect please let me know and ill add it.

Gemster

 Respond  
Ghost-writer   -  Sep 15, 2009

I mean like games etc. cookie scripts, basic stuff :). Put a spot were i could put all those so it could be a bot and less of a mode setting dialog sort of thing :D. Now that would be sexy and a first to the bot making society :O, tbh if i knew how i would do it myself :3 but il let you :D.

 Respond  
Gemster   -  Sep 10, 2009

make it so i can put on scripts :\

What exactly do u mean Ghost-writer ?

Gemster

 Respond  
Ghost-writer   -  Sep 10, 2009

make it so i can put on scripts :\

 Respond  
Pass   -  Sep 09, 2009

Very true, Gemster. Apparently i overlooked the fact that it's a socketbot

 Respond  
Gemster   -  Sep 09, 2009

Updated, hope you all like the new version as much as I did writing it :D

Have Fun

Gemster

 Respond  
Gemster   -  Sep 07, 2009

Unless you set the bot's mIRC.exe to run from a proxy, which would mean your bot can use proxies, since mIRC can use proxies.

Pass, it isent a mirc bot or any other kind of client bot. This script is not and will not work correctly in a bots script. Its for your own mirc and the bot runs directly from in there(kinda remote control).

Its a socket bot, not a mirc bot.

So you cant use proxys at all.

Thanks
Gemster

 Respond  
Pass   -  Sep 07, 2009

it wont cause any trouble as it users your own ip. Even if you are connected to irc via a proxie or bnc, this bot will always use your real ip.

Unless you set the bot's mIRC.exe to run from a proxy, which would mean your bot can use proxies, since mIRC can use proxies.

 Respond  
Ghost-writer   -  Sep 06, 2009

well thanks for telling me that now :|

 Respond  
Gemster   -  Sep 06, 2009

it wont cause any trouble as it users your own ip. Even if you are connected to irc via a proxie or bnc, this bot will always use your real ip.

Thanks
Gemster

 Respond  
Ghost-writer   -  Sep 06, 2009

i click join i click part i click join i click part i get banned i join another channel repeat. FUN PROCCESS! But i know its not made for flooding, just saying dont let a noob get there hands on this. it could cause any ircop a lot of trouble :|

 Respond  
Gemster   -  Sep 06, 2009

Yes i know that sunslayer, but its more like a new snippet rather than an update. The only thing in common with this post is that its a socketbot and a few commands are the same.

the dialog is compleatly different and most of the code is rewritten.

But I will update this post rather than making a new post.

Thanks
Gemster

 Respond  
sunslayer   -  Sep 05, 2009

Because this time RavenBot's dialog has been fully redone and a lot more commands added, ill be posting it as a new snippet but ill add a link to it from this 1.
to save u some time in the future if u have an updated version and u make a new post the post will be deleted

You may not post an updated snippet separately, you need to edit your first post.

 Respond  
Gemster   -  Sep 05, 2009

Anyways just to let u all know im almost done with the updated version.

Because this time RavenBot's dialog has been fully redone and a lot more commands added, ill be posting it as a new snippet but ill add a link to it from this 1.

Thanks
Gemster

 Respond  
TheNitelyfe   -  Sep 05, 2009

Gemster he means go to random Networks and spam-troll random channels in said networks lol

 Respond  
Gemster   -  Sep 05, 2009

i like it. good for join/part flood and the say button is great for it :] now all you need to do is connect this to a proxy and flood random servers ;]

Where in this snippet does it state that this is a flood bot ?
RavenBot was not made to be a flood bot in anyway at all and as for join/part flood, its just as easy to do that with ur own mirc. Proxie connection will not be added to this bot as its not a war bot in any way.

 Respond  
Ghost-writer   -  Sep 05, 2009

i like it. good for join/part flood and the say button is great for it :] now all you need to do is connect this to a proxy and flood random servers ;]

 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.