Top

Remote Bot Script


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  4.0 (of 1 scores)
Date Added  May 04, 2009
Last Updated  Aug 06, 2009
Tags  bot  control  remote 

Introduction

This is a remote script made for my bot. Its pretty nice, especially if you have another computer somewhere else running a bot

Grab the Code

on *:load:{
  set %bot.owner $$?="Please set my owner"
  set %bot.password $$?="Please set a password."
  echo -a If you need to reset your password, type /resetpass
  echo -a Coded by Kinight (Hawkee)
  echo -a Tested on irc.authoritygamer.com
  echo -a Channel #AuthorityGamer. User: iAlex
  echo -a Questions? Comments? alex@authoritygamer.com
  echo -a type /botcmds to get the list
}
 
alias help {
  If ($1 == $null) {
    help
  }
  Else {
    If ($1 == .cmd) {
      echo .cmd sends a RAW command to the server
      echo It basically tells the server exactly what you type after the password. 
      echo Ex: <Me> .cmd 123 helpop <Bot> Command Executed
      echo Bot's Side: Helpop OutPut
    }
    Elseif ($1 == .join) {
      echo .join usage:
      echo /msg Bot .join <password> <#Channel> 
    }
    Elseif ($1 == .part) {
      echo .part usage:
      echo /msg Bot .part <password> <#Channel>
    }
    Elseif ($1 == .server) {
      echo .server usage:
      echo /msg Bot .server <password> <IP/Host> <arguments> <ports> <password>
      echo type /help /server for more info
    }
    Elseif ($1 == .restart) {
      echo .restart usage:
      echo /msg Bot .restart <password> <now|connection|cancel> 
      echo .restart now < That will restart mIRC as soon as it gets the command
      echo .restart connection < It will disconnect and reconnect
      echo .restart cancel < Cancel's any pending restart
      echo .restart < Restarts mIRC in 30 secons
    }
    Elseif ($1 == .shutdown) {
      echo .shutdown usage:
      echo /msg Bot .shutdown <password>
      echo Shuts down the bot
    }
    Elseif ($1 == /resetpass) {
      echo /resetpass usage:
      echo /resetpass
      echo Will pop up a window for the new password
    }
    Else {
      help $1-
    }
  }
}
 
alias resetpass {
  echo -a Current Password: %bot.password
  set %bot.password $$?="Please input your new bot password"
  echo -a New Password: %bot.password
}
 
alias botcmds {
  echo -a Remote Bot Commands:
  echo -a .cmd - Execute a server command (Anything that is in /helpop on UnrealIRCd.  EG: join part msg notice)
  echo -a .join - Join a channel
  echo -a .part - Part a channel
  echo -a .server - Connect to a new server. Uses any agruments/extras mIRC supports.
  echo -a .restart <now|connection|cancel> - Restarts the bot.
  echo -a .shutdown - Shuts off the mIRC the bot is running off.  WARNING: Unless you can access the computer the bot is on, DO NOT USE THIS
  echo -a Local Commands:
  echo -a /resetpass - Resets the password used for remote cmds
  echo -a ~~~~~~~~~~~~~~~~~
  echo -a You can also type /help </local or .remote command>
}
 
on *:text:.shutdown*:?:{
  if ($nick == %bot.owner) {
    if ($2 == %bot.password) {
      exit -n  
    }
    Else {
      msg $nick Invalid Password. Syntax: /msg $me .shutdown <password>
    }
  }
  Else {
    msg $nick You're not the owner!
  }
}
 
 
on *:text:.server*:?:{
  if ($nick == %bot.owner) {
    if ($2 == %bot.password) {
      server $3- 
    }
    Else {
      msg $nick Invalid Password. Syntax: /msg $me .server <password> <server> <arguments> <port(s)> <password>
    }
  }
  Else {
    msg $nick You're not the owner!
  }
}
 
 
 
on *:text:.part*:?:{
  if ($nick == %bot.owner) {
    if ($2 == %bot.password) {
      part $3 
    }
    Else {
      msg $nick Invalid Password. Syntax: /msg $me .part <password> <channel>
    }
  }
  Else {
    msg $nick You're not the owner!
  }
}
 
 
on *:text:.join*:?:{
  if ($nick == %bot.owner) {
    if ($2 == %bot.password) {
      join $3 
    }
    Else {
      msg $nick Invalid Password. Syntax: /msg $me .join <password> <channel>
    }
  }
  Else {
    msg $nick You're not the owner!
  }
}
 
 
on *:text:.cmd*:?:{
  if ($nick == %bot.owner) {
    if ($2 == %bot.password) { 
      raw $3-
      msg %bot.owner Command Executed
    }
    Else {
      msg %bot.owner Invalid Password Syntax: /msg $me .cmd <password> <server-side command (join, part, etc.)> <value>
    }
  }
  Else {
    msg $nick You aren't the owner! 
  }
}
 
/* Taken from The_Alimghty_Duelist's Staff Bot v4 script */
 
