mIRC Home    About    Download    Register    News    Help

Print Thread
#249996 28/12/14 02:03 PM
M
michaelukz
michaelukz
M
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
}

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

M
michaelukz
michaelukz
M
Thanks it really helps, But how do I make it non case sensitive (Not just for this command).

#250019 30/12/14 04:10 AM
Joined: Jan 2004
Posts: 1,330
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,330
It isn't.

M
michaelukz
michaelukz
M
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!

#250037 30/12/14 09:11 PM
M
michaelukz
michaelukz
M
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.

#250039 30/12/14 09:48 PM
Joined: Dec 2013
Posts: 771
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 771
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.

M
michaelukz
michaelukz
M
Thanks laugh

M
michaelukz
michaelukz
M
How would I make a Admin only command so it checks for +0 mode?

#250057 31/12/14 07:56 PM
Joined: Mar 2014
Posts: 214
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 214
if ($nick isop #<channel>) {

M
michaelukz
michaelukz
M
It seems it's not working--

This is what I have / Need it to function as

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

#250070 01/01/15 07:08 PM
P
paper0rplastic
paper0rplastic
P
on *:TEXT:!test:#: {
if ($nick isop #kryptonica) { msg $chan Hi }
}

Last edited by paper0rplastic; 01/01/15 07:09 PM.
#250089 02/01/15 05:13 PM
M
michaelukz
michaelukz
M
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'

#250090 02/01/15 05:31 PM
B
Belhifet
Belhifet
B
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.)

#250102 03/01/15 05:39 AM
M
michaelukz
michaelukz
M
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."

#250118 03/01/15 09:48 AM
Joined: Dec 2013
Posts: 771
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 771
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 $+ .
}


Link Copied to Clipboard