mIRC Home    About    Download    Register    News    Help

Print Thread
Page 4 of 4 1 2 3 4
Re: Writing a bot [Re: Mpot] #186911 28/09/07 05:42 AM
Joined: Jun 2006
Posts: 508
D
deegee Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Like this perhaps...
Code:
on *:TEXT:-*:#: {
  if (%icybot == off) { msg $chan Sorry, IcyBot is disabled. }
  elseif (%banners == off) { msg $chan Sorry, banners are disabled. }
  else {
    if ($1 == -mpot) { msg $chan 11,0"0,1112,11"11,122,12"12,22,2"2,210,2"2,1010,10%%%%%%0 Master Mpot 10,10%%%%%%2,10"10,22,2"2,212,2"2,1211,12"12,110,11"11,0 }
    elseif ($1 == -colors) { msg $chan 0,1 1 0,2 2 0,3 3 0,4 4 0,5 5 0,6 6 0,7 7 0,8 8 0,9 9 0,10 10 0,11 11 0,12 12 0,13 13 0,14 14 0,15 15 }
    elseif ($1 == -duncan) { msg $chan 9,0"0,910,9"9,102,10"10,22,2"2,23,2"2,33,3%%%%%%8 Duncan007 3,3%%%%%%2,3"3,22,2"2,210,2"2,109,10"10,90,9"9,0 }
    elseif ($1 == -ichban) { msg $chan 4,0"0,410,4"4,102,10"10,22,2"2,21,2"2,11,1%%%%%%0 IchbanRyushi 1,1%%%%%%2,1"1,22,2"2,210,2"2,104,10"10,40,4"4,0 }
    elseif ($1 == -kuros) { msg $chan 4,0"0,46,4"4,613,6"6,1313,13"13,1311,13"13,1111,11%%%%%%0 Kuros 11,11%%%%%%13,11"11,1313,13"13,136,13"13,64,6"6,40,4"4,0 }
    elseif ($1 == -ekal) { msg $chan 11,0"0,1112,11"11,122,12"12,22,2"2,210,2"2,1010,10%%%%%%0 Ekal 10,10%%%%%%2,10"10,22,2"2,212,2"2,1211,12"12,110,11"11,0 }
    elseif ($1 == -lunaki) { msg $chan 13,0"0,131,13"13,12,1"1,22,2"2,26,2"2,66,6%%%%%%0 Lunaki 6,6%%%%%%2,6"6,22,2"2,21,2"2,113,1"1,130,13"13,0 }
    elseif ($1 == -marajah) { msg $chan 3,0"0,31,3"3,15,1"1,55,5"5,52,5"5,22,2%%%%%%15 Marajah 2,2%%%%%%5,2"2,55,5"5,51,5"5,13,1"1,30,3"3,0 }
    elseif ($1 == -kuro) { msg $chan 6,0"0,62,6"6,212,2"2,1212,12"12,121,12"12,11,1------13Kuro-Sakura1,1-----12,1"1,1212,12"12,122,12"12,26,2"2,60,6"6,0 }
    elseif ($1 == -peth) { msg $chan 14,0"0,1415,14"14,151,15"15,11,1"1,17,1"1,77,7------0Penguin7,7-----1,7"7,11,1"1,115,1"1,1514,15"15,140,14"14,0 }
    elseif ($1 == -vrixis) { msg $chan 4,0"0,45,4"4,54,5"5,44,4"4,45,4"4,55,5------4Vrixis5,5-----4,5"5,44,4"4,45,4"4,54,5"5,40,4"4,0 }
    elseif ($1 == -austin) { msg $chan 1,0"0,16,1"1,615,6"6,1515,15"15,1514,15"15,1414,14------8Austindel The Horrendous14,14-----15,14"14,1515,15"15,156,15"15,61,6"6,10,1"1,0 }
    elseif ($1 == -iron) { msg $chan 1,0"0,12,1"1,214,2"2,1414,14"14,144,14"14,44,4------8Ironguard The Fierce4,4-----14,4"4,1414,14"14,142,14"14,21,2"2,10,1"1,0 }
  }
}

