Quote:
I'm making a bot to help me understand some scripting I am unclear in; I don't know or remember some parts of this script and it would be grand if someone could help me finish this. Thank you.

on *:TEXT:!AddQ *:#:/write Q (unfinished)
on *:TEXT:!Q:#:/msg $chan (unfinished)


we can do into deep scriptiing but to bring the memories back here it is

on *:TEXT:*:*: {
if ($1 == !AddQ) { //write quote.txt $2- }
if ($1 == !Q) { msg $active $read(quotes.txt) }
}
[color:green]//*** this is basically saying on *:TEXT:!AddQ:*<< a * = wildcard so it can be anything in text and we add * again so that its either channel or privmsg query so on *:TEXT:!AddQ:*:*: {

and the rest if etc... its like using IF in real life

so if $1 == !AddQ which $1 represents the first word in a text file
example:.. <TestorBot> !AddQ sajfkkjla asjkfslfksf safasfa
we wanna write to text file which you got the write command ok but you wanna target a text file or something like quotes.txt so

if ($1 == !AddQ) { write quotes.txt $2- } which $2 represents second word but by adding a - after it it continues with the rest of the line

if ($1 == !Q) { msg $active $read(quotes.txt) }

<testorbot> !Q
<newbot> sajfkkjla asjkfslfksf safasfa

$reads a random line...


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }