Quote system script

By Bigmomma on Aug 12, 2006

This is a quote system script.
commands are:
!quote - tells a random quote
!quote # - tells quote #
!addquote - adds a quote
!delquote # - deletes quote # limited for ops
!lastquote - tells the last quote

I've took the command IDEA'S from another bot (haven't seen the script) so this is not stolen...

#######################################
#Quote system                         #
#by Rick/Freckle/Bigmomma             #
#xr.no-ip.biz (soon irc.rageirc.net)  # #RageIRC                              #
#######################################
on *:TEXT:!quote:#: { set %quote $read(quotes.txt) } { .msg $chan $chr(91) $+ $chr(35) $+ $readn $+ $chr(92) $+ $lines(C:\mIRC-Bot\Quotes.txt) $+ $chr(93) 4 $+ %quote }
on *:TEXT:!quote *:#: { if ($2 isalnum) && ($2 <= $lines(C:\mIRC-Bot\Quotes.txt)) { .msg $chan Quote $chr(91) $+ $chr(35) $+ $2 $+ $chr(92) $+ $lines(C:\mIRC-Bot\Quotes.txt) $+ $chr(93) 4 $+ $read(quotes.txt, $2) } }
on *:TEXT:!addquote *:#: { .write quotes.txt 12Quote added by $nick on $date $+ : 4 $+ $2- } { .msg $chan Your quote has been added, thank you! }
on *:TEXT:!delquote *:#: { if ($nick isop $chan) { .write -dl$2 quotes.txt }
{ .msg $chan Quote $chr(35) $+ $2 has been deleted. } }
on *:TEXT:!quotes:#: { .msg $chan Total number of quotes: $lines(C:\mIRC-Bot\Quotes.txt) }
on *:TEXT:!lastquote:#: { .msg $chan 12Last quote: $read(Quotes.txt, $lines(C:\mIRC-Bot\Quotes.txt)) }

Comments

Sign in to comment.
Clueless   -  Oct 16, 2007

i already have some of them :p besides i have all the /quote does is it returns a random quote. even if i use a number it will return a random quote. thats all i needed though :p

 Respond  
Kyousoukyoku   -  Oct 15, 2007

Why not use this:

alias quote { 
  if ($1 isnum && $read(quotes.txt,$1)) { 
   msg $iif($active != status window,$active,$chan) Quote number $+($chr(40),$1,$chr(41),:) $v2
  }
  else { 
   msg $iif($active != status window,$active,$chan) Total quotes:  $lines(quotes.txt)
  }
}

alias addquote { 
  if ($1- && $exists(quotes.txt)) { 
   write quotes.txt $1-
   echo $colour(info) -a Quote added.
   msg $iif($active != status window,$target,$chan) Quote $1- added.
  }
}

alias delquote { 
  if ($1 isnum && $read(quotes.txt,$1)) { 
   write -dl quotes.txt $1
   echo $colour(info) -a Quote deleted.
   msg $iif($active != status window,$target,$chan) Quote number: $1 deleted. 
  }
} 

And just make a file named quotes.txt in your mircdir. Commands: /delquote (num), /addquote (quote), /quote (num)

  • Something manually typed in this editbox btw. ;)
 Respond  
Akishoot   -  Oct 15, 2007

@ Clueless - You can use [.code] and [./code] (Without the periods) to put segments of coding into. =)

Example:

alias wave {
  /describe $active waves to everyone.
}
 Respond  
Clueless   -  Oct 15, 2007

never thought of that... ima test before sending this quote so i dont double post something that wasnt nesseciary..

TESTING...

ok only the first alias is giving me trouble so here it is

alias quote {
if ($1 isnum) && ($2 <= $lines(c:\program files\mirc\Quotes.txt)) /msg $chan Quote $chr(91) $+ $chr(35) $+ $2 $+ $chr(92) $+ $lines(c:\program files\mirc\Quotes.txt) $+ $chr(93) 4 $+ $read(quotes.txt, $2)
else { set %quote $read(quotes.txt) } { /msg $chan $chr(91) $+ $chr(35) $+ $readn $+ $chr(92) $+ $lines(c:\program files\mirc\Quotes.txt) $+ $chr(93) 4 $+ %quote }
}

let me know if you have a solution

 Respond  
napa182   -  Oct 13, 2007

why dont you just trigger it in a alias for Ur self.

 Respond  
Clueless   -  Oct 13, 2007

this is what i put but it didnt work.

;on :input:#: { if ($1 == !quote) && ($2 == $null) { set %quote $read(quotes.txt) } { .msg $chan $chr(91) $+ $chr(35) $+ $readn $+ $chr(92) $+ $lines(c:\program files\mirc\Quotes.txt) $+ $chr(93) 4 $+ %quote }
;on
:input:#: { if ($1 == !quote) && ($2 isalnum) && ($2 <= $lines(c:\program files\mirc\Quotes.txt)) { .msg $chan Quote $chr(91) $+ $chr(35) $+ $2 $+ $chr(92) $+ $lines(c:\program files\mirc\Quotes.txt) $+ $chr(93) 4 $+ $read(quotes.txt, $2) } }
;on :input:#: { if ($1 == !addquote) .write quotes.txt 12Quote added by $nick on $date $+ : 4 $+ $2- } { .msg $chan Your quote has been added, thank you! }
;on
:input:#: { if ($1 == !delquote) && ($nick isop $chan) { .write -dl$2 quotes.txt }
;{ .msg $chan Quote $chr(35) $+ $2 has been deleted. } }
;on :input:#: { if ($1 == !quotes) .msg $chan Total number of quotes: $lines(c:\program files\mirc\Quotes.txt) }
;on
:input:#: { if ($1 == !lastquote) .msg $chan 12Last quote: $read(Quotes.txt, $lines(c:\program files\mirc\Quotes.txt)) }

(i had commented it because i wanted to keep this for refrence)

 Respond  
guest598594   -  Oct 08, 2007
on *:input:#:{
  if ($1 == ...) 
}
 Respond  
Clueless   -  Oct 08, 2007

yes. i have tried myself but failed miserably...

 Respond  
guest598594   -  Sep 22, 2007

on input?

 Respond  
Clueless   -  Sep 22, 2007

would you be able to add a self quote part into there?

like so if you dont have a bot (or dont want one) you can use it yourself?

 Respond  
guest598594   -  Sep 03, 2007

if ($nick isop $chan) {

 Respond  
fooddude707   -  Aug 30, 2007

would it be possible to make it so that only ops can use 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.