mIRC Home    About    Download    Register    News    Help

Print Thread
Some basic b0t scripting help #100853 17/10/04 03:02 PM
Joined: Oct 2004
Posts: 2
N
nerdco Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
N
Joined: Oct 2004
Posts: 2
Hey,

Well Im really n00b, I basically got some stuff from the net and edited it:

This is what I have:

on ^$:PART:#: {
if ($nick == chanb0t) && ($chan == #Nerd-Tech) { mode $chan +ooooo nerdco Gergij cdbrown |Scott| Es }
}

on 1:QUIT:#: {
if (chanb0t == $nick) && ($chan == #Nerd-Tech) { mode $chan +ooooo nerdco Gergij cdbrown |Scott| Es }
}

on 1:JOIN:#: {
if (chanb0t == $nick) && ($chan == #Nerd-Tech) { mode $chan -ooooo nerdco Gergij cdbrown |Scott| Es }
}

on 1:JOIN:#: {
if ($readini(ntaccess.ini,nicks,$nick) == $nick) && ($chan == #Nerd-Tech) { mode $chan -o $nick }
}

Now the top two jsut do not work... Can you help me fix em up and somehow replace all the nicks with the file thingo command $readini(ntaccess.ini,nicks,$nick)

Ta in advance

Nerd


Re: Some basic b0t scripting help #100854 17/10/04 03:19 PM
Joined: Dec 2002
Posts: 7
D
Davman Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
D
Joined: Dec 2002
Posts: 7
Well uhh... the code you have says "when someone quits, and it's the bot, make the bot try and set a mode".... now how's it gonna set a mode if it's quit? you might want to go for an entire re-write there....

Re: Some basic b0t scripting help #100855 17/10/04 04:25 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
on ^[color:Red]$:PART:#: {[/color] - the $ doesn't work with ON Part, only with ON Text and the likes.. $ means to look for a regex match, so it will not work there.

on 1:QUIT:[color:red]#: {[/color] - in the ON Quit event there is no channel, since you quit IRC and not a chan. If you would like to get the channel, I suggest a while loop using $comchan($nick,N).

I didn't understand what you wanted with the ini file, sorry smirk

Zyzzyx smile


"All we are saying is give peace a chance" -- John Lennon
Re: Some basic b0t scripting help #100856 18/10/04 06:39 AM
Joined: Oct 2004
Posts: 2
N
nerdco Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
N
Joined: Oct 2004
Posts: 2
Hey,

After some experimentation and some help from some other people I have ended up with this:

on @*:PART:#Nerd-Tech: {
if ($nick == chanb0t) { mode $chan +ooooo nerdco Gergij cdbrown |Scott| Es }
}
on 1:QUIT: {
if (chanb0t == $nick) && ($nick ison #Nerd-Tech) { mode #Nerd-Tech +ooooo nerdco Gergij cdbrown |Scott| Es }
}
on 1:JOIN:#: {
if ($readini(ntaccess.ini,nicks,$nick) == $nick) && ($chan == #Nerd-Tech) { mode $chan -o $nick }
else if (chanb0t == $nick) && ($chan == #Nerd-Tech) { mode $chan -ooooo nerdco Gergij cdbrown |Scott| Es }
}

Now where I have things like:
mode $chan -ooooo nerdco Gergij cdbrown |Scott| Es

I want to replace all the names with a reference to my auser list as all of us have the same custom hostmask... This will allow for more security:

My auser list looks like this:
10:nerdco!*@staff.nerdtech.ws
10:Es!*@staff.nerdtech.ws
10:Gergij!*@staff.nerdtech.ws
10:cdbrown!*@staff.nerdtech.ws
10:|Scott|!*@staff.nerdtech.ws

Nerd

Re: Some basic b0t scripting help #100857 18/10/04 05:19 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
What do you mean by replacing them with a reference? You can use the $ulist identifier (/help $ulist), but this might not be what you're looking for.


"All we are saying is give peace a chance" -- John Lennon
Re: Some basic b0t scripting help #100858 18/10/04 06:31 PM
Joined: Dec 2002
Posts: 79
F
Fantas Offline
Babel fish
Offline
Babel fish
F
Joined: Dec 2002
Posts: 79
if you are all level 10

on 10:PART:#Nerd-Tech: {