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
Zapple
Newbie


Joined: 29 Apr 2001
Posts: 8

PostPosted: Wed Dec 19, 2001 2:19 am   

How to trigger off of a missing line?
 
Ok heres the info I see when i type: glance player

Player has a few scratches.
his skin has a barklike texture..
his form is blurred and difficult to make out!
his body seems to be made of stone!

What i'm trying to figure out is how to automatically cast stone skin on the target if the line:

his body seems to be made of stone!

is missing.

And the same thing for casting the blur spell when the line:

his form is blurred and difficult to make out!

is missing.

Any ideas? I been at this for hours...Been trying with #IF but not sure what im doin wrong. Thanks alot in advance, appreciate any ideas.

Zap
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Wed Dec 19, 2001 4:47 am   
 
Create a temporary trigger to fire when the first blank line after the text block is received. Make the temp trigger check the flags modified by the text received from the MUD.



#TR {(%w) has {a few scratches|some cuts|horrible lacerations|whatever}} {
#VAR hasBarkskin 0
#VAR hasStoneskin 0
#VAR isBlurred 0
#VAR player %1
#TEMP {$} {
#IF !@hasBarkskin {cast barkskin @player}
#IF !@hasStoneskin {cast stoneskin @player}
#IF !@isBlurred {cast blur @player}
}
}
#TR {^{his|her} skin has a barklike texture..} {#VAR hasBarkskin 1}
#TR {^{his|her} form is blurred and difficult to make out!} {#VAR isBlurred 1}
#TR {^{his|her} body seems to be made of stone!} {#VAR hasStoneskin 1}


You can put this in a class and turn it on and off with an alias if you like.

Troubadour
Reply with quote
Drevarr
Beginner


Joined: 19 Dec 2001
Posts: 17
Location: USA

PostPosted: Wed Dec 19, 2001 4:54 am   
 
#ALIAS gs {#T+ Glance;#var has_stone 0;#var stone_tar %1;glance %1}
#TRIGGER {%w body seems to be made of stone!} {#var has_stone 1} "Glance"
#TRIGGER {No-one by that name here.} {#var has_stone 1;#T- Glance} "Glance"
#TRIGGER {^$} {#if (!@has_stone) {stone @stone_tar};#T- Glance} "Glance"

Change the No-one by that name here. trigger to match your mud output in case you fat finger the glance target.
Reply with quote
Zapple
Newbie


Joined: 29 Apr 2001
Posts: 8

PostPosted: Wed Dec 19, 2001 11:56 pm   
 
Thanks both of ya for the help. Actually Drevarrs solution fits more into what I want to do, with one problem, it wont work :) hehe

For some reason this trigger is not getting triggered:
#TRIGGER {^$} {#if (!@has_stone) {stone @stone_tar};#T- Glance} "Glance"

The variable @has_stone is getting set correctly to 1 or 0 depending on the situation, but if its 0, the trigger to cast stone isnt firing.

Also, the entire Glance class is never getting turned off, which I think might be part of the same problem.

Any ideas?
Reply with quote
Zapple
Newbie


Joined: 29 Apr 2001
Posts: 8

PostPosted: Thu Dec 20, 2001 12:17 am   
 
Ok I think I got it I took out the ^ in
#TRIGGER {^$} {#if (!@has_stone) {stone @stone_tar};#T- Glance} "Glance"

And it seems to work, thanks again :)
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