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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Fewyn
Wanderer


Joined: 27 Sep 2002
Posts: 83

PostPosted: Tue Oct 08, 2002 2:36 am   

help
 
I need something so if i see something like:
There is a strange distortion in space and time up ahead of you!
There is a strange distortion in space and time to the left of you!
There is a strange distortion in space and time to the right of you!
There is a strange distortion in space and time right behind you!

The first one I need it so I cant go fw or forward
The second I cant go left
third I cant go right
and the 4th one I cant go bw or backward


Thanks for your help.
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Tue Oct 08, 2002 3:53 am   
 
This may help:

#CLASS SpaceTime
#VAR InvalidDirs %null %null
#ALIAS move {#IF (%ismember("%1", @InvalidDirs) = 0) {"%1";#VAR InvalidDirs %null}}
#ALIAS fw {move fw}
#ALIAS forward {move forward}
#ALIAS bw {move bw}
#ALIAS backward {move backward}
#ALIAS right {move right}
#ALIAS left {move left}
#TRIGGER {There is a strange distortion in space and time up ahead of you!} {#ADDI InvalidDirs "fw";#ADDI InvalidDirs "forward"}
#TRIGGER {There is a strange distortion in space and time to the left of you!} {#ADDI InvalidDirs "left"}
#TRIGGER {There is a strange distortion in space and time to the right of you!} {#ADDI InvalidDirs "right"}
#TRIGGER {There is a strange distortion in space and time right behind you!} {#ADDI InvalidDirs "bw";#ADDI InvalidDirs "backward"}
#CLASS 0

Basically, when it encounters one of those distortions, it'll mark that direction as invalid and cancel any attempts to move that way.



 - Charbal
Reply with quote
Drevarr
Beginner


Joined: 19 Dec 2001
Posts: 17
Location: USA

PostPosted: Tue Oct 08, 2002 3:53 am   
 
Here is a method using the keypad, you could disable your current keypad class and enable testmove when you needed it. I use something close to this when I board a ship to sail. Hope this helps or sparks an idea.

#var ahead 1 {1}
#var behind 1 {1}
#var left 1 {1}
#var right 1 {1}
#key KEY8 {#if (@ahead) {clear;fw} {#show TIME SPACE DISTORTION AHEAD!!!}} testmove
#key KEY2 {#if (@behind) {clear;bw} {#show TIME SPACE DISTORTION BACKWARD!!!}} testmove
#key KEY6 {#if (@left) {clear;l} {#show TIME SPACE DISTORTION LEFT!!!}} testmove
#key KEY4 {#if (@right) {clear;r} {#show TIME SPACE DISTORTION RIGHT!!!}} testmove
#key KEY5 {clear;#show TestMove Cleared, select a direction or scan again.}
#alias {clear} {#var ahead 1;#var behind 1;#var left 1;#var right 1}
#trigger {^There is a strange distortion in space and time * (%w) of you!$} {#var %1 0} testmove
#trigger {^There is a strange distortion in space and time right (%w) you!$} {#var %1 0} testmove
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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