Macro Help

WoW Discussion
Post Reply
User avatar
Nilaman
Almost 1337
Almost 1337
Posts: 795
Joined: July 3, 2002, 3:33 pm

Macro Help

Post by Nilaman »

I am trying to create a macro that will cast a spell and turn off all forms of attack. Scatter Shot stuns the target and any damage done to it will break the stun. So far I have:

/cast Scatter Shot - casts the spell
/script PetWait() - keeps my pet near the mob for when the spell breaks
/script PetPassiveMode() - turns my pet attack off
/script if IsCurrentAction(3,1) then CastSpellByName("Auto Shot"); end;
- I have it check another action bar that I don't use to see if auto shoot is turned on then turn it off.

For whatever reason, I can not figure out how to get it to check if auto attack (3,4 - if you need to know) is on and turn it off if it is. All I can get it to do is toggle between on or off.

Could anyone help me out a bit? Thank you.
Fairweather Pure
Super Poster!
Super Poster!
Posts: 8509
Joined: July 3, 2002, 1:06 pm
XBL Gamertag: SillyEskimo

Post by Fairweather Pure »

Seriously, WoW macros are not user friendly in the slightest. It's pretty sad really, since EQ1's were so simple. I hate seeing new games take a giant step backwards. It's probably my #1 complaint about the game.
cadalano
Way too much time!
Way too much time!
Posts: 1673
Joined: July 16, 2004, 11:02 am
Location: Royal Palm Beach, FL

Post by cadalano »

function over form.


EQ macro's were barely even worth it except as a toy. Whereas WoW scripts could probably wipe your ass for you if you have half a brain and put enough time into them. Giant step backwards my fuckin ass.
I TOLD YOU ID SHOOT! BUT YOU DIDNT BELIEVE ME! WHY DIDNT YOU BELIEVE ME?
User avatar
miir
Super Poster!
Super Poster!
Posts: 11501
Joined: July 3, 2002, 3:06 pm
XBL Gamertag: miir1
Location: Toronto
Contact:

Post by miir »

EQ1 macros were easy and effective but very rudimentary.

SWG macros were/are sick.
It was too easy to set up an unattended/looping macro to grind XP for you while you were at work.
I've got 99 problems and I'm not dealing with any of them - Lay-Z
User avatar
cid
Way too much time!
Way too much time!
Posts: 1098
Joined: August 28, 2002, 10:17 pm
Location: Lost in my avatar
Contact:

Post by cid »

Tumble macro for teh win!!
User avatar
Mr Bacon
Way too much time!
Way too much time!
Posts: 2108
Joined: September 27, 2002, 4:57 pm
Location: Down the street
Contact:

Post by Mr Bacon »

aehaheaeh /pizza macro.

wrong game!
miir and I are best friends. <3
User avatar
XunilTlatoani
Star Farmer
Star Farmer
Posts: 379
Joined: September 6, 2002, 2:37 pm
Location: Lakemoor, IL

Post by XunilTlatoani »

I don't know if there is a single built-in function that will tell you if you are in some form of auto-combat (melee, ranged, etc.). My guess is that you would need to write a lua event-handler (sans the UI component, unless you want to display the value) that maintains a global variable of your combat state that can be referenced from the macro. For example, there is a PLAYER_ENTER_COMBAT and PLAYER_LEAVE_COMBAT event pair, but I think that will only tell you when you start/stop melee auto-attack, not ranged.

Anyway, something similar has probably already been done, so your next best bet is to find a similar add-on/macro and yank their code ;)
Xunil Tlatoani - Gnome Arch Lich (Retired)
Keepers of the Elements

Tlatoani - Gnome Warlock
Light of Dawn (Lightbringer Server)
User avatar
masteen
Super Poster!
Super Poster!
Posts: 8197
Joined: July 3, 2002, 12:40 pm
Gender: Mangina
Location: Florida
Contact:

Post by masteen »

10 print "UR A NOOB!!!1!!!"
20 goto 10
"There is at least as much need to curb the cruel greed and arrogance of part of the world of capital, to curb the cruel greed and violence of part of the world of labor, as to check a cruel and unhealthy militarism in international relationships." -Theodore Roosevelt
User avatar
miir
Super Poster!
Super Poster!
Posts: 11501
Joined: July 3, 2002, 3:06 pm
XBL Gamertag: miir1
Location: Toronto
Contact:

Post by miir »

cid wrote:Tumble macro for teh win!!
Hehe...

When I gave it another go late last year, it was nearly impossible to find any non-bot entertainers. I played mostly entertainer in beta and early on so it was a bit depressing to a social profession like entertainer replaced by bots. :cry:

Haven't kept up with what's going on in SWG lately but I'd be curious to find out of they put the kibosh on recursive macros yet.
I've got 99 problems and I'm not dealing with any of them - Lay-Z
User avatar
Nilaman
Almost 1337
Almost 1337
Posts: 795
Joined: July 3, 2002, 3:33 pm

Post by Nilaman »

A friend helped me out with it.

/script if PlayerFrame.inCombat then AttackTarget()end

Wonder if I can make that work the same way for Auto Shot at some point. I have been trying to, but have not had much time.
User avatar
XunilTlatoani
Star Farmer
Star Farmer
Posts: 379
Joined: September 6, 2002, 2:37 pm
Location: Lakemoor, IL

Post by XunilTlatoani »

I was kinda right...just didn't know they already had a lua event handler for it :P

Code: Select all

if ( event == "PLAYER_ENTER_COMBAT" ) then
		this.inCombat = 1;
		PlayerFrame_UpdateStatus();
		return;
	end

	if ( event == "PLAYER_LEAVE_COMBAT" ) then
		this.inCombat = nil;
		PlayerFrame_UpdateStatus();
		return;
	end
Seems like auto-shoot is a whole different animal though, so you'll have to stick with your previous method of checking if it is active it seems.
Xunil Tlatoani - Gnome Arch Lich (Retired)
Keepers of the Elements

Tlatoani - Gnome Warlock
Light of Dawn (Lightbringer Server)
User avatar
Nilaman
Almost 1337
Almost 1337
Posts: 795
Joined: July 3, 2002, 3:33 pm

Post by Nilaman »

Well auto shot is counted as a spell. I see no reason why it can't be macro'ed.
Post Reply