mIRC Home    About    Download    Register    News    Help

Print Thread
#128246 22/08/05 08:44 PM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
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)

#128247 22/08/05 10:47 PM
Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
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

#128248 22/08/05 10:54 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
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* }
#128249 22/08/05 11:59 PM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
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.

#128250 23/08/05 12:05 AM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
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.

#128251 24/08/05 12:58 AM
Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
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.

#128252 24/08/05 03:28 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
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* }

Link Copied to Clipboard