|
GooseFire Novice
Joined: 08 Sep 2003 Posts: 32 Location: USA
|
Posted: Sun Feb 15, 2004 3:42 am
Turning folders on and off |
Alright, well I wanted to create an anti-illusion system so that venoms that werent set off to be cured unless said folder was on. So, this is an example:
Dubothe *****s you twice in rapid succession with his dirk.
A *****ly, stinging sensation spreads through your body.
You gasp as your fine-tuned reflexes disappear into a haze of
confusion.
(sidenote: the **** was suppose to be a word that it's blotching out for some reason, not sure why :S)
Now, when it sees the first line: %w *****s you twice in rapid succession with %w dirk.
it was suppose to do this to turn the folder on:
#t+ Double Stab
#WA 200
#t- Double Stab
In that folder it has the cures for the two venoms that followed its lines, but it didnt turn it on.. Any ideas? Also, this is the cure trigger I was using for that exact combo:
#TRIGGER {^A *****ly, stinging sensation spreads through your body.$}{#if %line2=~ "^{A|*}{ |*}{p|*}{r|*}{i|*}{c|*}{k|*}{l|*}{y|*}{ |*}{s|*}{t|*}{i|*}{n|*}{g|*}{i|*}{n|*}{g|*}{ |*}{o|*}{v|*}{e|*}{r|*}{c|*}{o|*}{m|*}{e|*}{s|*}{ |*}{y|*}{o|*}{u|*}{r|*}{ |*}{b|*}{o|*}{d|*}{y|*}," {addherb 02_paralyse;addherb 06_sensitivity}
#if %line2=~ "^The idea of eating or drinking is repulsive to you.$" {addsalve 01_anorexia;addherb 06_sensitivity}
#if %line2=~ "^Hmmmm. Why must everything be so difficult to figure out?$" {addherb 03_stupidity;addherb 06_sensitivity}
#if %line2=~ "(*)$You feel ugliness radiating from you.$" {addherb 06_sensitivity;addsmoke sva}
#if %line2=~ "^Your mind swims as dizziness overtakes you.$ " {addherb 17_dizziness;addherb 06_sensitivity}
#if %line2=~ "(*)$You gasp as your fine-tuned reflexes disappear into a haze of confusion.$" {addherb 12_clumsiness;addherb 06_sensitivity}
#if %line2=~ "^You watch, in horror, as your (%w) arm shrivels up and becomes useless.$" {addsalve ma;addherb 06_sensitivity}
#if %line2=~ "(*)$You stumble as your (%w) leg shrivels into a useless appendage.$" {addsalve ml;addherb 06_sensitivity}
#if %line2=~ "^Your limbs grow heavy and you groan feebly.$" {addherb 13_vernalius;addherb 06_sensitivity}
#if %line2=~ "^You feel light headed and dizzy.$" {addherb 01_scytherus;addherb 06_sensitivity}
#if %line2=~ "(*)$A sense of extreme nausea washes over you.$" {addherb 11_botulinum;addherb 06_sensitivity}
#if %line2=~ "(*)$Your vision is flooded with light, and your face suddenly reddens.$" {addherb 16_darkshade;addherb 06_sensitivity}
#if %line2=~ "^You look about yourself nervously.$" {addherb 29_shyness;addherb 06_sensitivity}
#if %line2=~ "^You feel a tightening sensation grow in your lungs.$" {addherb 04_asthma;addherb 06_sensitivity}
#if %line2=~ "(*)$You notice that your sweat glands have begun to rapidly secrete a foul, oily $" {addherb 06_sensitivity;addsmoke sva}
#if %line2=~ "(*)$You realize that your heroic actions can no longer continue unnoticed, and you $" {addherb 06_sensitivity;addherb 05_reckless}
#if %line2=~ "(*)$Your eyelids are forced open by the powerful venom.$" {addherb 06_sensitivity;addherb eba}
#if %line2=~ "^Numbness seizes you as your vision and hearing fade.$" {addherb 06_sensitivity;addherb eba}
#if %line2=~ "^You begin feeling slightly flushed.$" {addherb 06_sensitivity;di}}
"Venoms|Double Stab"
I know this is alot for one trigger, but I washoping it allowed me to take full control of the venom curing in which paticular order the venoms should be cured. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Feb 15, 2004 5:10 am |
Don't use #WAIT with triggers.
By using #WAIT, you prevent zMUD from doing anything for the next 200 milliseconds, by which time the next several lines will probably have gone by unprocessed. You can use #ALARM to create a delay, but for this trigger #CONDITION would probably be a better choice. |
|
|
|
GooseFire Novice
Joined: 08 Sep 2003 Posts: 32 Location: USA
|
Posted: Sun Feb 15, 2004 6:20 am |
I tried the #ALARM for the Value of the trigger to turn it on:
#t+ Double Stab
#ALARM +2 {#t- Double Stab} But, that didnt work. Not sure why, I suppose it could be my triggers. Am I allowed to anchor the triggers of the #IF's in the " " ? That might be the problem, and for the #CONDITION. I read the help file on there and I'm still confused as to how I'd set it to turn the folder on and off. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun Feb 15, 2004 6:48 am |
It is more than likely because the class name is two words Try this
#T- "Double Stab"
or
#T- {Double Stab}
One of those should do it |
|
|
|
GooseFire Novice
Joined: 08 Sep 2003 Posts: 32 Location: USA
|
Posted: Sun Feb 15, 2004 7:47 am |
That didnt help it, maybe its the triggers.. *chin* Is their anyway to check and see if it's turning on the folder?
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun Feb 15, 2004 10:19 am |
Problem could be with the two name class then
First rename the class so it is only ONEWORD i.e. DoubleStab
then give your alarm a name so you don't have a million of them going off at once
#alarm "stab" {+2} {#t- "DoubleStab"} |
|
|
|
user0101 Apprentice
Joined: 01 Aug 2003 Posts: 100 Location: USA
|
Posted: Sun Feb 15, 2004 6:16 pm |
They can send illusions before the DSTAB as well.
People can also have the illusion artifact.
Your code looks similar to mine when I first started making anti illusion coding all those months ago. There are a few things which you will discover if you keep working on it, and why creating code like this is such a pain.
Basically, what you can do is setup a button which turns off all pvp reflexes, and turns on a class folder which contains the reflexes for every class, sorted into their own class folder. A dynamic illusion system if you will. Then, you can manually turn on/off the reflexes for each class you may be fighting, based on if they have the illusion artie/can send illusions from a skill. Each of these reflexes then have the appopriate source checks, line checking, space checks, etc.
It has gotten to a point now, where I can stop 99% of snake illusions by this method, even when they send a fake source message along with one aff message.
Not releasing the code yet because it isn't done for all classes, but you get the point. |
|
|
|
GooseFire Novice
Joined: 08 Sep 2003 Posts: 32 Location: USA
|
Posted: Mon Feb 16, 2004 12:29 am |
Alrighteh! It workie now. Thanks for your help people. The turning it into one word helped Nexela, along with the ideas for the #ALARM. Thanks alot!
|
|
|
|
GooseFire Novice
Joined: 08 Sep 2003 Posts: 32 Location: USA
|
Posted: Mon Feb 16, 2004 1:34 am |
Arrghhh.. Soon as joy continued with having that work, I stumbled into something else that has me stumped.
When the folder is activated and, lets say it sees these two lines after the double stabbing happens:
A *****l* stinging ove*comes your body, fading away into num*ness.
The idea of eating or drinking is repulsive to you.
Then, it moves to do this: addsalve 01_anorexia;addherb 02_paralyse
Well, that's fine and dandy and does add the salve and herb to the cure list, but what if paralysis is already on the curing list? My old way of doing this had that fixed, it used:
#IF %ismember( 02_paralyse, @HerbList) {} {#co 1001;addherb 02_paralyse}
As you can see I've already used an #IF and I'm not sure how to add
'#IF %ismember( 02_paralyse, @HerbList) {} {#co 1001;addherb 02_paralyse}' and 'addsalve 01_anorexia;addherb 02_paralyse' together. It would need to check 01_anorexia, @SalveList just like in the HerbList as well. |
|
|
|
|
|