Re: Writing a bot [Re: Riamus2] #186924 28/09/07 11:47 AM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
Code:
on *:TEXT:-*:#: {
  if (%icybot == off) { msg $chan Sorry, IcyBot is disabled. }
  elseif (%banners == off) { msg $chan Sorry, banners are disabled. }  elseif ($1 == -mpot) { msg $chan 11,0"0,1112,11"11,122,12"12,22,2"2,210,2"2,1010,10%%%%%%0 Master Mpot 10,10%%%%%%2,10"10,22,2"2,212,2"2,1211,12"12,110,11"11,0 }
  elseif ($1 == -colors) { msg $chan 0,1 1 0,2 2 0,3 3 0,4 4 0,5 5 0,6 6 0,7 7 0,8 8 0,9 9 0,10 10 0,11 11 0,12 12 0,13 13 0,14 14 0,15 15 }
  elseif ($1 == -duncan) { msg $chan 9,0"0,910,9"9,102,10"10,22,2"2,23,2"2,33,3%%%%%%8 Duncan007 3,3%%%%%%2,3"3,22,2"2,210,2"2,109,10"10,90,9"9,0 }
  elseif ($1 == -ichban) { msg $chan 4,0"0,410,4"4,102,10"10,22,2"2,21,2"2,11,1%%%%%%0 IchbanRyushi 1,1%%%%%%2,1"1,22,2"2,210,2"2,104,10"10,40,4"4,0 }
  elseif ($1 == -kuros) { msg $chan 4,0"0,46,4"4,613,6"6,1313,13"13,1311,13"13,1111,11%%%%%%0 Kuros 11,11%%%%%%13,11"11,1313,13"13,136,13"13,64,6"6,40,4"4,0 }
  elseif ($1 == -ekal) { msg $chan 11,0"0,1112,11"11,122,12"12,22,2"2,210,2"2,1010,10%%%%%%0 Ekal 10,10%%%%%%2,10"10,22,2"2,212,2"2,1211,12"12,110,11"11,0 }
  elseif ($1 == -lunaki) { msg $chan 13,0"0,131,13"13,12,1"1,22,2"2,26,2"2,66,6%%%%%%0 Lunaki 6,6%%%%%%2,6"6,22,2"2,21,2"2,113,1"1,130,13"13,0 }
  elseif ($1 == -marajah) { msg $chan 3,0"0,31,3"3,15,1"1,55,5"5,52,5"5,22,2%%%%%%15 Marajah 2,2%%%%%%5,2"2,55,5"5,51,5"5,13,1"1,30,3"3,0 }
  elseif ($1 == -kuro) { msg $chan 6,0"0,62,6"6,212,2"2,1212,12"12,121,12"12,11,1------13Kuro-Sakura1,1-----12,1"1,1212,12"12,122,12"12,26,2"2,60,6"6,0 }
  elseif ($1 == -peth) { msg $chan 14,0"0,1415,14"14,151,15"15,11,1"1,17,1"1,77,7------0Penguin7,7-----1,7"7,11,1"1,115,1"1,1514,15"15,140,14"14,0 }
  elseif ($1 == -vrixis) { msg $chan 4,0"0,45,4"4,54,5"5,44,4"4,45,4"4,55,5------4Vrixis5,5-----4,5"5,44,4"4,45,4"4,54,5"5,40,4"4,0 }
  elseif ($1 == -austin) { msg $chan 1,0"0,16,1"1,615,6"6,1515,15"15,1514,15"15,1414,14------8Austindel The Horrendous14,14-----15,14"14,1515,15"15,156,15"15,61,6"6,10,1"1,0 }
  elseif ($1 == -iron) { msg $chan 1,0"0,12,1"1,214,2"2,1414,14"14,144,14"14,44,4------8Ironguard The Fierce4,4-----14,4"4,1414,14"14,142,14"14,21,2"2,10,1"1,0 }
}

Re: Writing a bot [Re: Mpot] #186936 28/09/07 10:21 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
I'll try that, Deegee.

Furthermore, I just wrote this up with the if $ == b, so people can make the bars bold if they want. !colorbar4 is working fine, !colorbar5 isn't. I coping this right out of the scripts editor, I can't figure out why !colorbar5 isn't spacing in front of the IF's. Yes, I know, less halt more return, and more else, but It's a work in progress.

