Log in

View Full Version : Managing procs



Nikita
09-19-2011, 05:06 AM
Hi there

Been wanting to setup some kind of proc handling system for my elemental shamans.

What I would like to do is handle procs like Maat does.

Simply have a button which spams Earth Shock, this button wont be clickable until I have 7-9 stacks of Lightning Orbs.

Been toying with Maats script, but with no succsess at all. Any1 got any ideas how to go forward with this?


-------------------------------------------------------------------------
-- FRAMES
-------------------------------------------------------------------------
local addon = CreateFrame("Frame", UIParent)
local numFrames = 4
-- Global table for debugging purpsoe
mh = {}
local mhKey = "mh%d"
for i=1, numFrames do
mh[mhKey:format(i)] = true
mh[mhKey:format(i).."bg"] = true
end
-- Action bar slot size
local posXoffset = 26
local posX = 0
-- generate frames and background
for i=1, numFrames do
mh[mhKey:format(i)] = CreateFrame("Frame", UIParent)
mh[mhKey:format(i).."bg"] = mh[mhKey:format(i)]:CreateTexture("Background", "BACKGROUND")
mh[mhKey:format(i).."bg"]:SetTexture(1, 1, 1, 0.05)
mh[mhKey:format(i).."bg"]:SetAllPoints()
mh[mhKey:format(i)]:SetSize(24,24)
mh[mhKey:format(i)]:SetScript("OnMouseDown", function() end)
posX = posX + posXoffset
mh[mhKey:format(i)]:SetPoint("CENTER", WorldFrame, "CENTER", posX, 375)
end
-------------------------------------------------------------------------
-- Utility
-------------------------------------------------------------------------
local function OnUpdate()
-- Shaman section
if select(2,UnitClass("player")) == "SHAMAN" then
if select(8,GetTalentInfo(3,10)) == 0 then mh.mh1:Hide() mh.mh2:Hide() mh.mh3:Hide() mh.mh4:Hide() return end
-- Ele shaman section
if not UnitBuff("player", "Lightning Shield") then
if UnitPower("player", 9) == 3 then
mh.mh2:Hide()
else
mh.mh2:Show()
end
----------------------------------------------------------------
-- EVENT HANDLING
-------------------------------------------------------------------------
do
local f = CreateFrame("Frame")
local total = 0
f:SetScript("OnUpdate", function(self, elapsed)
total = total + elapsed
if total > 0.2 then
OnUpdate()
total = 0
end
end)
end
addon:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
addon:RegisterEvent("UNIT_POWER")
addon:SetScript("OnEvent", function(self, event, ...)
self[event](self, ...)
end)



Would the lua script be similar to this?


Regards Nikita

Jafula
09-19-2011, 09:25 PM
Simply have a button which spams Earth Shock, this button wont be clickable until I have 7-9 stacks of Lightning Orbs.



I think this will fall under Blizzard's definition of botting. I'm pretty sure the addon system won't let you do this.

Nikita
09-20-2011, 01:00 AM
Its just like an overlay on my earth shock which fades when I have 7-9 staks. Dont see why this wouldnt be legal

ebony
09-20-2011, 02:32 AM
yep this is classed as a automated system Nikita. the best way is useing jmaba to slow when i got it a 9 stack on the char on its own key for each char,

but using overlay that talks to the game would need to read the game memey that is bannble in the tos

Zub
09-20-2011, 02:40 AM
but in any case the overlay would only prevent an actual mouse click. Do you click to spam your Earth Shock?

Nikita
09-20-2011, 05:14 AM
Would it be legal if I used my mouse to click it? Thinking about using Atramedes Shield Clicker addon, and configure it to work with my earth shock. That addon is legal, and will block mouseclicks on your screen until you need to click the shield. This way you can spam click on one spot, and once you need to click that item/shield the overlay fades

Khatovar
09-20-2011, 05:24 AM
Only if you manually manage the mouse. As I stated when I closed that thread, you can not use predetermined coordinates {IE, you click or press a button on your master screen and your mouse moves to X, Y on your slave screens and clicks}.

MiRai
09-20-2011, 08:08 AM
Or you can set up Power Auras to make big glowing things on your screen when you and/or your alts have
the desired amount of stacks.

Fat Tire
09-20-2011, 08:51 AM
Or you can set up Power Auras to make big glowing things on your screen when you and/or your alts have
the desired amount of stacks.

