Healing Problems.

Posted by Morgoth on Wed 04 Jun 2003 08:11 AM — 25 posts, 88,676 views.

Israel #0
Ok. I have two problems, here the first one:
1. In the mud I play (achaea), there's two types of ways to break the legs, there is a regular break which can be cured by apply a mending salve, and there is salve balance e.g (I can only apply a salve every 2 seconds or so), and the other break is cured with restoration then mending has to be applied. What i'm thinking of is like setting a variable for every part of my leg, like MendingRA MendingLA and RestorationLA and so on,then doing something like when I get the affliction MendingRA become vbtrue, then it cures and it becomes MendingRA = VbFalse, but there is the problem with the salve balance...
2. Another problem is illusions. There is a certain class that can conjure illusion, now this illusion looks exactly like the affliction message. So what I'm thinking is, that if its an actual affliction, they have to attack, so if they attack and then I get an affliction only then does it cure, if its just an affliction then it doesn't cure it. The Problem is I'm not sure how to go about doing it.


P.S: Please post solutions in VB Script.
Israel #1
Please Reply? :P
Russia #2
1. Salve balance is not a big problem. You can simply have a trigger to match on the balance recovery message, check if any of your limbs are broken and cure those that are.

2. Illusions are very complicated. Your proposed solution wouldn't work very well, due to some attacks giving more than one affliction, but not necessarily so. You'd have to enable/disable lots of triggers and it would still fail to give you adequate protection, since all it would take to bring that system down is a dstab with one affliction on it. I would suggest curing manually when fighting classes which can use illusions, or maybe thinking some more in hopes that you'll come up with a better solution
Israel #3
Well.....I kind of wanted to bring this subject back up, as I couldn't think of a solution. So here's some attacks.
A genuine attack could be something like this:
-----------------------------------------------------------
Morgoth viciously jabs an ornate steel rapier into your right leg.
You feel a tightening sensation grow in your lungs.
Morgoth viciously jabs an ornate steel rapier into your right leg.
You watch, in horror, as your right arm shrivels up and becomes useless.
-----------------------------------------------------
Then an illusion would be just:
You feel a tightning sensation grow in your lungs.
The problem is, there is a genuine attack called dstab
which is one attack
(not sure if this is exact)
--------------------------------------------------------
Dirgath stabs you twice with his dagger
You feel a tightning sensation grow in your lungs.
You watch, in horro as your right arm shrivels up and becomes useless.
--------------------------------------------------------

Please Reply
Canada #4
Hi, I play Aetolia, which is very, very similar to Achaea, but there are minor differences, so please inform me if I'm assuming something incorrectly. Also, this is going to be a long post, so grab an attention span kiddies :)

My first question is this: On Achaea, do you have to specify which arm you apply mending to? On Aetolia you don't, you just APPLY MENDING and one of your crippled limbs is brought back. The problem with specifying mendingRA, mendingLA etc. is that there are skills which shrivel a limb without telling you which limb is shrivelled, like the necromancy skill SHRIVEL which reads like this:
---------
Before you can avoid it, Bob's hand brushes against your leg and it withers away.
---------
Can you see the problem? You won't know if it was your right leg or left leg. To combat this problem, I've created a subroutine that looks like this:
------------
Sub legson (a, b, c)
Dim legs1, legs2, slickness
legs1 = world.getvariable ("affliction_legs1")
legs2 = world.getvariable ("affliction_legs2")
If legs1 = "off" Then 'if you don't have any crippled legs, set variable to 1 crippled leg
   world.setvariable "affliction_legs1", "on"
ElseIf legs1 = "on" Then 'if you have one crippled leg already, set variable to 2 crippled legs
   world.setvariable "affliction_legs2", "on"
End If
slickness = world.getvariable ("affliction_slickness")
If slickness = "off" Then 'if you don't have slickness, apply mending to heal the crippled leg
   world.sendpush "apply mending"
End If
End Sub

-----------
You can do the same for the arms, just substitute "arms" everwhere the word "legs" appears.

When you cure a crippled leg, here's the subroutine:
-------
Sub legs1off (a, b, c)
Dim legs1, legs2
legs1 = world.getvariable ("affliction_legs1")
legs2 = world.getvariable ("afflcition_legs2")
If legs1 = "on" Then
   world.setvariable "affliction_legs1", "off"
Exit Sub
Elseif legs1 = "off" Then
   world.setvariable "affliction_legs2", "off"
End If
End Sub

-------

Note that you're going to waste a lot of mending salves if they dsl or dstab you with epteth/epseth. I'm willing to accept that. Other people aren't and they make it so that they won't apply another salve until they get the message that says "You may apply another salve." This is dangerous against serpentlords who will make that into an illusion and trick your system into never applying another salve.

Whenever I get the trigger:

You may apply another salve to yourself.

it calls this subroutine (note, each affliction has a variable: affliction_afflictionname which is switched on and off as needed). This is a variant on something Nick wrote for a post I made almost a year ago.
------------
sub salves (a, b, c)
dim value, spell
For Each v In world.GetVariableList
  value = world.GetVariable (v)
  If Left (v, 11) = "affliction_" Then
   spell = Mid (v, 12)  ' spell is after "affliction_"
   If value = "on" Then  ' do if spell is active
     Select Case spell 
       Case "anorexia"         world.sendpush "apply epidermal"
       Case "arms1"            world.sendpush "apply mending"
       Case "legs1"            world.sendpush "apply mending"
       Case "arms2"            world.sendpush "apply mending"
       Case "legs2"            world.sendpush "apply mending"
       Case "burning"		 world.sendpush "apply mending"
     End Select
     Exit Sub
   End If
  End If 
Next
end Sub

------------

In my next post, I'll explain how I handle damaged limbs (mutilation etc.) which includes making this subroutine a whole lot bigger.

If you have any questions, or I'm not being clear, just ask. I know my subs are a mess. I don't know vbscript conventions very well, so any pointers, suggestions, etc. are welcome and very much desired.

Bobble
Amended on Fri 20 Jun 2003 11:21 PM by Bobble
Canada #5
Well, I just notced the spaces didn't come through properly in those subroutines. They should still work, but they're hard to read

Now, when they break your arms or legs, things get more complicated. When it breaks, it gives you a partially damaged limb (requiring restoration) and it cripples it (requiring mending). Then if they continue to go on attacking it without you doing anything, they mutilate it, thus requiring two restoration applications, and a mending application. Also, if you have leg damage, the mending salve will fizzle, so you need to take care of restoring it first. This is the subroutine I wrote to handle damage to legs:

Trigger text, as a regular expression:
Your (left|right) leg breaks from all the damage\.$
calls this sub:

Sub damagedlegs (a, b, c)
Dim legs1, legs2
legs1 = world.getvariable ("affliction_legs1")
legs2 = world.getvariable ("affliction_legs2")
If legs1 = "off" Then
   world.setvariable "affliction_legs1", "on"
Elseif legs1 = "on" Then
   world.setvariable "affliction_legs2", "on"
End If
If slickness = "off" Then
   world.sendpush "apply restoration to legs"
End If
Dim damagedlegs1, damagedlegs2
damagedlegs1 = world.getvariable ("affliction_damagedlegs1")
damagedlegs2 = world.getvariable ("affliction_damagedlegs2")
If damagedlegs1 = "off" Then
   world.setvariable "affliction_damagedlegs1", "on"
   Exit Sub
Elseif damagedlegs1 = "on" Then
   world.setvariable "affliction_damagedlegs2", "on"
End If
Dim slickness
slickness = world.getvariable ("affliction_slickness")
End Sub

---------

Triggered to the regular expression:

Your (left|right) leg is fully healed\!$

is this subroutine:
------------

Sub damagedlegsoff (a, b, c)
Dim damagedlegs1, damagedlegs2
damagedlegs1 = world.getvariable ("affliction_damagedlegs1")
damagedlegs2 = world.getvariable ("affliction_damagedlegs2")
If damagedlegs1 = "on" Then
   world.setvariable "affliction_damagedlegs1", "off"
   Exit Sub
Elseif damagedlegs1 = "off" Then
   world.setvariable "affliction_damagedlegs2", "off"
End If
End Sub

-----------

Then for mutilated legs:
---------
Sub mutilatedlegs (a, b, c)
Dim mutilatedlegs1, mutilatedlegs2
mutilatedlegs1 = world.getvariable ("affliction_mutilatedlegs1")
mutilatedlegs2 = world.getvariable ("affliction_mutilatedlegs2")
Dim slickness
slickness = world.getvariable ("affliction_slickness")
If slickness = "off" Then
   world.sendpush "apply restoration to legs"
