|
PrestoPimp Apprentice
Joined: 18 Sep 2001 Posts: 175 Location: USA
|
Posted: 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. |
|
|
|
megamog75 Enchanter
Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: 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. |
|
|
|
PrestoPimp Apprentice
Joined: 18 Sep 2001 Posts: 175 Location: USA
|
Posted: 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}
? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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. |
|
|
|
megamog75 Enchanter
Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: 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.
|
|
|
|
PrestoPimp Apprentice
Joined: 18 Sep 2001 Posts: 175 Location: USA
|
Posted: 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} |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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} |
|
|
|
|
|