Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Firey
Wanderer


Joined: 30 Dec 2003
Posts: 61
Location: Norway

PostPosted: Sun Jan 22, 2006 1:02 pm   

Achaea limb counter..help with a trigger..?
 
I want to make a system which will keep track of how many times I need to hit a limb before it breaks.
I have a variable for each possible limb (Head, torso, right arm, left arm, right leg, left leg)

This is what it says when I hit Musicia's left arm:

You viciously jab an ornate steel rapier into Musicia's left arm.

Then I can do:

#TRIGGER {You viciously jab an ornate steel rapier into @target's left arm.} {#VAR leftarm 1}

Right?

But in that case I would need to make one trigger for each different part of the body, which would in fact slow down the system quite a lot I think, especially when it sometimes give another message than mentioned above.

Any ideas how I could make this easier? Without having to make 6 triggers for that message, then 6 triggers for the other message too..

This is the other message that can come though:

Lightning-quick, you jab Musicia's left arm with an ornate steel rapier.

Any help, please?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jan 22, 2006 6:54 pm   
 
You will need to use the stringlist pattern. {Item1|item2|itemN}. You will need to enable the Use Wildcards in Stringlists option in Preferences.
_________________
EDIT: I didn't like my old signature
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Jan 23, 2006 4:56 am   
 
Use wildcards to start then refine it down this will allow you to collect info on the stringlist patterns.

ie start with the open trigger. You could populate this by grep'ing in logs as well:
#TRIGGER {You (*) {an|a} (*) into (%w){'s|'} (*).} {
#VAR DamMsg {%1}
#VAR WeaponMsg {%2}
#VAR TargetMsg {%3}
#VAR TargetLimbMsg %replace({%4}," ","")
}

Then when you have good built up lists do something like:
#TRIGGER {You {@DamMsg} {an|a} @WieldedWeapon into @Target{'s|'} ({@TargetLimbMsg}).} {#ADD @target.%1 1}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net