I don't know if anyone has ever found a way to do this, or at least a better way but I wanted to share this code I made to cast thunderstorm. It does require the window to be focused like harvesting used to to require.
So maybe there is a better way... If there is please tell me!
Code: Select all
<onSkillCast>
-- Casts Thunderstorm at the player's window position
if arg1.Name == "MAGE_THUNDERSTORM" then
printf("Casting: Thunderstorm - Focus on Window needed!\n"); --not really needed
addMessage("Casting: Thunderstorm"); --not really needed
-- gets windows Width and Height
local hf_x, hf_y, hf_wide, hf_high = windowRect( getWin());
-- clicks at about 1/3 of window Height which is about where the player always is
player:mouseclickL(hf_wide/2,hf_high*2/3);
yrest(2500); --simulating casttime
end;
</onSkillCast>Any feedback on this will help, thanks.