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
DarkEdge
Newbie


Joined: 17 Oct 2003
Posts: 4
Location: USA

PostPosted: Fri Oct 17, 2003 11:39 pm   

#Pick command and its capabilities
 
In the essence of attempting to make olc easier, I'm trying to develope a simple interface that can offer options to choose, store in an alias, and then later be command'd in by the use of an alias (or at the same time as option is selected).

So far, this one works great:
#PICK {p:Choose your sector type ...} {o:1} {Mountain:sector=mountain} {Hills:sector=hills}

But here's where i'm having most my difficulty... multiple options... say room flags where I want to choose three, and then say, have all three stored in that variable, even if its basically #var roomflags {dark;indoors;safe}

The second problem is I'd like to set up where I can get prompted to enter in my own text for a variable via a popup window... such as a window that says: Input your room description, then the ability to do so, click okay, and have it store that paragraph or line of text into a single variable... any of this possible? or where can I look to find more options of the #pick command? No luck so far...

DarkEdge
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 18, 2003 1:23 am   
 
If you want to allow multiple options, don't include o:1.
#VAR sector "";#PICK {p:Choose your sector type ...} {Mountain:#ADDI sector mountain} {Hills:#ADDI sector hills}
or
#VAR sector %pick( "p:Choose your sector type ...", "mountain", "hills")

For prompting, use the appropriately named command or function.
#PROMPT description "Enter the room description"
or
#VAR description %prompt( "", "Enter the room description")
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Oct 18, 2003 6:04 pm   
 
o:x can be set to a non-zero positive number as well, which will limit the multiple selections to that number. Works great if you can only pick y options but have y+x available to choose from.
Reply with quote
DarkEdge
Newbie


Joined: 17 Oct 2003
Posts: 4
Location: USA

PostPosted: Mon Oct 20, 2003 4:59 am   
 
That %pick works wonderfully, but I haven't used the listing for variables too much... when I attempt to use an alias to input what's stored in @sector I get:

mountains|hills

due to the listing... there any possible way for it to list one at a time, or ; instead of |?

Thank you in advance!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Oct 20, 2003 6:35 am   
 
There are many commands and functions for working with lists.
#AL sector {#FORALL @sector {%i}}
Reply with quote
DarkEdge
Newbie


Joined: 17 Oct 2003
Posts: 4
Location: USA

PostPosted: Mon Oct 20, 2003 8:34 pm   
 
Last time I should be asking for help on this subject (I hope). Its not a huge problem, but a minor annoyance... using #VAR description %prompt( "", "Enter the room description") or #prompt description "Enter description" it only seems to allocate me so many characters... So while I may type in a moderately sized paragraph, when I go to input that information from the description variable, I see that it ended up getting cut off. Any possible means to bypass this limit?

While I'm posting, I may as well ask of your opinion lightbulb, in making it a well ran script... currently its running sufficient enough for me.. I mainly use an alias start, that goes through the different prompt choices to create the variables and store that information... after that's all done I have another alias, finished, that basically outputs all of the stored information with #WA to not spam my screen. Didn't bother trying to do anything with if arguments... and I'm wondering what would be the best type of script for actually doing an automated room building.

So you could enter store a vnum for startroom, and basically have it dig directions and automatically add one digit to that vnum. Thank you for all the advice and help :)

DarkEdge
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Oct 20, 2003 11:15 pm   
 
If it's cutting off your variable at a set length, you can use a while loop with a #YESNO command and enter descriptions one or two sentences at a time. Since this is bound to be a bit cumbersome, you might want to use the status window or a child window to keep you updated after each iteration.
Reply with quote
DarkEdge
Newbie


Joined: 17 Oct 2003
Posts: 4
Location: USA

PostPosted: Tue Oct 21, 2003 2:03 am   
 
I like the loop idea, especially with working with #YESNO... essentially instead of just typing in finished (finished is my alias to input all the info that has been stored in the said variables) and having it go through all the variable info... I'd rather it be: I type finish and one last prompt comes up that gives me the option for which variables to include.

A slight example would be as follows:
Finished
Prompt window: Select modifications ...
default: all
roomname
roomdescription
northdesc
southdesc
eastdesc
westdesc
downdesc
updesc
sector
roomflag

I dunno... haven't quite thought it all through on how I would script that... essentially it would make the final output more concise. As far as setting up the #loop for inputting a line at a time... not positive how I'd corrilate it all.. heh :)

DarkEdge
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Tue Oct 21, 2003 5:32 pm   
 
Your prompt problem seems to not be effectiong me, i took everything you had up in your posts and put it into my promt and cought it, except where the "ENTER's" where at. Check your paragraphs to see if it is the same for you.

If so use an alias to do the work of the prompt like so:
#alias new {#prompt new "add it here";#var new %replace(@new,"*","|");#forall @new {#show %i}}

or something like that Should do the trick, but untested because I did not have an example paragraph to work with.
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