Attempting to make a noobie macro that will help me /assist

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

Moderator: MacroQuest Developers

stilltryn
decaying skeleton
decaying skeleton
Posts: 2
Joined: Thu Jun 10, 2004 3:52 am

Attempting to make a noobie macro that will help me /assist

Post by stilltryn » Thu Jun 10, 2004 4:16 am

My newbie roommate just started playing a warrior in EQ a couple months ago, and I've been spending some time playing with him helping him get past his teen levels.
I've been trying to make a little macro that will help me make sure he doesn't get himself in over his head when he tries to hunt and gets a little too brave. He doesn't like if I load up an autoheal bot, but he doesn't mind if I leave my druid near him on the other computer while I am on raids or grinding.

I'm wanting to make something that I can run on my druid while he plays that will send my main tells and tell me what he's getting ready to attack next. Something along the lines of "Peewee tells you, 'His target is a Dervish Thug'" "Peewee tells you, "He lost his target'" "Peewee tells you, 'His target is A Sand Mummy'" "Peewee tells you, 'He lost his target'" "Peewee tells you, 'His target is Dorn B'Dynn'"

but i am far from being a blackbelt programmer.

I have come up with

/target Myroomie
/assist
if target == 'Myroomie' /return
/tell Jimmy "his target is %t"
/return

Now, the main problem with that is, although it won't send a tell until he actually aquires a target, if he DOES target something, it'll superspam me with that %t in tells.

I guess here i need to setup some kind of "%t becomes targetvariable1", and add a 'if %t == targetvariable1, then /return until %t is either 'Myroomie' (meaning it died and he has no target, where i can set it to /tell Jimmy "He lost his target", or, if %t is NOT == targetvarible1, then mention his NEW target, or... well, that's where I start to get a bit overwhelmed.

I realize that some of the really nice macros like Genbot have all this incorporated into their targetting engines, but, it starts with 52 /call AddCommand lines which branch out into a paragraphs of string variables, followed by 41 declarations, and then i just lose it and walk to the fridge and grab a beer and sit back down again just to become confused more.

I've been checking out the manual, and all the commands themselves seem completely intuitive. I now understand length$'s all the click commands, and starting to understand the /for and a little bit of the /if stuff, but, the declarations and scopes are completely greek to me. I think mainly because all the examples used to explain them use more programming syntax I am not familiar with to start with :?

Anyone know of a nice little primer on simple things like arrays? I'd love to be able to actually make some helpful macros, but, if I don't understand the basic scripting concepts, I wont be able to make anything more than a '/click combine; /click autoinventory' script.

Thanks in advance, it's never easy to admit you don't know how to do something when you feel you're not stupid, but, it felt good explaining what I was trying to do without sounding like an idiot (i hope!).

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

warnme.mac

Post by grimjack » Thu Jun 10, 2004 5:13 am

I can't test it but it should work barring a typo.

Code: Select all

|warnme.mac
|Usage: Target the person to babysit and run:
|/macro warnme.mac <person to warn>
|Should warn one time per new target.

Sub Main
   /declare watchid int outer
   /declare watchname string outer
   /declare lastid int outer
   /declare master string outer
   /if (!${Defined[Param0]) { 
      /echo Usage: Target person to watch and /macro warnme.mac <person to warn>
      /endmacro 
   }
   /varset master ${Param0}
   /varset watchid ${Target.ID}
   /varset watchname ${Target.CleanName}
   :assistloop
   /assist 
   /delay 1s
   /if (${Target.ID}==${watchid}) /goto :assistloop
   /if (${lastid}!=${Target.ID}) /tell ${master} ${watchname} has targeted ${Target.CleanName}.
   /varset lastid ${Target.ID}
   :targetwatched
   /target ${watchname}
   /delay 1s
   /if (${Target.ID}!=${watchid}) /goto :targetwatched
   /goto :assistloop
/return
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

Oid
a snow griffon
a snow griffon
Posts: 416
Joined: Thu Oct 17, 2002 3:26 am
Contact:

Post by Oid » Thu Jun 10, 2004 3:28 pm

nice nice.
Smokey the Lax says only you can prevent reproduction.

stilltryn
decaying skeleton
decaying skeleton
Posts: 2
Joined: Thu Jun 10, 2004 3:52 am

Post by stilltryn » Thu Jun 10, 2004 11:18 pm

That's totally awesome Grim, thanks so much for reading through the long message and actually putting that together.

I hope the next time you get a flat tire the hooter's van just happens to be driving behind you on their way back from a mud volleyball game!