Thread Tools Display Modes
02-14-12, 07:18 AM   #1
Aalwein
A Flamescale Wyrmkin
 
Aalwein's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 147
cancelling druid shapeshift

Is there a simple way to execute a command to cancel druid shapeshift? From what I've found in the wiki, CancelShapeshiftForm() is a protected command so I can't just throw it in anywhere.

I'm simply trying to have FollowFelankor call Pokedex whenever a whisper to mount is received. Right now I've simply told FollowFelankor to call "Pokedex:ToggleMount()" when it receives the whisper to mount and it works fine as long as I'm not shapeshifted. I don't know nearly enough Lua code to decipher how Pokedex cancels the shapeshift, but obviously the ToggleMount() function doesn't do it.

Basically, I was hoping to just add a "/cancelform" line right before the Pokedex:ToggleMount(), but I just can't figure out how to do it.

Is this something that can easily be done or am I out of my depth on this? If it is something easy, what line should I add there to cancel the shapeshift?
__________________
Aalwein | Jaberwocky
Die by the Arrow | YouTube | Facebook | Twitter
  Reply With Quote
02-14-12, 09:27 AM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Not possible without hardware input (key or mouse click).

Pokedex is probably using secure frames to do that on a click or keybind or in response to very specific macro conditionals that are allowed to run protected code.
Doing it "automatically" is not possible that's the whole point of protected status.
  Reply With Quote
02-14-12, 01:42 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,334
Originally Posted by Dridzt View Post
... Pokedex is probably using secure frames to do that on a click or keybind or in response to very specific macro conditionals that are allowed to run protected code.
Doing it "automatically" is not possible that's the whole point of protected status.
Actually, the CallCompanion() and DismissCompanion() aren't protected functions and could be used as such for mounts, but CancelShapeshift() is protected and can't be used outside of the SecureActionButton templates.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
02-14-12, 02:51 PM   #4
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2010
Posts: 200
I feel like you're allowed to do /run CancelShapeshiftForm() as long as you click/press the macro. I'm not entirely sure though
  Reply With Quote
02-14-12, 04:18 PM   #5
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
I didn't say anything about CallCompanion() the question was specifically about shapeshift.

@Waky:
That also doesn't work but there's /cancelform which is a legitimate macro command.
  Reply With Quote
02-14-12, 06:18 PM   #6
Aalwein
A Flamescale Wyrmkin
 
Aalwein's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 147
I figured there wouldn't be an easy solution, if one at all. Thanks for the feedback guys. Guess I just need to remember to get out of cat form before I get up from the computer!

There's no way to emulate a /click via the addon, right? Because the in-game command to run Pokedex is /click PokedexToggleMountButton
__________________
Aalwein | Jaberwocky
Die by the Arrow | YouTube | Facebook | Twitter

Last edited by Aalwein : 02-14-12 at 06:39 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » cancelling druid shapeshift


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