mIRC Home    About    Download    Register    News    Help

Print Thread
Nightbots @touser@ #249996 28/12/14 02:03 PM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
Hi, First of all If say something stupid-- Forgive me, I am new to scripting and new to mIRC, So I am trying to create a custom TWITCH bot.

Now I have used nightbot before, And I can't figure one command out, On nightbot the command was !splat = @user@ has splatted @touser@ with sticky glue, I can figure out the $nick, But when I try and get the @touser@ I believe it would be $$2 however when I put that nothing happens, This is my current command it looks a little odd since I have been experimenting

on *:TEXT:splat:#: { msg $chan $nick has splatted $$2 with sticky glue
}

Re: Nightbots @touser@ [Re: michaelukz] #249997 28/12/14 05:05 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Code:
on *:text:!splat &:#: { msg # $nick has splatted $2 with sticky glue }
on *:text:!slap &:#: { msg # $nick has slapped $2 with a large trout }


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Nightbots @touser@ [Re: Nillen] #250018 30/12/14 02:14 AM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
Thanks it really helps, But how do I make it non case sensitive (Not just for this command).

Re: Nightbots @touser@ [Re: michaelukz] #250019 30/12/14 04:10 AM
Joined: Jan 2004
Posts: 1,276
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,276
It isn't.

Re: Nightbots @touser@ [Re: Loki12583] #250036 30/12/14 08:58 PM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
So how would I get a Multi Text one -- IE on text kappa

/timeout $nick 1
<Ukzbot>: I don't like that command very much!

Re: Nightbots @touser@ [Re: michaelukz] #250037 30/12/14 09:11 PM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
What I mean is, I personally don't like the emoticon Kappa, So i have it set to timeout the kappa for one second, Which it does, HOWEVER, It doesn't do the second part of text though it is a different part ie

on *:TEXT:Kappa:#: { msg $chan timeout $nick 1} <---- This text is completed.

on *:TEXT::Kappa:#: {msg $chan Now now, I don't like that emoticon!
} <---- This text NOT completed.

Re: Nightbots @touser@ [Re: michaelukz] #250039 30/12/14 09:48 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Code:
on *:text:*kappa*:#: { 
msg # timeout $nick 1
msg # Now now, I don't like that emoticon! 
}

Since they both match the exact same text you can't have them in the same file like that. If you want two matches of the exact same text, or all text, you need to have 2 different files. You can click "file > new" to create a new file.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Nightbots @touser@ [Re: Nillen] #250040 30/12/14 10:10 PM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
Thanks laugh

Re: Nightbots @touser@ [Re: Nillen] #250043 30/12/14 11:39 PM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
How would I make a Admin only command so it checks for +0 mode?

Re: Nightbots @touser@ [Re: michaelukz] #250057 31/12/14 07:56 PM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
if ($nick isop #<channel>) {


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Re: Nightbots @touser@ [Re: judge2020] #250068 01/01/15 06:23 PM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
It seems it's not working--

This is what I have / Need it to function as

on *:TEXT:!test:#: if ($nick isop #kryptonica) { Hi
}

Re: Nightbots @touser@ [Re: michaelukz] #250070 01/01/15 07:08 PM
Joined: Sep 2014
Posts: 52
paper0rplastic Offline
Babel fish
Offline
Babel fish
Joined: Sep 2014
Posts: 52
on *:TEXT:!test:#: {
if ($nick isop #kryptonica) { msg $chan Hi }
}

Last edited by paper0rplastic; 01/01/15 07:09 PM.
Re: Nightbots @touser@ [Re: paper0rplastic] #250089 02/01/15 05:13 PM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
Thanks, but I have one last question, how would I get it to do an if command

IE on *:TEXT:!1out &:#: {
if ($nick isop #kryptonica) { msg $chan /unban $2 }
msg # $2 has been timed out for 1 minute.
}

Say a moderator has tried to timeout a moderator, How would I get it so that this will say 'msg # $2 is a moderator and can only be timed out by the owner'

Re: Nightbots @touser@ [Re: michaelukz] #250090 02/01/15 05:31 PM
Joined: Jun 2014
Posts: 248
B
Belhifet Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
msg # $iif($2 isop #,$2 is a moderator and can only be timed out by the owner,$2 has been timed out for 1 minute.)

Re: Nightbots @touser@ [Re: Belhifet] #250102 03/01/15 05:39 AM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
How would I get it to say that if it wasn't a mod at all, "Sorry, &nick You don't have permission to use this command."

Re: Nightbots @touser@ [Re: michaelukz] #250118 03/01/15 09:48 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
You're pretty much free to do whatever you want in mIRC's dynamic language, as long as you understand it. You should read the help files of " /help if then else " and " /help on text "

Here are some basic syntaxes for you to follow
Code:
on *:text:!test*:#: { 
;Starting with a simple message
msg # $nick initiated a test

;Is the user an op in the channel? Do this
if ($nick isop #) msg # $nick is an op
;Is the user not an op? Do this
else { 
msg # $nick is not an op
msg # Hehe, not even an op *laughs*
}

;Did the user write something after !test? Do this
if ($2) msg # $nick also mentioned $2- message
;Not? Do this
elseif (!$2) msg # $nick did not mention anything in his message

;Ending with a simple message
msg # K, this has been a simple test brought to you by $me $+ .
}


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net