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
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Wed Feb 18, 2004 5:53 pm   

Auto-Hide Trigger
 
Okay, what I want to do is make it to where when my chars type hide.. they do it till they are actually hidden. The status of my Hide/Sneak/Invis status is in my prompt as follows.

mv HS QT

Where HS means hide and sneak. I need to make a trigger where once you see "You attempt to hide." it will check the prompt for the H and if it's not there.. then enter hide again. Once hide is entered again of course the check part will be redone due to "You attempt to hide." being activated. Thanks folks.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Wed Feb 18, 2004 6:28 pm   
 
#tr autohide {You attempt to hide.} {#noop}
#cond {^mv (?)} {#if %1="H" {#noop} {hide}}

easy way I think.
Reply with quote
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Wed Feb 18, 2004 6:43 pm   
 
Okay the actual prompt looks like

1544/1544hp 643/643mv QT: {1000} (346) Gold:9197687

I was just using the mv and qt as borders for the thing i needed. Is there some way to have zmud check if a spot contains H? For example..

(%d)/(%d)hp (%d)/(%d)mv (*) QT:(%d) ~{(%d)~} ~((%d)~) Gold:(%d)

#IF %5(contains)H {#NOOP} {hide}
?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Feb 18, 2004 6:43 pm   
 
A two-state trigger should do it.
#TR {You attempt to hide.} {}
#COND {mv(*)} {#IF %begins( %1, H) {} {hide}} {prompt}

If there are other characters which might come before H, use %pos instead of %begins.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Wed Feb 18, 2004 8:07 pm   
 
same applies just put your prompt into either of these examples given and it should work just fine.
Reply with quote
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Thu Feb 19, 2004 5:35 am   
 
Okay now when My prompt reads:

1810/1810hp 646/646mv IHS QT:27 {19} (335) Gold:9106579
and i type hide
and it says "You attempt to hide"
It spams in hide for each line of prompt even though i am hidden

I used the
#TR {You attempt to hide.} {}
#COND {mv(*)QT} {#IF %pos( %1, H) {} {hide}} {prompt}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Feb 19, 2004 7:13 am   
 
If you had looked up %pos, you'd have seen it needed the arguments in the opposite order from %begins.
#TR {You attempt to hide.} {}
#COND {mv(*)QT} {#IF %pos( H, %1) {} {hide}} {prompt}
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