Thread Tools Display Modes
10-06-14, 11:34 AM   #1
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
CastSpellByID() blocked or not?

Hey all,

I've found something strange with CastSpellByID.

Code:
/script CastSpellByID(31707)
(http://www.wowhead.com/spell=31707)
does work


Code:
/script CastSpellByID(33395)
(http://www.wowhead.com/spell=33395)
is blocked.

Why does the first macro work and the second is blocked?? I can't see any difference.
  Reply With Quote
10-06-14, 11:51 AM   #2
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
Maybe because it is an instant cast?
__________________
◘◘ Author of MiirGui Texture Pack - [Core] [Blue] [Grey] ◘◘
  Reply With Quote
10-06-14, 12:49 PM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You are allowed to use CastSpellByID/CastSpellByName with professions spells (eg. CastSpellByName("Alchemy") to open the tradeskill frame for alchemy) but not for actual spells. Either pet spells are also allowed, or this specific spell is allowed by accident. I would recommend against using either function at all, though, as there are other ways to open the tradeskill frame, and you probably should not be auto-casting pet spells from an addon, as if the spell is being allowed by accident, such behavior may flag your account as using some kind of bot or hack.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-06-14, 01:49 PM   #4
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by Phanx View Post
You are allowed to use CastSpellByID/CastSpellByName with professions spells (eg. CastSpellByName("Alchemy") to open the tradeskill frame for alchemy) but not for actual spells. Either pet spells are also allowed, or this specific spell is allowed by accident. I would recommend against using either function at all, though, as there are other ways to open the tradeskill frame, and you probably should not be auto-casting pet spells from an addon, as if the spell is being allowed by accident, such behavior may flag your account as using some kind of bot or hack.
Well, I was assuming that CastSpellByID would be blocked for all spells. That's why I'm asking.

Could someone report this to the US forum? I really would like to know if this behavior is accidentally or intentionally.
  Reply With Quote
10-06-14, 01:50 PM   #5
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by Miiru View Post
Maybe because it is an instant cast?
Maybe. Unfortunately the only pet I have access to is the Water Elemental. So I can't test this with other instant pet spells.

Last edited by Duugu : 10-06-14 at 01:52 PM.
  Reply With Quote
10-07-14, 05:47 AM   #6
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
Originally Posted by Duugu View Post
Maybe. Unfortunately the only pet I have access to is the Water Elemental. So I can't test this with other instant pet spells.
On Hunter-Pet Instant Spells like Growl(2649) or Bullheaded(53490), theres no blocked message. Just tested this on ptr.

edit: gonna test some 'attack-spells'

edit2: if i could find any
__________________
◘◘ Author of MiirGui Texture Pack - [Core] [Blue] [Grey] ◘◘

Last edited by Miiru : 10-07-14 at 06:22 AM.
  Reply With Quote
10-07-14, 07:50 AM   #7
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by Miiru View Post
On Hunter-Pet Instant Spells like Growl(2649) or Bullheaded(53490), theres no blocked message. Just tested this on ptr.

edit: gonna test some 'attack-spells'

edit2: if i could find any
I've tested some non-pet instant spells too. All of them where blocked as expected.
Seems to be intentionally then. Don't know why they explicit allow pet instant spells. Doesn't make much sense. *shrug*
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » CastSpellByID() blocked or not?

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

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