Code:
on *:text:!colorbar_how:#:/notice $nick To make a colorbar with five colors, you can type !colorbar5 color1 color2 color3 color4 color5 nickcolor nick. To make one with four colors, you may type !colorbar4 color1 color2 color3 color4 nickcolor nick. To access the list of colors, type -colors. You can put more than one word in the name. A title is optional. After you have picked a colobrar, contact Mpot and send it to him. He will add it to my database for easy call up, and join notice.

on *:text:!colorbar4 *:#:{
  if (%icybot == off) { msg $chan Sorry, IcyBot has been disabled. | halt }
  if (%bannermaker == off) { msg $chan Sorry, banner making has been disabled. | halt }
  if ($$7 == b) { msg $chan $+(,$2,$chr(44),0"0,$chr(44),$2,$3,$chr(44),$2",$2,$chr(44),$3,$4,$chr(44),$3",$3,$chr(44),$4,$4,$chr(44),$4",$4,$chr(44),$4,$5,$chr(44),$4",$4,$chr(44),$5,$5,$chr(44),$5,------,$6,,$8-,,,$5,$chr(44),$5,-----,,$4,$chr(44),$5",$5,$chr(44),$4,$4,$chr(44),$4",$4,$chr(44),$4,$3,$chr(44),$4",$4,$chr(44),$3,$2,$chr(44),$3",$3,$chr(44),$2,0,$chr(44),$2",$2,$chr(44),0) | halt }
msg $chan $+(,$2,$chr(44),0"0,$chr(44),$2,$3,$chr(44),$2",$2,$chr(44),$3,$4,$chr(44),$3",$3,$chr(44),$4,$4,$chr(44),$4",$4,$chr(44),$4,$5,$chr(44),$4",$4,$chr(44),$5,$5,$chr(44),$5,------,$6,$7-,,$5,$chr(44),$5,-----,,$4,$chr(44),$5",$5,$chr(44),$4,$4,$chr(44),$4",$4,$chr(44),$4,$3,$chr(44),$4",$4,$chr(44),$3,$2,$chr(44),$3",$3,$chr(44),$2,0,$chr(44),$2",$2,$chr(44),0) | halt }
}

on *:text:!colorbar5 *:#:{
if (%icybot == off) { msg $chan Sorry, IcyBot has been disabled. | halt }
if (%bannermaker == off) { msg $chan Sorry, banner making has been disabled. | halt }
if ($8 == b) { msg $chan $+(,$2,$chr(44),0"0,$chr(44),$2,$3,$chr(44),$2",$2,$chr(44),$3,$4,$chr(44),$3",$3,$chr(44),$4,$4,$chr(44),$4",$4,$chr(44),$4,$5,$chr(44),$4",$4,$chr(44),$5,$5,$chr(44),$5,------,$6,,$9-,,,$5,$chr(44),$5,-----,,$4,$chr(44),$5",$5,$chr(44),$4,$4,$chr(44),$4",$4,$chr(44),$4,$3,$chr(44),$4",$4,$chr(44),$3,$2,$chr(44),$3",$3,$chr(44),$2,0,$chr(44),$2",$2,$chr(44),0) | halt }
msg $chan $+(,$2,$chr(44),0"0,$chr(44),$2,$3,$chr(44),$2",$2,$chr(44),$3,$4,$chr(44),$3",$3,$chr(44),$4,$5,$chr(44),$4",$4,$chr(44),$5,$6,$chr(44),$5",$5,$chr(44),$6,$6,$chr(44),$6,-------,$7,$8-,,$6,$chr(44),$6,-------,,$5,$chr(44),$6",$6,$chr(44),$5,$4,$chr(44),$5",$5,$chr(44),$4,$3,$chr(44),$4",$4,$chr(44),$3,$2,$chr(44),$3",$3,$chr(44),$2,0,$chr(44),$2",$2,$chr(44),0)
}

Last edited by Mpot; 28/09/07 10:26 PM.
Re: Writing a bot [Re: Mpot] #186976 29/09/07 04:38 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
Bump for great justice?