on *:TEXT:.restart*:*: {
  If ($3 == $null) && ($2 == %bot.password) && ($nick == %bot.owner) {
    If (%restart != on) {
      .notice $nick Restarting in 30 seconds. To cancel this, type: restart cancel
      .timerrestart 1 30 exit -nr
      set %restart on
    }
    Else {
      .notice $nick Bot is already restarting
    }
  }
  Else {
    If ($2 == cancel) {
      If (%restart == on) {
        .timerrestart* off
        unset %restart
        .notice $nick Restart has been cancelled.
      }
      Else {
        If (%resnotice != on) {
          .notice $nick There is no restart scheduled.
          set -u3 %resnotice
        }
      }
    }
    If ($2 == now) {
      exit -nr
    }
    If ($2 == connection) {
      server
    }
  }
  Elseif ($nick !== %bot.owner) {
    msg $nick You aren't the owner.
  }
  Else {
    msg $nick Invalid Password.
  }
}
 
on *:text:*:?:{
  if ($nick !== %bot.owner) {
    msg $nick You're not the owner!
    window -c $nick
    write Logs.txt MSG: $+ $chr(91) $asctime(dd/mm/yyyy hh:nn:TT) $chr(93) $+  $nick : $1-
  }
}
 
on *:notice:*:{
  if ($nick !== %bot.owner) {
    notice $nick You're not the owner!
    write Logs.txt NOTICE:  $+ $chr(91) $asctime(dd/mm/yyyy hh:nn:TT) $chr(93) $+ $nick : $1-
  }
}
 
/* Thank you The_Almighty_Duelist */
 
on *:NICK: {
  If ($nick == %bot.owner) {
    set %bot.owner $newnick
  }
}
 

Comments

  (17)  RSS
Myidentityisasecret
Comments: 1
 
mIRC Snippet:  Remote Bot Script
Posted on May 4, 2009 6:49 pm
How do I set owner? :p DO I type it in where it says "Please set my owner"?
Jethro_
Comments: 436
 
mIRC Snippet:  Remote Bot Script
Posted on May 4, 2009 8:56 pm
As titled, this script goes into your bot remote. You type in a nick that you want to set as an owner. Once set, only that nick can trigger the script via the PM. Also, It is unnecessary to have two on text events.
Code:
on *:load: {
  set %bot.owner $$?="Please set my owner"
  echo -a Coded by Kinight (Hawkee)
  echo -a Tested on irc.authoritygamer.com
  echo -a Channel #AuthorityGamer. User: iAlex
  echo -a Questions? Comments? alex@authoritygamer.com
}
on *:TEXT:*:?: {
  if ($1 == .cmd) && ($nick == %bot.owner) {
    raw $2-
  }
  elseif ($nick != %bot.owner) {
    msg $nick Sorry $nick - I'm a bot, talk to $v2
    window -c $nick
    write Logs.txt TEXT:  [ $time ]  $nick : $1-
  }
}
on *:NOTICE:*: {
  if ($nick != %bot.owner) {
    write Logs.txt NOTICE:  [ $time ] $nick : $1-
  }
}
Aucun50
Comments: 548
 
mIRC Snippet:  Remote Bot Script
Posted on May 4, 2009 10:40 pm
Quote:
How do I set owner? :p DO I type it in where it says "Please set my owner"?


That is in the on load meaning when you load this script it will open a small box, the box will say "Please set my owner" under that box you type your "Bot owner name".

The way I see this is you have two on text and one is "on *:text:*:?:{" to read all commands and everything typed, the other is for .cmd when you type the .cmd the other on text will say "Sorry $nick - I'm a bot, talk to iAlex". To solve this use what
Jethro_ posted or put it into one on text event.

The_Almighty_Duelist
Comments: 84
 
mIRC Snippet:  Remote Bot Script
Posted on May 5, 2009 5:20 am
Code:

on *:NICK: {
  If ($nick == %bot.owner) {
    set %bot.owner $newnick
  }
}
PATX
Comments: 390
 
mIRC Snippet:  Remote Bot Script
Posted on May 5, 2009 4:52 pm
ok. pretty good script. kinda newbish and pointless but if you are new then good job.
Kinight
Comments: 18
 
mIRC Snippet:  Remote Bot Script
Posted on May 11, 2009 1:43 am
PATX

I'm not that noobish, its just helpful if you have a script on a remote computer you cant get to and you need to run a command on. I use it when i leave a bot running at home and im gone
The_Almighty_Duelist
Comments: 84
 
mIRC Snippet:  Remote Bot Script
Posted on Aug 5, 2009 7:12 pm
Code:

