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
Gwaer
Beginner


Joined: 23 Sep 2002
Posts: 12

PostPosted: Mon Sep 23, 2002 11:57 am   

Status bar-Room Exits
 
Ok Well heres the jist of my problem, i started playing this mud with Pueblo, and in my exploits i learned only how to navigate thru the look of the text, and the dynamic link exits pueblo has automatically, so i am trying to duplicate that as closely as possible, im looking to either have the exits that are not there every move dissapear...or to change to a different color, ie have North South East West NE SE SW NW Up Down there at all times and just change colors when an exit comes up, and possibly have a special exit on the end when i get to somewhere i need to enter ship, instead of just north south...

my mud looks like this on the exit line every time


The only obvious exit is out.
or
Obvious directions are:
west, east, north, south.

if someone could just get me started i could hopefully make new triggers for special exits that i use a lot for the last variable...i've read the entire forums looking for someone needing something like this...but i appear to be the only person with this handicap...also i have the new beta version 6.34

Thx in advance

Also, if there is a way to make them clickable, just for the heck of it sometimes i like to click the special ones instead of typing them out :) 'cause im just lazy like that....(pretty low priority just wondering if its possible)
Reply with quote
Gwaer
Beginner


Joined: 23 Sep 2002
Posts: 12

PostPosted: Mon Sep 23, 2002 3:39 pm   
 
I looked thru every topic i could find as well as doing searches on everything i could think of that might yeild the results i was looking for, got a headache from all the reading :) unfortunately i have to go to bed now (9:40am) i had another question when i started writing this post but i forgot it mid sentance....heh :) so i look foreward to your suggestions
Reply with quote
Gwaer
Beginner


Joined: 23 Sep 2002
Posts: 12

PostPosted: Tue Sep 24, 2002 2:05 am   
 
I've been thinking, and trying stuff to just even get the 1st part of this to work to actually set the directions to variables,

im making their default char32, and resetting them every time i move, and reloading them when the direction text comes up...but if i capture them as a string with Obvious directions are:$ (*) and then print them and set them to the status bar, it semi works, but there is no way customize it at all

so i am thinking maybe if i setup a loop command to read Obvious directions are: then on the next line it loops &{exit1}, &{exit2}, etc untill it gets to say &{exit5}.

and the exit period stops the loop...but i really have no idea im just theorizing right now....any input would be helpful....

i've been reading thru the help of zmud looking for any command that would make the status bar clickable, or anything of that nature...im new to this zmud language just looking for some help

thx
Reply with quote
Drevarr
Beginner


Joined: 19 Dec 2001
Posts: 17
Location: USA

PostPosted: Tue Sep 24, 2002 2:47 am   
 
Here is a clickable solution using buttons. Every time you get the exit line it will #unbutton the previous buttons and then create a new set of buttons based on the new list of exits.

Pattern:
Obvious directions are:$(*).

Commands:
#forall {@tempexits} {#unbutton (%i)}
#var AllExits {%1}
#var tempexits %replace( @AllExits, ", ", |)
#var NumExits %numitems( @tempexits)
#forall {@tempexits} {#BU %i {%i} {%i}}

You'll need to set up similar trigger for the "The only obvious exit out." line.

Should handle mutli word exits assuming all exits are followed by a comma with the exception of the last which is followed by a period.

Tested on 6.16
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Sep 24, 2002 2:54 am   
 
Have a look at Troubadour's script in the topic Making a compass. If it's not what you want, it should at least give you some ideas.

LightBulb
Senior Member
Reply with quote
Gwaer
Beginner


Joined: 23 Sep 2002
Posts: 12

PostPosted: Tue Sep 24, 2002 3:11 am   
 
As t othe button post, its a grand idea, i dont know if its something i am doing wrong though but when i push a button all i get is

History reference not found.

i'd rather have just plain text in the status bar i can click on, but beggers cant be choosers and i will take the button thing with all the gratitude in my heart :) if i can make it work

EDIT - Also i came across the compass post when i was 1st searching for a way to make this work, i tried to encorporate it into what i needed :( but i just couldnt im afraid *sigh* its amazing how he came up with it as well, just from a post like that :) *impressed*

thx for your replies thus far
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Sep 24, 2002 6:55 am   
 
Personally, I just use number pad keys. I find that easier than using a mouse anyway.

LightBulb
Senior Member
Reply with quote
Gwaer
Beginner


Joined: 23 Sep 2002
Posts: 12

PostPosted: Tue Sep 24, 2002 7:48 am   
 
Yea, im using the number keys, i guess i will just have to learn to renavigate my mud without them, i didnt use them all that much but i just subconsciously know where im going, and where i am when i see the way the exits change, i'll just deal i suppose :) thx for trying to help

