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
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Mon Jan 13, 2003 7:46 pm   

Complex Room script help
 
I am tring to figure out a script to place in my shops that does this:

sends command list then captures everything and makes it into a #yesno list.

This is what my command would look like:
309hp 124m>340mv 222wt 350mxwt 661378ex>list
[Lv Price] Item
[19 8593] A fine handaxe.
[11 160] A meat cleaver.
[ 9 52] A pitchfork.
[ 0 106] A small birch chest.

309hp 124m>340mv 222wt 350mxwt 661378ex>
Also the list must be expandable beacause there is sometime a great deal to be sold and sometimes only one thing.
I am not sure if there is a way but I would greatly like anyones help.

megamog75
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Jan 14, 2003 2:13 am   
 
How would the script decide which one is the keyword used to buy the item?

Kjata
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Tue Jan 14, 2003 2:55 am   
 
My mud lets me do "buy 1." to buy the first item, "buy 2." to buy the second, etc...

if your mud lets you do something like this, it's a fairly easy script, otherwise, Kjata's right, you'll have to figure a fool-proof way to determine a keyword, otherwise you might "buy book" and get the "Picture book of lewd acts" instead of "The book of divine inspiration, with complete steps to becoming immortal"
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Jan 14, 2003 3:13 am   
 
The problem not only arises when multiple items have the same keyword, but with all items. For example, how is zMUD to know that for the first item in the sample provided the keyword is the third word, "handaxe" (this might not be true, but it is just to illustrate my point), while in the third item the keyword is the second word, "pitchfork". You might then say, well it is the last word that should be used. However, each area writer decides what the keywords are for each item and they do not always use the last word of the short description. I've even come across some items that do not have the keyword anywhere in the short description.

Kjata
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Tue Jan 14, 2003 3:55 am   
 
Ok maybe the yesno wasn't the way to go but I did come up with this:

#TRIGGER {^~[(%D)(%S)(%D)~](*)} {#gag
#mxp Do you wish to buy this<send "buy '%4'" "buy"> %4</send>?}
this will show as aproblem when you save but it works just fine.

It replaces all the [23 23]item with an option to buy by clicking the link.
this is the sample I posted mine is actually alittle bit different as i had to fix it to mach my perticular mud.

I still need away to capture the list and add it to the room discription so I can see what is in the shop before I choose to go or not, anyone have any ideas on that?

megamog75
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Tue Jan 14, 2003 7:19 pm   
 
Everyone was right ofcorse how does the zmud know what the keyword is? I have thought about making a database to help with that but as said each area would be different key words so I will tool around with this for awhile and see if I can come up with something.

megamog75
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