WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Shift + Click over Unitframe (https://www.wowinterface.com/forums/showthread.php?t=35866)

Elendhriel 10-17-10 06:17 PM

Shift + Click over Unitframe
 
I am trying to get a small script done where I can define a spell that is cast when over a Unit frame and using Shift Left Mouse Click. But I am stuck it doesn't work so far. Basically something I could do with Clique but I just need it for 2 Spells and would like a more lightweight solution for this. Basically the approach would be:

WorldFrame:HookScript("OnMouseDown", function(self, button)
if(button=="LeftButton" and IsShiftKeyDown() and UnitExists("mouseover")) then

Yeah here I am stuck tried several things .....

end
end)

Seerah 10-17-10 07:35 PM

Firstly, why are you using WorldFrame instead of the unit frame? Secondly, casting spells is a secure function and will need more than what you've started with. I've never worked with it myself, so I won't try to give any help which would most likely be wrong. :)


All times are GMT -6. The time now is 08:19 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI