|
kazu Beginner
Joined: 16 Sep 2008 Posts: 17
|
Posted: Tue Sep 30, 2008 1:32 am
string problem |
Ok, so I'm working on building my herb, salve, and smoke queues. I've made a bunch of triggers and I have it to where they are supposed to add to a string table when the message comes up. However, the message is always firing and it's flooding my string tables, any idea what is wrong? Here is the coding:
#CLASS {diagnose}
#TRIGGER (pacified) {#addi afflicted pacifism} "" {notrig}
#TRIGGER (indifferent) {#addi safflicted indefference} "" {notrig}
#TRIGGER (being effused of phlegm) {#addi afflicted phlegm} "" {notrig}
#TRIGGER (anorexic) {#addi safflicted anorexia} "" {notrig}
#TRIGGER (confounded with blurry vision) {#addi safflicted bvison} "" {notrig}
#TRIGGER (engulf your body) {#addi safflicted aflame} "" {notrig}
#TRIGGER (confused) {#addi afflicted confusion} "" {notrig}
#TRIGGER (demented) {#addi afflicted dementia} "" {notrig}
#TRIGGER (hallucinating) {#addi afflicted hallucinations} "" {notrig}
#TRIGGER (paranoid) {#addi afflicted paranoia} "" {notrig}
#TRIGGER (feeling unnaturally tranquil) {#addi afflicted peace} "" {notrig}
#TRIGGER (paralysed) {#addi afflicted paralysis} "" {notrig}
#TRIGGER (allergic to sunlight) {#addi afflicted darkshade} "" {notrig}
#TRIGGER (violently ill) {#addi afflicted vomiting} "" {notrig}
#TRIGGER (overcome by dizziness) {#addi afflicted dizziness} "" {notrig}
#TRIGGER (suffering from epilepsy) {#addi afflicted epilepsy} "" {notrig}
#TRIGGER (impatient) {#addi afflicted impatience} "" {notrig}
#TRIGGER (unnaturally stupid) {#addi afflicted stupidity} "" {notrig}
#TRIGGER (afflicted by horrible asthma) {#addi afflicted asthma} "" {notrig}
#TRIGGER (afflicted with clumsiness) {#addi afflicted clumsiness} "" {notrig}
#TRIGGER (full of limp veins) {#addi afflicted limpv} "" {notrig}
#TRIGGER (sensitive to pain) {#addi afflicted sensitivity} "" {notrig}
#TRIGGER (wearied in body) {#addi afflicted weariness} "" {notrig}
#TRIGGER (agoraphobic) {#addi afflicted agoraphobia} "" {notrig}
#TRIGGER (frothing at the mouth) {#addi afflicted berserk} "" {notrig}
#TRIGGER (masochisti) {#addi afflicted masochism} "" {notrig}
#TRIGGER (reckless) {#addi afflicted recklessness} "" {notrig}
#TRIGGER (afraid of heights) {#addi afflicted vertigo} "" {notrig}
#TRIGGER (afflicted with the mind power of an idiot) {#addi afflicted idiocty} "" {notrig}
#TRIGGER (plodding with slow movement) {#addi afflicted plodding} "" {notrig}
#TRIGGER (afflicted by thin blood) {#addi afflicted scytherus} "" {notrig}
#TRIGGER (catching glimpses of Hell) {#addi smafflicted hellsight} "" {notrig}
#TRIGGER (extremely oily) {#addi smafflicted slickness} "" {notrig}
#TRIGGER (inspiring disloyalty in those nearby) {#addi afflicted disfigurement} "" {notrig} |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Sep 30, 2008 2:18 am |
My guess is that you need to replace all the parentheses (( and )) with curly brackets ({ and }).
Parentheses in a #TRIGGER = Expression trigger = in ZMud they ALL get evaluated every time any variable gets changed. As each set of parentheses has plain text in them, and since all plain-text characters have an ascii value greater than 0 and since 0 or "" = False in ZMud they would evaluate to true and fire, and therein set a variable to start the whole process over again. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Sep 30, 2008 2:33 am |
Yeah. Matt has the right of it. 20 seconds to type in a few things with CMud's subregex and here you go. I also corrected the typo "safflicted", and added a #CLASS 0 to the end. I put a #DELCLASS on there so it gets rid of all the old triggers first.
Code: |
#DELCLASS diagnose
#CLASS {diagnose}
#TRIGGER {pacified} {#addi afflicted pacifism} "" {notrig}
#TRIGGER {indifferent} {#addi afflicted indefference} "" {notrig}
#TRIGGER {being effused of phlegm} {#addi afflicted phlegm} "" {notrig}
#TRIGGER {anorexic} {#addi afflicted anorexia} "" {notrig}
#TRIGGER {confounded with blurry vision} {#addi afflicted bvison} "" {notrig}
#TRIGGER {engulf your body} {#addi afflicted aflame} "" {notrig}
#TRIGGER {confused} {#addi afflicted confusion} "" {notrig}
#TRIGGER {demented} {#addi afflicted dementia} "" {notrig}
#TRIGGER {hallucinating} {#addi afflicted hallucinations} "" {notrig}
#TRIGGER {paranoid} {#addi afflicted paranoia} "" {notrig}
#TRIGGER {feeling unnaturally tranquil} {#addi afflicted peace} "" {notrig}
#TRIGGER {paralysed} {#addi afflicted paralysis} "" {notrig}
#TRIGGER {allergic to sunlight} {#addi afflicted darkshade} "" {notrig}
#TRIGGER {violently ill} {#addi afflicted vomiting} "" {notrig}
#TRIGGER {overcome by dizziness} {#addi afflicted dizziness} "" {notrig}
#TRIGGER {suffering from epilepsy} {#addi afflicted epilepsy} "" {notrig}
#TRIGGER {impatient} {#addi afflicted impatience} "" {notrig}
#TRIGGER {unnaturally stupid} {#addi afflicted stupidity} "" {notrig}
#TRIGGER {afflicted by horrible asthma} {#addi afflicted asthma} "" {notrig}
#TRIGGER {afflicted with clumsiness} {#addi afflicted clumsiness} "" {notrig}
#TRIGGER {full of limp veins} {#addi afflicted limpv} "" {notrig}
#TRIGGER {sensitive to pain} {#addi afflicted sensitivity} "" {notrig}
#TRIGGER {wearied in body} {#addi afflicted weariness} "" {notrig}
#TRIGGER {agoraphobic} {#addi afflicted agoraphobia} "" {notrig}
#TRIGGER {frothing at the mouth} {#addi afflicted berserk} "" {notrig}
#TRIGGER {masochisti} {#addi afflicted masochism} "" {notrig}
#TRIGGER {reckless} {#addi afflicted recklessness} "" {notrig}
#TRIGGER {afraid of heights} {#addi afflicted vertigo} "" {notrig}
#TRIGGER {afflicted with the mind power of an idiot} {#addi afflicted idiocty} "" {notrig}
#TRIGGER {plodding with slow movement} {#addi afflicted plodding} "" {notrig}
#TRIGGER {afflicted by thin blood} {#addi afflicted scytherus} "" {notrig}
#TRIGGER {catching glimpses of Hell} {#addi smafflicted hellsight} "" {notrig}
#TRIGGER {extremely oily} {#addi smafflicted slickness} "" {notrig}
#TRIGGER {inspiring disloyalty in those nearby} {#addi afflicted disfigurement} "" {notrig}
#CLASS 0 |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Tue Sep 30, 2008 2:52 am |
The only problem is that since they are in no way anchored, the triggers will fire whenever someone uses the words in general chat. While "You are pacified." will fire, so will "Charneus gossips 'what's the meaning of pacified?'" It's best to make the triggers as exact as possible to prevent such instances. Just my two cents.
Charneus |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Tue Sep 30, 2008 5:33 pm |
I'll have to agree with Charn on that, and if possible use the ^ character to denote only to fire on a newline.
|
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
kazu Beginner
Joined: 16 Sep 2008 Posts: 17
|
Posted: Tue Sep 30, 2008 7:34 pm thanks |
Thanks for all the help guys, also the safflicted wasn't a typo, that's for a salve queue, safflicted=salve afflicted Also, how do I add the ^ to help anchor them? The reason they are partial like that is because they work off a skill in the mudd that only spits out partial lines for each different affliction like that.
|
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Tue Sep 30, 2008 7:55 pm |
Give a few examples of lines the MUD spits out regarding your triggers and someone, if not me, will probably write a better trigger for it. We need all the examples it can spit out, if possible.
Charneus |
|
|
|
kazu Beginner
Joined: 16 Sep 2008 Posts: 17
|
Posted: Tue Sep 30, 2008 7:58 pm |
Those lines I gave you are the exact ones. It's not a full affliction line, there are plenty of those. This is working off a skill called diagnose that gives me an exact phrase about what I have. Here's an example of an affliction stupidity line:
%w uses his mind to cast a net of stupidity over your own.
If I were to use diagnose, I would always see:
unnaturally stupid |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Sep 30, 2008 8:29 pm |
Code: |
#DELCLASS {diagnose}
#CLASS {diagnose}
#TRIGGER {^pacified$} {#addi afflicted pacifism} "" {notrig|case}
#TRIGGER {^indifferent$} {#addi safflicted indefference} "" {notrig|case}
#TRIGGER {^being effused of phlegm$} {#addi afflicted phlegm} "" {notrig|case}
#TRIGGER {^anorexic$} {#addi safflicted anorexia} "" {notrig|case}
#TRIGGER {^confounded with blurry vision$} {#addi safflicted bvison} "" {notrig|case}
#TRIGGER {^engulf your body$} {#addi safflicted aflame} "" {notrig|case}
#TRIGGER {^confused$} {#addi afflicted confusion} "" {notrig|case}
#TRIGGER {^demented$} {#addi afflicted dementia} "" {notrig|case}
#TRIGGER {^hallucinating$} {#addi afflicted hallucinations} "" {notrig|case}
#TRIGGER {^paranoid$} {#addi afflicted paranoia} "" {notrig|case}
#TRIGGER {^feeling unnaturally tranquil$} {#addi afflicted peace} "" {notrig|case}
#TRIGGER {^paralysed$} {#addi afflicted paralysis} "" {notrig|case}
#TRIGGER {^allergic to sunlight$} {#addi afflicted darkshade} "" {notrig|case}
#TRIGGER {^violently ill$} {#addi afflicted vomiting} "" {notrig|case}
#TRIGGER {^overcome by dizziness$} {#addi afflicted dizziness} "" {notrig|case}
#TRIGGER {^suffering from epilepsy$} {#addi afflicted epilepsy} "" {notrig|case}
#TRIGGER {^impatient$} {#addi afflicted impatience} "" {notrig|case}
#TRIGGER {^unnaturally stupid$} {#addi afflicted stupidity} "" {notrig|case}
#TRIGGER {^afflicted by horrible asthma$} {#addi afflicted asthma} "" {notrig|case}
#TRIGGER {^afflicted with clumsiness$} {#addi afflicted clumsiness} "" {notrig|case}
#TRIGGER {^full of limp veins$} {#addi afflicted limpv} "" {notrig|case}
#TRIGGER {^sensitive to pain$} {#addi afflicted sensitivity} "" {notrig|case}
#TRIGGER {^wearied in body$} {#addi afflicted weariness} "" {notrig|case}
#TRIGGER {^agoraphobic$} {#addi afflicted agoraphobia} "" {notrig|case}
#TRIGGER {^frothing at the mouth$} {#addi afflicted berserk} "" {notrig|case}
#TRIGGER {^masochisti$} {#addi afflicted masochism} "" {notrig|case}
#TRIGGER {^reckless$} {#addi afflicted recklessness} "" {notrig|case}
#TRIGGER {^afraid of heights$} {#addi afflicted vertigo} "" {notrig|case}
#TRIGGER {^afflicted with the mind power of an idiot$} {#addi afflicted idiocty} "" {notrig|case}
#TRIGGER {^plodding with slow movement$} {#addi afflicted plodding} "" {notrig|case}
#TRIGGER {^afflicted by thin blood$} {#addi afflicted scytherus} "" {notrig|case}
#TRIGGER {^catching glimpses of Hell$} {#addi smafflicted hellsight} "" {notrig|case}
#TRIGGER {^extremely oily$} {#addi smafflicted slickness} "" {notrig|case}
#TRIGGER {^inspiring disloyalty in those nearby$} {#addi afflicted disfigurement} "" {notrig|case}
#CLASS 0 |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Tarn GURU
Joined: 10 Oct 2000 Posts: 873 Location: USA
|
Posted: Tue Sep 30, 2008 11:16 pm |
kazu wrote: |
This is working off a skill called diagnose that gives me an exact phrase about what I have.
|
I don't see a trigger to turn it off after the output from the command is done. Do you handle that and the activation externally?
Some typos remain ("idiocty", "indefference"). They're not part of the input so as long as they're consistently misspelt where they're used elsewhere everything will be fine.
-Tarn |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Wed Oct 01, 2008 1:00 pm |
Also you could put diagnose into an alias form that turns on the diagnose class and then add a trigger for the end of diagnose that turns the class back off. That way these trigs will only fire when you diagnose yourself.
|
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
|
|