mIRC Home    About    Download    Register    News    Help

Print Thread
#141020 02/02/06 09:36 PM
Joined: Sep 2005
Posts: 53
C
Babel fish
OP Offline
Babel fish
C
Joined: Sep 2005
Posts: 53
Im trying to make my own quote system. But I dont know how to add something to a text. Like I want the script to add " {-My Quote's-} - (The quote) "
when I type
/add (The Quote)
or when I type .add (the Quote)
I also need to have " {-My Quote's-} added automatically without me typing it.

#141021 02/02/06 09:43 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
For a simple quote database, you can use a text file & write the quotes in there.

You can do something like this

Code:
alias addquote {
 write myquotes.txt {-My Quote's-} - $$1- $+([,$fulldate,])
}


Syntax: /addquote <your_quote>

/help /write

To retrieve/read the quotes, you would use $read

/help $read


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#141022 02/02/06 09:49 PM
Joined: Sep 2005
Posts: 53
C
Babel fish
OP Offline
Babel fish
C
Joined: Sep 2005
Posts: 53
Nevrmind I used this method.
Code:
menu channel,status,nicklist {
  Quote System
  .Add A Quote: set %newquote $$?="What is your quote?" | write quotes.txt %newquote | msg $chan Quote Added: %newquote 
}

#141023 03/02/06 10:41 PM
Joined: Sep 2005
Posts: 53
C
Babel fish
OP Offline
Babel fish
C
Joined: Sep 2005
Posts: 53
Although I use this code... I still dont know how to make something like {- My Quote's -} before the quote itself...
Code:
menu channel,status,nicklist {
  Quote System
  .Add A Quote: set %newquote $$?="What is your quote?" | write quotes.txt %newquote | msg $chan Quote Added: %newquote
}

Help

#141024 03/02/06 11:29 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
//echo -a $+($chr(123),- My Quote's -,$chr(125)) $({- My Quote's -},0)
you should be able to use either one
Code:
menu channel,status,nicklist {
  Quote System
  .Add A Quote: {
    var %newquote = $$?="What is your quote?" 
    write quotes.txt $({- My Quote's -},0) %newquote 
    msg $chan $+($chr(123),- My Quote's -,$chr(125)) Quote Added: %newquote
  }
}


Link Copied to Clipboard