Remote Bot Script

Platform:  mIRC
Published  May 04, 2009
Updated  Aug 06, 2009
This is a remote script made for my bot. Its pretty nice, especially if you have another computer somewhere else running a bot 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

Sign in to comment.
The_Almighty_Duelist   -  Feb 29, 2012
the bot owner is you. you are the bot owner.
 Respond  
DowNFaLL   -  Feb 16, 2012
how i can create a bot owner?Help!
 Respond  
The_Almighty_Duelist   -  Jul 03, 2011
haters gonna hate :)
 Respond  
jonesy44   -  Jul 03, 2011
Overused meme. How boring.
 Respond  
The_Almighty_Duelist   -  Jul 02, 2011
old conversation is old
 Respond  
Kinight   -  Jul 02, 2011
Also PATX, how are you reliably running mIRC under ubuntu? Wine just makes it lag even worse! :D
 Respond  
Kinight   -  Feb 13, 2010
:D *gives TAD a cookie* Wow.. because a POS 601 mhz / 256mb running Win Server 2003 was able to run most of my scripts with TAD's stacked on them. After that we tried crashing it through the mirc scripts and it took us roughly 15 minutes to even get it to start lagging.

Again patx, peas get a rife. Hokay?
 Respond  
The_Almighty_Duelist   -  Nov 26, 2009

Kinight i run ubuntu purely and it does not lag my comp (in fact my comp is prolly waaay better then urs due to the fact it costs 5000 bucks and was intended to be a personal server, i have modded it a bit...) however as i said this is a long script for nothing.

also screw winblows


ooooooo...can i feed the troll please? =D
 Respond  
PATX   -  Nov 26, 2009
Kinight i run ubuntu purely and it does not lag my comp (in fact my comp is prolly waaay better then urs due to the fact it costs 5000 bucks and was intended to be a personal server, i have modded it a bit...) however as i said this is a long script for nothing.

also screw winblows
 Respond  
jonesy44   -  Nov 06, 2009
Apologies, i had not noticed your else statement at the end.
 Respond  
Kinight   -  Nov 05, 2009
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 :)

 Respond  
PATX   -  Aug 11, 2009
no lag-tastic as in mirc lagging due to the over loaded remote section.
 Respond  
jonesy44   -  Aug 11, 2009
mirc already has a /help alias. i suggest you change it.
 Respond  
The_Almighty_Duelist   -  Aug 11, 2009
lag-tastic? as in, you have a crappy compy?
 Respond  
PATX   -  Aug 11, 2009
@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.
 Respond  
PATX   -  Aug 11, 2009
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.
 Respond  
Phoenix-   -  Aug 10, 2009
Code
 

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.
 Respond  
The_Almighty_Duelist   -  Aug 10, 2009
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
 Respond  
Phoenix-   -  Aug 05, 2009
This should be done in a single On Text event, as others have posted. It makes things easier, more organized, and looks better.
 Respond  
The_Almighty_Duelist   -  Aug 05, 2009
Code
 


needs to be this:

Code
 
 Respond  
Kinight   -  May 11, 2009
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
 Respond  
PATX   -  May 05, 2009
ok. pretty good script. kinda newbish and pointless but if you are new then good job.
 Respond  
The_Almighty_Duelist   -  May 05, 2009
Code
 
 Respond  
Aucun50   -  May 04, 2009
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.

 Respond  
Jethro   -  May 04, 2009
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
 
 Respond  
Myidentityisasecret   -  May 04, 2009
How do I set owner? :p DO I type it in where it says "Please set my owner"?
 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.