a trigger to open doors

Scripts and support for your favorite MUD client.
watashi420
Sojourner
Posts: 28
Joined: Sat Dec 15, 2001 6:01 am
Location: Maine
Contact:

a trigger to open doors

Postby watashi420 » Thu Nov 04, 2010 3:33 pm

I currently have a trigger that uses a variable so the prompt that comes out as "open "name of door"", which doesn't really work very well because if there are more than one door with that name it just opens it in a n then e then s then west order, and i end up just having to type "open "name of door" "direction"" anyway. i was hoping that someone with more client experience could maybe help me add a "last command" into the trigger so it would do something like if i typed:


A Small Chamber
Exits: - North#
Corpse of Korir is lying here.
A heavy iron chest is here, its lid melted into slag.

< 401h/401H 120v/120V P: std > n
The door seems to be closed.
open door n

< 401h/401H 120v/120V P: std > Ok.

Like i said, it currently just types in "open door" and like i said that isn't the most helpful trigger, maybe there is a way to add a variable that is the last command or something? or maybe people have a better trigger set up? or maybe people just type! who knows, any effort is appreciated, tyvm

bizibobble / vipabbiple / jorivh / wizul
Gormal
Sojourner
Posts: 3917
Joined: Tue Feb 13, 2001 6:01 am
Location: A Whale's Vagina
Contact:

Re: a trigger to open doors

Postby Gormal » Thu Nov 04, 2010 3:49 pm

#ALIAS N {n;#var dir %1}
#ALIAS S {s;#var dir %1}
#ALIAS E {e;#var dir %1}
#ALIAS W {w;#var dir %1}
#ALIAS D {d;#var dir %1}
#ALIAS U {u;#var dir %1}

then add an @dir into your triggers. It won't work if you're spamming of course, but I can't think of a good way to do it other than this.
Disoputlip
Sojourner
Posts: 956
Joined: Thu Feb 21, 2002 6:01 am
Location: Copenhagen

Re: a trigger to open doors

Postby Disoputlip » Thu Nov 04, 2010 8:45 pm

I have it with %lastcom.

Code: Select all

#TRIGGER {The (%w) seems to be closed.} {open %1 %lastcom}


There is a small disadvantage with this when I have my rescue trigger on, but else it works perfectly for me.
watashi420
Sojourner
Posts: 28
Joined: Sat Dec 15, 2001 6:01 am
Location: Maine
Contact:

Re: a trigger to open doors

Postby watashi420 » Thu Nov 04, 2010 9:48 pm

thank you guys!

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 12 guests