mIRC Home    About    Download    Register    News    Help

Topic Options
#240444 - 05/02/13 07:44 PM Link certain text to other channel
Dragaen Offline
Nutrimatic drinks dispenser

Registered: 05/02/13
Posts: 5
Loc: Sweden, UmeŚ
Hey

I have no clue how to fix this script:
When a certain person writes a certain text/ or a part of a sentence like = <Notice!> then the rest of the sentence comes) it automatically links that message to another channel that I am in.

How do I do that?

;;Edit
And is it possible to highlight all the users in that channel before the quote of the message from the other channel is displayed


Edited by Dragaen (05/02/13 07:52 PM)

Top
#240446 - 05/02/13 10:14 PM Re: Link certain text to other channel [Re: Dragaen]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlšnge
You can look at:

/help on text
/help msg
/help $chan
/help notice

All you need can be found there. smile
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#240447 - 05/02/13 10:24 PM Re: Link certain text to other channel [Re: sparta]
Dragaen Offline
Nutrimatic drinks dispenser

Registered: 05/02/13
Posts: 5
Loc: Sweden, UmeŚ
Alright thank you.

I will try my best =). Kinda new to this.

Top
#240448 - 05/02/13 11:49 PM Re: Link certain text to other channel [Re: sparta]
Dragaen Offline
Nutrimatic drinks dispenser

Registered: 05/02/13
Posts: 5
Loc: Sweden, UmeŚ
Sparta
Is there any way to copy what the sentence is and reply it auto in another channel.

on 1:TEXT:Ny Tour*:#<channel>:/msg #<channel>

Its the part after |/msg #<channel>| I want it to notify the users in that certain channel exactly what the sentence with the words and who said it |1:TEXT:Ny Tour*| was


Edited by Dragaen (05/02/13 11:50 PM)

Top
#240449 - 06/02/13 12:18 AM Re: Link certain text to other channel [Re: Dragaen]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
Int he on TEXT event, $1- is the text on the line.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#240450 - 06/02/13 12:56 AM Re: Link certain text to other channel [Re: Riamus2]
Dragaen Offline
Nutrimatic drinks dispenser

Registered: 05/02/13
Posts: 5
Loc: Sweden, UmeŚ
I am complete noob with scripts, where do i type it.
Should have never posted here :S

But thank you for trying sparta and Riamus =)


Code:
on 1:TEXT:*Ny Tour*:#Turnering:{/msg #Macellarius.priv 4 Ny |-Turnering-|     }


It automatically types |- Ny Turnering-| to the channel #Macellarius.priv if anyone types in the channel #Turnering with the words <Ny Tour>

Basically:
I want to get a particular user's message, in a particular channel to be directly copied into another channel with timestamp and the whole sentence. Users of the other channel should be highlighted also

The sentence must contain the words Ny Tour

-------------------------------
http://i.imgur.com/L8gzSzK.png

Maybe the pic will tell the story a little better.
I want that "Bot" |Utroparen| i want the lines it writes there to be "shouted" into another channel through me.

Like im quoting the stuff he says in #channel1 and im reposting it directly into #channel2


Edited by Dragaen (06/02/13 03:04 AM)

Top
#240454 - 06/02/13 09:18 AM Re: Link certain text to other channel [Re: Dragaen]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlšnge
This is just a exmaple:
Code:
on 1:TEXT:hallo*:#:echo -at $nick said: $1- | .msg #testing $timestamp $nick > $1-

first part do a echo to you, the part after | send a message to #testing with the text that was entered along with hallo, the $1- part return the whole line that was typed in to the channel, you can change it to $2- to skip the first word and so on, dont you use the - sign $1 will only return the first word, not all words typed in the chanenl.
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#240455 - 06/02/13 11:10 AM Re: Link certain text to other channel [Re: Dragaen]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
Well, you asked what to put after /msg #channel and I said $1-. smile