End If
If mutilatedlegs1 = "off" Then
   world.setvariable "affliction_mutilatedlegs1", "on"
   Exit Sub
Elseif mutilatedlegs1 = "on" Then
   world.setvariable "affliction_mutilatedlegs2", "on"
End If
End Sub

-----------

And triggered to:

Your (left|right) leg is greatly healed\, but still damaged\.$

is:
-----------
Sub mutilatedlegsoff (a, b, c)
Dim mutilatedlegs1, mutilatedlegs2
mutilatedlegs1 = world.getvariable ("affliction_mutilatedlegs1")
mutilatedlegs2 = world.getvariable ("affliction_mutilatedlegs2")
If mutilatedlegs1 = "on" Then
   world.setvariable "affliction_mutilatedlegs1", "off"
   Exit Sub
elseif mutilatedlegs1 = "off" Then
   world.setvariable "affliction_mutilatedlegs2", "off"
End If
End Sub

------

Because the post is too long, my next will have the ammended salve application sub in it.

Bobble
Amended on Fri 20 Jun 2003 11:19 PM by Bobble
Canada #6
Now, the salve application sub, called by "You may apply another salve to yourself" is bigger than the one in my previous post. If you implement these subroutines, use this "salve" sub, not the one I posted above.

----------
Dim value, spell, slickness, dlegs1, dlegs2, darms1, darms2, dhead, dtorso, mlegs1, mlegs2, marms1, marms2, mhead, mtorso
slickness = world.getvariable ("affliction_slickness")
darms1 = world.getvariable ("affliction_damagedarms1")
darms2 = world.getvariable ("affliction_damagedarms2")
dlegs1 = world.getvariable ("affliction_damagedlegs1")
dlegs2 = world.getvariable ("affliction_damagedlegs2")
dhead = world.getvariable ("affliction_damagedhead")
dtorso = world.getvariable ("affliction_damagedtorso")
mlegs1 = world.getvariable ("affliction_mutilatedlegs1")
mlegs2 = world.getvariable ("affliction_mutilatedlegs2")
marms1 = world.getvariable ("affliction_mutilatedarms1")
marms2 = world.getvariable ("affliction_mutilatedarms2")
mtorso = world.getvariable ("affliction_mutilatedtorso")
mhead = world.getvariable ("affliction_mutilatedhead")
If slickness = "on" Then
	Exit Sub
End If
If darms1 = "on" Then
   world.sendpush "apply restoration to arms"
   Exit Sub
Elseif darms2 = "on" Then
   world.sendpush "apply restoration to arms"
   Exit Sub
Elseif dlegs1 = "on" Then
   world.sendpush "apply restoration to legs"
   Exit Sub
Elseif dlegs2 = "on" Then
   world.sendpush "apply restoration to legs"
   Exit Sub
Elseif dtorso = "on" Then
   world.sendpush "apply restoration to torso"
   Exit Sub
Elseif dhead = "on" Then
   world.sendpush "apply restoration to head"
   Exit Sub
Elseif marms1 = "on" Then
   world.sendpush "apply restoration to arms"
Elseif marms2 = "on" Then
   world.sendpush "apply restoration to arms"
   Exit Sub
Elseif mlegs1 = "on" Then
   world.sendpush "apply restoration to legs"
   Exit Sub
Elseif mlegs2 = "on" Then
   world.sendpush "apply restoration to legs"
   Exit Sub
Elseif mhead = "on" Then
   world.sendpush "apply restoration to head"
   Exit Sub
Elseif mtorso = "on" Then
   world.sendpush "apply restoration to torso"
   Exit Sub
End If
For Each v In world.GetVariableList
  value = world.GetVariable (v)
  If Left (v, 11) = "affliction_" Then
   spell = Mid (v, 12)  ' spell is after "affliction_"
   If value = "on" Then  ' do if spell is active
     Select Case spell 
	 Case "anorexia"         world.sendpush "apply epidermal"
       Case "arms1"            world.sendpush "apply mending"
       Case "legs1"            world.sendpush "apply mending"
       Case "arms2"            world.sendpush "apply mending"
       Case "legs2"            world.sendpush "apply mending"
       Case "burning"		 world.sendpush "apply mending"
     End Select
     Exit Sub
   End If  ' end spell "on"
  End If   ' end variable starting with "affliction_"
Next
end Sub

--------

The reason I put all the damaged limb stuff up front, in front of the "For each" is because the select case runs through the variables in the order they're put in the array. If you don't do it like this, the variables are arranged in alphabetical order, the crippled arms are selected before the damaged arms are, and it will try to apply mending, which won't work and you'll lock yourself up.

I know there's probably a more "streamlined" way of doing this and if so, I'd love to see it. I've learned all my vbscript from MUSHclient, so there's tons of stuff I don't know.

Next post is on how to handle those pesky illusions.
Amended on Fri 20 Jun 2003 11:17 PM by Bobble
Canada #7
Okay, because I've been so long winded in the previous posts, I'll try to be a little more brief here.

My solution for illusions is what you proposed, enabling the triggers only when preceeded by an attack. First of all, you have to put every single affliction trigger into a group. My group is labeled "afflictionson". Shadowsnakes (or whatever serpentlord class you're fighting) have three ways to actually hit you with a venom: bite, arrow and dstab

So make an alias like "snake" that you type when you're fighting a serpentlord. It will call this subroutine:
-------
Sub snake (a, b, c)
world.enablegroup "afflictionson", 0
End Sub
-------

and then an alias to turn this off when you're not fighting them, "snakeoff" which calls:
------
Sub snakeoff (a, b, c)
world.enablegroup "afflictionson", 1
End sub
------
Then you make three triggers (all regular expressions), one for bite, one for an arrow strike and one for dstab:

.+ sinks (his|her) fangs into your body and you wince in pain\.$

It strikes you\, gouging a deep and bloody wound\.$

.+ pricks you twice in rapid succession with (his|her).+$

each of these calls this subroutine
--------
Sub snakeattack (a, b, c)
world.enablegroup "afflictionson", 1
world.enabletrigger "afflictionsoff", 1
End Sub
--------
The solution to the problem Ked brought up is really quite easy. It has to do with the "afflictionsoff" trigger. The first thing sent to you after an attack is . . . . A PROMPT! So the trigger labelled "afflictionsoff" is this

^H\:.+\]

Which calls this subroutine:
--------
Sub snakeattackoff (a, b, c)
world.enablegroup "afflictionson", 0
world.enabletrigger "afflictionsoff", 0
End Sub
--------

I know the prompt in Achaea is configured differently, so you'll have to adjust it. I think it uses a <> instead of [] around the equilibrium balance indicators. If you can copy and paste a sample prompt, it'll be easy to adjust.

There are some weaknesses. For instance if they illusion a bite, then you'll get fooled. I've made a choice to make my system ignore any bite except scytherus (so my subs look different then the ones I posted). It's up to you to make the same choice.

Also, if you get teamed by a snake and another class, you're going to have problems.

Let me know if you have questions!
Canada #8
So how the illusion countermeasure works is that you shut off your affliction triggers. So if they illusion, you'll ignore them.

Then if they dstab you:

Dirgath pricks you twice in rapid succesion with a needle pointed dirk. 'enables your affliction triggers and the "afflictionsoff" trigger
You feel a tightning sensation grow in your lungs. 'recognized as a legitimate affliction
You watch, in horror as your right arm shrivels up and becomes useless. 'recognized as a legitimate affliction
H:3850 M:3850 [csdb eb] 'sets off the "afflictionsoff" trigger calling the "snakeattackoff" sub
Hmm. Why is everything so hard to figure out? 'an illusion that will be ignored


Bobble
Amended on Fri 20 Jun 2003 11:26 PM by Bobble
Australia Forum Administrator #9
To fix your formatting problems, check "forum codes" on the post (you can edit it and do that), and then put your formatted code inside:

[code]

... blah blah ...

[/code]

You should also "escape" out brackets and backslashes - there is a function in the MUSHclient notepad to do just that.

Canada #10
I'm sorry, newbie time, "escape out"?
Israel #11
Ok. I'm really slow in scripting...so please bear with me.
Prompt in achaea looks like this .....
3732h, 2148m ex- (p.s, you probably know th ex part changes if you've eaten kola/cohosh, and if you have balance/eq)
So how exactly would I write that? (please put exactly what I would put in afflic message)
Second thing, if I were fighting a non-serpentlord class, wouldn't the Prompt trigger (afflictonsoff) affect my healing? because everytime it saw a prompt it would turn my healing off? (I'm probably now realizing something very simple.....so please enlighten me.....)

Thanks.
Israel #12
Um forgot another thing, do I put ALL my triggers in one group? or just the ones that set my variables to show that I have a certain affliction.
Australia Forum Administrator #13
"Escape out" refers to the general problem of where you have something like [code] to indicate special processing, and you conceivably might want to put [code] into your code.

eg. (in pseudocode)

for code = 1 to 10
i = blah [code]
end for


To work around this we can "escape" square brackets by putting a backslash in front of them, eg.

i = blah \[ code \]

The forum software knows not to treat such a thing as a special "code" sequence, and also removes the backslashes.

Also, in case you want to use a backslash itself, you escape backslashes, like this: \\

Inside MUSHclient's notepad you can select a block of text and select "quote forum codes" which will do that for you.
Canada #14
Quote:
3732h, 2148m ex- (p.s, you probably know th ex part changes if you've eaten kola/cohosh, and if you have balance/eq)
So how exactly would I write that? (please put exactly what I would put in afflic message)


Wow, okay, the Achaea prompt is quite different, but it's still quite easy to make a trigger for that. This would be the text you match on:

^\d+h\, \d+m

Then you have to make sure you set it as a regular expression. This _should_ work, but test it and tell me if it's not. On a side note, you could make another trigger with the exact same text only with round () brackets around the \d+, so it would appear as ^(\d+)h\, (\d+)m to capture your current health and mana and begin sipping health and mana vials when you get low. But that's another thread altogether.

Quote:
Second thing, if I were fighting a non-serpentlord class, wouldn't the Prompt trigger (afflictonsoff) affect my healing? because everytime it saw a prompt it would turn my healing off? (I'm probably now realizing something very simple.....so please enlighten me.....)


Yes, yes it would. I tried to remove some of the extras I have in my own subroutines (to personalize it to my class) and removed something I shouldn't have. Actually, since no other classes bite or dstab, it would only happen if you were struck by an arrow (recall that the prompt trigger is only turned on when you are bitten, dstabbed or struck by an arrow, and that it turns itself off when called, the world.enabletrigger "afflictionsoff", 0 does that). To handle this, make the following changes:

Sub snake (a, b, c)
world.setvariable "snake", "on"
world.enablegroup "afflictionson", 0
End Sub

Sub snakeoff (a, b, c)
world.setvariable "snake", "on"
world.enablegroup "afflictionson", 1
End Sub

Sub snakeattack (a, b, c)
dim snake
snake = worldgetvariable ("snake")
If snake = "on" then
	world.enablegroup "afflictionson", 1
	world.enabletrigger "afflictionsoff", 1
End If
End Sub

Sub snakeattackoff (a, b, c)
dim snake
snake = worldgetvariable ("snake")
If snake = "on" then
	world.enablegroup "afflictionson", 0
	world.enabletrigger "afflictionsoff", 0
End If
End Sub


It occurs to me now that I really need to choose better names for my triggers and groups. This could be confusing.

Anyway, the addition of the "snake" variable will make sure you have set the system to recognize that you're fighting snakes before switching your afflictions on and off. Just a word of warning though, if you use this system, you have to remember to use the "snakeoff" alias when you're done fighting a snake. If you don't and you start fighting other classes, none of your affliction triggers will fire and you'll be very dead, very fast.

Quote:
do I put ALL my triggers in one group? or just the ones that set my variables to show that I have a certain affliction.


Just the ones that change your variables to show that you have a certain affliction.

There are a lot of other tricks to fighting snakes. If you construct your triggers carefully, using regular expressions, you can catch a lot of badly done illusions. I'm not sure about Achaea, but on Aetolia, if the snake knows where line breaks are inserted, they can put the proper amount of spaces into the illusion to get it to break over two lines. So instead of illusioning just one affliction, they'll give you two, like this:

3999h, 4850m ex-
Hmmmm. Why is everything so difficult to figure out?
A pr*ckly st*inging sensatio* overw*elms your body, fad*ng away into numbness.
3999h, 4850m ex-

Of course, if you get your system to work, a smart snake is going to realize what you've done and do this type of illusion.

3999h, 4850m ex-
Exodus sinks his fangs into your body and you wince in pain.
Hmmmm. Why is everything so difficult to figure out?
3999h, 4850m ex-

