Page 1 of 1
parseing tells?
Posted: Sun Oct 24, 2004 3:04 am
by MvXciter
Is there a way to parse tells, Like (1) tells you, '(2) (3) (4)' so that the #'s get parsed in that order using say a space as a delm? I've searched and found macros that use tells but so far I havent gotten anything to work. The only thing I got to work was picking the sender, and then all of what was in the tell.
I eventualy want to make a macro that is dependant on those prams. Any help would be most welcomed.
PS will come back and edit for spelling when I'm not brain dead.
Posted: Sun Oct 24, 2004 6:51 am
by Cr4zyb4rd
I suggest you read the fine manual. The section on custom events covers this quite well.
Posted: Sun Oct 24, 2004 7:52 am
by dman
or string.Arg[]
Re: parseing tells?
Posted: Sun Oct 24, 2004 3:14 pm
by Fluffy
MvXciter wrote:Is there a way to parse tells, Like (1) tells you, '(2) (3) (4)' so that the #'s get parsed in that order using say a space as a delm? I've searched and found macros that use tells but so far I havent gotten anything to work. The only thing I got to work was picking the sender, and then all of what was in the tell.
I eventualy want to make a macro that is dependant on those prams. Any help would be most welcomed.
PS will come back and edit for spelling when I'm not brain dead.
Well you are right in what you are thinking here.. Lets check it out
Code: Select all
#event Dotell "#1# tells you, '#2# #3# #4#'"
Sub Event_Dotell(string line, string argone, string argtwo, string argthree, string argfour)
/echo "${argone} sent me a tell"
/return
or
Code: Select all
#event Dotell "#1# tells you, '#*#'"
Sub Event_Dotell(string line, string teller)
/declare anarg string local
/declare x int local
/for x 1 to 4
/varset anarg ${line.Arg[${x}," "]}
/echo "${teller} told me ARG ${x}: ${anarg}"
/next x
/return
parsing tells?
Posted: Mon Oct 25, 2004 1:21 am
by MvXciter
Thanks Fluffy,
This will finally give me some kind of error check so I can stop crashing my client every time I do something it wasn’t expecting.
This is a hard language to grasp without some guidance and practice. It’s kind of like going from Linux scripting, to BAT files.
Thank you again.
Re: parsing tells?
Posted: Mon Oct 25, 2004 3:15 am
by Goofmester1
MvXciter wrote:
This is a hard language to grasp without some guidance and practice. It’s kind of like going from Linux scripting, to BAT files.
Thank you again.
Fortunatly this language has a great set for guidance if you look around.
http://macroquest2.com/includes/wassup/manual.php is a good start and then reading through search results shows alot. Then if you still dont understand it a clear and thoughtful help post will get you the help. Normally the help post that gets the most help have a clear question and an example of the code they tried.