er?
Reply with quote
Gwaer
Beginner


Joined: 23 Sep 2002
Posts: 12

PostPosted: Tue Sep 24, 2002 3:15 pm   
 
WoooHOOOOOO!

ok i have figured out how to make the status bar clickable

send "@exit1" "@exit1">@exit1</send
enclosed in less-than greater-than symbols, like html... if @exit1 is equal to north then the status area will make the text north, clickable and send north to the mud now i am new to the zmud language, and what i need to do now doesnt seem very hard, but i cant figure out how to do it, i will keep trying untill someone else beats me to the punch though :)

this is what i have so far thanks to Drevarr (*kneel*)
#var AllExits {%1}
#var tempexits %replace( @AllExits, ", ", |)
#var NumExits %numitems( @tempexits)

this gives me the number of exits numerical, and a string list of all the exits, so im thinking all i need to do is create something that sticks exit1 exit2 exit3, however many there are in the numexit var, copy it to the status area the number of times needed and voila...

this could be useful for so much more than directions as well...really happy about this...

anywho its 9:00am and i havnt slept all night i dont know if im even thinking straight i will read over it again when i wake up, in the mean time if anyone can make this work i will be very appreciative

thx in advance
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Sep 24, 2002 10:55 pm   
 
Wow I didn't know you could use MXP on the status bar, that is swift.

Here is your class with a whole script
#CLASS {ExitLinks}
#ALIAS ExitsDisp {Exits2="";#FORALL @Directions { #IF (%ismember(%lower(%i),%lower(@Exits))) {#DELNITEM Exits %ismember(%lower(%i),%lower(@Exits));#ADDITEM Exits2 %concat("<SEND ",%i," ",%i,"><COLOR #00FF00>",%i",</COLOR></SEND>")} { #ADDITEM Exits2 %concat("<SEND ",Unavailable," ",Unavailable,"><COLOR #FF0000>",%i",</COLOR></SEND>")}};#FORALL @Exits { #ADDITEM Exits2 %concat("<SEND ",%i," ",%i,"><COLOR #00FF00>",%i",</COLOR></SEND>")};ExitsD=@Exits2}
#VAR Exits {}
#VAR Exits2 {}
#VAR Directions {North|South|East|West|NE|SE|NW|SW|Up|Down}
#VAR ExitsD {}
#TRIGGER {^The only obvious exit is (%w).$} {Exits="%1";ExitsDisp}
#TRIGGER {^Obvious directions are:$(*).$} {Exits=%replace("%1",", ","|");ExitsDisp}
#ONINPUT {Unavailable} {#GAG}
#STAT {@ExitsD}
#CLASS 0
Reply with quote
Gwaer
Beginner


Joined: 23 Sep 2002
Posts: 12

PostPosted: Wed Sep 25, 2002 3:30 am   
 
*sigh* that doesnt work for several reasons...it just plain wont work, i think it may be a problem with the mxp expressions after the concat, im fiddeling with it to try and make it work...but secondly the gag command doesnt appear to work with the mxp in the status bar, filling my status bar with all kinds of unavailable mxp code nonesense *still messing with it tho*
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Sep 25, 2002 11:25 am   
 
What does the output look like in the status bar with the original script I put together? It worked when I tested it so it may just be a preference setting.
Reply with quote
Gwaer
Beginner


Joined: 23 Sep 2002
Posts: 12

PostPosted: Wed Sep 25, 2002 12:03 pm   
 
<SEND Unavailable Unavailable>COLOR #FF0000North",/COLOR/SEND"|<SEND South South>COLOR #00FF00South",/COLOR/SEND"|<SEND Unavailable Unavailable>COLOR #FF0000East",/COLOR/SEND"|<SEND Unavailable Unavailable>COLOR #FF0000West",/COLOR/SEND"|<SEND Unavailable Unavailable>COLOR #FF0000NE",/COLOR/SEND"|<SEND Unavailable Unavailable>COLOR #FF0000SE",/COLOR/SEND"|<SEND Unavailable Unavailable>COLOR #FF0000NW",/COLOR/SEND"|<SEND Unavailable Unavailable>COLOR #FF0000SW",/COLOR/SEND"|<SEND Unavailable Unavailable>COLOR #FF0000Up",/COLOR/SEND"|<SEND Unavailable Unavailable>COLOR #FF0000Down",/COLOR/SEND"



this is exactly what shows up in the status bar, none of it is gagged

er?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Sep 25, 2002 10:29 pm   
 
Seems like when you copied and pasted it at the commandline it created the alias incorectly. Try copying the script portion from my post into the alias within the settings editor.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Sep 26, 2002 11:48 am   
 
Since your still having problems try this.

Copy it into the ExitsDisp alias within the settings editor.

