I was wondering how I could make it so that if I typed:
/me waves
it comes out as
JMT waves
I don't like the idea of making a seperate verb for this kinda thing though =\ can anyone help me out here? Pwease? ^_^
ID:167719
![]() Feb 6 2006, 10:28 am
|
|
So what you're saying is that you want to convert "/me" into the usr's name? Or do you want it to convert it to "JMT"?
|
copy the say proc, and name it me. if someone types /me the command line will do the me proc instead of say
|
By not making a seperate verb you mean you want to use say? If so, just use copytext to check the first few characters and then chop them off.
mob/verb/say(message as text) |
that is what i meant, thanks. i went with making a hidden verb called "me" though ^^;
sorry for the confusion everyone =\ |
copytext(msg,1,5) is gonna fail when the message is shorter than 4 characters. Best to find it like so:
if(findText(msg, "/me ", 1, 5) == 1) Lummox JR |
Lummox JR wrote:
copytext(msg,1,5) is gonna fail when the message is shorter than 4 characters. It doesn't fail. Rather, it just returns the entire string passed to it without modification. Therefor, my example still works fine. If it is less than 4 characters, then it is not "/me " with more text following and the 'prefix == "me"' part will be false and continue on to the normal version of say as appropriate. |
I learned something with this:
I changed my say and world-say verbs: mob/verb/ Now if I type "/emote a-splodes" it will print "*KirbyRules a-splodes*" instead of "KirbyRules says: a-splodes" |
Do it just like say.