mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Joined: Dec 2006
Posts: 31
J
JohnS Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2006
Posts: 31
ok ive been trying to search google and trying to piece something together to do what im wanting but its not working. what im looking for is in a specific channel if a specific person enters i want an action to be done.

so like:
if (User) joins #(channel) /me (action)

this cant be even close but this is what im thinking of sort of.
on 1!:JOIN:#(channel):{
if $nick == User
/me (action)
}

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
on *:join:#channel:{
  if $nick == User {
    describe $chan action
  }
}


Use describe and the channel to script an action. /me isn't designed for scripts.

Joined: May 2008
Posts: 329
A
Fjord artisan
Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
Code:
on 1!:JOIN:#(channel):{
if $nick == User { /me (action) }
}


The '/me (action)' needs to go on the 'if $nick == (User)' line else the '/me (action) will always happen, even if $nick is not (User).


I registered; you should too.
Joined: Dec 2006
Posts: 31
J
JohnS Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2006
Posts: 31
ok i copied AWEStuns first and filled in the channel and nick and action and it didnt work. then i copied RusselBs one and it gave a weird reult so i modded it a tad and ended up with close to AWEStuns solution but for some reason AWEStuns didnt work right at first. so i have both versions and if someone can please explain why the first one doesnt work but the second one does then that would be great.

DOESNT WORK:
on 1!:JOIN:#(channel):{
if $nick == User { /me (action) }
}

WORKS:
on *:join:#(channel):{
if $nick == User { /me (action) }
}

i had made a test channel to test it and put my nick in as $nick and the channel name as #(channel).

looking back at my first post and what i have working now i cant believe how close i was to having something that would have worked considering i know nothing of mirc scripting other than copying code snippets laugh


EDIT:
weird thing. in tests it worked but when the person joined the channel i had it set up for it didnt trigger.

Last edited by JohnS; 07/05/08 11:46 AM.
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

RusselB had it right, try his.

Code:

on !*:JOIN:#(channel): {
  if ($nick == User) {
    describe $chan (action)
  }
}



Joined: Dec 2006
Posts: 31
J
JohnS Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2006
Posts: 31
Originally Posted By: RoCk

RusselB had it right, try his.

Code:

on !*:JOIN:#(channel): {
  if ($nick == User) {
    describe $chan (action)
  }
}



Code:
on !*:JOIN:#JohnDoeChannel: {
  if ($nick == JohnDoe {
    describe $chan Waves Hi
  }
}

doesnt work.
ive tried removing the ! so it would work for my name and it still isnt shows

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Do you have another JOIN event in the same script file? If so it could be the cause.

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
You missed the closing bracket (after User)

Joined: Dec 2006
Posts: 31
J
JohnS Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2006
Posts: 31
Originally Posted By: RoCk

Do you have another JOIN event in the same script file? If so it could be the cause.

nope

Joined: May 2008
Posts: 329
A
Fjord artisan
Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
Put a ^ in front of the *

Code:
on ^*:JOIN:#JohnDoeChannel: {
  if ($nick == JohnDoe {
    describe $chan Waves Hi
  }
}


I registered; you should too.
Joined: Dec 2006
Posts: 31
J
JohnS Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2006
Posts: 31
Originally Posted By: AWEstun
Put a ^ in front of the *

Code:
on ^*:JOIN:#JohnDoeChannel: {
  if ($nick == JohnDoe {
    describe $chan Waves Hi
  }
}

i tried that using my nick and it didnt work.
also id like the action to be the same result as /me not the channel doing the action.

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

I misread. That's how the /describe command works, it will be you performing the action on the specified channel (target). I have no idea why it won't work for you, did you make sure your remotes aren't disabled? Try typing Type /remote on

AWEstun: The ^ prefix is for halting the default text.

Code:

on *:JOIN:#JohnDoeChannel: {
  if ($nick == JohnDoe {
    describe $chan Waves Hi
  }
}



Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
As Horstl said about 4 posts up, there's a closing parenthesis missing in that /if condition that's breaking it.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Dec 2006
Posts: 31
J
JohnS Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2006
Posts: 31
yes remotes are on.

it still doesnt work.
would changing $chan after describe to $nick instead make it "JohnDoe Waves Hi" instead of "JohnDoeChannel Waves Hi" ?

@starbucks mafia, where exactly would it be? what would be the complete working code then, im confused where exactly itd go.

Last edited by JohnS; 07/05/08 04:42 PM.
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

on *:JOIN:#JohnDoeChannel: {
if ($nick == JohnDoe) {
describe $chan Waves Hi
}
}

Originally Posted By: JohnS

would changing $chan after describe to $nick instead make it "JohnDoe Waves Hi" instead of "JohnDoeChannel Waves Hi" ?



If you're on #JohnDoeChannel, type /describe #JohnDoeChannel finally realizes how this command works.

Joined: Dec 2006
Posts: 31
J
JohnS Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2006
Posts: 31
so theres no way to have the wave be from me it has to be "the channel" instead.

what im looking for is this:

Lisa has joined the channel.
*John Waves Hi to Lisa

so everytime she joins it would trigger and say i wave.


could you do something like this instead maybe:
on *:JOIN:#JohnDoeChannel: {
if ($nick == JohnDoe) {
if ($nick2 == Lisa) {
describe $nick Waves Hi to $nick2
}
}
}

with somehow specifying that $nick is whatever my nick is ($me)

Last edited by JohnS; 07/05/08 05:07 PM.
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
The describe command in RoCk's post will be from you. The $chan in that line is the destination (it will be sent to the channel so that everyone on there can see you waving) - all desribes/messages/etc that you send will always implicitly be from you.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Dec 2006
Posts: 31
J
JohnS Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2006
Posts: 31
is there a way to make this work if im not an op?
imade a test channel so i was automatically an op and they joined and it worked. but in the normal channel it didnt work. i think its got to do with my lack of op maybe

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Nope, this isn't restricted in that a way.

You may have
a) some other "on *:JOIN:#JohnDoeChannel: {" event loaded, using a /halt command
or
b) another on *:JOIN:#JohnDoeChannel: {" event loaded in the same scriptfile

To greet that specific nick, extend the "describe $chan <your described text here>" command, e.g.:
describe $chan waves Hi to $nick $+ !

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You may also have forgotten to change the channel name(s) in there. It does happen, so might be good to just double check. smile


Invision Support
#Invision on irc.irchighway.net
Page 1 of 2 1 2

Link Copied to Clipboard