This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Please help
Post Reply
Return to board index
Post by
nightzz903
So I want a macro to go for a infinite loop the macro is:
/script RepopMe();
/stopattack
/script RetrieveCorpse()
I would be very thankful if someone would do that.
Post by
Nulgar
What would be the application for that?
Macros can call other macros, so it's
technically
possible. But a true infinite loop will eventually crash the game, possibly even the whole computer. It needs a halt condition.
Post by
nightzz903
Okay so it will crash the game maybe even the pc
Then could someone make it so it only activated when the Release Spirit and Revive pop up?
Post by
Nulgar
I'm still unsure what you want to achieve. There are probably better solutions than an endless loop.
Post by
1048263
This post was from a user who has deleted their account.
Post by
nightzz903
I want a macro that will auto revive you when you come to your corpse so you don't have to click on the button so this:
/script RepopMe();
/stopattack
/script RetrieveCorpse()
Clicks the Release Spirit(RepopMe(); )
and Revive(RetrieveCorpse() )
But I still have to click on the macro itself on the action bar. I want it to do that for itself
So if I die it will click the Release automatically and when I come to my corpse it will ress auto aswell
Post by
Myrroddin
I don't think you can do it via a macro, as macros must have a hardware event like a key or mouse button press. I did find
http://www.curse.com/addons/wow/sdsmartres
which is outdated, but might still work if you enable load out of date addons.
Post by
Nulgar
Like Myrroddin said, you still need to perform an action, a hardware event to trigger something. You can use the two script commands in a macro that is bound to some key - since the functions don't do anything when you're alive, you can even combine them with your main ability:
#showtooltip
/script RepopMe();
/script RetrieveCorpse()
/cast Fireball
Post by
digitalutopia1
It's possible to do - just not in a macro, unless you shove it in an OnUpdate event, and I don't even want to guess how bad that would lock you up.
An addon is the best way to do it, as you would have enough characters to respond to the "CORPSE_IN_RANGE" and "PLAYER_DEAD" events, as well as be able to check if there's a timer on being able to res.
Something like this is what you'd be looking for
local f=CreateFrame("Frame",nil);
f:RegisterEvent("CORPSE_IN_RANGE");
f:RegisterEvent("PLAYER_DEAD");
f:SetScript("OnEvent",function(self,event,...)
if(event=="PLAYER_DEAD") then
RepopMe()
elseif(GetCorpseRecoveryDelay()==0) then
RetrieveCorpse()
end
);
f:SetScript("OnUpdate",function(self,event,...)
if(UnitIsDead("player")==1 and GetCorpseRecoveryDelay()==0) then
RetrieveCorpse();
end
);
Note: I haven't tested this to see how well it works, this is just basing it off of existing events/API that would seem to work.
Post by
22686
This post was from a user who has deleted their account.
Post by
1048263
This post was from a user who has deleted their account.
Post by
digitalutopia1
an OnUpdate script wouldn't hurt that much. A LOT of things are already going on every frame :P
I went ahead and hooked the OnUpdate function for staticpopup frames, since they are visible (and therefore will only call OnUpdate) when the criteria for the actions in question are met - so no pesky event monitoring required on our part :P
(And the reason for using OnUpdate instead of OnShow is because recovering a corpse the moment you are in range rarely works. And then there's the res timer of course.)
There's a toggleable version (with announce) and an always-on (well, until the end of a session that is :P) version. Choose one.
Toggle:/run local a=AUTODIE a=a and a%2+1 or hooksecurefunc("StaticPopup_OnUpdate",function(s)if AUTODIE==1 and(s.which=="DEATH"or s.which=="RECOVER_CORPSE")then s.button1:Click()end end)or 1 AUTODIE=a print("<automatic (un)die'eing> "..(a==1 and"ON"or"OFF"))
always on (/reload to get rid of it):/run AUTODIE=AUTODIE or hooksecurefunc("StaticPopup_OnUpdate",function(s)if AUTODIE==1 and(s.which=="DEATH"or s.which=="RECOVER_CORPSE")then s.button1:Click()end end)or 1
Yes, but not all "things" are the same. Both RepopMe() and RetrieveCorpse() require server verification before they can be processed - and depending on what kind of limits Blizzard places on such functions, it could cause a lot of issues if you called it on each frame.
Using OnUpdate itself isn't bad - but what you actually
do
on every frame, can be.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.