Unofficial World of Warcraft Forums  
Please respect other members. Please do not post links or information about hacking/warez/cheats.
Read the rules of these forums as we rarely warn before banning. Lost or need RSS check the forum map.

Quick Site Nav
Navigation
Worldofwar.Net
WoW Forums
WoWDigger WoW Database
Articles
Community Blogs
WoW Info
Wrath of the Lich King Info
Primary Professions
Secondary Professions
Maps
Classes
PvP
A-Z Index
Guides
Submit Guides
List Guides
UI/Mods
Latest Mods
Submit Mod
List Macros
Submit Macro
Media Gallery
Gallery Home
Upload Pics
Community WoW Shots
Community BC Shots
Player Pics
Official WoW Shots
Official BC Shots


Donate and get extra forum perks
Support WoW:IncGamers

Go Back   Unofficial World of Warcraft Forums > WoW Community Forums > UI Customisation > UI/Mod Developer Forum

Reply
 
Thread Tools Display Modes
Old 11-05-2006, 05:48 PM   #1
Granom
WoW: IncGamers Member
 
Join Date: Jun 2005
Location: USA
Posts: 581
CastSpellByName returns?

I've figured out that CastSpellByName returns some value that can be used like a boolean to determine whether the spell cast was successful or not, but I have a case where it seems more complicated than that.

In a macro I have something like...

if not CastSpellByName("Shred") then CastSpellByName("Claw") end

The intent here is to shred if I'm behind the target and have enough energy, else cast claw. It seems to work so long as I have less than 60 energy (the amount required for shred), whether I'm in front or behind the target, the macro casts claw. However, if I have 60 or more energy and am in front of the target, I get an failure message--something like "Must be behind the target"--and claw does not get cast.

So it seems that CastSpellByName("Shred") fails if I don't have enough energy, but it succeeds if I have enough even though I'm not behind the target. Any explanations for what's happening here? Alternatively, is there any way to test if I'm behind my target?
Granom is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:42 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Advertisement System V2.5 By   Branden