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
RobMacAF
Apprentice


Joined: 09 Jun 2002
Posts: 186
Location: USA

PostPosted: Thu Dec 04, 2003 1:14 am   

MXP and SUB
 
Ok, I want to be able to type look and make the things I see into links that will send the look command to them when I click on it...

This is the trigger and such

You also see a pile of rusty nails, a shadowling, an Empath donation shelf with some stuff on it, a bucket of viscous gloop, some smoothly worked stairs of golden oak, and an Empath renown scroll.

Now, I have a normal trigger that fires on You also see that starts a class, This is the class script

#CLASS {Main|Look} {enable}
#TRIGGER {({a|an|some}) (*){,|.}} {#SUB {~<send ~"look %2~" ~"Right-click for options|Fresh|Scar|Internal|Internal Scar~"~>%1 %2~</send~>}}
#TRIGGER {.} {#T- {Main|Look}}
#CLASS 0


What it SHOULD do is make every one into a link that will look at that object when I click on it but instead it turns the You also see line into one large link.... Any help would be great

That period trigger is to close the class when it hits the period
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Dec 04, 2003 1:20 am   
 
You are going to have to do this another way. The problem is that the * is greedy, so it will match everything until the period and then the period matches. What you will need to do is to first store the line into a variable, and then process it to insert the SEND's where they should go. The best way would be to convert it into a stringlist by replacing the commans with | and then work on each item in the list.
Reply with quote
RobMacAF
Apprentice


Joined: 09 Jun 2002
Posts: 186
Location: USA

PostPosted: Thu Dec 04, 2003 2:15 am   
 
Ok, Might you give me some examples, Stringlists are one thing I have barely used at all. Maybe I should start using them more
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4686
Location: Pensacola, FL, USA

PostPosted: Fri Dec 05, 2003 7:13 pm   
 
Not too long ago arrays were discused for purposes similar to this, check this topic:
http://www.zuggsoft.com/forum/topic.asp?TOPIC_ID=13818
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