|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
this text is supposed to show what people say in a channel in a custom format (basically, i take the text when somebody writes something and show it another way). however, the following code does that for my own text, but when other people talk in a channel, the text appears to be blocked.. it doesn't show anything to me. can anyone help me and tell me why?
on ^*:text:*:#:{.
echo -t $target $+(•••,$nick,•••,>>) $1-
halt
}
/*--------------*/
on 1:input:*:{
if ($left($1,1) != /) || ($ctrlenter) {
.echo -t $active $+(•••,$me,•••,>>) $1-
.raw privmsg $active : $+ $1-
halt
}
}
|
|
|
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
i'm not interrested in a different version, i just need to know why this one doesn't work, so that i may fix it....
|
|
|
|
Joined: Feb 2003
Posts: 26
Ameglian cow
|
Ameglian cow
Joined: Feb 2003
Posts: 26 |
$target?
I'm not sure what it is or if it works. I would debug a little. In the line before you use $target, try "echo -s target is: $target " to see if $target does link to anything.
Either way, I would use $chan instead.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
One thing you might like to do is remove that /*--------------*/ construct.
The
/*
*/
construct, to have comments inside them only works if it's on multiple lines. /*blabla*/ doesn't. In fact, mIRC now thinks that the opening comment /* has not been closed, so your entire remote after that is ignored.
So either remove that line, put a ; in front of it, or make it like:
/* -------------- */
Gone.
|
|
|
|
Joined: Aug 2005
Posts: 128
Vogon poet
|
Vogon poet
Joined: Aug 2005
Posts: 128 |
I already answered to this topic before, and the script I gave you with changing the messages format was working. Now, you edited it, and it's not working anymore. Check the old topic and look what's wrong, and don't add more topics for same problem please
|
|
|
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
QUOTE i'm not interrested in a different version, i just need to know why this one doesn't work, so that i may fix it.... END QUOTE
thanks anyway stefy.. i asked why this code wasn't working. i removed the comments but still, it doesn't work. it shows what other people are saying in both the old format and my custom format. and that is despite the fact that i wrote HALT. HALTDEF doesn't work either
anyone has a solution for this?
edit: changed $chan instead of $target. still doesn't work
Last edited by filip_xyz; 16/08/05 02:28 PM.
|
|
|
|
Joined: Apr 2003
Posts: 701
Hoopy frood
|
Hoopy frood
Joined: Apr 2003
Posts: 701 |
on ^*:text:*:#:{ .Who put that . there? Scripting is not english, don't put a dot at the end of a sentence in mIRC scripting
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Good eyes. Hard to notice that in here.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Aug 2005
Posts: 128
Vogon poet
|
Vogon poet
Joined: Aug 2005
Posts: 128 |
on ^*:text:*:#:{ .Who put that . there? Scripting is not english, don't put a dot at the end of a sentence in mIRC scripting Lol, I didn't see that either. But in the version I gave him there was no .
|
|
|
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
forget the spelling mistakes. those are not the cause!
i need logically to find out what's wrong. IT DOESN"T WORK!
|
|
|
|
Joined: Apr 2003
Posts: 701
Hoopy frood
|
Hoopy frood
Joined: Apr 2003
Posts: 701 |
Dwonload mIRC 6.16 from here, install it into a new folder, hit alt-r twice and paste on ^*:text:*:#:{
echo -t $target $+(•••,$nick,•••,>>) $1-
halt
}
on *:input:*:{
if ($left($1,1) != /) || ($ctrlenter) {
echo -t $active $+(•••,$me,•••,>>) $1-
.raw privmsg $active : $+ $1-
halt
}
} in that window exactly as you see it here, on 11 different lines, then hit alt-s to save it. Then close the remotes window by clicking the OK button, connect to your server and test it out. It does work correctly. If it doesn't for you, you either have some other scripts interfering, some other typo's, commented the code out (; or /* somewhere), forgot a } in the code above, have scripts disabled (type /Remote on), disabled the group you put that code in ( /help groups), or did something else wrong.
|
|
|
|
Joined: Aug 2005
Posts: 1,052
Hoopy frood
|
Hoopy frood
Joined: Aug 2005
Posts: 1,052 |
forget the spelling mistakes. those are not the cause!
i need logically to find out what's wrong. IT DOESN"T WORK! dude chill... dont be rude man they are trying to assist you (atleast IT DOESNT WORK) looks rude on ^*:text:*:*:{ if ($nick ison #) { echo -a $timestamp (••• $+ $nick $+ •••>>) $1- | HALT } } on *:INPUT:*:{ if ($me ison #) { echo -a $timestamp (••• $+ $me $+ •••>>) $1- | halt } } thats all you need... :tongue:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
|
|
|
|
Joined: Aug 2005
Posts: 128
Vogon poet
|
Vogon poet
Joined: Aug 2005
Posts: 128 |
forget the spelling mistakes. those are not the cause!
i need logically to find out what's wrong. IT DOESN"T WORK! Yes, that was the cause. I tried it with . and it didn't work. Then i removed the . and it worked perfectly.
|
|
|
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
hello again. sorry if i seemed rude, text can be interpreted and that was not myy intention. i installed a brand new copy of mirc 6.16. still doesn't work but please read to the end of this post. my text appears. however, when someone else says something, his text doesn't appear. nowhere. not in the channel... not anywhere. it's like he didn't say anything. if someone has tested the code and works, can it be a problem from the sever (i don't think so, because the modifications are client-side, right? ). what else could cause this ? i attached a small movie with me doing the things above (my desktop), please look at it and tell me if i do something wrong. it's archived with WinRAR 3.5 beta. and has 250kb. otherwise it would have been 17MB http://www.xana.ro/~filip/mircbug.rarthanks all for help.
|
|
|
|
Joined: Apr 2003
Posts: 701
Hoopy frood
|
Hoopy frood
Joined: Apr 2003
Posts: 701 |
It's wrong and the cause of all these problems:
-> echo -a sends to the active window, not the channel window (it might sometimes if you're lucky or on only one channel, but not always)
-> if ($nick ison # ) -> 3 cases --> it's a pm then this test fails and you get default display --> it's a channel message then this gives the changed display (somewhere, whatever window was on top) --> it's a channel message but from outside the channel (was not +n) then this gives default display
-> the on input event halts everything, even /commands. Sometimes it would echo something but it never sends anything to the server (/.raw, /.msg, something like that) or even let you execute commands.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
@Lpfix: Instead of doing echo -a, which will echo to the active window, whichever one that may be (could be your status window for example), you should echo to the correct window. On thing you can do is this: echo $iif($chan,$chan,$nick) <text> What does this mean? In the on text event with location part * it can trigger on both channels and queries. $chan will be filled if the on text triggered on a channel, so then the $iif returns $chan, and we echo to the channel. $nick will be filled if it's in a query, so $iif returns $nick and we echo the text to the nickname's window. on ^*:text:*:*: haltdef | echo -mbflirt $iif($chan,$chan,$nick) $+(<<,$nick,>>) $1- @Original requester: Your on input event could be improved some. on *:input:*:{
if (!$istok(/ $readini($mircini,text,commandchar),$left($1,1),32)) && $&
($istok(channel chat query,$window($active).type,32)) && $&
(!$ctrlenter) && (!$inpaste) {
haltdef
.msg $active $1-
echo -artc own $+(<<,$me,>>) $1-
}
} - This will check if the window you are typing to is either a channel, query, or chat window.
- It will check not only for the / command char, but for the custom command char that users can specify in the mIRC options.
- In the on input event, using echo -a is fine, since the active window is the one where you typed the text, it will always be the correct window.
- Note that instead of checking for ($ctrlenter) it makes more sense to check for (!$ctrlenter). ctrl+enter is generally a means to be able to override your script and msg something directly to the server bypassing your on input script. Example if it were an acronym replacer, and you typed lol, it would go to the on input event and change it to "Laughing out Loud", though with the ctrl+enter trick, you can make it so it just sends "lol", by checking for (!$ctrlenter).
- I included a check for (!$inpaste), which means right now when you paste something, it will not be formatted. If you do want your pastes to go through the on input event, remove the if check for (!$inpaste).
Gone.
|
|
|
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
my work is finally complete! i will write the code without no further explanation, as i am very tired of all this thinking. mirc has .... let's not call them bugs, because they're not.... but .. "glitches". this solution can be complicated in a thousand different ways, but i preffer to keep it simple. anyway, here's the code that works fine, tested:
on ^*:TEXT:*:#:{
if ($nick != $me) .echo $chan $timestamp ( $+ $nick $+ ): $1-
haltdef
}
on *:INPUT:*:{
if (($server) && (!$ctrlenter) && ($left($1,1) != /)) {
echo $timestamp 4( $+ $me $+ 4): $1-
.msg $active $1-
halt
}
}
problem bbefore was that on input i had to add .msg otherwise my message desn't get sent. bye and thanks very much to all
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
I will think twice next time before giving you code, since you're not going to listen to it anyway.
The code I gave you was all that you need, but suit yourself.
Two more things: - You cannot trigger your own text events, so the check for if ($nick != $me) is obsolete. - The check for if ($server) in the on input event also is useless, since you could still be typing in a status window. I already gave you a way how to determine if the active window is a window which you can send messages to...
Btw, this sort of thing IS very simple, it's one of the most basic things in mIRC scripting.
Btw2, this Xscript2005 of yours is breaking the mIRC license agreement, which states you may not redistribute the mIRC executable with your scripts.
Gone.
|
|
|
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
thanks for the comments, they were useful. true.. i didn't read the licence agreement.. who does? however i'm not advertising it anywhere. it's for me only (although i made a local website) but i will remove the mirc executable from the archive now that i found out. btw, that website is private. i don't understand why did you look at it and how you found it.
|
|
|
|
Joined: Aug 2005
Posts: 128
Vogon poet
|
Vogon poet
Joined: Aug 2005
Posts: 128 |
btw, that website is private. i don't understand why did you look at it and how you found it.
Well, you said the site earlier: http://www.xana.ro/~filip/mircbug.rarP.S. You're Romanian, like me
|
|
|
|
|