parseing tells?

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

MvXciter
decaying skeleton
decaying skeleton
Posts: 3
Joined: Mon Oct 11, 2004 2:50 am

parseing tells?

Post by MvXciter » Sun Oct 24, 2004 3:04 am

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.

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Sun Oct 24, 2004 6:51 am

I suggest you read the fine manual. The section on custom events covers this quite well.

dman
a hill giant
a hill giant
Posts: 181
Joined: Fri Dec 05, 2003 12:54 pm

Post by dman » Sun Oct 24, 2004 7:52 am

or string.Arg[]

User avatar
Fluffy
a ghoul
a ghoul
Posts: 81
Joined: Sun Aug 22, 2004 5:08 pm

Re: parseing tells?

Post by Fluffy » Sun Oct 24, 2004 3:14 pm

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

MvXciter
decaying skeleton
decaying skeleton
Posts: 3
Joined: Mon Oct 11, 2004 2:50 am

parsing tells?

Post by MvXciter » Mon Oct 25, 2004 1:21 am

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.

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Re: parsing tells?

Post by Goofmester1 » Mon Oct 25, 2004 3:15 am

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.