Exits2="";#FORALL @Directions { #IF (%ismember(%lower(%i),%lower(@Exits))) {#DELNITEM Exits %ismember(%lower(%i),%lower(@Exits));#ADDITEM Exits2 %concat("<SEND ",%i," ",%i,"><COLOR #00FF00>",%i",</COLOR></SEND>")} { #ADDITEM Exits2 %concat("<SEND ",Unavailable," ",Unavailable,"><COLOR #FF0000>",%i",</COLOR></SEND>")}};#FORALL @Exits { #ADDITEM Exits2 %concat("<SEND ",%i," ",%i,"><COLOR #00FF00>",%i",</COLOR></SEND>")};ExitsD=@Exits2
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Sep 27, 2002 2:54 am   
 
quote:

*sigh* that doesnt work for several reasons...it just plain wont work, i think it may be a problem with the mxp expressions after the concat, im fiddeling with it to try and make it work...but secondly the gag command doesnt appear to work with the mxp in the status bar, filling my status bar with all kinds of unavailable mxp code nonesense *still messing with it tho*



Check your preferences to see if the "Allow <> for expand" is turned on. If all the script is doing is sending a mass of text to the statusbar, and this option is turned on, chances are this is the culprit.

li'l shmoe of Dragon's Gate MUD
Reply with quote
Gwaer
Beginner


Joined: 23 Sep 2002
Posts: 12

PostPosted: Fri Sep 27, 2002 8:37 am   
 
Wooohooo Ok yea, when i unchecked the expand <> pref then i got the links in the status bar, but they are all red, and all trigger unavailable, which shows in the prompt...

however when i type unavailable it is gagged...so the trigger works its just not working when the button triggers it :(


this is exactly what shows up in my status bar now

north,|south,|east,|west,|northeast,|southeast,|northwest,|southwest,|up,|down,|out,|Obvious directions are,

i even color coded them exactly how they are, incidentaly all of them trigger unavailable except the last one which triggers obvious *shrug*
er?
Reply with quote
Gwaer
Beginner


Joined: 23 Sep 2002
Posts: 12

PostPosted: Fri Sep 27, 2002 8:56 am   
 
ok after some fiddeling with triggers i got it to make the exits variable the right thing

but now i get this, the beginning looks the same as the last post, with the red directions and then end is now green with all the available exits, but they all trigger the 1st exit... like so

<SEND Unavailable Unavailable><COLOR #FF0000>north,</COLOR></SEND>|<SEND Unavailable Unavailable><COLOR #FF0000>south,</COLOR></SEND>|<SEND Unavailable Unavailable><COLOR #FF0000>east,</COLOR></SEND>|<SEND Unavailable Unavailable><COLOR #FF0000>west,</COLOR></SEND>|<SEND Unavailable Unavailable><COLOR #FF0000>northeast,</COLOR></SEND>|<SEND Unavailable Unavailable><COLOR #FF0000>southeast,</COLOR></SEND>|<SEND Unavailable Unavailable><COLOR #FF0000>northwest,</COLOR></SEND>|<SEND Unavailable Unavailable><COLOR #FF0000>southwest,</COLOR></SEND>|<SEND Unavailable Unavailable><COLOR #FF0000>up,</COLOR></SEND>|<SEND Unavailable Unavailable><COLOR #FF0000>down,</COLOR></SEND>|<SEND Unavailable Unavailable><COLOR #FF0000>out,</COLOR></SEND>|<SEND north, east, south, west. north, east, south, west.><COLOR #00FF00>north, east, south, west.,</COLOR></SEND>



er?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Sep 27, 2002 11:43 am   
 
Grr, I was late for work when I made the other post yesterday and forgot to copy in the changes. I tested it with the Allow <> expand checked, so let me see If I can get the changes right again.

Exits2="";#FORALL @Directions { #IF (%ismember(%lower(%i),%lower(@Exits))) {#DELNITEM Exits %ismember(%lower(%i),%lower(@Exits));#ADDITEM Exits2 %concat(%char(34),"<SEND ",%i," ",%i,">~<COLOR #00FF00>",%i,"</COLOR>~</SEND>",%char(34))} { #ADDITEM Exits2 %concat(%char(34),"<SEND Unavailable Unavailable>~<COLOR #FF0000>",%i,"</COLOR>~</SEND>",%char(34))}};#FORALL @Exits { #ADDITEM Exits2 %concat(%char(34),"<SEND ",%i," ",%i,">~<COLOR #00FF00>",%i,"</COLOR>~</SEND>")};ExitsD=@Exits2

Now I see you will also have to change the Directions variable to have the diagonals fully written out instead of abbrieviated like NW.

As for the Unavailable trigger is was meant to stop anything being sent to the mud if you clicked on a red link. Try using a blank alias instead.
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