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


Joined: 11 Sep 2005
Posts: 124

PostPosted: Fri Dec 30, 2005 9:19 pm   

Rename (Or in other words, cast doesnt take the full target)
 
Some spells do take the whole mob's name when casting at them, but not this one i'm working with.
I want it to return the second 'word' in a multiple word string


Given a string "oldstyle ares", return the string "ares"
Given "oldstyle ali baba thief" return "ali"
Given "troll" return "troll"
basically looking to remove oldstyle when returning strings, and use more specific nouns in the case of other 2 word mobs (troll slave=slave) etc.
Thanks.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Dec 30, 2005 9:33 pm   
 
#HELP

#HELP %word
#HELP %if
#HELP %numwords

#FUNC 2ndword %if(%numwords("%1")>1,%word("%1",2),"%1")

#SAY @2ndword("Multi word string")
word
#SAY @2ndword("Multi")
multi
_________________
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