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


Joined: 19 May 2006
Posts: 1

PostPosted: Fri May 19, 2006 10:23 pm   

Need help with capture for strings!
 
Hi gents,

Ok I need help capturing info to a string, then storing only the last two words. example

In Gemstone IV, I receive the following room info:

Its crooked branches reaching upward toward the sunlit sky, a gnarled old oak tree stands at the edge of the gently sloping hill. You also see a raider orc, a gold filigree pink topaz neckchain and a metal breastplate.

I want to store everything after "you also see" but only the last two words, such as "raider orc" and "topaz neckchain" notice the full description for the neckchain is "gold filigree pink topaz neckchain". GSIV doesnt accept that same description if I try something like "STOW MY gold filigree pink topaz neckchain", it'll only accept "STOW MY topaz neckchain". It's driving me nuts!

I don't know how to capture multiple word items, or how to retrive them as only 2 word items. Could someone help me out?

Thanks,

-Jon
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Sat May 20, 2006 2:53 am   
 
This is a bit more complex then something I can just toss a script out for. The first thing is to capture all the text, you should be able to find many examples of that in these forums. Next you want to parse out individual items. Again such things can be found in the forums. Finally is the words issue, one or more of the words in the description is likely able to be used to address that specific item; again scripts that are capable of doing the required loop can be found in these forums. I would say taking the time to search the forums will help you in the long run, I can write up yet another solution if you are still in need in a day or so, but it will likely be more complex then your understanding of zScript. If it doesn't perfectly fit your needs I am not about to spend days bouncing back and forth to make it perfect for you. So please consider exactly what you want to happen and just how many things you want the script to be sensitive to.

I am not trying to discourage you from posting further, I am just asking that you as a first time poster use the search feature. If nothing else post a full capture of your MUD text from prompt to prompt, including text before the command you sent and text after the prompt you would want further commands issued on. This will allow all of us to come up with a likely trigger solution that is specifically tailored to your MUD.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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