#MIRC @ Dalnet

MIRC Client Help Forum

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Dalnet Services Help Popups
Mon Oct 24, 2011 7:16 am by HorseC

» DCC Problem Checking Script
Fri Sep 30, 2011 11:43 pm by Rukbat

» general question
Fri Sep 30, 2011 5:25 am by Rukbat

» Banned by dal.net
Sat Aug 13, 2011 11:25 pm by HorseC

» "MISHBOX" tutorials on mirc scripting.
Tue Aug 02, 2011 7:16 am by HorseC

» A very good guide to mIRC Scripting
Tue Aug 02, 2011 7:08 am by HorseC

» Dialog tool for DALnet services
Mon Aug 01, 2011 7:53 am by HorseC

» Scripting Class Level 2 Class 4
Sat Jul 30, 2011 1:01 am by HorseC

» Scripting Class Level 2 Class 3
Sat Jul 30, 2011 12:49 am by HorseC

Gallery


Statistics
We have 32 registered users
The newest registered user is boed1

Our users have posted a total of 38 messages in 36 subjects

You are not connected. Please login or register

a simple Quote system..

View previous topic View next topic Go down  Message [Page 1 of 1]

1 a simple Quote system.. on Thu Jul 21, 2011 10:51 am

Admin


Admin
This Script is for use in an mIRC based bot...

;=============================================================================================
;
; A quote Database script for an mIRC based BOT.
;
; Author: One of the Ops on DALnet mIRC.
;
; Notes: this will create a file called quotes.txt with the data from the add function.
;
; it will currently support the following formats...
; To search: .quote search keyword
; to show total quotes: .quote total
; To display random quote: .quote
; To display unique quote : .quote nn (nn = number for quote)
; For more information on search options see: http://www.mirc.org/quotesys.html;
;
; Note well: currently the control character can be . or ! or @ ie. !quote .quote @quote (see on text line)
; ALSO note the characters block character seen in the listing that follows is the ctl+k combination.
;=============================================================================================

on $*:text:/^[!@.]quotes?(add)?/i:#mirc: {
var %qdb = quotes.txt , %readn = 1 , %match
if ($regml(1)) && ($nick isop # || $nick isvo #) {
write -a $qt(%qdb) $2-
msg # Added quote07 $2- 14to the database at line number07 $lines(%qdb) $+ 14.
}
else {
if (!$2) { msg # Random Quote ( $+ $readn $+ ): [ $read(%qdb,n) ] }
elseif ($2 isnum && $read(%qdb,n,$2)) { msg # Selected Quote ( $+ $+(,$2,/,$lines(%qdb)) $+ ): $v1 }
elseif ($2 == last && $lines(%qdb)) { msg # 14L07ast 14Q07uote14(07# $+ $v1 $+ 14)00: $read(%qdb,n,$v1) }
elseif ($2 == total) { msg # 14Total number of quotes:07 $lines(%qdb) }
elseif ($regex(wcore,$2,/^(wc|re)?search$/i)) {
msg # Searching through quote database for07 $3- $+ 14...
while ($read(%qdb,$iif($regml(wcore,1) = re,r,w),$iif($regml(wcore,1),$3-,$+(*,$3-,*)),%readn)) var %match = $addtok(%match,$readn,32) , %readn = $readn + 1
if (%match) { msg # Found quotes matching07 $3- $+ 14:07 %match }
else { msg # No quotes found matching07 $3- $+ 14. }
}
else { msg # Error in syntax or insufficient access to use method. Quote operation aborted. }
}

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum