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
robo
Beginner


Joined: 09 Sep 2004
Posts: 16

PostPosted: Thu Sep 09, 2004 3:24 pm   

re-arm trigger, blinded vs. unblinded
 
Here is my trigger for when I get disarmed

#tr {DISARMS you and sends your weapon flying!} {~~;get @weap1;get @weap2;wear @weap1;sec @weap2}

the 'DISARMS' part is obviously the message I see, then the ~~ cancels all other commands so I can rearm.

@weap1 and @weap2 are variables I have set up for my weapons

What I'd like to do is set soemthing up for when I am blinded and I get disarmed, so that I second my sheathed weapon rather than trying to get the disarmed weapon

I'm not sure how to work that in without duplicating the above trigger

so if, for example, I'm fighting "Legolas" (yeah yeah)

Legolas DISARMS you and sends your weapon flying!

If I'm blinded, no matter who I'm fighting, I see the following:

Someone DISARMS you and sends your weapon flying!

Maybe some type of if/then statement? i.e.

If <blinded> then (use one trigger), if <not blinded> then (use the other trigger)

the message I see when I'm blinded (by skill or spell)

You are blinded!

heh...go figure. :)

any help on how to structure this, greatly appreciated
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Thu Sep 09, 2004 3:49 pm   
 
All you need to do is change your trigger a little.
Code:

#CLASS {Disarmed}
#VAR combatant {}
#TRIGGER {You are blinded} {~~;get @weap2;sec @weap2}
#TRIGGER {(%w) DISARMS you and sends your weapon flying!} {#VAR combatant {%1};#IF (@combatant = "Someone") {;Place commands here to use your second weapon;~~;get @weap2;sec @weap2} {;Place commands here to retrieve your first weapon; ~~;get @weap1;get @weap1}}
#CLASS 0

_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)

Last edited by darmir on Thu Sep 09, 2004 3:52 pm; edited 1 time in total
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Thu Sep 09, 2004 3:51 pm   
 
#TRIG {(*) DISARMS you and sends your weapon flying!} {#IF (%1=Someone) {second sheathed weapon} {~~;get @weap1;get @weap2;wear @weap1;sec @weap2}}
Reply with quote
robo
Beginner


Joined: 09 Sep 2004
Posts: 16

PostPosted: Wed Sep 15, 2004 3:44 pm   
 
hurm, oddly enough, it seems to automatically second the sheathed weapon
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Sep 15, 2004 3:59 pm   
 
#TRIG {(%w) DISARMS you and sends your weapon flying!} {#IF ("%1" = "Someone") {~~;second sheathed weapon} {~~;get @weap1;get @weap2;wear @weap1;sec @weap2}}

With * as the wildcard, %1 will frequently contain spaces. Without "s or other delimiters around %1, the expression will evaluate to true whenever %1 does contain spaces. Using %w ensures that %1 won't contain spaces, so the "s aren't actually necessary in the revised trigger.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
robo
Beginner


Joined: 09 Sep 2004
Posts: 16

PostPosted: Wed Sep 15, 2004 4:16 pm   
 
ha

you rule, thanks LB
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