mIRC Homepage

Nightbots @touser@

Posted By: michaelukz

Nightbots @touser@ - 28/12/14 02:03 PM

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
}
Posted By: Nillen

Re: Nightbots @touser@ - 28/12/14 05:05 PM

Code:
on *:text:!splat &:#: { msg # $nick has splatted $2 with sticky glue }
on *:text:!slap &:#: { msg # $nick has slapped $2 with a large trout }
Posted By: michaelukz

Re: Nightbots @touser@ - 30/12/14 02:14 AM

Thanks it really helps, But how do I make it non case sensitive (Not just for this command).
Posted By: Loki12583

Re: Nightbots @touser@ - 30/12/14 04:10 AM

It isn't.
Posted By: michaelukz

Re: Nightbots @touser@ - 30/12/14 08:58 PM

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!
Posted By: michaelukz

Re: Nightbots @touser@ - 30/12/14 09:11 PM

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.
Posted By: Nillen

Re: Nightbots @touser@ - 30/12/14 09:48 PM

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.
Posted By: michaelukz

Re: Nightbots @touser@ - 30/12/14 10:10 PM

Thanks laugh
Posted By: michaelukz

Re: Nightbots @touser@ - 30/12/14 11:39 PM

How would I make a Admin only command so it checks for +0 mode?
Posted By: judge2020

Re: Nightbots @touser@ - 31/12/14 07:56 PM

if ($nick isop #<channel>) {
Posted By: michaelukz

Re: Nightbots @touser@ - 01/01/15 06:23 PM

It seems it's not working--

This is what I have / Need it to function as

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

Re: Nightbots @touser@ - 01/01/15 07:08 PM

on *:TEXT:!test:#: {
if ($nick isop #kryptonica) { msg $chan Hi }
}
Posted By: michaelukz

Re: Nightbots @touser@ - 02/01/15 05:13 PM

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'
Posted By: Belhifet

Re: Nightbots @touser@ - 02/01/15 05:31 PM

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.)
Posted By: michaelukz

Re: Nightbots @touser@ - 03/01/15 05:39 AM

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."
Posted By: Nillen

Re: Nightbots @touser@ - 03/01/15 09:48 AM

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 $+ .
}
© 2019 mIRC Discussion Forums