mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 20
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Feb 2003
Posts: 20
Has anyone seen or heard of a script that could store information people send it and display it in the channel when needed?

Something like - anyone could type !add <info> and the info could then be retrieved by anyone in the channel with another trigger word.

Or perhaps some pointers on how to code this

thx

Joined: Dec 2002
Posts: 83
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2002
Posts: 83
Untested - but should work....

Code:
on *:TEXT:!add:*:{
/write words.txt $nick said, $2-
}
on *:TEXT:!read:*:{
if ($2 !== $null) {
/msg $nick $read(words.txt) 
}
else {
/msg $nick $read(words.txt, s, $2)
}


Usage:
!add Text to add
!read - reads a random line
!read <nick> - searchs for a line that $nick said.
}


Link Copied to Clipboard