Self buff macro?

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

Moderator: MacroQuest Developers

Pyro_dmod
decaying skeleton
decaying skeleton
Posts: 1
Joined: Tue Sep 18, 2012 4:15 pm

Self buff macro?

Post by Pyro_dmod » Tue Sep 18, 2012 4:33 pm

I've checked the Wiki, and did a search, but TBH I have no idea what search terms I would have used to figure out this problem... So please forgive me if this is already addressed in another post. Also I am rather new to making macros so its probably a newb problem.

Code: Select all

Sub Main
	/tar myname
          ${If[${Me.Buff[Perfected Dead Man Floating]},,/aa act perfected dead man floating /delay 4s]}
	  /memspellset Shadowside
	  /delay 5s
	  /cast 12
	  /delay 3s
	  /cast item "Mask of the Beasts"
	  /delay 1s
	  /cast item "Worker's waistbelt"
	  /delay 1s
	  /cast item "vyers' engraved ring"
	  /delay 1s
	  /cast item "Ritual blade of the Tides"
	  

/return
I just want it to check and see if I have Perfected DMF, if I do not, cast it. If I do have DMF on move to the next line.
Any tips on what is causing this to fail, or how I can do this easier?

EDIT: I found out how to do it, took me awhile...

Code: Select all

Sub Main
	
	/tar myname
    /if (${Me.Buff[Perfected Dead Man Floating].ID}) {
		/call :second
	}
	/aa act Perfected Dead Man Floating
	  /delay 4s
	  /memspellset Shadowside
	  /delay 5s
	  /cast 12
	  /delay 3s
	  /cast item "Mask of the Beasts"
	  /delay 1s
	  /cast item "Worker's waistbelt"
	  /delay 1s
	  /cast item "vyers' engraved ring"
	  /delay 1s
	  /cast item "Ritual blade of the Tides"
		/endmacro
	  /return

	Sub :Second

	  /delay 2s
	  /memspellset Shadowside
	  /delay 5s
	  /cast 12
	  /delay 3s
	  /cast item "Mask of the Beasts"
	  /delay 1s
	  /cast item "Worker's waistbelt"
	  /delay 1s
	  /cast item "vyers' engraved ring"
	  /delay 1s
	  /cast item "Ritual blade of the Tides"
	  /endmacro
/return

/return
Though, if anyone has a easier method. I'll be interested in learning anything new! :D

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: Self buff macro?

Post by dewey2461 » Wed Sep 19, 2012 8:36 am

This is probably the easiest way to do things.

If ( No - Spell buff ) then
Cast Spell
End if

becomes

/if ( !${Me.Buff[Perfected Dead Man Floating].ID) {
/cast 1
}

The tricky parts to this are checking to see if the buff is in the buff window or song window and checking the correct place.

And then casting the buff using the right spell, item, AA, disc.

I don't have time to write much at the moment but will try and write something after work.

TMS
a hill giant
a hill giant
Posts: 151
Joined: Sun Nov 07, 2004 6:55 am

Re: Self buff macro?

Post by TMS » Wed Sep 19, 2012 2:56 pm

In the VIP Section is an selfbuff macro.

viewtopic.php?f=49&t=18466

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: Self buff macro?

Post by dewey2461 » Wed Sep 19, 2012 7:58 pm

Good call. Code reuse and promote VIP membership.