As sparta showed, just put $1- in the message wherever you want. You can add additional details like "$nick said" if you want to adjust the format of how the line looks when sent to the other channel. But otherwise, /msg #channel $1- will do what you asked.

If you want to only have it work if a specific nick says it instead of if anyone says that phrase, then you can include an IF statement... if ($nick == something) { msg #channel $1- } . Timestamps won't matter because you are sending it at the same time it's received, so anyone seeing it will already have timestamps (if they have timestamps enabled). If you still want to include timestamps, you can use something like /msg #channel $timestamp $1- , which will show the timestamp in the format that you use, but it really shouldn't be needed.

As far as highlighting users, I'm not sure what you are asking for there. The message will be whatever was said and won't be edited. If you want to start editing the message, then you'll need to know how you want to edit it and then do so. Note that most people don't need their name included in a message to understand the message.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#240458 - 06/02/13 01:28 PM Re: Link certain text to other channel [Re: Riamus2]
Dragaen Offline
Nutrimatic drinks dispenser

Registered: 05/02/13
Posts: 5
Loc: Sweden, UmeŚ
@Riamus2

Thank you so much, using this atm. And it will work fine.
Code:
on 1:TEXT:*Ny Tour*:#hejsan:/msg #dudŚ  11,1NY TOUR01,01††††11,01|~~~~~~~~~~


What you said about if ($nick == something) { msg #channel $1-
where do you place it in the script.

Is it after on 1:TEXT:*Ny Tour*:#hejsan

And what I meant with highlight users is to give them a heads up that the message has popped up. Like if your writing to a certain user you type <Nick> blablablabla. (And they then get highlighted)


PS!
I'm sorry that im so annoying and that I suck at this. I just really want it to work :S

In short words:
The steps are : IF "Ny Tour" is written in #Turnering (by the user @Utroparen) the whole sentence with "Ny Tour" in it SHOULD be printed in #Macellarius.priv channel AND notify everyone in the channel,

Code:
on 1:TEXT:Ny Tour*:#Turnering:echo -at $Utroparen said: $1- | /msg #Macellarius.priv $timestamp $nick > $1-

^ That should be right ?


Edited by Dragaen (06/02/13 02:19 PM)

Top
#240463 - 07/02/13 02:50 AM Re: Link certain text to other channel [Re: Dragaen]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
Typing /help /if will give you some examples, but basically, it's just something like:

Code:
on *:text:*some trigger*:#channel: {
  if ($nick == somenick) {
    echo -a Yes
  }
  else {
    echo -a No
  }
}


That is just an example. More than likely, you will be doing something other than echoing Yes and No. You might use /msg instead of /echo, or do something else. You also don't need the else section if you don't want it to do anything when the nick isn't "somenick". The help file gives some good information on using IF/ELSEIF/ELSE.

Highlighting a nick the way you mean depends entirely on each person's settings. Some people have their mIRC set up to notify them in some way (sound, flashing, etc.) when their nick is said. Most don't have it set that way and will not be notified in any way other than visually seeing the message itself no matter what you do. You can include a bunch of nicks in the message, but it will look really bad if you have more than a couple people on the channel. For example, this looks awful (my personal opinion, of course):

Quote:
nick1, nick2, nick3, nick4, nick5, nick6, nick7, nick8, nick9, nick10: So-and-so said: blah blah blah


You could do that, but it is perhaps not the best idea. If the text is something that people need to be notified about, then you may want to just recommend that each person set their highlight settings up so that they are notified when "Ny Tour" is on a line. Then you don't have to put everyone's nick on the line. Of course, whether or not they take the advice is up to each person.

Note on your last code example, you need to use {}'s because you're using a | in the line to do two things. Also, unless you have a custom identifier named $Utroparen, that will show up as nothing (null). More than likely what you mean is $nick said instead. $nick will be the nick of the person who said triggered the event. Basically the same thing you did on the msg part of the line.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top