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


Joined: 15 Aug 2006
Posts: 14

PostPosted: Tue Aug 15, 2006 10:25 pm   

Stripping titles in a name.
 
Alright, so here's the deal.

On the mud i play, there are pre/post titles. For example, "Emperor Tah, The Demon Slayer"

The idea is to strip the pre/post titles down to the name alone for trigger use.

Example:

Emperor Tah, The Demon slayer tickles you.

For ease, I simply want to tickle Tah back, but a normal trigger won't work because there are hundres of titles like "Emperor" and "The Demon Slayer" that won't work as keywords. so i need to use simply "Tah"

Here is the code i had in place 7 months ago that no longer seems to work on a freshly installed copy of Zmud:


Code:
#VAR strip {%word( %word( "", 1, ","), %numwords( %word( "", 1, ",")))}


The idea behind this is to to make a trigger as follows:

Code:
#TRIGGER {(*) tickes you.} {tickle @strip("%1")}


Like i said, this code i no longer working for me, for some reason, but i'd be really curious to see if anyone has an idea on how to do it another way. I've gone over all of my settings and everything seems fine, yet it doesn't work anymore.
Reply with quote
shalimar
GURU


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

PostPosted: Tue Aug 15, 2006 10:50 pm   
 
#TR {^[%w%s](%w) tickles you} {tickle %1}
#TR {(%w),* tickles you} {tickle %1}

or, make a list of folks that you would like to autorespond to stored in @friends

#TR {({@friends})*tickles you} {tickle %1}
_________________
Discord: Shalimarwildcat
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Tue Aug 15, 2006 11:31 pm   
 
Change your #VAR strip to #FUNC strip also you have a typo and I am not looking for it see the link below.
You prolly got it from an import file and its a zmud problem with exported functions it exports them as #VAR strip {} instead of #VAR strip "" or #FUNC strip {}

Also made a quick post in the finished script forums about this.
http://forums.zuggsoft.com/phpbb/viewtopic.php?p=96504#96504
_________________
Zmud Support Library
Zmud Knowledge Base
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