Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Sun Sep 24, 2006 5:33 am   

[1.07] Last Input?
 
#echo %lastinput

shows
#echo %lastinput

#echo %lastinput2

shows
%lastinput2

#echo %lastin2

shows
#echo %lastin2

%lastcom shows the last thing i entered into the command line ><

im confused.

What im trying to do is a simple auto opener.

This is the script i used originally
Code:

#CLASS {MMSystem|Force Opener}
#TRIGGER {The (*) is closed.} {
#IF (%lastcom=s) {lastdir = south} {#if (%lastcom=n) {lastdir = north} {#if (%lastcom=e) {lastdir = east} {#if (%lastcom=w) {lastdir = west} {#if %lastcom=ne) {lastdir = northeast} {#if (%lastcom=nw) {lastdir = northwest} {#if (%lastcom=se) {lastdir = southeast} {#if (%lastcom=sw) {lastdir = southwest} {#if (%lastcom=d) {lastdir = down} {#if (%lastcom=u) {lastdir = up} {}}}}}}}}}} {}
open @lastdir
}
#TRIGGER {It's locked.} {
#IF (%lastcom=s) {lastdir = south} {#if (%lastcom=n) {lastdir = north} {#if (%lastcom=e) {lastdir = east} {#if (%lastcom=w) {lastdir = west} {#if %lastcom=ne) {lastdir = northeast} {#if (%lastcom=nw) {lastdir = northwest} {#if (%lastcom=se) {lastdir = southeast} {#if (%lastcom=sw) {lastdir = southwest} {#if (%lastcom=d) {lastdir = down} {#if (%lastcom=u) {lastdir = up} {}}}}}}}}}} {}
unlock @lastdir
bash @lastdir
}
#TRIGGER {The (*) are closed.} {
#IF (%lastcom=s) {lastdir = south} {#if (%lastcom=n) {lastdir = north} {#if (%lastcom=e) {lastdir = east} {#if (%lastcom=w) {lastdir = west} {#if %lastcom=ne) {lastdir = northeast} {#if (%lastcom=nw) {lastdir = northwest} {#if (%lastcom=se) {lastdir = southeast} {#if (%lastcom=sw) {lastdir = southwest} {#if (%lastcom=d) {lastdir = down} {#if (%lastcom=u) {lastdir = up} {}}}}}}}}}} {}
open @lastdir
}
#TRIGGER {A strange force blocks your passage.} {
#IF (%lastcom=s) {lastdir = south} {#if (%lastcom=n) {lastdir = north} {#if (%lastcom=e) {lastdir = east} {#if (%lastcom=w) {lastdir = west} {#if %lastcom=ne) {lastdir = northeast} {#if (%lastcom=nw) {lastdir = northwest} {#if (%lastcom=se) {lastdir = southeast} {#if (%lastcom=sw) {lastdir = southwest} {#if (%lastcom=d) {lastdir = down} {#if (%lastcom=u) {lastdir = up} {}}}}}}}}}} {}
open @lastdir
}
#CLASS 0


I streamlined this into
Code:

#CLASS {MMSystem|Force Opener}
#ONINPUT {^(%t)$} {#VARIABLE lastDir %1} "" {notrig}
#TRIGGER {The (*) {is|are} closed.} {open @lastdir}
#TRIGGER {It's locked.} {unlock @lastdir;bash @lastdir}
#TRIGGER {A strange force blocks your passage.} {open @lastdir}
#CLASS 0


Yet neither work at all. So needless to say im really confused now.
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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