Re: Writing a bot [Re: Mpot] #186981 29/09/07 06:18 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
What is the $chr for a space?

Re: Writing a bot [Re: Mpot] #186984 29/09/07 06:21 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
32

Re: Writing a bot [Re: hixxy] #186986 29/09/07 06:24 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
You are a life-saver. I couldn't seem to get it with $asc.

Re: Writing a bot [Re: Mpot] #186989 29/09/07 06:38 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
Why is
Code:
unload C:\IcyBot2\Scripts\Callup_Banners.mrc
not working?

Re: Writing a bot [Re: Mpot] #186993 29/09/07 07:02 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
unload -rs

Re: Writing a bot [Re: hixxy] #186994 29/09/07 07:05 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
So, the -rs switch is required?

Re: Writing a bot [Re: Mpot] #186995 29/09/07 07:10 PM
Joined: Jul 2006
Posts: 3,697
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,697
Yes :
/unload <-a|-nrs> <filename>

In the help file, arguments that are between < > are required

Last edited by Wims; 29/09/07 09:10 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Writing a bot [Re: Wims] #186997 29/09/07 09:11 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
This is not working. It works all the way to the message, and then messages the $nick, but the $read isn't working, so the bot messages the nick with one word, the nickname of the person who insulted them, and it messes up.

This should be working. I have another script, in the same exact directory, with a $read of a file in that directory, and it works fine. >.>

EDIT: I changed it to read the file that the other script does, and it worked. Which leads me to believe that insult.txt is buggered. But the problem is, I tried several other .txt's, didn't work...

Code:
on *:TEXT:!insult*:#:{
  if ($2 == $null) { msg $chan Specify someone to insult. }
  msg $$2 $nick $read(insult.txt) | closemsg $$2 | msg $chan $$2 has been insulted.
}

on *:TEXT:!insult*:?:{
  if ($2 == $null) { msg $nick Specify someone to insult. }
  msg $$2 $nick $read(insult.txt) | closemsg $$2 | msg $nick $$2 has been insulted.
}


And, insult.txt:

Code:
insult
insult
insult
etc

Last edited by Mpot; 29/09/07 09:53 PM.
Re: Writing a bot [Re: Mpot] #187003 29/09/07 09:53 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Type //echo -a $isfile(insult.txt) in any window to see if the file exists.

Re: Writing a bot [Re: hixxy] #187004 29/09/07 09:58 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
It's coming back $false. But that makes no sense. Because I'm looking at the file right now. Saved. It's there.

EDIT: I changed it to $read(C:\IcyBot2\Scripts\insult.txt) and it worked fine. Weirdest thing I've ever seen. o-0

Last edited by Mpot; 29/09/07 10:01 PM.
Re: Writing a bot [Re: Mpot] #187008 29/09/07 10:32 PM
Joined: Jun 2006
Posts: 508
D
deegee Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Originally Posted By: Mpot

I can't figure out why !colorbar5 isn't spacing in front of the IF's.

The colorbar4 script has a closing brace in the line with no /if, but there is no opening brace...

Re: Writing a bot [Re: deegee] #187020 29/09/07 11:55 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
Originally Posted By: deegee
Originally Posted By: Mpot

I can't figure out why !colorbar5 isn't spacing in front of the IF's.

The colorbar4 script has a closing brace in the line with no /if, but there is no opening brace...


That would indeed explain it.

Re: Writing a bot [Re: Mpot] #187027 30/09/07 01:30 AM
Joined: Jun 2006
Posts: 508
D
deegee Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Originally Posted By: Mpot
It's coming back $false. But that makes no sense. Because I'm looking at the file right now. Saved. It's there.

EDIT: I changed it to $read(C:\IcyBot2\Scripts\insult.txt) and it worked fine. Weirdest thing I've ever seen. o-0


try typing this
//echo -ag $nofile($mircexe) | echo -ag $mircdir

$mircdir is where mirc.ini is located, not mirc.exe
This is where mirc will look for files with no paths, or relative paths.

You can set mirc to use the dir where mirc.exe is (or another dir) with the -r commandline switch /help command line

Page 4 of 4 1 2 3 4