Guestbookscript for your bot

By toenie on Jun 02, 2004

With this script, you can write a message to your bot and it saved the message.

The commands are:
For the guests: !write MESSAGE, !read
for the Admin: !gb on, !gb off

;Guestbook script - Made by toenie

on *:LOAD: {
  echo -a 7::12 Thanks for use this guestbook script 7::
  %admin = $$?="What is your OWN nickname?"
  %gbook = off
}

on *:TEXT:!gb*:#: {
  if ($nick == %admin) {
    if ($2 == on) { %gbook = on | msg $chan 7::12The guestbook is on7:: | halt }
    if ($2 == off) { %gbook = off | msg $chan 7::12The guestbook is turned off7:: | halt }
    else { notice $nick 7::2 $2 12Error: Wrong command7:: }
  }
}

on *:TEXT:!write*:#: {
  if (%gbook == on) { inc %gb.count | write guestbook.txt Nummer:: %gb.count $+ :: Writed by:: $nick :: $2- | notice $nick 7::12Thanks for your reply 7:: }
  else { msg $chan 7::12The guestbook is off7:: }
}

on *:TEXT:!read:#: {
  if (%gbook == on) { 
  notice $nick You can read the guestbook now:
    %reply = $calc($lines(guestbook.txt)-6)
    :replies
    if (%reply == $lines(guestbook.txt)) { halt } 
    else {
      inc %reply
      notice $nick $read(guestbook.txt,%reply)
      goto replies
    }
  }
  if (%gbook == off) { msg $chan 7::12The guestbook is off7:: }
}

;I hope you like this script ;-)

Comments

Sign in to comment.
vlaamse   -  Jun 28, 2012

toenie, i have the trivia script you have made, i like the script very mutch but i'd like to add theme's in it, like country's, capitals, .... but i can't seem to make it work, i have try'd lots of things, can and will you help me with that pls :D

 Respond  
toenie   -  Jun 07, 2004

I don\'t think so... When I have try this script, it\'s work. :-/

 Respond  
SL   -  Jun 06, 2004

no toenie its not that try the line [ notice $nick $read(guestbook.txt,%reply) ] I\'d bet the mistake is in there

 Respond  
toenie   -  Jun 06, 2004

I think I\'ve got the problem. Before you can write a message and read the guest book, you must typ !gb on to turn the guestbook on

 Respond  
toenie   -  Jun 06, 2004

strange. Maybe you can try http://www.kletshoekje.nl/index.php?board=14;action=display;threadid=1115 - That\'s the original script. You must translate it self, because it\'s a dutch script. ;)

 Respond  
Jose`Botella   -  Jun 03, 2004

Yes I know that. But it mIRC doesn\'t know where to pull the information from, other than some .txt file names guestbook.txt

 Respond  
ledzeppelin   -  Jun 03, 2004

id use a .ini for the calculations

 Respond  
toenie   -  Jun 03, 2004

By writing the first message, mIRC made the file ;)

 Respond  
Jose`Botella   -  Jun 02, 2004

the !read part is messed up. It doesn\'t know where to get the .txt from and once it finds it, it doesn\'t know what to read from it.

 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.