|
Mattsc23 Beginner
Joined: 07 Dec 2002 Posts: 12 Location: USA
|
Posted: Fri Dec 13, 2002 12:17 am
Prompt gaging and windows help, again |
Ok, I've done some research on the boards and Ive found some things that I'm sure will be useful to me, but I don't know enough about coding to tailer the knowledge to my uses. So, Here's what I've got and what I need. If anyone can help my modify what I have to what I need I would be most grateful.
1) I found a script which I modified:
#VAR comms {tell|gossip|question|yell|answer|music} {tell|gossip|question|answer|music} {Windoze}
#TRIGGER {^* {@comms}*: '%*'$} {#gag;#CAP 1 Gossips} {Windoze} 517
#TRIGGER {^* {@comms}*:$ '%*'$} {#gag;#CAP 2 Gossips} {Windoze} 517
#TRIGGER {^* {@comms}*:$ '%*$ %*'$} {#gag;#CAP 3 Gossips} {Windoze} 517
#TRIGGER {^* {@comms}*:$ '%*$ %*$ %*'$} {#gag;#CAP 4 Gossips} {Windoze} 517
#TRIGGER {^* {@comms}*:$ '%*$ %*$ %*$ %*'$} {#gag;#CAP 5 Gossips} {Windoze} 517
#TRIGGER {^* {@comms}*:$ '%*$ %*$ %*$ %*$ %*'$} {#gag;#CAP 6 Gossips} {Windoze} 517
I was hoping this would send my comms to the window Gossips, but it is not working. Here is a sample of the output from my mud:
49/49hp 161/161m 136/136mv 2225 lv
Vath gossips 'I hate Nirvana'
49/49hp 161/161m 136/136mv 2225 lv
Someone gossips 'Im at Bjorgvin and Im scaaared'
49/49hp 161/161m 136/136mv 2225 lv
Vath gossips 'Not nearly scared enough :P'
49/49hp 161/161m 136/136mv 2225 lv
Someone gossips 'Mobs are aggie here?'
49/49hp 161/161m 136/136mv 2225 lv
Foxtail gossips 'Yeah, Petter sure wrote a huge area, didn't he?'
49/49hp 161/161m 136/136mv 2225 lv
Foxtail grats 'Morgon!'
49/49hp 161/161m 136/136mv 2225 lv
Someone gossips 'um'
49/49hp 161/161m 136/136mv 2225 lv
Foxtail gossips 'wait'
49/49hp 161/161m 136/136mv 2225 lv
Lianne gossips 'Wow.. lotsa people on'
2) As you can see above I also have not sucessfully gaged my prompt. I was hoping to find an exact solution in the old board messages, but was unable to do so. However, I did find a script to send and gag my prompt to variables for use in a status bar (which I don't know how to set up either ). Here is what I found:
#TR {^~{(%d)/(%d)hp (%d)/(%d)m (%d)/(%d)mv (*) lv ~}} {#VAR hp %1;#VAR maxhp %2;#VAR mana %3;
#VAR maxmana %4;#VAR mov %5;#VAR maxmov %6; #VAR level {%7};#GAG} {} {nocr|prompt}
My question here is can any of the above be modified in a way to send my prompt to the same window as my comms, but only after one of my comms is gaged?
I know this is asking alot, but my knowledge of coding is pretty much nil, I can only parrett what other show me. I'm hoping as I get help from folks it will all begin to make sense to me and I can begin doing things on my own.
Thanks again for any help,
Matt |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Dec 13, 2002 1:08 am |
The first step to figuring out why things don't work is to look up the commands and see how they are supposed to work. zMUD has a builtin helpfile which is easily accessed from the Help menu, and which has details on the usage of every command.
In particular, if you look up the helpfile for #TRIGGER you'll see that the correct syntax is:
Syntax: #TR [id] pattern command [classname] [options]
and that the options in the options field should be a string list of words (nocr, prompt, case, verbatim, notrig, color, disable, or line=color). Nowhere is there any mention of using numbers (such as 517). While this may in fact work, only the original scripter is likely to know which options will be chosen by the numeric code since it's not documented anywhere that I've seen.
Since you want to include the prompt with all captured communication, your best bet is probably the #C+ and #C- commands for capturing, along with #GAGON and #GAGOFF for gagging. Something along the lines of:
#TR{^* {@comms}*: '} {#C+ Gossips;#VAR Gossip 1;#GAGON}
#TR {^(%d)/(%d)hp (%d)/(%d)m (%d)/(%d)mv (%d) lv} {#VAR hp %1;#VAR maxhp %2;#VAR mana %3;
#VAR maxmana %4;#VAR mov %5;#VAR maxmov %6; #VAR level {%7};#GAG;#IF (@gossip = 1) {#VAR gossip 0;#C-;#GAGOFF}} {} {nocr|prompt}
Personally, I seldom use any of the #GAG commands. I prefer being able to see everything that's going on in my main window, with the secondary windows supplying an easy way to review things I might otherwise miss during battlespam.
LightBulb
Senior Member
P.S. I changed the prompt trigger pattern to match the examples in your post. I removed the ~{ from the beginning and the ~} from the end. I also changed the last wildcard (level) from * to %d, since it appears you'll always have a number there (it's 2225 in your examples). |
|
|
|
Mattsc23 Beginner
Joined: 07 Dec 2002 Posts: 12 Location: USA
|
Posted: Sat Dec 14, 2002 10:50 pm |
Ok, Ive tried to make this work but have come up completely empty. So, I've decided to try something simplier. Instead of gaging text when I send it to a window I'm gonna leave itin the main window and send it to an addtional window. The first thing I did was define the following variable:
#VAR comms {tells|gossips|questions|answers|music|grats}
in order to get all of my muds(Rivers of Mud)channels.
I then defined the following trigger:
#TR {@comms} {#CAP Comms}
to capture any channel data and send it to the window 'Comms'. This did not work so I tried this:
#TR {(%w) @comms '(*)'} {#CAP Comms}
which didn't work either. However, if I make the trigger:
#TR {gossips} {#CAP Comms}
it does work.
What I don't understand is why the last works and the first to do not. It seems to me that the error must lie somewhere in the defination of my @comms variable? Anyone have any ideas?
Matt
PS Again here is some output from the mud:
49/49hp 161/161m 136/136mv 2225 lv
Someone gossips 'Im at Bjorgvin and Im scaaared'
49/49hp 161/161m 136/136mv 2225 lv
Vath gossips 'Not nearly scared enough :P'
49/49hp 161/161m 136/136mv 2225 lv
Someone gossips 'Mobs are aggie here?'
49/49hp 161/161m 136/136mv 2225 lv
Foxtail gossips 'Yeah, Petter sure wrote a huge area, didn't he?'
49/49hp 161/161m 136/136mv 2225 lv
Foxtail grats 'Morgon!' |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Dec 14, 2002 11:10 pm |
The problem is in this trigger:
#TR {@comms} {#CAP Comms}
In order to use a stringlist, you'll need additional braces around @comms. It should only need two, but using version 6.16 I always need three. Experiment, shouldn't take more than a few minutes to find the right number.
#TR {{{@comms}}} {#CAP Comms}
LightBulb
Senior Member |
|
|
|
Mattsc23 Beginner
Joined: 07 Dec 2002 Posts: 12 Location: USA
|
Posted: Sun Dec 15, 2002 12:34 am |
Worked perfectly! Thanks LightBulb.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|