alias help {
  If ($1 == $null) {
    help
  }
  Else {
    If ($1 == .cmd) {
      echo .cmd sends a RAW command to the server
      echo It basically tells the server exactly what you type after the password.
      echo Ex: <Me> .cmd 123 helpop <Bot> Command Executed
      echo Bot's Side: Helpop OutPut
    }
    If ($1 == .join) {
      echo .join usage:
      echo /msg Bot .join <password> <#Channel>
    }
    If ($1 == .part) {
      echo .part usage:
      echo /msg Bot .part <password> <#Channel>
    }
    If ($1 == .server) {
      echo .server usage:
      echo /msg Bot .server <password> <IP/Host> <arguments> <ports> <password>
      echo type /help /server for more info
    }
    If ($1 == .restart) {
      echo .restart usage:
      echo /msg Bot .restart <password> <now|connection|cancel>
      echo .restart now < That will restart mIRC as soon as it gets the command
      echo .restart connection < It will disconnect and reconnect
      echo .restart cancel < Cancel's any pending restart
      echo .restart < Restarts mIRC in 30 secons
    }
    If ($1 == .shutdown) {
      echo .shutdown usage:
      echo /msg Bot .shutdown <password>
      echo Shuts down the bot
    }
    If ($1 == /resetpass) {
      echo /resetpass usage:
      echo /resetpass
      echo Will pop up a window for the new password
    }
  }
}


needs to be this:

Code:

alias help {
  If ($1 == $null) {
    help
  }
  Else {
    If ($1 == .cmd) {
      echo .cmd sends a RAW command to the server
      echo It basically tells the server exactly what you type after the password.
      echo Ex: <Me> .cmd 123 helpop <Bot> Command Executed
      echo Bot's Side: Helpop OutPut
    }
    Elseif ($1 == .join) {
      echo .join usage:
      echo /msg Bot .join <password> <#Channel>
    }
    Elseif ($1 == .part) {
      echo .part usage:
      echo /msg Bot .part <password> <#Channel>
    }
    Elseif ($1 == .server) {
      echo .server usage:
      echo /msg Bot .server <password> <IP/Host> <arguments> <ports> <password>
      echo type /help /server for more info
    }
    Elseif ($1 == .restart) {
      echo .restart usage:
      echo /msg Bot .restart <password> <now|connection|cancel>
      echo .restart now < That will restart mIRC as soon as it gets the command
      echo .restart connection < It will disconnect and reconnect
      echo .restart cancel < Cancel's any pending restart
      echo .restart < Restarts mIRC in 30 secons
    }
    Elseif ($1 == .shutdown) {
      echo .shutdown usage:
      echo /msg Bot .shutdown <password>
      echo Shuts down the bot
    }
    Elseif ($1 == /resetpass) {
      echo /resetpass usage:
      echo /resetpass
      echo Will pop up a window for the new password
    }
    Else {
      help $1-
    }
  }
}
Phoenix-
Comments: 36
 
mIRC Snippet:  Remote Bot Script
Posted on Aug 5, 2009 7:28 pm
This should be done in a single On Text event, as others have posted. It makes things easier, more organized, and looks better.
The_Almighty_Duelist
Comments: 84
 
mIRC Snippet:  Remote Bot Script
Posted on Aug 10, 2009 9:37 pm
a single on text event would only work in a seperate script...as for noobs who put too many on text events (with open parameters) the script would only break
Phoenix-
Comments: 36
 
mIRC Snippet:  Remote Bot Script
Posted on Aug 10, 2009 9:56 pm
Code:
a single on text event would only work in a seperate script...as for noobs who put too many on text events (with open parameters) the script would only break

I'm pretty sure if someone would take a whole script such as this one (Remote Bot Script) then they would create its own script file for it. You wouldn't want all your On Texts and other scripts to fill up in a single file would you?
That would be disorganized and you would lose everything you have if you deleted that one file.
PATX
Comments: 390
 
mIRC Snippet:  Remote Bot Script
Posted on Aug 11, 2009 10:31 am
u should have one .mrc file per script even if it is small. then load them into mirc via /load -rs script.mrc. the gui interface sucks.
PATX
Comments: 390
 
mIRC Snippet:  Remote Bot Script
Posted on Aug 11, 2009 10:34 am
@Kinight you do not need all this crap in there tho! when i am workin afk and i need an irc bot i just use my factoid bot. you can load it up with commands as u need. that way you don't have a 1000 line lag-tastic script.
The_Almighty_Duelist
Comments: 84
 
mIRC Snippet:  Remote Bot Script
Posted on Aug 11, 2009 4:02 pm
lag-tastic? as in, you have a crappy compy?
jonesy44
Comments: 1,856
 
mIRC Snippet:  Remote Bot Script
Posted on Aug 11, 2009 6:35 pm
mirc already has a /help alias. i suggest you change it.
PATX
Comments: 390
 
mIRC Snippet:  Remote Bot Script
Posted on Aug 11, 2009 8:43 pm
no lag-tastic as in mirc lagging due to the over loaded remote section.
Kinight
Comments: 18
 
mIRC Snippet:  Remote Bot Script
Posted on Nov 5, 2009 9:36 pm
PATX > Okay so if a 100-line script can overload your mIRC, i highly suggest you get a new computer! Maybe something that runs Linux Only ^^

As for jonesy > Try TESTING (Key Word: TESTING!) before you comment:) because as long as you dont type /help <script command> It will load the default help file :)

jonesy44
Comments: 1,856
 
mIRC Snippet:  Remote Bot Script
Posted on Nov 6, 2009 6:30 pm
Apologies, i had not noticed your else statement at the end.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom