PDA

View Full Version : Macro help


EberKain
11-28-2004, 02:43 AM
I would like to make a macro that can use two attacks,

/cast Roposte

if the target has a weapon, and

/cast Sinister Strike

in all other cases.

sarf
11-28-2004, 12:22 PM
I don't think there's any way to detect if the target has a weapon...

Sarf
---
Never hit a man with glasses. Hit him with a baseball bat.

EberKain
11-28-2004, 03:17 PM
The problem is that Ribpose becomes avaliable whenever I parry, but it can only be used in on mobs that are holding weapons. If I make the macro

/cast Riposte
/cast Sinister Strike

Then it hangs whenever the Ripsote command is avaliable but the target dosent have a weapon, and it prevents me from casting sinister strike because of a slight global cooldown even though the skill wasnt actually used.

If I flip the macro around, then it works, but I would perfer it to cast Riposte first because Riposte has a faster cooldown and is cheaper on my power points.

sarf
11-28-2004, 03:24 PM
But how would you tell that a mob has a weapon?

Sarf
---
The nice thing about standards is that you have so many to choose from

EberKain
11-28-2004, 09:59 PM
Thats why its titled help, i have no clue.

Can you think of any way to do what I want?

sarf
11-28-2004, 10:36 PM
Actually, I could think of two main ways:

1. Database (remembering what mobs have weapons)
2. Trial and error
3. Both

Method that I'd use:

1. Check if mob is in "creeps that I know stuff about" list.
1.a. If so, are they "riposte:able" ?
1.a.a. If so, do the Riposte.
1.a.b. If not, then do other stuff.
1.b. If the mob is not in the "creeps that I know stuff about", use Riposte.
1.b.1. Note whether riposte fails or succeeds (but only if it hits... it can miss, can't it?).

Sarf
---
Linux: Because rebooting is for adding new hardware.

Munson
11-28-2004, 10:53 PM
/script if( CastSpellByName("Riposte") ) then
/script else CastSpellByName("Sinister strike"); end

Would this solve the problem, or doesnt CastSpellByName() return false on error?

sarf
11-28-2004, 11:19 PM
Correct. AFAIK, CastSpellByName returns nothing.

You have to be on the lookout for an error message.

Sarf
---
Do not disturb me. I'm disturbed enough already.