Love power auras

....there is an addon that actually talks to you with this hot weird robot chick voice and will let you know when something is ready or something is used by an enemy player.

Edit: Its called GladiatorlosSA

Nikita
09-20-2011, 09:59 AM
Only if you manually manage the mouse. As I stated when I closed that thread, you can not use predetermined coordinates {IE, you click or press a button on your master screen and your mouse moves to X, Y on your slave screens and clicks}.

What if I add a modifier key to press, then click my mouse on my screen, and the alts copy my mouse click? Wouls be the same way I drop healing rain on my shamans

Khatovar
09-20-2011, 10:39 AM
That should be fine, as long as the mouse is mirrored and not jumping to a specific location no matter where your master's mouse is.

Examples -

You put a button/icon/notification of some fashion at 25 25 on all your screens.

1 - Your mouse is somewhere else. You hit the modifier and your mouse moves itself to 25 25 and starts clicking.


Not acceptable.


<Hotkey X>
<MoveMouse screen 25 25>
<SendWinM wow1>
<ClickMouse>
<SendWinM wow2>
<ClickMouse>
<SendWinM wow3>
<ClickMouse>



2 -You manually move your mouse to 25 25, then hit the button. The mouse clicks at 25 25 on your main screen, but is redirected using altered clickmouse commands


Not Acceptable.


<Hotkey X>
<SendWinM w1>
<ClickMouse Window 25 25>
<SendWinM w2>
<ClickMouse Window 150 275>
<SendWinM w3>
<ClickMouse Window 250 25>



3 - You manually move your mouse to 25 25, then hit the button. The mouse clicks in the same relative position on all screens.


Acceptable.


<UseKeyAsModifier X>
<Hotkey X LButton>
<SendLabel w1, w2, w3, w4, w5>
<Clickmouse %TriggerMainKey%>

Nikita
09-20-2011, 12:07 PM
That should be fine, as long as the mouse is mirrored and not jumping to a specific location no matter where your master's mouse is.

Examples -

You put a button/icon/notification of some fashion at 25 25 on all your screens.

1 - Your mouse is somewhere else. You hit the modifier and your mouse moves itself to 25 25 and starts clicking.


Not acceptable.


<Hotkey X>
<MoveMouse screen 25 25>
<SendWinM wow1>
<ClickMouse>
<SendWinM wow2>
<ClickMouse>
<SendWinM wow3>
<ClickMouse>



2 -You manually move your mouse to 25 25, then hit the button. The mouse clicks at 25 25 on your main screen, but is redirected using altered clickmouse commands


Not Acceptable.


<Hotkey X>
<SendWinM w1>
<ClickMouse Window 25 25>
<SendWinM w2>
<ClickMouse Window 150 275>
<SendWinM w3>
<ClickMouse Window 250 25>



3 - You manually move your mouse to 25 25, then hit the button. The mouse clicks in the same relative position on all screens.


Acceptable.


<UseKeyAsModifier X>
<Hotkey X LButton>
<SendLabel w1, w2, w3, w4, w5>
<Clickmouse %TriggerMainKey%>


Well, is it legal to manage fulmination with the last method there + Atramedes Shield Clicker?

Khatovar
09-20-2011, 02:47 PM
I don't know about the shield clicker. All I can say is I don't use it.

zenga
09-20-2011, 05:30 PM
There is a way to do this all (and much more) without needing to 'automate' stuff. I doubt blizzard intended this, but basically you (ab)use the world map. You check against a stack of lightning shield orbs, if it's more than 7 all good, if not the world map is triggered which prevents the spell from going through. It takes a bit of creativity to set it all up with isboxer and the flow on your actionbar, but it works 100% fine.
In pvp you could use windshear spam, and let your addon check if a spell is interrupted or not, if one of your guys interrupted it, the other ones won't blow their as it gets blocked by the world map. If you find it annoying, you can also change the opacity/transparency of it.

Maat
10-10-2011, 09:19 AM
Since quite a few people were asking for update, or just generally wanted some help of getting it work, here is what I am using right now.

http://www.wowace.com/paste/4058/

I still don't have time to help each and everyone of you to adjust it to your setup. It is still not user friendly, however if you look at the code you might get the general idea and maybe can fix it to suit your own needs.