|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
So I'm trying to make a script for my bot that spits out colorbars. I usually make them myself, but since this has become tedious, I decided that I'd automate the process. It's supposed to work where you specify the colors and your name, IE !colorbar 1 2 3 4 Mpot. Any ideas why it's not working? on 1:text:!colorbar*:#: msg $chan $$1,0"¼0,$$1¼»$$2,$$1"¼$$1,$$2¼»$$3,$$2"¼$$2,$$3¼»$$3,$$3"¼$$3,$$3¼»$$4,$$3"¼$$3,$$4¼»1,1%%%%%%0 $$5 $$4,$$4%%%%%%$$3,$$4"¼$$4,$$3¼»$$3,$$3"¼$$3,$$3¼»$$2,$$3"¼$$3,$$2¼»$$1,$$2"¼$$2,$$1¼»0,$$1"¼$$1,0¼»
The ¼ is part of the bar itself, makes it look pretty. Say I picked colors 11, 12, 2, and 10. And my name is Mpot. I'd go !colorbar 11 12 2 10 Mpot and I should get something back looking like this:
Last edited by Mpot; 18/09/07 10:10 PM.
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
You can't squish things like this against the $ symbols. You need to $+ things together (or $+()). i.e.
on 1:text:!colorbar*:#: msg $chan $+ $$1,0"¼0, $+ $$1 $+ ¼»...
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
I'm still a little confused. Could you edit the entire script in that manner? I think I might be able to study it a little better in a completed fashion.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
on 1:text:!colorbar *:#: {
if (!$5) { msg $chan Invalid Format. Use: !colorbar color1 color2 color3 color4 nick | return }
msg $chan $+(,$1,$chr(44),0"¼0,$chr(44),$1¼»,$2,$chr(44),$1"¼,$1,$chr(44),$2¼»,$3,$chr(44),$2"¼,$2,$chr(44),$3¼»,$3,$chr(44),$3"¼,$3,$chr(44),$3¼»,$4,$chr(44),$3"¼,$3,$chr(44),$4¼»,$4,$chr(44),$4,------,0 $5,,$4,$chr(44),$4,-----,,$3,$chr(44),$4"¼,$4,$chr(44),$3¼»,$3,$chr(44),$3"¼,$3,$chr(44),$3¼»,$2,$chr(44),$3"¼,$3,$chr(44),$2¼»,$1,$chr(44),$2"¼,$2,$chr(44),$1,¼»0,$chr(44),$1"¼,$1,$chr(44),0¼»)
}
There you are.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
Wait, we've got a problem. I just loaded up the script and tried it, and was returned: Edit: I'm heading to sleep. I'll check through tomorrow.
Last edited by Mpot; 18/09/07 11:25 PM.
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
Fixed it. Just had to up the value of the $ by one. IE, $4 became $5 on 1:text:!colorbar *:#: {
if (!$5) { msg $chan Invalid Format. Use: !colorbar color1 color2 color3 color4 nick | return }
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,------,0,$6-,,$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¼»)
}
There should be a simple edit to make it to where the color of the name text can be specified in the middle, but I can't seem to figure it out. Help?
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
on 1:text:!colorbar *:#: {
if (!$5) { msg $chan Invalid Format. Use: !colorbar color1 color2 color3 color4 nick | return }
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¼»)
}
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
You may want to adjust the "error" line to use !$6 instead of !$5 now that there is another color. Up to you.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
I don't exactly understand what that line does, but if you think it'll help, I shall. Thanks.
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
I did that, and now it doesn't work when I use 0(white) as the name color. I changed it back to 5, worked fine again.
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
Nevermind, I was able to figure it out myself.
Last edited by Mpot; 19/09/07 11:02 PM.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Here's a rewrite that will avoid problems when the last item is 0.
on 1:text:!colorbar *:#: {
if ($7 == $null) { msg $chan Invalid Format. Use: !colorbar color1 color2 color3 color4 color5 nick | return }
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¼»)
}
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
I was able to get everything working fine, I've got !colorbar4 and !colorbar5. Everything seemed to work fine with !$5, so I left it. Here they are: on 1:text:!colorbar4 *:#: {
if (!$5) { msg $chan Invalid Format. Use: !colorbar color1 color2 color3 color4 nickcolor nick | return }
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¼»)
}
on 1:text:!colorbar5 *:#: {
if (!$5) { msg $chan Invalid Format. Use: !colorbar color1 color2 color3 color4 color5 nickcolor nick | return }
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¼»)
}
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
I want to be able to add colorbars for callup to IcyBot's script with !addbar colorbargoeshere callupcommand
So !addbar 11,0"¼0,11¼»12,11"¼11,12¼»2,12"¼12,2¼»2,2"¼2,2¼»10,2"¼2,10¼»10,10%%%%%%0 Master Mpot 10,10%%%%%%2,10"¼10,2¼»2,2"¼2,2¼»12,2"¼2,12¼»11,12"¼12,11¼»0,11"¼11,0¼» -mpot and the bot would write
on 1:TEXT:-mpot:#:msg $chan 11,0"¼0,11¼»12,11"¼11,12¼»2,12"¼12,2¼»2,2"¼2,2¼»10,2"¼2,10¼»10,10%%%%%%0 Master Mpot 10,10%%%%%%2,10"¼10,2¼»2,2"¼2,2¼»12,2"¼2,12¼»11,12"¼12,11¼»0,11"¼11,0¼» halt to the last line of the file. If there's text on the last line, it'd need to create a new line on the bottom and write that one in. The .mrc is called Callup Banners.mrc and is located in C:\IcyBot\Scripts Also, can you write it as a on TEXT, with the access level instead of one being addbar? Thanks! (I could probably do it myself, but I can't seem to figure out hte command. I know one if $read, but I tried /help $write and got nothing.) d EDIT: Tinkered some, is it: on addbar:TEXT:!addbar*:#: /write C:\IcyBot\Scripts on 1:text:- $+ $$2:#:msg $chan $$1 | halt
halt ?
Last edited by Mpot; 19/09/07 11:58 PM.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
/help /write Anyhow, you really should adjust those IFs like I mentioned. $6 for the first one and $7 for the second one and check if they're == $null rather than !$___ as shown in what I gave you. It's up to you though. You don't have to use error checking at all. It will work without that line in there. If you're going to include the error checking, you should have it valid.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
I looked at the help /write, could you tell me if my attempt is vaild? Edit: on 1: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.
on 1:text:!colorbar4 *:#: {
if ($6 == $null) { msg $chan Invalid Format. Use: !colorbar color1 color2 color3 color4 nickcolor nick | return }
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¼»)
}
on 1:text:!colorbar5 *:#: {
if($7 == $null) { msg $chan Invalid Format. Use: !colorbar color1 color2 color3 color4 color5 nickcolor nick | return }
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¼»)
}
? Also, if I wanted to add the /write line to the top of my colorbar script, would the correct parentheses format be { on addbar:TEXT:!addbar*:#: { /write C:\IcyBot\Scripts\test.mrc on 1:text:$$2:#:{ msg $chan $$1 | halt } } | /notice $nick Bar added. | halt }
Last edited by Mpot; 20/09/07 12:22 AM.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Your edit of those is correct. For the writing...
on addbar:TEXT:!addbar *:#: {
write C:\IcyBot\Scripts\test.mrc $2-
notice $nick Bar added.
}
Note that you don't need /'s in a script. Also, I have no idea what you were trying to do with that line. You cannot put 2 on TEXT events on the same line. I'm not quite sure what you were trying to do there. Anyhow, this will add the text after !addbar to that test.mrc file for you. I don't know that .mrc is the best ending for that file, though. .txt would probably make more sense as you're not adding lines of a script to that file... just text.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
Let me explain why I need the on text: ;Call-Up Banners
on *:TEXT:-mpot:#:msg $chan 11,0"¼0,11¼»12,11"¼11,12¼»2,12"¼12,2¼»2,2"¼2,2¼»10,2"¼2,10¼»10,10%%%%%%0 Master Mpot 10,10%%%%%%2,10"¼10,2¼»2,2"¼2,2¼»12,2"¼2,12¼»11,12"¼12,11¼»0,11"¼11,0¼» | halt
on *:TEXT:-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 | halt
on *:TEXT:-duncan:#:msg $chan 9,0"¼0,9¼»10,9"¼9,10¼»2,10"¼10,2¼»2,2"¼2,2¼»3,2"¼2,3¼»3,3%%%%%%8 Duncan007 3,3%%%%%%2,3"¼3,2¼»2,2"¼2,2¼»10,2"¼2,10¼»9,10"¼10,9¼»0,9"¼9,0¼» | halt
on *:TEXT:-ichban:#:msg $chan 4,0"¼0,4¼»10,4"¼4,10¼»2,10"¼10,2¼»2,2"¼2,2¼»1,2"¼2,1¼»1,1%%%%%%0 IchbanRyushi 1,1%%%%%%2,1"¼1,2¼»2,2"¼2,2¼»10,2"¼2,10¼»4,10"¼10,4¼»0,4"¼4,0¼» | halt
on *:TEXT:-kuros:#:msg $chan 4,0"¼0,4¼»6,4"¼4,6¼»13,6"¼6,13¼»13,13"¼13,13¼»11,13"¼13,11¼»11,11%%%%%%0 Kuros 11,11%%%%%%13,11"¼11,13¼»13,13"¼13,13¼»6,13"¼13,6¼»4,6"¼6,4¼»0,4"¼4,0¼» | halt
on *:TEXT:-ekal:#:msg $chan 11,0"¼0,11¼»12,11"¼11,12¼»2,12"¼12,2¼»2,2"¼2,2¼»10,2"¼2,10¼»10,10%%%%%%0 Ekal 10,10%%%%%%2,10"¼10,2¼»2,2"¼2,2¼»12,2"¼2,12¼»11,12"¼12,11¼»0,11"¼11,0¼» | halt
on *:TEXT:-lunaki:#:msg $chan 13,0"¼0,13¼»1,13"¼13,1¼»2,1"¼1,2¼»2,2"¼2,2¼»6,2"¼2,6¼»6,6%%%%%%0 Lunaki 6,6%%%%%%2,6"¼6,2¼»2,2"¼2,2¼»1,2"¼2,1¼»13,1"¼1,13¼»0,13"¼13,0¼» | halt
on *:TEXT:-marajah:#:msg $chan 3,0"¼0,3¼»1,3"¼3,1¼»5,1"¼1,5¼»5,5"¼5,5¼»2,5"¼5,2¼»2,2%%%%%%15 Marajah 2,2%%%%%%5,2"¼2,5¼»5,5"¼5,5¼»1,5"¼5,1¼»3,1"¼1,3¼»0,3"¼3,0¼» | halt
on *:TEXT:-kuro:#:msg $chan 6,0"¼0,6¼»2,6"¼6,2¼»12,2"¼2,12¼»12,12"¼12,12¼»1,12"¼12,1¼»1,1------13Kuro-Sakura1,1-----12,1"¼1,12¼»12,12"¼12,12¼»2,12"¼12,2¼»6,2"¼2,6¼»0,6"¼6,0¼» | halt
on *:TEXT:-peth:#:msg $chan 14,0"¼0,14¼»15,14"¼14,15¼»1,15"¼15,1¼»1,1"¼1,1¼»7,1"¼1,7¼»7,7------0Penguin7,7-----1,7"¼7,1¼»1,1"¼1,1¼»15,1"¼1,15¼»14,15"¼15,14¼»0,14"¼14,0¼» | halt
on *:TEXT:-vrixis:#:msg $chan 4,0"¼0,4¼»5,4"¼4,5¼»4,5"¼5,4¼»4,4"¼4,4¼»5,4"¼4,5¼»5,5------4Vrixis5,5-----4,5"¼5,4¼»4,4"¼4,4¼»5,4"¼4,5¼»4,5"¼5,4¼»0,4"¼4,0¼» | halt
I need the !addbar to add the inputed stuff (the bar and the callup code) to the end of that script, in an on text like the above...
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Ok, I see.
on addbar:TEXT:!addbar *:#: {
write C:\IcyBot\Scripts\test.mrc on *:text: $+ $2 $+ :#: msg chan $3-
notice $nick Bar added.
}
Just make absolutely sure that you use $read with the "n" parameter when reading from the text file so that the text isn't evaluated. Otherwise, someone can for your script to make you disconnect, delete your files, or just about anything else.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
Ah, I only plan on allowing myself to access this script, it seems to have too many possible exploits. Also, I hate to put you through this, but I just updated my format to if ($strip($$1) == -trigger) { msg $chan colorbarhere | halt } !addbar trigger colorbarAnd it'd add it to the last line, with the trigger in one place and the colorbar in the second. I'm going to attempt this one myself, can you tell me if it's good? I need the halt command written in like that as a part of the bar code, not to halt the /write script. I dunno if I did it properly. on addbar:TEXT:!addbar *:#: {
write C:\IcyBot\Scripts\callup_banners.mrc if ($strip($$1) == $+ $$2 $+) { msg $chan $$3 | halt }
notice $nick Bar added.
}
Last edited by Mpot; 20/09/07 11:20 PM.
|
|
|
|
Joined: Jun 2006
Posts: 508
Fjord artisan
|
Fjord artisan
Joined: Jun 2006
Posts: 508 |
I'm going to attempt this one myself, can you tell me if it's good? I need the halt command written in like that as a part of the bar code, not to halt the /write script. I dunno if I did it properly. on addbar:TEXT:!addbar *:#: {
write C:\IcyBot\Scripts\callup_banners.mrc if ($strip($$1) == $+ $$2 $+) { msg $chan $$3 | halt }
notice $nick Bar added.
}
on addbar:TEXT:!addbar & &:#:{
write C:\IcyBot\Scripts\callup_banners.mrc if ($strip($1) == $2) $chr(123) msg $!chan $3 $chr(124) halt $chr(125)
notice $nick Bar added.
}
PS if the bot is in C:\IcyBot you can more simply use " write Scripts\callup_banners.mrc ...." Or perhaps $+($scriptdir,callup_banners.mrc)
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
on *:TEXT:-*:#:{
if (%banners == off) { msg $chan Banners are disabled. | halt }
if ($strip($$1) == -mpot) { msg $chan 11,0"¼0,11¼»12,11"¼11,12¼»2,12"¼12,2¼»2,2"¼2,2¼»10,2"¼2,10¼»10,10%%%%%%0 Master Mpot 10,10%%%%%%2,10"¼10,2¼»2,2"¼2,2¼»12,2"¼2,12¼»11,12"¼12,11¼»0,11"¼11,0¼» | halt }
if ($strip($$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 | halt }
if ($strip($$1) == -duncan) { msg $chan 9,0"¼0,9¼»10,9"¼9,10¼»2,10"¼10,2¼»2,2"¼2,2¼»3,2"¼2,3¼»3,3%%%%%%8 Duncan007 3,3%%%%%%2,3"¼3,2¼»2,2"¼2,2¼»10,2"¼2,10¼»9,10"¼10,9¼»0,9"¼9,0¼» | halt }
if ($strip($$1) == -ichban) { msg $chan 4,0"¼0,4¼»10,4"¼4,10¼»2,10"¼10,2¼»2,2"¼2,2¼»1,2"¼2,1¼»1,1%%%%%%0 IchbanRyushi 1,1%%%%%%2,1"¼1,2¼»2,2"¼2,2¼»10,2"¼2,10¼»4,10"¼10,4¼»0,4"¼4,0¼» | halt }
if ($strip($$1) == -kuros) { msg $chan 4,0"¼0,4¼»6,4"¼4,6¼»13,6"¼6,13¼»13,13"¼13,13¼»11,13"¼13,11¼»11,11%%%%%%0 Kuros 11,11%%%%%%13,11"¼11,13¼»13,13"¼13,13¼»6,13"¼13,6¼»4,6"¼6,4¼»0,4"¼4,0¼» | halt }
if ($strip($$1) == -ekal) { msg $chan 11,0"¼0,11¼»12,11"¼11,12¼»2,12"¼12,2¼»2,2"¼2,2¼»10,2"¼2,10¼»10,10%%%%%%0 Ekal 10,10%%%%%%2,10"¼10,2¼»2,2"¼2,2¼»12,2"¼2,12¼»11,12"¼12,11¼»0,11"¼11,0¼» | halt }
if ($strip($$1) == -lunaki) { msg $chan 13,0"¼0,13¼»1,13"¼13,1¼»2,1"¼1,2¼»2,2"¼2,2¼»6,2"¼2,6¼»6,6%%%%%%0 Lunaki 6,6%%%%%%2,6"¼6,2¼»2,2"¼2,2¼»1,2"¼2,1¼»13,1"¼1,13¼»0,13"¼13,0¼» | halt }
if ($strip($$1) == -marajah) { msg $chan 3,0"¼0,3¼»1,3"¼3,1¼»5,1"¼1,5¼»5,5"¼5,5¼»2,5"¼5,2¼»2,2%%%%%%15 Marajah 2,2%%%%%%5,2"¼2,5¼»5,5"¼5,5¼»1,5"¼5,1¼»3,1"¼1,3¼»0,3"¼3,0¼» | halt }
if ($strip($$1) == -kuro) { msg $chan 6,0"¼0,6¼»2,6"¼6,2¼»12,2"¼2,12¼»12,12"¼12,12¼»1,12"¼12,1¼»1,1------13Kuro-Sakura1,1-----12,1"¼1,12¼»12,12"¼12,12¼»2,12"¼12,2¼»6,2"¼2,6¼»0,6"¼6,0¼» | halt }
if ($strip($$1) == -peth) { msg $chan 14,0"¼0,14¼»15,14"¼14,15¼»1,15"¼15,1¼»1,1"¼1,1¼»7,1"¼1,7¼»7,7------0Penguin7,7-----1,7"¼7,1¼»1,1"¼1,1¼»15,1"¼1,15¼»14,15"¼15,14¼»0,14"¼14,0¼» | halt }
if ($strip($$1) == -vrixis) { msg $chan 4,0"¼0,4¼»5,4"¼4,5¼»4,5"¼5,4¼»4,4"¼4,4¼»5,4"¼4,5¼»5,5------4Vrixis5,5-----4,5"¼5,4¼»4,4"¼4,4¼»5,4"¼4,5¼»4,5"¼5,4¼»0,4"¼4,0¼» | halt }
I got this off someone else. I'd just use on TEXTs for each bar, but I need the %banners...
|
|
|
|
Joined: Jun 2006
Posts: 508
Fjord artisan
|
Fjord artisan
Joined: Jun 2006
Posts: 508 |
See PM
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
Alright, new thing. Does this work: The write code that you came up with: on addbar:TEXT:!addbar *:#:{
var %file = C:\IcyBot\Scripts\test.mrc
var %line = -il1,%a = $+(*:text:,$2,:*)
^^ %Line is set to -il1 (Insert at line 1) (Used with /write)
; check if you have an event for that text (%line will then be -l<N>)
if $read(%file,wn,%a) { var %line = -l $+ $readn }
; write the line, overwriting if it exists, else added at line 1.
write %line $qt(%file) on $+(*:text:,$2,:#:msg) $!chan $$3-
; reload the script so it will take effect
.reload -rs %file
; advise user that line was added
notice $nick Bar added.
} on bannercontrol:text:!banners_off::/disable #banners | notice $nick Banners disabled.
on bannercontrol:text:!banners_on:?:/enable #banners | notice $nick Banners enabled.
on bannercontrol:text:!banners_off:#:/disable #banners | msg $chan Banners disabled.
on bannercontrol:text:!banners_on:#:/enable #banners | msg $chan Banners enabled. #banners on
...
on *:TEXT:-*:#:{
on *:TEXT:-mpot:#:msg $chan 11,0"¼0,11¼»12,11"¼11,12¼»2,12"¼12,2¼»2,2"¼2,2¼»10,2"¼2,10¼»10,10%%%%%%0 Master Mpot 10,10%%%%%%2,10"¼10,2¼»2,2"¼2,2¼»12,2"¼2,12¼»11,12"¼12,11¼»0,11"¼11,0¼» | halt
on *:TEXT:-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 | halt on *:TEXT:-duncan:#:msg $chan 9,0"¼0,9¼»10,9"¼9,10¼»2,10"¼10,2¼»2,2"¼2,2¼»3,2"¼2,3¼»3,3%%%%%%8 Duncan007 3,3%%%%%%2,3"¼3,2¼»2,2"¼2,2¼»10,2"¼2,10¼»9,10"¼10,9¼»0,9"¼9,0¼» | halt
on *:TEXT:-ichban:#:msg $chan 4,0"¼0,4¼»10,4"¼4,10¼»2,10"¼10,2¼»2,2"¼2,2¼»1,2"¼2,1¼»1,1%%%%%%0 IchbanRyushi 1,1%%%%%%2,1"¼1,2¼»2,2"¼2,2¼»10,2"¼2,10¼»4,10"¼10,4¼»0,4"¼4,0¼» | halt
on *:TEXT:-kuros:#:msg $chan 4,0"¼0,4¼»6,4"¼4,6¼»13,6"¼6,13¼»13,13"¼13,13¼»11,13"¼13,11¼»11,11%%%%%%0 Kuros 11,11%%%%%%13,11"¼11,13¼»13,13"¼13,13¼»6,13"¼13,6¼»4,6"¼6,4¼»0,4"¼4,0¼» | halt
on *:TEXT:-ekal:#:msg $chan 11,0"¼0,11¼»12,11"¼11,12¼»2,12"¼12,2¼»2,2"¼2,2¼»10,2"¼2,10¼»10,10%%%%%%0 Ekal 10,10%%%%%%2,10"¼10,2¼»2,2"¼2,2¼»12,2"¼2,12¼»11,12"¼12,11¼»0,11"¼11,0¼» | halt
on *:TEXT:-lunaki:#:msg $chan 13,0"¼0,13¼»1,13"¼13,1¼»2,1"¼1,2¼»2,2"¼2,2¼»6,2"¼2,6¼»6,6%%%%%%0 Lunaki 6,6%%%%%%2,6"¼6,2¼»2,2"¼2,2¼»1,2"¼2,1¼»13,1"¼1,13¼»0,13"¼13,0¼» | halt
on *:TEXT:-marajah:#:msg $chan 3,0"¼0,3¼»1,3"¼3,1¼»5,1"¼1,5¼»5,5"¼5,5¼»2,5"¼5,2¼»2,2%%%%%%15 Marajah 2,2%%%%%%5,2"¼2,5¼»5,5"¼5,5¼»1,5"¼5,1¼»3,1"¼1,3¼»0,3"¼3,0¼» | halt
on *:TEXT:-kuro:#:msg $chan 6,0"¼0,6¼»2,6"¼6,2¼»12,2"¼2,12¼»12,12"¼12,12¼»1,12"¼12,1¼»1,1------13Kuro-Sakura1,1-----12,1"¼1,12¼»12,12"¼12,12¼»2,12"¼12,2¼»6,2"¼2,6¼»0,6"¼6,0¼» | halt
on *:TEXT:-peth:#:msg $chan 14,0"¼0,14¼»15,14"¼14,15¼»1,15"¼15,1¼»1,1"¼1,1¼»7,1"¼1,7¼»7,7------0Penguin7,7-----1,7"¼7,1¼»1,1"¼1,1¼»15,1"¼1,15¼»14,15"¼15,14¼»0,14"¼14,0¼» | halt
on *:TEXT:-vrixis:#:msg $chan 4,0"¼0,4¼»5,4"¼4,5¼»4,5"¼5,4¼»4,4"¼4,4¼»5,4"¼4,5¼»5,5------4Vrixis5,5-----4,5"¼5,4¼»4,4"¼4,4¼»5,4"¼4,5¼»4,5"¼5,4¼»0,4"¼4,0¼» | halt
...
#banners end Will that make it to where they either work, or don't, depending on !banners_on or !banners_off? I tried that and got some shitty message: " * No groups needed to be changed " and when I just leave it with #banners on and try -mpot I get " ON Unknown command " If we can figure out how to make those go away and have the groups work properly, and then use the write you came up with, but modify it so it puts in the line before the ... #banners end Then we're set. Any ideas?
Last edited by Mpot; 21/09/07 12:35 AM.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
You're missing a } at the end (before #banner end). Also, those "..." shouldn't be there.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
The "..." were in the /help file
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
That's just to show you that the script goes there. ... either horizontal or vertical (when nothing else is on the line) indicates that something else can go there.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
|
|
|
|
Joined: Apr 2007
Posts: 228
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2007
Posts: 228 |
Nevermind.
Last edited by Mpot; 21/09/07 09:36 PM.
|
|
|
|
|