|
Bromax Wanderer
Joined: 03 Jan 2002 Posts: 66
|
Posted: Thu Jun 24, 2004 7:33 pm
condition wont fire.... |
#CLASS {Autoclose}
#TRIGGER {open (%w)$(%w)} {
#VAR lastdir %2
#IF (@lastdir=n) {#VAR closedir s}
#IF (@lastdir=s) {#VAR closedir n}
#IF (@lastdir=e) {#VAR closedir w}
#IF (@lastdir=w) {#VAR closedir e}
#IF (@lastdir=u) {#VAR closedir d}
#IF (@lastdir=d) {#VAR closedir u}
#COND {^~[ obvious exits:(*)~]} {close %doorname( ,@closedir)} {within|param=40}
}
#CLASS 0
everything works fine...other than the door doesn't close..why won't the condition fire? |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Thu Jun 24, 2004 8:43 pm |
I think your problem is that sneaky little comma in the %doorname function that shouldn't be there.
Also, make certain that your trigger is valid, using the Test tab in the Settings editor. |
|
|
|
Bromax Wanderer
Joined: 03 Jan 2002 Posts: 66
|
Posted: Thu Jun 24, 2004 9:36 pm |
yeah trigger works....and the comma is supposed to be there I was told (typo in help guide)...if I enter it manually it works...but I don't wanna do it that way ;-)
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jun 24, 2004 10:31 pm |
The CONDITION would send "close" to the MUD even if you have the %doorname function wrong. If it doesn't, these seem the most likely possibilities:
1. You have "Trigger on commands" pref disabled
2. The #CONDITION pattern doesn't match the MUD output
3. The MUD output is a prompt and you haven't enabled the Prompt option
You can determine whether the primary trigger fires or not by checking what state it's in after you open a door and go through it. |
|
|
|
Bromax Wanderer
Joined: 03 Jan 2002 Posts: 66
|
Posted: Fri Jun 25, 2004 12:38 am |
Allright...if I take the condition out it fires...but it does it quickly...before im in the room with the door I want to close...if I use an alarm to delay a little it works sometimes...unless I'm walking fast then it fires too late...is there a way to make it fire when I enter the room through the door...this is what the mud is doing:
speedwalk commands:
open celldoor
s
close
s
e
Ok.
o HP:Healthy MV:Full > Close what?
o HP:Healthy MV:Full > Entrance to the Dungeon
[ obvious exits: N S W U ]
it tries to close before I even move...even though the commands were sent in the correct order...and I'm not in the correct room so it fires the close command without a door name. |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Fri Jun 25, 2004 9:17 pm |
I think I see your problem. You're missing a } before the #COND. Assuming you're right about the comma (which doesn't make sense, but I don't use it, so OK), try this:
quote:
#CLASS {Autoclose}
#TRIGGER {open (%w)$(%w)} {
#VAR lastdir %2
#IF (@lastdir=n) {#VAR closedir s}
#IF (@lastdir=s) {#VAR closedir n}
#IF (@lastdir=e) {#VAR closedir w}
#IF (@lastdir=w) {#VAR closedir e}
#IF (@lastdir=u) {#VAR closedir d}
#IF (@lastdir=d) {#VAR closedir u}
}
#COND {^~[ obvious exits:(*)~]} {close %doorname( ,@closedir)} {within|param=40}
}
#CLASS 0
|
|
|
|
|
|