Mophead Posted October 18, 2005 Share Posted October 18, 2005 Could someone do this for me please, there should be like a .txt file caleld quotes and when you !Addquote it writes it into the quotes.txt file, and anyone at any level can add quotes. Link to comment
Cube Posted October 18, 2005 Share Posted October 18, 2005 if ($3 == !addquote) { !write " $+ $scriptdir $+ quote.txt" $4- .timer 1 0.5 mta.msg $1 $2 Paragraph added succesfull ! Paragraph IDs: $lines($scriptdir $+ quote.txt) $+ , quote contents: .timer 1 1 mta.msg $1 $2 $4- } elseif ($3 == !quote) || ($3 == !q) { if ($4 == $null) { mta.msg $1 $2 Syntax error: !quote , range: 1- $+ $lines($scriptdir $+ quote.txt) } else { var %q = $read($scriptdir $+ quote.txt,$4) if (%q == $null) { mta.msg $1 $2 Paragraph doesnt exists, range: 1- $+ $lines($scriptdir $+ quote.txt) } else { mta.say $1 %q } } } try it, + elseif ($3 == !setquote) { if ($4 == $null) { mta.msg $1 $2 Syntax error: !setquote } else { !write -l $+ $4 " $+ $scriptdir $+ quote.txt" $5- .timer 1 0.5 mta.msg $1 $2 Paragraph added succesfull ! Paragraph IDs: $4 $+ , quote contents: .timer 1 1 mta.msg $1 $2 $5- } } Link to comment
Recommended Posts