Silent Posted June 21, 2005 Share Posted June 21, 2005 just asking this, im gonna make a .txt called quote.txt can some make a script so when i type !quote it takes a random line of the quote.txt and says it? Peace out, Silent. Link to comment
Mike Posted June 21, 2005 Share Posted June 21, 2005 (edited) on *:SIGNAL:mta.command:{ if ($3 == !quote) mta.say $1 $read(quote.txt) } Edited June 21, 2005 by Guest Link to comment
[KFC]KungFu Posted June 21, 2005 Share Posted June 21, 2005 I have something like this for tips in PartyServer but it's more complicated looking. Oli made it some time ago just switch tip with quote... it also has a join message to let them know that the tips exist... that's a join.txt file on *:SIGNAL:mta.command:{ var %a = $iif($4 == $null,$2,$mta.findid($1,$4)) if $3 == !tip { if %a == -1 mta.msg $1 $2 Error - Invalid ID. elseif $mta.name($1,%a) == unknown mta.msg $1 $2 Error - Invalid ID. else mta.msg $1 %a $read($scriptdirtips.txt,$rand(1,$lines($scriptdirtips.txt))) } } on *:SIGNAL:mta.join:{ mta.msg $1 $2 $read($scriptdirjoin.txt,$rand(1,$lines($scriptdirjoin.txt))) } maybe better or worse.. dunno but it works. Link to comment
MrJax Posted June 21, 2005 Share Posted June 21, 2005 on *:SIGNAL:mta.command:{ if ($1 == !quote) mta.say $1 $read(quote.txt) } if ($3 == !quote) Link to comment
Oli Posted June 21, 2005 Share Posted June 21, 2005 Mike: $read(quote.txt,$rand(1,$lines(quote.txt))) Link to comment
MrJax Posted June 21, 2005 Share Posted June 21, 2005 //echo $read(funny.txt) Reads a random line from the file funny.txt. Link to comment
Mike Posted June 21, 2005 Share Posted June 21, 2005 on *:SIGNAL:mta.command:{ if ($1 == !quote) mta.say $1 $read(quote.txt) } if ($3 == !quote) lol, of course. Had a tiring day /me waves to Oli with /help $read Link to comment
Recommended Posts