If they do that, the illusion will trick the system, because the inclusion of the bite in the illusion "fooled" the system into thinking that it was a real attack. I've adjusted my system so that it only pays attention to a bite if it gives me scytherus (it would be dumb for a snake to illusion giving you scytherus) since that tends to be the only thing they use bite for (for other venoms they'll just dstab you, it's more efficient).

If you're a priest or if you have diag in survival, you can set up a nifty system to reset your affliction variables and use diagnose to set them properly. I keep this as a type of "panic button" to use when I'm fighting and I realize the system thinks I have an affliction I don't actually have. Let me know if you're interested in that, but if you thought my other subroutines were long, you should see the ones for this. I need to think of a way to make them shorter.

Anyway, let me know if any of this isn't making sense. I know my explanations can be obtuse.
Amended on Sat 21 Jun 2003 03:03 PM by Bobble
Israel #15
Ok thanks for helping me out, as a side note though, I wish I had diag, and focus. But I don't have any creds, so goodbye nifty skills for me :(.
Israel #16
Ok. It doesn't work
Here's my script.
Sub Snake (name,output,wildcs)
world.setvariable "snake", "on"
world.enablegroup "afflictionson", 0
End Sub
Sub Snakeoff (name,output,wildcs)
world.setvariable "snake", "on"
world.enablegroup "afflictionson", 1
End Sub
Sub Snakeattack (name,output,wildcs)
Dim snake
snake = world.getvariable ("snake")
If snake = "on" then
world.enablegroup "afflictionson", 1
world.enabletrigger "afflictionsoff", 1
End If
End Sub
Sub Snakeattackoff (name, output, wildcs)
Dim snake
snake = world.getvariable ("snake")
If snake = "on" then
world.enablegroup "afflictionson", 0
world.enabletrigger "afflictionsoff", 0
End If
End Sub

Now one thing I don't get, is how can you set snake to on if it isn't declared yet? shouldn't you declare the variable outside it? Second thing, most snakes do---
Dirgath sinks his fangs into your body and you wince in pain.
Your vision is flooded with light, and your face suddenly reddens.
Any ideas how to get past that?

thanks.
Australia Forum Administrator #17
See this:

http://www.gammon.com.au/scripts/doc.php?function=setvariable

The variables in question are internal MUSHclient variables (you can see them from the configuration screen). Setting a variable creates it if necessary.
Canada #18
Okay, it's one of those days, I copied a few things incorrectly:

Quote:
Sub Snakeoff (name,output,wildcs)
world.setvariable "snake", "on"
world.enablegroup "afflictionson", 1
End Sub


change 2nd line to:
 world.setvariable "snake", "off"


I should also ask what's not working, are the all the illusions fooling it or just the ones like the example you just gave? Make sure you read up on the link Nick gave.

I got fooled by that bite illusion a lot, so what I chose to do was to completely ignore any bite, unless it was scytherus.

So the trigger
.+ sinks (his|her) fangs into your body and you wince in pain.

calls this subroutine instead

Sub bite (a, b, c)
Dim snake
snake = world.getvariable ("snake")
If snake = "on" Then
world.enabletrigger "scytheruson", 1
world.enabletrigger "scytheruson1", 1
world.enabletrigger "afflictionsoff", 1
End If
End Sub


scytheruson and scytheruson1 are the labels for the scytherus trigger texts:
You feel light headed and dizzy\.$
You swoon as you suffer a toxic relapse\.$

Which also belong to the group "afflictionson"

