mIRC Home    About    Download    Register    News    Help

Topic Options
#145566 - 24/03/06 10:17 PM How would I echo text from one channel to another?
Theta Offline
Nutrimatic drinks dispenser

Registered: 06/01/05
Posts: 8
Hi everyone,

The problem I have is I want to echo text from one channel to another channel in another network. For example, I wish to echo whatever a trivia bot is announcing in #channel1 through my nick to #channel2 so there is no need to bring the bot into another network//channel. If anyone knows how I would really appreciate it, thanks!

Top
#145567 - 25/03/06 01:05 AM Re: How would I echo text from one channel to another?
Crash_N_Burn Offline
Babel fish

Registered: 13/01/06
Posts: 61
Loc: Portugal / Lisboa
I made a simple rotine who say what you type in one channel and said that to another channel!
Its very basic but works fine, all you need to do is copy/past the folowing rotine in your Remote section:

Code:
 
menu Channel {
  Chan2 Menu
  .Turn on system:.set %Loged_Chan2 On | .echo -a *** Chan2 System On
  .Turn Off system:.set %Loged_Chan2 Off | .echo -a *** Chan2 System Off
  .-
  .Set Chan1:.set %Chan1 $input(Please input the 1 Channel to replay your message:,129)
  .Set Chan2:.set %Chan2 $input(Please input the 2 Channel to be replayed:,129)
}

on *:INPUT:#:{
  if (%Loged_Chan2 == On) {
    if ($window($active) == %Chan1) {
      var %msg = $1-
      if (%Chan2 == $null) {
        echo -a *** Please set the Channel to be replayed!
      }
      else {
        .echo %Chan2 %msg
        .msg %Chan2 %msg
      }
    }
  }
  else {
    echo -a *** Chan2 System halted, please turn on the system!
  }
}

 


Explanation:

What the code does is simple,
1. first you need set up the Chan1 (the channel who its gonna be listened), we can assume that Channel calls #Chat.

2. you need set up the Chan2 (Channel who its gonna be replayed by the first channel), it can be #OtherRoom.

