random play with !quote on bot

By jackko on Jun 06, 2005

hmmm when u have a quote bot and u lazy to access to ur bot and set ramdom play quote, this is a simple snippet that let's u on ur ramdom play quote with out accessing ur bot.
Note: this tigger can only be on by same ip as bot, becouse some ppl may off it using !quote

sry my english not that good pls do understand =)

on 1:TEXT:*:#:{ 
  if ($1 == !Quotes) { 
    if ($2 == start) { 
      set %addressnick $remove($address($nick,2),*!*@) 
      set %addressme $remove($address($me,2),*!*@) 
      if (%addressnick = %addressme) { 
        if (%quotesystemstatus == off) { 
          /set %quotesystemstatus on 
          /set %totalquotes $lines(C:\quotes.txt) 
   /set %quoteline $rand(0,%totalquotes) 
          .timerquote 0 300 msg # (# $+ %quoteline $+ ) $!read(C:\quotes.txt, %quoteline) 

        } 
        else { 
          .notice $nick Sorry Owner. You already start the Quote System! if you wan to stop pls type !Quotes Stop. 
        }      
      } 
      else { 
        .notice Sorry You are not my owner. 
      } 
    } 
    elseif ($2 == add) { 
      set %addressnick $remove($address($nick,2),*!*@) 
      set %addressme $remove($address($me,2),*!*@) 
      if (%addressnick = %addressme) { 
        /write C:\quotes.txt $3- 
      } 
      else { 
        .notice Sorry You are not my owner. 
      } 
    } 
    elseif ($2 == stop) { 
      set %addressnick $remove($address($nick,2),*!*@) 
      set %addressme $remove($address($me,2),*!*@) 
      if (%addressnick = %addressme) { 
        /set %quotesystemstatus off 
        .timerquote off 
      } 
      else { 
        .notice Sorry You are not my owner. 
      } 
    } 

  } 
} 

Comments

Sign in to comment.
ermansanidhya   -  Nov 17, 2007

look good if u use level :)

 Respond  
cooolstar   -  Jun 14, 2005

But if you want for only display random quotes by the bot.

on 1:text:!quote*:#:{ .timerdcsdisplay 0 10 display }
alias display {
:again
inc %cscooolstarno
set %csread $read(cs.txt,%cscooolstarno)
if (%csread == end) { set %cscooolstarno 0 | goto again }
.timercs3 1 2 msg %cshome %cscolors1 %csread
}

simply change the file cs.txt and timercsdisplay . you can also
/set %cscolors1 (press ctrl + k)

thanks

 Respond  
supergeo   -  Jun 07, 2005

Nice. This is useful.

 Respond  
dem0n   -  Jun 06, 2005

Nice snippet.

 Respond  
DarthReven   -  Jun 06, 2005

you could just use $read(quotes.txt) for a random line and use $readn for the line number

 Respond  
jackko   -  Jun 06, 2005

=) enjoy using =)

 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.