|
M4gnA Newbie
Joined: 19 Feb 2008 Posts: 9
|
Posted: Tue Feb 19, 2008 9:18 pm
Have problems with the #CAP and #GAG cammands please help! |
Hi!
I feel quite silly for asking for this since i've been scripting some before :S, but I have serious problems with the #GAG and #CAP commands. I wanted the tells to be gaged from main window and shown in a second window called messages or something like that. This is how i've made it:
Pattern: ^(%w) tells you '*'
Value: #GAG
#CAP messages
I've tried to use #GA instead of #GAG which i found in the help tool in zMUD but that didn't work either. The tells is still shown in main window. The #CAP command seems to work abit. when someone tells me something when first loaded the script a new window poped up with the name messages (just as i wanted it to be) but nothing is shown in that window, the tells still shows in main window. I have been trying other stuffs in the same trigger like #CW and stuffs and that works. Everything seem to work except the #GAG and #CAP commands, everything else i've tried have working (and i've tried the other stuffs in exactly the same trigger) so it shoulnd't really be anything wrong with the Pattern. I've also been looking for some kind of "collision" between other triggers but I cant find any. I've even tried to remove the * from the pattern so it was like:
^(%w) tells you ' but it won't gag/show the tell on the second window.
I would really appreciate help on this one. |
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Tue Feb 19, 2008 9:29 pm |
did you try to reverse the precedence?
#cap
#gag
#gag
#cap
can you #sub " "?
I don't use them but thought to offer that |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Tue Feb 19, 2008 9:48 pm |
First you have to capture, then you have to gag.
Code: |
#trigger {^(%w) tells you '*'} {#cap Messages;#gag}
|
Prog |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
M4gnA Newbie
Joined: 19 Feb 2008 Posts: 9
|
Posted: Tue Feb 19, 2008 10:54 pm |
Getting abit crazy on this one now. :S
|
|
|
|
M4gnA Newbie
Joined: 19 Feb 2008 Posts: 9
|
Posted: Tue Feb 19, 2008 10:55 pm |
I've tried to make them reverse now. now it looks just like you writed. i've copy/paste it.
Code: |
#trigger {^(%w) tells you '*'} {#cap Messages;#gag} |
It still won't work for me. :S
atleast i get something in the messages window now (the one i want the tells to be printed in) but the only thing i see in that window now is my prompt (my Hp, Mana, Move and so on). I still don't get the tell in the second window, and it still isn't gaged.
The tell is shown in main window and the only thing i get in the second one is my prompt.
How does this work? i should get the tell in second window now right? |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Tue Feb 19, 2008 11:30 pm |
You're saying that the "tell message" stays in the main window and isn't gagged?
My best guess is that your pattern isn't correct.
If you're using (%w) check if the pattern for the line in question actually has an equal one word in it.
Because thats what %w means. One word.
Apparently its a name and it can well be more than one word, maybe using (*) instead will help.
Also, perhaps you have to escape the " ' "-s. Use tilde (~) for it. And its never a bad call to end pattern with $.
So.
Code: |
#trigger {^(*) tells you ~'*~'$} {#cap Messages;#gag}
|
Prog |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
M4gnA Newbie
Joined: 19 Feb 2008 Posts: 9
|
Posted: Tue Feb 19, 2008 11:43 pm |
On the MUD i'm playing on names can't be more then one word so (%w) should work. but i've done as you said and i copied your Code exactly as i says now my trigger looks like this:
Code: |
Patter: ^(*) tells you ~'*~'$
Value: #cap messages
#gag |
but it still is the same as before, the tell isn't gaged at all. and it still shows in the main wondow. In the Messages window i still just get my prompt and the tell is shown in main window and not gaged. just like before. How/why does the prompt show in the second window (only just after i recived a tell) and not the tell it self?
you prolly think i'm the worst scripter ever, but i did copy/paste what you writed and pasted it in pattern/value in my trigger. I'm sorry. I appreciate your help! but I can't seem to get why it aint working. :S
(i've tried put something else instead of #cap and #gag in the value and then the trigger works so the pattern coudn't possible be wrong i assume) |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Tue Feb 19, 2008 11:47 pm |
You could always try and simplify the pattern further...
Delete the non-working trigger and paste this in at the command line.
#TR {tells you} {#GAG;#CAP messages} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
M4gnA Newbie
Joined: 19 Feb 2008 Posts: 9
|
Posted: Tue Feb 19, 2008 11:57 pm |
I've tried to delete the not working one now and made a new one looking as you said.
Code: |
#TR {tells you} {#GAG;#CAP messages} |
but it still aint working.. now i only gets a blank line in the messages window. i tried to put #cap before #gag and then i got the same as before, the prompt was shown in the second window but the tell is just as before in main window and not gaged.
*confused* |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Wed Feb 20, 2008 12:11 am |
Very odd indeed
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Wed Feb 20, 2008 1:23 am |
At this point I would try to simply color the text to see if it is matching. Then move to trying to capture it.
#trigger {tell} {#col 12}
Then if it colors the text correctly make the trigger pattern more complex. If it does NOT color the text I would have to ask if you are certain that you have triggers enabled...
Once you have a pattern that is complex enough to be sure that you are only coloring the text that you want to capture then add in the capturing stuff. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Wed Feb 20, 2008 3:42 am |
Did you accidently click regex or something undesired? You could export the one trigger and look to see if it has any odd characters. Also, as this seems to be a little hard to explain, you could name yours, then make a regex one and name that. then delete the triggers, close ZMud, import, and try them alternatively. You might also try the triggers alone in a test mud with almost blank settings.
I have a trigger that wont fire. I saw it the other day, it matches, it performs its operation if I execute it, but it wont fire on the mud. I have no clue either, so I know how you feel. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Feb 20, 2008 5:32 am |
Also can we get some sample text? Might be something else that's being taken for granted.
|
|
_________________ Asati di tempari! |
|
|
|
M4gnA Newbie
Joined: 19 Feb 2008 Posts: 9
|
Posted: Wed Feb 20, 2008 10:52 am |
I've tried to make colour on the text with the #CW command and I've changed my trigger so it look exactly like this:
Code: |
Pattern:^(%w) tells you '*'$
Value:#CW red
#CAP messages
#GAG
tell %1 testing testing |
then the recived tell gets red (just like it should be with the #CW -thing) and i reply testing testing the one who told me anything but the #CAP and #GAG doesn't work, even though i've got it in the same trigger and everything else in this trigger works. I'm so confused right now, why does everything cept from the CAP/GAG work?. :S |
|
|
|
luggage Novice
Joined: 20 Jul 2004 Posts: 38 Location: Australia
|
Posted: Wed Feb 20, 2008 1:32 pm |
You have no other triggers using gags at all?
Nothing with #GAGON or #GAGOFF or #GAGBLOCK?
What I would do is create a new session to the mud, and add in just that trigger alone.
First just try capturing to a 2nd window, if that works, try gagging it as well.
If it works, you have a clash with something else in your scripts.
If it still doesn't work, its either the trigger itself, or zmud.
And like Tech said, an example of mud output is always helpful. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Feb 20, 2008 1:35 pm |
Have you tried just #CAP or #GAG by themselves in the trigger to see if they work? Have tried disabling other triggers to see if there is some interference in that window? Have you checked the color of the text for the messages window? It be working properly but the text color happens to be black.
|
|
_________________ Asati di tempari! |
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Wed Feb 20, 2008 3:32 pm |
Is it a some scary popup blocker? I don't mean that literally but I wouldn't rule out that something could be conflicting with the window creation process in some way
|
|
|
|
M4gnA Newbie
Joined: 19 Feb 2008 Posts: 9
|
Posted: Wed Feb 20, 2008 8:57 pm |
this is how it looks when i get a tell
Code: |
Roxie tells you 'testing testing'
1687(1687)H 1181(1181)M 377(377)V |
where the numbers below are my promt (hp,Mana and move) and the trigger look like this:
Code: |
#trigger {^(%w) tells you '*'$} {#CAP messages;#GAG} |
and the only thing shown in messages window is my prompt (1687(1687)H 1181(1181)M 377(377)) not the tell. and aint gaged.
i've also tried to make the tells in the group from the leader or tells from leader to me shown in the same window and that look like this when the leader tells something in the group
Code: |
Roxie tells the group, 'testing testing' |
where Roxie currently is set to leader (@tank)
and that trigger look like this:
Code: |
#trigger {^@tank tells {you|the group,} '*'$} {#CW cyan;#CAP messages;#GAG} |
and the funny thing is when the leader (who is set to @tank) tells the group something then it's gaged from the main window and the tell is shown in the messages window in the colour cyan just like i want, but when the leader (@tank) tell me anything(not the group), the ordinary tell is still shown in main window and not gaged at all. seems like there is some bug or anything with the #CAP and tells or something. :S |
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Wed Feb 20, 2008 10:00 pm |
I would certainly escape the ~' and the ~,
I am hyper that way
I don't usually for possesive case and contractions, but tildes are harmless and since it doesn't work.
Commas are evil though, that is gonna hurt
I wonder if the whole class got messed up by that? |
|
|
|
M4gnA Newbie
Joined: 19 Feb 2008 Posts: 9
|
Posted: Thu Feb 21, 2008 12:22 am |
I've tried used tildes to but still not working. and how come that when the leader (@tank) tells the group something it work but now when he tells me something?
i've also tried to change the value on that trigger to
Code: |
#trigger {^@tank tells {you|the group,} '*'$} {#CW cyan;tell @tank testing} |
and then it works.. when @tank tells me anything i tell him testing and when he tells something to the group then i'm telling him testing. so the pattern should be correct, right?
but why isn't #CAP and #GAG working on ordenary tells? |
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Thu Feb 21, 2008 1:19 am |
I still think it is the comma confusing whatever invisible routine is alternating the text with whatever invisible routine capture is using or one of those or neither of those but it is the comma, I suppose. You can't use those freely in functions anyway and {a|b} looks suspiciously functional. It may not be apparent in this or that operation but it may change the meaning of some code god knows where.
Ok I don't know much, but I think if you are using parenthesis or brackets or quotes in one place and not closing them in another, the problem may not fail there, but somewhere else. So, you can use %char(44) instead of tilde+comma on that, but I think it is at least the first correction you will need to make
Whatever, if you really want to get this and nobody suggests anything better, I think you need to deconstruct, and see if #CAP does work with no settings (and an escaped comma). Aside from that you could do a check into what other program (antivirus, anti spyware, stealth programs) may interfere with scripts or child windows.
Good luck. I hope you fix it. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Feb 21, 2008 2:45 am |
Not sure what to tell you? Did you try it in a new session? I just tried your trigger code and your text and it worked like a charm the first time.
|
|
_________________ Asati di tempari! |
|
|
|
M4gnA Newbie
Joined: 19 Feb 2008 Posts: 9
|
Posted: Thu Feb 21, 2008 11:35 am |
really wierd. :S i haven't tried it in a new session yet, i should do that really soon.
thanks alot for the help! atleast i know that the trigger is correct now. now i just need to figure out what's buggin. |
|
|
|
|
|