3. you need start the engine, just right-Click on any Channel window and push Chan2 menu>Turn on system, then the engine gonna be started!
All what you say in Chan1 (#chat) its gonna be replayed in Chan2 (#OtherRoom); You also can turn off the engine!

Its simple but works fine to me, any bug or dont, feel free to change it to your way!

Thats all

*
_________________________
The practice do the Master...

Top
#145568 - 25/03/06 03:48 AM Re: How would I echo text from one channel to anot
Theta Offline
Nutrimatic drinks dispenser

Registered: 06/01/05
Posts: 8
Thanks for the script Crash_N_Burn. It echoes what I say perfectly without any problem, however I think I misunderstood the meaning of echo in mirc. For example,

if <TriviaBot> says "Bonus point" in #chan1, what I would like for mirc to do is immediately take what <Triviabot> said in #chan1 and say it in #chan2.

Top
#145569 - 25/03/06 07:16 AM Re: How would I echo text from one channel to anot
Crash_N_Burn Offline
Babel fish

Registered: 13/01/06
Posts: 61
Loc: Portugal / Lisboa
If you dont get it i explain to you, the rotine i give you, do exacly what you wanted, but first of all you need set up for the channel and what channel to echoe the messeges!
Say to another Channel what you sayed in #chan1, in my rotine you need expecify what chan you wanna echoe!

If you wanna i can make ir more simple without any popup for you see!

Thats all

*
_________________________
The practice do the Master...

Top
#145570 - 25/03/06 08:35 PM Re: How would I echo text from one channel to anot
Theta Offline
Nutrimatic drinks dispenser

Registered: 06/01/05
Posts: 8
The problem I have is not following your instructions. The system you setup works perfectly as I've said. The problem is your script only echoes what I say from one channel to the other channel.

Quote:
3. you need start the engine, just right-Click on any Channel window and push Chan2 menu>Turn on system, then the engine gonna be started!
All what you say in Chan1 (#chat) its gonna be replayed in Chan2 (#OtherRoom); You also can turn off the engine!


What I need is to echo what the bot says, not what I say. I hope that's clearer, regards.

Top
#145571 - 25/03/06 09:28 PM Re: How would I echo text from one channel to anot
Crash_N_Burn Offline
Babel fish

Registered: 13/01/06
Posts: 61
Loc: Portugal / Lisboa
lo0lo0...
You just need put that rotine on Remotes in your bot, its simple!Not in you, in your bot, open Remotes and then past the code to there, its gonna work for your bot as like work with you!
If you wanna i can remove the popups and put the rotine more explicit and easy to use, without turn On/Off etc!

Any problem, say here!

Thats all

*


Edited by Crash_N_Burn (25/03/06 09:30 PM)
_________________________
The practice do the Master...

Top
#145572 - 25/03/06 11:25 PM Re: How would I echo text from one channel to anot
Theta Offline
Nutrimatic drinks dispenser

Registered: 06/01/05
Posts: 8
I don't have access to the bot, if I did I wouldn't be making this request for an echo script, and again your script is simple enough, it works to exactly what you said, but what you said is not what I want as I've tested it out on many channels....

Top
#145573 - 25/03/06 11:58 PM Re: How would I echo text from one channel to anot
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
he referes to YOUR bot, not the trivia bot, your bot is the mirc thats going to be in the tyrivia bots channel and the other network channel.

Top
#145574 - 26/03/06 12:30 AM Re: How would I echo text from one channel to anot
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
here is your basic copy cat kinda script
it doesnt do multiserver
Code:
alias copycat $iif(!$dialog(copycat),dialog -dm copycat copycat,dialog -v copycat)
dialog copycat {
  title "CopyCat"
  size -1 -1 100 75
  option dbu
  edit "" 101, 5 10 90 10
  edit "" 102, 5 30 90 10
  edit "" 103, 5 50 90 10
  text "Source Channel", 201, 5 0 90 10
  text "Source Nick", 202, 5 20 90 10
  text "Destination Channel", 203, 5 40 90 10
  button "On", 901, 5 62 40 10
  button "Off", 902, 55 62 40 10
  button "", 999, 0 0 0 0, cancel
}
on *:dialog:copycat:sclick:901:{
  set %copychan $did(copycat,101).text
  set %copynick $did(copycat,102).text
  set %copytoo $did(copycat,103).text
  .enable #copycat
  echo -a Copy Cat Script is now 4,2ARMED
  ;dialog -x copycat
}
on *:dialog:copycat:sclick:902:{
  .disable #copycat
  echo -a Copy Cat Script is now 1,9DISARMED
}
on *:dialog:copycat:sclick:999:{
  unset %copy*
  .disable #copycat
  echo -a Copy Cat Script is now 1,9DISARMED
}

#copycat off
on *:text:*:#:{
  if ($chan == %copychan) {
    if ($nick == %copynick) {
      var %copytext = $1-
      .msg %copytoo %copynick -&gt; %copytext
    }
  }
}
#copycat end


give it a test

Top
#145575 - 26/03/06 12:56 AM Re: How would I echo text from one channel to anot
Theta Offline
Nutrimatic drinks dispenser

Registered: 06/01/05
Posts: 8
The copycat script works fine, thanks. The problem with the first script is that it only echoes what the "bot" or where ever the script was installed said, and nothing else from the channel is transmitted over.

Top
#145576 - 26/03/06 03:23 AM Re: How would I echo text from one channel to anot
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
Quote:

The problem I have is I want to echo text from one channel to another channel in another network. For example, I wish to echo whatever a trivia bot is announcing in #channel1 through my nick to #channel2 so there is no need to bring the bot into another network//channel. If anyone knows how I would really appreciate it, thanks!



the copycat will do that, just what you asked, except I did not include multiserver scripting.
You didnt say you wanted to spy on everything said in one channel and msg that to another channel.

Top
#145577 - 26/03/06 01:02 PM Re: How would I echo text from one channel to another?
Crash_N_Burn Offline
Babel fish

Registered: 13/01/06
Posts: 61
Loc: Portugal / Lisboa
Now i see whta you want, i dont get it at first time!
I assume that your bot is runing from a mIRC Bot, and you have access to them.
Yah its quite impossible turn On/Off your bot by popups were you do not have phisicall access to them.

Thats all

*
_________________________
The practice do the Master...

Top
#145578 - 26/03/06 06:00 PM Re: How would I echo text from one channel to anot
Theta Offline
Nutrimatic drinks dispenser

Registered: 06/01/05
Posts: 8
Thanks to both of you for helping though.

Top
#145579 - 11/04/06 01:51 PM Re: How would I echo text from one channel to anot
theonethetwo Offline
Self-satisified door

Registered: 11/04/06
Posts: 3
Sorry, if my chan name was #1 and 2 was #2 can you re show that text so I can copy it exact as I am having problems, also I cant seem to find where you start this script

Can you echo to another network and chan? I have posted this just but it seemed to get deleted for some unknown reason.

Thanks Rob

Top