|
mrkelley Beginner
Joined: 15 Aug 2006 Posts: 14
|
Posted: 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. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: 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 |
|
|
|
|
|
|
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
|
|