If you're fighting a snake that combines the illusion you gave and _actual_ bites, you're going to get fooled a lot, there's no way to beat it with an automated system. I've found in my experience that snakes don't use bite a lot other than to give scytherus, unless they don't have dstab yet. If you have, or can get diagnose in survival, your problems can go away quite quickly. So if you're fighting snakes a lot, I reccommend spending some lessons in survival.
Israel #19
How can diag help so much unless you are running or shielding A LOT. Diagnose takes eq. So??
Canada #20
Diag takes your eq for 1 second. So in one second you can know, with absolute certainty what you are afflicted with. And you can set up triggers and variables to record this, if that's your pleasure. Do a diag after each of your attacks or every two attacks, whatever your preference, whatever your preference, and you should find that the snake isn't able to lock up your system as badly. I find that 1 second every so often isn't really a waste.
Israel #21
Ok. I need help again. (surprise surprise). The script doesn't work for some reason, although I don't get any real error. (On a side note, I added another defense that turns off first messages and only catches primary afflics, so I can't be fooled with bite messages). Here's my script, can anyone tell me whats wrong with it?
------------------------------------------------------------


Sub Snake (name,output,wildcs)
world.setvariable "snake", "on"
world.enablegroup "afflictionson", 0
World.EnableTrigger "Afflic_Curare_10", FALSE ' disable trigger
World.EnableTrigger "Afflic_Aconite_1", FALSE ' disable trigger
World.EnableTrigger "Afflic_Eurypteria_1", FALSE ' disable trigger
World.EnableTrigger "Afflic_Epidermal_2", FALSE ' disable trigger
World.EnableTrigger "Afflic_Kalmia_1", FALSE ' disable trigger
World.EnableTrigger "Afflic_Darkshade_2", FALSE ' disable trigger
End Sub
Sub Snakeoff (name,output,wildcs)
world.setvariable "snake", "off
world.Enablegroup "afflictionson", 1
World.EnableTrigger "Afflic_Curare_10", TRUE ' enable trigger
World.EnableTrigger "Afflic_Aconite_1", TRUE ' enable trigger
World.EnableTrigger "Afflic_Eurypteria_1", TRUE ' enable trigger
World.EnableTrigger "Afflic_Epidermal_2", TRUE ' enable trigger
World.EnableTrigger "Afflic_Kalmia_1", TRUE ' enable trigger
World.EnableTrigger "Afflic_Darkshade_2", TRUE ' enable trigger
End Sub
Sub snakeattack (a, b, c)
Dim Snake
Snake = worldgetvariable ("snake")
If snake = "on" then
world.enablegroup "afflictionson", 1
world.enabletrigger "afflictionsoff", TRUE
End If
End Sub
Sub snakeattackoff (a, b, c)
dim snake
snake = worldgetvariable ("snake")
If snake = "on" then
world.enablegroup "afflictionson", 0
world.enabletrigger "afflictionsoff", FALSE
End If
End Sub
Sub snakeattackoff (a, b, c)
dim snake
snake = worldgetvariable ("snake")
If snake = "on" then
world.enablegroup "afflictionson", 0
world.enabletrigger "afflictionsoff", FAlSE
End If
End Sub

Triggers:

trigger
enabled="y"
match=".+ sinks (his|her) fangs into your body and you wince in pain\.$"
regexp="y"
script="Snakeattack"
sequence="100"
>

<trigger
enabled="y"
match="^\d+h\, \d+m"
regexp="y"
script="Snakeattackoff"
sequence="100"
>

<trigger
enabled="y"
match=".+ pricks you twice in rapid succession with (his|her).+$"
regexp="y"
script="Snakeattack"
sequence="100"
>
Here's a sample of one of my triggers.

trigger
enabled="y"
group="Afflictionson"
match="Your state of paralysis prevents you from doing that."
name="Afflic_Curare_5"
script="Healing"
sequence="100"
>

-----------------------------------------------------------
Israel #22
Ok here is my follow up post as I thought the last one was already long as it is. I want another backup just encase some snake manages to get through my system. the thing is this, if I lets say they manage to pass a stupidity on me, then I eat a goldenseal, when I recover balance, and it hasn't been healed it goes back to a state that its healed.
Israel #23
Please reply.
Australia Forum Administrator #24
It is hard to help with things where you say "it doesn't work" without giving any details. For instance, what output arrives from the MUD, exactly? (copy and paste please).

What does it do? What do you expect it to do?

However I see a couple of things. You seem to have two subs called snakeattackoff for some reason.

You also have the line:

world.setvariable "snake", "off

There is a missing closing quote there.

Rather than sitting around waiting for other people to debug your scripts I suggest trying to do it yourself.

Here are some things you can do:

  • Put in world.note here and there to check that scripts are running when you expect, and that various variables are what you expect. You can always comment them out later.
  • Make each trigger colour the matching line in a distinctive colour. Then you can see if the triggers are matching or not. If not, work out why not.
  • Use the world.debug facility or the configuration screen to check whether variables are set to what you expect.
  • The enablegroup command returns a count of the number enabled or disabled. You could display that to see if the number of things being enabled/disabled is what you expect.

    eg.

    count = world.enablegroup ("afflictionson", 0)
    world.note count & " items in afflictionson group disabled"