/cast # (name of target)

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Dantuss
decaying skeleton
decaying skeleton
Posts: 9
Joined: Sun Aug 03, 2003 3:21 pm

/cast # (name of target)

Post by Dantuss » Sun Aug 03, 2003 3:25 pm

could this command be added to the macroquest enhanced comands?

/cast # (name of target)

I do alot of buffing and currently i have to

/tr
to target the player then
/cast #

It would make my life so much easier to have this function added into the enhanced comands, so I only ever have to type one line of text to cast and target, this could probably come in handy for anyone that nukes aswell.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Mon Aug 04, 2003 6:33 am

This sounds like something that could be done with an alias, or at least a macro.

Code: Select all

/alias /buff /target $lasttell /if "$target(name,clean)"=="$lasttell" /cast "My buff spell"
Not sure if you can run those commands on one line though, but then you could do a macro like this:

Quickbuff.mac

Code: Select all

Sub Main
   /if "$p0"=="" /endmacro
   /if "$target(name,clean)"!="$lasttell" /endmacro
   /target $lasttell
   /if n $strlen("$p0")>1 {
      /cast "$p0"
   } else {
      /cast $int($p0)
   }
/return
Hotbutton: buff

Code: Select all

/macro quickbuff "Blessing of Reverence"
Or

Code: Select all

/macro quickbuff 1
I'm not sure if /alias's can work with $p(arameters), if it can you could even add an alias to execute the macro, so you could use commandline:

Code: Select all

/alias /buff /macro quickbuff $p0
Then you could buff simply by typing:

Code: Select all

/buff 1
Wich would target last person that sent tell, then cast what is in spellgem 1

Hell, you could even expand the macro to also send a tell to the target that the buff is inc, with how long it will be till it lands on the target etc.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Mon Aug 04, 2003 5:07 pm

Hmm. I just tested $lasttell variable and it seems to be appending some extra string to the playername that last sent a tell.

Anyone know of this will be fixed?

To begin withy it looked like the appended string was the same allways, so I tried to remove it by a simple $left(9,"$lasttell") but then I just had some other chars appended

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Mon Aug 04, 2003 5:22 pm

Okay. Investigated further..

Seems like $lasttell wants to be 13 chars long at the very least.

If I get a tell from a player that has a 13 char long name $lasttell will be correct. If I get a tell from from a player with less than 13 char long name, some chars will be appended the string. Haven't figured out if there are any order to the characters appended, and I need to test what it will do if a player with a name longer than 13 chars sends me a tell.

So far the closest thing you can do to use the $lasttell variable is to use:
/target $right(4,"$lasttell")
Since character names must be at least 4 chars long )at least I have never seen any lover than 4 chars). Problem here is if you have 2 players with identical first 4 chars in the same range.

You could perhaps give the /target command more restriction like

/target radius $spell($char(gem,$p0),range) $right(4,"$lasttell")

This however is untested by me ;)

Doodman
a ghoul
a ghoul
Posts: 124
Joined: Thu Jan 02, 2003 12:07 pm

Post by Doodman » Mon Aug 04, 2003 5:29 pm

Actually to accomplish what you first asked for, you don't even need $lasttell

A slight change to the code kagonis posted, if it is in buff.mac:

Code: Select all

Sub Main
   /if $strlen("$p1")>0 {
      /target $p1
   }
   /if n $strlen("$p0")>1 {
      /cast "$p0"
   } else {
      /cast $int($p0)
   }
/return
Then, to buff me do:

Code: Select all

/macro buff 8 doodman
To buff your current target:

Code: Select all

/macro buff 8
Take care,
Doodman

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Tue Aug 05, 2003 12:36 pm

Ya doodman, I know you can do it like that, but you need to type a lot more with your code, that was what I was trying to avoid by using the $lasttell ;)

Ie, make the macro then just when someone sends you a tell type /buff 1 to cast spell in gem 1 on that person.

Doodman
a ghoul
a ghoul
Posts: 124
Joined: Thu Jan 02, 2003 12:07 pm

Post by Doodman » Tue Aug 05, 2003 1:02 pm

Kagonis, yep, I understand what you were trying too accomplush. I was just commenting that that was not the original request, although using $lasttell is a nice feature as well.

Then, if $lastell is broken, a work around would be to use events to get the "Soandso tells you," like and parse off the persons name and do your own $lasttell type logic.

I don't use many macros that way, as to me they seem suspicious. If I would run a macro on, say, my druid on the box next to me. Why would I ever send myself a tell for a buff? Not that SOE would look for characters on related accounts sending tells to each other, but..

Again, I am just paranoid. Better to be paranoid then without my accounts IMHO.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Tue Aug 05, 2003 1:11 pm

Welll ya, if you just kept the macro running in the background it would be no problem catching the name with a #chat tell event.

Doodman
a ghoul
a ghoul
Posts: 124
Joined: Thu Jan 02, 2003 12:07 pm

Post by Doodman » Tue Aug 05, 2003 1:19 pm

Good point.

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Wed Aug 06, 2003 9:02 am

and what's wrong with the built-in EQ command /rtarget? */boggle*

/rtarget (shortened to /rt) targets the last person to send you a tell.