mIRC Homepage
Posted By: JohnS On Join Action For Specific Person - 07/05/08 07:54 AM
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)
}
Posted By: RusselB Re: On Join Action For Specific Person - 07/05/08 08:18 AM
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.
Posted By: AWEstun Re: On Join Action For Specific Person - 07/05/08 08:23 AM
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).
Posted By: JohnS Re: On Join Action For Specific Person - 07/05/08 11:04 AM
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.
Posted By: RoCk Re: On Join Action For Specific Person - 07/05/08 12:18 PM

RusselB had it right, try his.

Code:

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


Posted By: JohnS Re: On Join Action For Specific Person - 07/05/08 12:49 PM
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
Posted By: RoCk Re: On Join Action For Specific Person - 07/05/08 12:55 PM

Do you have another JOIN event in the same script file? If so it could be the cause.
Posted By: Horstl Re: On Join Action For Specific Person - 07/05/08 12:56 PM
You missed the closing bracket (after User)
Posted By: JohnS Re: On Join Action For Specific Person - 07/05/08 01:00 PM
Originally Posted By: RoCk

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

nope
Posted By: AWEstun Re: On Join Action For Specific Person - 07/05/08 02:18 PM
Put a ^ in front of the *

Code:
on ^*:JOIN:#JohnDoeChannel: {
  if ($nick == JohnDoe {
    describe $chan Waves Hi
  }
}
Posted By: JohnS Re: On Join Action For Specific Person - 07/05/08 02:24 PM
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.
Posted By: RoCk Re: On Join Action For Specific Person - 07/05/08 04:29 PM

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
  }
}


As Horstl said about 4 posts up, there's a closing parenthesis missing in that /if condition that's breaking it.
Posted By: JohnS Re: On Join Action For Specific Person - 07/05/08 04:41 PM
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.
Posted By: RoCk Re: On Join Action For Specific Person - 07/05/08 04:44 PM

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.
Posted By: JohnS Re: On Join Action For Specific Person - 07/05/08 05:02 PM
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)
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.
Posted By: JohnS Re: On Join Action For Specific Person - 08/05/08 03:25 AM
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
Posted By: Horstl Re: On Join Action For Specific Person - 08/05/08 03:40 AM
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 $+ !
Posted By: Riamus2 Re: On Join Action For Specific Person - 08/05/08 03:53 PM
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
Posted By: JohnS Re: On Join Action For Specific Person - 08/05/08 04:37 PM
is there a way to do multiple line actions?
Posted By: Riamus2 Re: On Join Action For Specific Person - 09/05/08 02:08 AM
Just use multiple /describe's
© mIRC Discussion Forums