mIRC Home    About    Download    Register    News    Help

Topic Options
#128246 - 22/08/05 09:44 PM !Q bot
pUff Offline
Ameglian cow

Registered: 31/03/05
Posts: 41
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)

Top
#128247 - 22/08/05 11:47 PM Re: !Q bot
stefys99 Offline
Vogon poet

Registered: 11/08/05
Posts: 128
I don't understand exactly what do u want to say, but here is a script:
Code:
on 1:text:!Qadd *:#:write quotes.txt $2-
on 1:text:!q:#:msg $chan Random quote: $read(quotes.txt,n)

!qadd This is a quote
!qadd This is another quote
!q --- tells you a random quote

Top
#128248 - 22/08/05 11:54 PM Re: !Q bot
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
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* }

Top
#128249 - 23/08/05 12:59 AM Re: !Q bot
pUff Offline
Ameglian cow

Registered: 31/03/05
Posts: 41
Neither of your scripts worked, at all. I tryed to look at them and i can't seem to figure out what is making them not work.

Top
#128250 - 23/08/05 01:05 AM Re: !Q bot
pUff Offline
Ameglian cow

Registered: 31/03/05
Posts: 41
Wait, i figured it out, it was one little misplaced 's'

on *:TEXT:*:*: {
if ($1 == !AddQ) { //write quote.txt $2- }
if ($1 == !Q) { msg $active $read(quotes.txt) }
}

Thank you for your help.

Top
#128251 - 24/08/05 01:58 AM Re: !Q bot
stefys99 Offline
Vogon poet

Registered: 11/08/05
Posts: 128
puff, I would suggest you to use my script, and not his.
Lpfix5's script is not containing the 'n' switch at $read, so this will make your bot hackable.
!addQ $findfile(.,*,1,quit pwned you)
type some more !q till u get this quote, and bot quits smile.. That's why you have to use mine.

Top
#128252 - 24/08/05 04:28 AM Re: !Q bot
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
Quote:
puff, I would suggest you to use my script, and not his.
Lpfix5's script is not containing the 'n' switch at $read, so this will make your bot hackable.
!addQ $findfile(.,*,1,quit pwned you)
type some more !q till u get this quote, and bot quits smile.. That's why you have to use mine.


lol steffy's... our scripts are the same thing i just didnt have the n switch it could of add it to mine we both posted our scripts at the same time laugh I just notice however you edited your first post all cool , we both answer to these type of questions all the time :P good scripting steffy!
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top