 |
b0urgeoisie Newbie
Joined: 04 Nov 2003 Posts: 2
|
Posted: Sat Jan 10, 2004 11:49 pm
Unlocking coded doors with triggers |
Alright, I play on a mud that allows you to assign codes to doors in order to lock/unlock them. I'm trying to make a code cracking system of triggers that would probably start with a button that did "unlock south 1000", and then triggers would add integers of 1 until the code is correct. After looking for a little over an hour I've reached a point where I'm -completely- stumped and would -greatly- appreciate any help.
Thanks. |
|
|
|
 |
Danlo Magician

Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Sun Jan 11, 2004 12:27 am |
Assuming you have some sort of message when you fail or succeed cracking, then you would need 2 triggers:
#trigger {You succeed in cracking the door!} {#var crackcount 0}
#trigger {The code is wrong. You failed to crack the door} {#add crackcount 1;unlock @dir @crackcount}
#alias crackdoor {#add crackcount 1;unlock %1 @crackcount} |
|
|
|
 |
b0urgeoisie Newbie
Joined: 04 Nov 2003 Posts: 2
|
Posted: Sun Jan 11, 2004 1:02 am |
Awesome, thanks a ton for the help, I had no idea about the #add command. After screwing around with you offered I managed to break it down into two triggers looking like this:
#trigger {unlock (%*) (%*)}{#va dir %1;#va crackcount %2}
#trigger {The keypad display flicks on: 'Invalid access code'}{#add crackcount 1;unlock @dir @crackcount}
Again, I greatly appreciate the help
-Ian |
|
|
|
 |
Danlo Magician

Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Sun Jan 11, 2004 1:33 am |
Change that first trigger to:
#trigger {unlock (%w) (%d)}{#va dir %1;#va crackcount %2}
Iirc, its dangerous to use %* because it allows others to operate commands on your zmud. |
|
|
|
 |
|
|
|