mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 46
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
Ok, I will try to give the short version.
I have a 5-10 line set of help files, that I send on remote. This works fine on it's own, even using timers for each line. I will post how that part looks later. The problem is, a few other people have a similar setup, and I don't want to trigger this when they are in channel, so I have been trying the if/else/if to halt if these people are around. I actually got it to work my 2nd try, and thought I was done, but what I had tried was a different single-line notice. Now, when I replace that single, with my much longer setup, I am only getting the first line to work. I just know I am missing something very small here. I am using 'notice' to respond to a nick only for these texts.
This is the one that worked:

on 1:TEXT:!test:#: /if nick1 ison # halt | /elseif nick2 ison # halt | /else /notice $nick text goes here

When I tried adding the following, I only got the first line, then it stopped; yet this whole thing works correctly on it's own, without using the if/else/if. I tried some bracketing, to no avail.

on 1:TEXT:!test:#: /if nick1 ison # halt | /elseif nick2 ison # halt | /else { .timer 1 0 /notice $nick 1: start text
{ .timer 1 8 /notice $nick 2: text
{ .timer 1 12 /notice $nick 3: text text
{ .timer 1 20 /notice $nick 4: you get the idea
{ .timer 1 28 /notice $nick 5: blah blah
{ .timer 1 42 /notice $nick 6: even more
{ .timer 1 48 /notice $nick 7: and more
{ .timer 1 60 /notice $nick 8: and more text

Again, it works fine on it's own, so I must be forgetting a simple bracket, command, or even a darn letter for all I know..lol...but I am most likely using that if/elseif incorrectly.
Maybe I should use something other than 'notice', but I do want it only to go to them, not the channel....and while I'm on that subject, if this has any easy answer, then I'd also like to be able to change the color of this text, but it seems to defaut to the users 'notice' text color by design..I've tried the color codes, trust me, they won't change it.

And lastly, to be able to echo to the channel, the same text from 'several' different trigger words on 1 'on text' remote would be another huge time saver. I know someone must have a good idea on that one (and I know it involves some bracketing).

Any help at all here, especially with my main problem of that script stopping at the first line, is greatly appreciated in advance. Thanks.


Joined: Oct 2003
Posts: 273
E
EVH Offline
Fjord artisan
Offline
Fjord artisan
E
Joined: Oct 2003
Posts: 273
Code:
on *:TEXT:*:#: {
  if ((nick1 ison #) || (nick2 ison #)) return
  if ($1 == !test) {
    notice $nick 1: this
    .timer 1 8 notice $nick 2: is
    .timer 1 12 notice $nick 3: the
    .timer 1 20 notice $nick 4: !test
    .timer 1 28 notice $nick 5: trigger
    .timer 1 42 notice $nick 6: now
    .timer 1 48 notice $nick 7: try
    .timer 1 60 notice $nick 8: !test2
  }
  if ($1 == !test2) {
    notice $nick 1: this
    .timer 1 8 notice $nick 2: is
    .timer 1 12 notice $nick 3: the
    .timer 1 20 notice $nick 4: !test2
    .timer 1 28 notice $nick 5: trigger
    .timer 1 42 notice $nick 6: now
    .timer 1 48 notice $nick 7: try
    .timer 1 60 notice $nick 8: !test3
  }
  if ($1 == !test3) {
    notice $nick 1: this
    .timer 1 8 notice $nick 2: is
    .timer 1 12 notice $nick 3: the
    .timer 1 20 notice $nick 4: !test3
    .timer 1 28 notice $nick 5: trigger
    .timer 1 42 notice $nick 6: you
    .timer 1 48 notice $nick 7: get
    .timer 1 60 notice $nick 8: the idea
  }
}


on *:TEXT:*:#: {
if ((nick1 ison #) || (nick2 ison #)) return
if ($1 == !test) {
notice $nick 1: this
.timer 1 8 notice $nick 2: is
.timer 1 12 notice $nick 3: the
.timer 1 20 notice $nick 4: !test
.timer 1 28 notice $nick 5: trigger
.timer 1 42 notice $nick 6: now
.timer 1 48 notice $nick 7: try
.timer 1 60 notice $nick 8: !test2
}
if ($1 == !test2) {
notice $nick 1: this
.timer 1 8 notice $nick 2: is
.timer 1 12 notice $nick 3: the
.timer 1 20 notice $nick 4: !test2
.timer 1 28 notice $nick 5: trigger
.timer 1 42 notice $nick 6: now
.timer 1 48 notice $nick 7: try
.timer 1 60 notice $nick 8: !test3
}
if ($1 == !test3) {
notice $nick 1: this
.timer 1 8 notice $nick 2: is
.timer 1 12 notice $nick 3: the
.timer 1 20 notice $nick 4: !test3
.timer 1 28 notice $nick 5: trigger
.timer 1 42 notice $nick 6: you
.timer 1 48 notice $nick 7: get
.timer 1 60 notice $nick 8: the idea
}
}

Last edited by EVH; 03/01/04 04:38 PM.
Joined: Jan 2004
Posts: 46
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
EVH;
Thank you so much!. It was just one of those things that was comsuming WAY more time than it should've....I'm guessing you've all been there before, right?...lol

What you posted did in fact work for me! I had the right idea, but the wrong concept...or vice versa...whatever. I had a feeling it was something rather simple I just couldn't see. With that design, I was easily able to get the color change I was talking about to work too, no problem! Now I just have to do another 1-liner that triggers off of multiple 'on text' , but actually the part that changes would be a number that increases, so maybe I could figure out a way to use those flags; > should work somehow. Triggers would be text123, text124, text125 and so on...
I am now off to use that same scripting you gave me, to try to echo to room, AND nick simultanouesly, what I'm speaking of above there.

It's one thing to get such good help, it's another to get it SO quick. I can't thank you enough.

Joined: Oct 2003
Posts: 273
E
EVH Offline
Fjord artisan
Offline
Fjord artisan
E
Joined: Oct 2003
Posts: 273
It's my pleasure and I'm glad I could help.
Yes we have all been there before. smile

Joined: Jan 2004
Posts: 46
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
Wow, unfortunately I am still having serious problems, not with what I originally posted, but something else. I discoverd you can't have 2 of those (like what was in my nice reply up there) in the remote area, unless you nest 1 inside the other, probably from the design.
I am still trying to have just a simple 1-line 'on text' sent by notice, but triggered from say, 123, 124, 125, 126, etc. I am also being unecessarily challenged by trying to have another post to 'nick & channel'. I can make a simple 'on text' remote, all day, but try and complicate it slightly, and I do have trouble sometimes. When i use what's above for my 1 liner, it's triggering on all sorts of things it shouldn't. Using *'s doesn't seem to help, that could be from the double ==.
Again, any help would be greatly appreciated. Thanks.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
you cant have more than one ON *:TEXT: in a file, you should however try and group your same work into one event

maybe use this as a start...
Code:
 
on *:TEXT:*:#: {
  echo -s ON TEXT EVENT IN CHANNEL @ $time
  echo -s Nick : $nick 
  echo -s Channel : $chan
  echo -s Text : $1-
}
 

from seeing them you can work out what you need to do to take what action you want.

Joined: Jan 2004
Posts: 46
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
I appreciate the help, but what was just last posted merely gave me a report of the event in the status window. What was last posted did not work by itself, but I did get it to work by adding this, the 'if' part if ($1 = trigger text) to look like this:

on *:TEXT:*:#: {
if ($1 = dork) {
echo -s ON TEXT EVENT IN CHANNEL @ $time
echo -s Nick : $nick
echo -s Channel : $chan
echo -s Text : $1-
}
which then posted to status window:

ON TEXT EVENT IN CHANNEL @ 13:43:48
Nick : my nick
Channel : channel i was on
Text : dork

while this would be a nice way to keep track of things, it still is not accomplishing what I want, which is to post a line of triggered text to channel AND nick simultaneously. If you use single specific 'on text' lines such as these:

on 1:TEXT:*find 80*:#:/echo $chan Please don't try to 'find' anything else from 80.

you can have dozens of them literally, because I do. But what I haven't quite figured out yet is how to do what I stated above, at the same time. That was really what I was looking for.
Oh, and btw, I have completely remove any other 'on text' events other than this one, to make sure I can try to get it to do what I want first, only then can I ...-ahem-....'try' to nest it properly later.
Thanks again for any help.

Joined: Jan 2004
Posts: 46
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
Alright, it appears that I have figured out how to get this working the way I want it to now. I added the bottom 2 lines, which are posting to where I want.

if ($1 = dork) {
echo -s ON TEXT EVENT IN CHANNEL @ $time
echo -s Nick : $nick
echo -s Channel : $chan
echo -s Text : $1-
echo $chan testing even more
notice $nick testing yet again
}

Now, the only problem is, this seems to only work with a single word, or number set, I cannot get it to trigger with what I really want which is @find 80...to tell them not to look for 80. I have tried asterisks everywhere, even dropped the '@' symbol, and even tried to string the 2 words together with an underscore _, all to no avail. It works, just not with what I want it too..lol. Maybe I need some bracketing or an identifier?
Anyone with any clue as to how to help would be greatly appreciated. Thanks.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
sorry i put it to you wrong when i said "you cant have more than one ON *:TEXT: in a file" , i was really meaning you cant have say on *:text:bob* and following that on*:text:bo* the bob* well trigger and the bo* well be ignored, but you could have bo* in another remote file.

As for needing to add a if ($1 == etc etc, i expected you to have to add them, that was the base of the on text event
from there you can expand it in what ways you need, it catches ALL channel text (excluding your own), by checking on $chan and/or $nick and/or $1- you can control what you want to happen.
examples...
if ($chan == #bobsplace) && ($1-2 == !seen bob) { msg $nick well duh its bobsplace! }
if ($chan == #wav) && (@find *.mp3 iswm $1-) { msg $nick no mp3's are found in #wav | describe $chan sees another mp3 request }

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
matchup > @find blah blah <anything else here>
if (@find blah blah == $1-3) {

matchup > @find blah<anything else here>
if (@find blah* iswm $1-) {

matchup > <anything>blah<anything>
if (*blah* iswm $1-) {


Joined: Jan 2004
Posts: 46
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
Dave;
I like those last 2 examples you gave me. I never thought of using 'matchup' ?
You seem to be very knowledgable about all of this, so I really appreciate your responding. As far as me, it's obvious I'm in the learning stage, but if there's one thing I have figured out, especially when it comes to a text event, it's how important the placing of those asterisks are!!...lol
Just view my other post...
and thanks again.


Link Copied to Clipboard