Alright, new thing. Does this work:

The write code that you came up with:

Code:
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.
}


Code:
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.


Code:
#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.