Top

-.-Quote V1.0 VIA Bot-.-


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  8.6 (of 5 scores)
Date Added  Jul 18, 2004
Last Updated  Sep 04, 2008

Description

Ok another bot script...Here is how it works...users can post quotes and then u can review quotes...easy...if you load it the system will echo the commands in the active window

Enjoy :)

Grab the Code

;  / \  | |
;  |||  | |
;   \\  | |
;  |||  | |__
;  \ /  |____|
;server : irc.4everlost.co.za
;room : #slc
;webpage : http://slchat.50megs.com/Home.htm
;Date codded : 18/07/2004
on 1:load: {
  echo -a 7,0 The following options is available
  echo -a 10,0!addquote 3and the quote 6(This will add a quote to the bot)
  echo -a 10,0!delquote 3and the quote number 6(This will delete quote number that u enter)
  echo -a 10,0!quote 6(This will Random between allquotes and tell u what quote nr. it is)
  echo -a 10,0!quote 3and the number 6(This will look up the quote of which number u have chosen)
  echo -a 10,0!qlines 6(This will give u the amount of quotes which have been added)
  echo -a 10,0!qhelp 6(This will bring you to this menu)
}
on 1:text:*:#: {
  if ($1 == !addquote) {
    if ($2 == $null) { Notice $nick Sorry you need to set a quote and u left it empty }
    if ($2 != $null) {
      write quote.txt $2-
      set %sl.ql $lines(quote.txt)
      msg $chan 5,0Added quote at position %sl.ql
      unset %sl.ql
    }
  }
  if ($1 == !delquote) {
    if ($2 == $null) { msg $chan 4,0Sorry $nick u need to add a number between 1 and $lines(quote.txt) }
    if ($2 != $null) {
      write -dl $+ $2 quote.txt
      msg $chan 3,0Quote 6# $+ $2 3Have been removed
    }
  }
  if ($1 == !quote) {
    if ($2 == $null) { 
      set %sl.qr $rand(1,$lines(quote.txt))
      set %sl.qra $read(quote.txt, %sl.qr)
      if (%sl.qra != $null) { msg $chan 10,0Random quote 6# $+ %sl.qr 10 $+ %sl.qra }
      if (%sl.qra == $null) { msg $chan 4,0Sorry there does not appear to be anny quotes available }
      unset %sl.qr
      unset %sl.qra
    }
    if ($2 != $null) { 
      set %sl.qo $read(quote.txt, $2)
      set %sl.qol $lines(quote.txt)
      if (%sl.qo == $null) { msg $chan 4,0Quote 6# $+ $2 4Does not exist 3U can select 1 to %sl.qol }
      if (%sl.qo != $null) { msg $chan 7,0Quote 6# $+ $2 7- %sl.qo }
      unset %sl.qo
      unset %sl.qol
    }
  }
  if ($1 == !qlines) {
    set %sl.qt $lines(quote.txt)
    if (%sl.qt != $null) { msg $chan 12,0There is this amount of quotes2 %sl.qt  }
    if (%sl.qt == $null) { msg $chan 4,0There does not appear to be anny quotes added yet $nick }
    unset %sl.qt
  }
  if ($1 == !qhelp) {
    msg $chan 7,0 The following options is available
    msg $chan 10,0!addquote 3and the quote 6(This will add a quote to the bot)
    msg $chan 10,0!delquote 3and the quote number 6(This will delete quote number that u enter)
    msg $chan 10,0!quote 6(This will Random between allquotes and tell u what quote nr. it is)
    msg $chan 10,0!quote 3and the number 6(This will look up the quote of which number u have chosen)
    msg $chan 10,0!qlines 6(This will give u the amount of quotes which have been added)
    msg $chan 10,0!qhelp 6(This will bring you to this menu)
  }
  else { halt }
}

Comments

  (5)  RSS
Fuzion
Comments: 48
 
mIRC Snippet:  -.-Quote V1.0 VIA Bot-.-
Posted on Jul 22, 2008 10:02 am
nice
H_M
Comments: 24
 
mIRC Snippet:  -.-Quote V1.0 VIA Bot-.-
Posted on Jul 23, 2008 6:25 am
Nice job, 9/10
TropicalMeltdown
Comments: 72
 
mIRC Snippet:  -.-Quote V1.0 VIA Bot-.-
Posted on Jul 23, 2008 9:24 am
Very Nice
KevKev
Comments: 3
 
mIRC Snippet:  -.-Quote V1.0 VIA Bot-.-
Posted on Nov 3, 2009 9:51 am
Nice Job 9/10
Ghost-writer
Comments: 353
 
mIRC Snippet:  -.-Quote V1.0 VIA Bot-.-
Posted on Nov 3, 2009 4:06 pm
a few things could be shortend
Code:

if (%sl.qra == $null) { msg $chan 10,0Random quote 6# $+ %sl.qr 10 $+ %sl.qra  }


Could be

Code:

if (!$sl.qra) msg $chan 10,0Random quote 6# $+ %sl.qr 10 $+ %sl.qra

Code:

    set %sl.qr $rand(1,$lines(quote.txt))
      set %sl.qra $read(quote.txt, %sl.qr)


This could be set to the var command so you dont have to unset them after, and when unsetting variables that start the same, unset sl.* works.

And finally
Code:

  else { halt }
}

no need for the else, just end it off.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  

Bottom